-
Notifications
You must be signed in to change notification settings - Fork 231
Tests
Yinhang Liu edited this page Sep 10, 2019
·
210 revisions
Usage: test-surround-view --module MODULE --input0 input.nv12 --input1 input1.nv12 --input2 input2.nv12 ...
--module processing module, selected from: soft, gles, vulkan
read calibration files from exported path $FISHEYE_CONFIG_PATH
--input0 input image(NV12)
--input1 input image(NV12)
--input2 input image(NV12)
--input3 input image(NV12)
--output output image(NV12/MP4)
--in-w optional, input width, default: 1280
--in-h optional, input height, default: 800
--out-w optional, output width, default: 1920
--out-h optional, output height, default: 640
--topview-w optional, output width, default: 1280
--topview-h optional, output height, default: 720
--scale-mode optional, scaling mode for geometric mapping,
select from [singleconst/dualconst/dualcurve], default: singleconst
--fm-mode optional, feature match mode,
select from [none/default/cluster/capi], default: none
--frame-mode optional, times of buffer reading, select from [single/multi], default: multi
--save optional, save file or not, select from [true/false], default: true
--save-topview optional, save top view video, select from [true/false], default: false
--loop optional, how many loops need to run, default: 1
--help usage
The calibration files(intrinsic paramters and extrinsic parameters) should be stored in "FISHEYE_CONFIG_PATH" directory, and then export the path:
export FISHEYE_CONFIG_PATH=/etc/xcam/calibration
1) GLES module
a. NV12 output
$ test-surround-view --module gles --input0 input0.nv12 --input1 input1.nv12 --input2 input2.nv12 --input3 input3.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1920 --out-h 640 --topview-w 1280 --topview-h 720 --scale-mode dualconst --fm-mode default --frame-mode multi --save true --save-topview true --loop 1
b. MP4 output
$ test-surround-view --module gles --input0 input0.nv12 --input1 input1.nv12 --input2 input2.nv12 --input3 input3.nv12 --output output.mp4 --in-w 1280 --in-h 800 --out-w 1920 --out-h 640 --topview-w 1280 --topview-h 720 --scale-mode dualconst --fm-mode default --frame-mode multi --save true --save-topview true --loop 1
2) Vulkan module
a. NV12 output
$ test-surround-view --module vulkan --input0 input0.nv12 --input1 input1.nv12 --input2 input2.nv12 --input3 input3.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1920 --out-h 640 --topview-w 1280 --topview-h 720 --scale-mode singleconst --fm-mode default --frame-mode multi --save true --save-topview true --loop 1
b. MP4 output
$ test-surround-view --module vulkan --input0 input0.nv12 --input1 input1.nv12 --input2 input2.nv12 --input3 input3.nv12 --output output.mp4 --in-w 1280 --in-h 800 --out-w 1920 --out-h 640 --topview-w 1280 --topview-h 720 --scale-mode singleconst --fm-mode default --frame-mode multi --save true --save-topview true --loop 1
3) CPU module
a. NV12 output
$ test-surround-view --module soft --input0 input0.nv12 --input1 input1.nv12 --input2 input2.nv12 --input3 input3.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1920 --out-h 640 --topview-w 1280 --topview-h 720 --scale-mode dualcurve --fm-mode capi --frame-mode multi --save true --save-topview true --loop 1
b. MP4 output
$ test-surround-view --module soft --input0 input0.nv12 --input1 input1.nv12 --input2 input2.nv12 --input3 input3.nv12 --output output.mp4 --in-w 1280 --in-h 800 --out-w 1920 --out-h 640 --topview-w 1280 --topview-h 720 --scale-mode dualcurve --fm-mode capi --frame-mode multi --save true --save-topview true --loop 1
1) GLES module
$ test-surround-view --module gles --input0 input0.nv12 --input1 input1.nv12 --input2 input2.nv12 --input3 input3.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1920 --out-h 640 --topview-w 1280 --topview-h 720 --scale-mode dualconst --fm-mode default --frame-mode multi --save false --save-topview false --loop 1000
2) Vulkan module
$ test-surround-view --module vulkan --input0 input0.nv12 --input1 input1.nv12 --input2 input2.nv12 --input3 input3.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1920 --out-h 640 --topview-w 1280 --topview-h 720 --scale-mode singleconst --fm-mode default --frame-mode multi --save false --save-topview false --loop 1000
3) CPU module
$ test-surround-view --module soft --input0 input0.nv12 --input1 input1.nv12 --input2 input2.nv12 --input3 input3.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1920 --out-h 640 --topview-w 1280 --topview-h 720 --scale-mode dualcurve --fm-mode capi --frame-mode multi --save false --save-topview false --loop 1000
Usage: test-image-stitching --input file --output file [--output-w width] [--input-h height] ...
--input input image(NV12)
--output output image(NV12)
--input-w optional, input width, default: 1920
--input-h optional, input height, default: 1080
--output-w optional, output width, default: 1920
--output-h optional, output width, default: 960
--res-mode optional, image resolution mode, select from [1080p/1080p4/4k/8k6], default: 1080p
--surround-mode optional, stitching surround mode, select from [sphere, bowl], default: sphere
--scale-mode optional, image scaling mode, select from [local/global], default: local
--enable-seam optional, enable seam finder in blending area, default: no
--enable-fisheyemap optional, enable fisheye map, default: no
--enable-lsc optional, enable lens shading correction, default: no
--fm optional, enable or disable feature match, default: true
--fisheye-num optional, the number of fisheye lens, default: 2
--save optional, save file or not, select from [true/false], default: true
--save-topview optional, save top view videos, select from [true/false], default: false
--save-freeview optional, save free(rectified) view videos, select from [true/false], default: false
--framerate optional, framerate of saved video, default: 30.0
--loop optional, how many loops need to run for performance test, default: 1
--help usage
For surround view mode, the calibration files(intrinsic paramters and extrinsic parameters) should be stored in "FISHEYE_CONFIG_PATH" directory, and then export the path:
export FISHEYE_CONFIG_PATH=/etc/xcam/calibration
1) Panorama mode (2-camera)
$ test-image-stitching --input input.nv12 --output output.mp4 --input-w 1920 --input-h 1080 --output-w 1920 --output-h 960 --surround-mode sphere --scale-mode local --enable-fisheyemap --res-mode 1080p --fm-ocl false --framerate 30.0 --save true --loop 1
2) Surround view mode (4-camera)
$ test-image-stitching --input input0.nv12 --input input1.nv12 --input input2.nv12 --input input3.nv12 --output output.mp4 --input-w 1280 --input-h 800 --output-w 1920 --output-h 640 --scale-mode local --enable-fisheyemap --res-mode 1080p4 --surround-mode bowl --fm-ocl false --framerate 30.0 --fisheye-num 4 --save true --loop 1
1) Panorama mode (2-camera)
$ test-image-stitching --input input.nv12 --output output.mp4 --input-w 1920 --input-h 1080 --output-w 1920 --output-h 960 --surround-mode sphere --scale-mode local --enable-fisheyemap --res-mode 1080p --fm-ocl false --framerate 30.0 --save false --loop 1000
2) Surround view mode (4-camera)
$ test-image-stitching --input input0.nv12 --input input1.nv12 --input input2.nv12 --input input3.nv12 --output output.mp4 --input-w 1280 --input-h 800 --output-w 1920 --output-h 640 --scale-mode local --enable-fisheyemap --res-mode 1080p4 --surround-mode bowl --fm-ocl false --framerate 30.0 --fisheye-num 4 --save false --loop 1000
Usage: test-gles-handler --type TYPE --input0 input.nv12 --input1 input1.nv12 --output output.nv12 ...
--type processing type, selected from: copy, remap, blend
--input0 input image(NV12)
--input1 input image(NV12)
--output output image(NV12/MP4)
--in-w optional, input width, default: 1280
--in-h optional, input height, default: 800
--out-w optional, output width, default: 1280
--out-h optional, output height, default: 800
--save optional, save file or not, select from [true/false], default: true
--loop optional, how many loops need to run, default: 1
--help usage
1) Copy test
$ test-gles-handler --type copy --input0 input0.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save true --loop 1000
2) Remap test
$ test-gles-handler --type remap --input0 input0.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save true --loop 1000
3) Blend test
$ test-gles-handler --type blend --input0 input0.nv12 --input1 input1.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save true --loop 1000
1) Copy test
$ test-gles-handler --type copy --input0 input0.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save false --loop 1000
2) Remap test
$ test-gles-handler --type remap --input0 input0.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save false --loop 1000
3) Blend test
$ test-gles-handler --type blend --input0 input0.nv12 --input1 input1.nv12 --output output.mp4 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save false --loop 1000
Usage: test-vk-handler --type TYPE --input0 input.nv12 --input1 input1.nv12 --output output.nv12 ...
--type processing type, selected from: copy, remap, blend
--input0 input image(NV12)
--input1 input image(NV12)
--output output image(NV12/MP4)
--in-w optional, input width, default: 1280
--in-h optional, input height, default: 800
--out-w optional, output width, default: 1280
--out-h optional, output height, default: 800
--save optional, save file or not, select from [true/false], default: true
--loop optional, how many loops need to run, default: 1
--help usage
1) Copy test
$ test-vk-handler --type copy --input0 input0.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save true --loop 1000
2) Remap test
$ test-vk-handler --type remap --input0 input0.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save true --loop 1000
3) Blend test
$ test-vk-handler --type blend --input0 input0.nv12 --input1 input1.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save true --loop 1
1) Copy test
$ test-vk-handler --type copy --input0 input0.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save false --loop 1000
2) Remap test
$ test-vk-handler --type remap --input0 input0.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save false --loop 1000
3) Blend test
$ test-vk-handler --type blend --input0 input0.nv12 --input1 input1.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save false --loop 1000
Usage: test-soft-image --type TYPE --input0 input.nv12 --input1 input1.nv12 --output output.nv12 ...
--type processing type, selected from: blend, remap
--input0 input image(NV12)
--input1 input image(NV12)
--output output image(NV12/MP4)
--in-w optional, input width, default: 1280
--in-h optional, input height, default: 800
--out-w optional, output width, default: 1280
--out-h optional, output height, default: 800
--save optional, save file or not, select from [true/false], default: true
--loop optional, how many loops need to run, default: 1
--help usage
1) Remap test
$ test-soft-image --type remap --input0 input0.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save true --loop 1000
2) Blend test
$ test-vk-handler --type blend --input0 input0.nv12 --input1 input1.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save true --loop 1000
1) Remap test
$ test-soft-image --type remap --input0 input0.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save false --loop 1000
2) Blend test
$ test-vk-handler --type blend --input0 input0.nv12 --input1 input1.nv12 --output output.nv12 --in-w 1280 --in-h 800 --out-w 1280 --out-h 800 --save false --loop 1000
Usage: test-video-stabilization --input file --output file [--input-w width] [--input-h height] ...
--input input image(NV12)
--output output image(NV12)
--input-w optional, input width; default:1920
--input-h optional, input height; default:1080
--gyro input gyro pose data
--save optional, save file or not, select from [true/false], default: true
--loop optional, how many loops need to run for performance test, default: 1
--help usage
$ test-video-stabilization --input input.nv12 --output output.mp4 --gyro gyro-data.csv --save true
$ test-video-stabilization --input input.nv12 --output output.mp4 --gyro gyro-data.csv --save false --loop 100
Usage: test-cl-image [-t type] [-f format] ... [-i input] [-o output]
-t type specify image handler type
select from [demo, csc, dcp, wavelet-haar, 3d-denoise, fisheye]
-f input_format specify a input format
-W image width specify input image width
-H image height specify input image height
-g output_format specify a output format
select from [NV12, BA10, RGBA]
-i input specify input file path
-o output specify output file path
-c csc_type specify csc type, default:rgba2nv12
select from [rgbatonv12, yuyvtorgba, nv12torgba]
-h help
1) Demo test
$ test-cl-image -t demo -f BA10 -i <inputfile> -o <outputfile>
e.g.: $ test-cl-image -t demo -f BA10 -i capture.raw -o demo.raw
2) Color conversion test
a. RGBA to NV12
$ test-cl-image -t csc -f RGBA -i <inputfile> -o <outputfile> -c rgbatonv12
e.g.: $ test-cl-image -t csc -f RGBA -i macc.rgba -o csc.nv12 -c rgbatonv12
b. NV12 to RGBA
$ test-cl-image -t csc -f NV12 -i <inputfile> -o <outputfile> -c nv12torgba
e.g.: $ test-cl-image -t csc -f NV12 -i macc.nv12 -o macc.rgba -c nv12torgba
3) Dcp test
$ test-cl-image -t dcp -f NV12 -i <inputfile> -o <outputfile>
e.g.: $ test-cl-image -t dcp -f NV12 -i input.nv12 -o output.nv12
4) Wavelet test
a. Haar-wavelet
$ test-cl-image -t wavelet-haar -f NV12 -i <inputfile> -o <outputfile>
e.g.: $ test-cl-image -t wavelet-haar -f NV12 -i input.nv12 -o output.nv12
5) 3D-Denoise test
$ test-cl-image -t 3d-denoise -f NV12 -i <inputfile> -o <outputfile>
e.g.: $ test-cl-image -t 3d-denoise -f NV12 -i input.nv12 -o output.nv12
6) fisheye test
$ test-cl-image -t 3d-denoise -f NV12 -i <inputfile> -o <outputfile>
e.g.: $ test-cl-image -t fisheye -f NV12 -i input.nv12 -o output.nv12
Command on linux PC:
$ gst-launch-1.0 -v tcpserversrc host=0.0.0.0 port=3000 ! queue max-size-bytes=0 ! h264parse ! queue ! avdec_h264 ! videoconvert ! video/x-raw, format=BGRx ! ximagesink sync=false
Command on camera device:
$ gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12,width=1920,height=1080 ! xcamfilter copy-mode=1 ! queue ! vaapiencode_h264 rate-control=cbr ! tcpclientsink host="192.168.1.3" port=3000 blocksize=1024000 sync=false
Command on linux PC:
$ gst-launch-1.0 -v tcpserversrc host=0.0.0.0 port=3000 ! queue max-size-bytes=0 ! h264parse ! queue ! avdec_h264 ! videoconvert ! video/x-raw, format=BGRx ! ximagesink sync=false
Command on camera device:
1) Normal preview
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 ! queue ! vaapiencode_h264 rate-control=cbr ! tcpclientsink host="192.168.1.3" port=3000 blocksize=1024000 sync=false
2) Haar-Wavelet preview
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 wavelet-mode=5 ! queue ! vaapiencode_h264 rate-control=cbr ! tcpclientsink host="192.168.1.3" port=3000 blocksize=1024000 sync=false
3) Haar-BayesShrink preview
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 wavelet-mode=6 ! queue ! vaapiencode_h264 rate-control=cbr ! tcpclientsink host="192.168.1.3" port=3000 blocksize=1024000 sync=false
4) Dcp preview
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 defog-mode=dcp ! queue ! vaapiencode_h264 rate-control=cbr ! tcpclientsink host="192.168.1.3" port=3000 blocksize=1024000 sync=false
5) Wireframe preview (need face detection plugin)
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 enable-wireframe=true ! queue ! vaapiencode_h264 rate-control=cbr ! tcpclientsink host="192.168.1.3" port=3000 blocksize=1024000 sync=false
6) 3D-Denoise preview
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 denoise-3d=yuv ! queue ! vaapiencode_h264 rate-control=cbr ! tcpclientsink host="192.168.1.3" port=3000 blocksize=1024000 sync=false
7) DVS preview
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 buffercount=32 enable-warp=1 ! queue ! vaapiencode_h264 rate-control=cbr ! tcpclientsink host="192.168.1.3" port=3000 blocksize=1024000 sync=false
8) Stitch preview
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 enable-stitch=true stitch-scale=local stitch-fisheye-map=true stitch-lsc=true stitch-fm-ocl=true stitch-res-mode=1080p ! video/x-raw, foramt=NV12, width=1920, height=960 ! queue ! vaapiencode_h264 rate-control=cbr ! tcpclientsink host="192.168.1.3" port=3000 blocksize=1024000 sync=false
Command on camera device:
1) Normal preview
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 enable-wireframe=true ! queue ! vaapiencode_h264 rate-control=cbr ! qtmux ! filesink location=test.mp4
2) Haar-Wavelet preview
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 wavelet-mode=5 ! queue ! vaapiencode_h264 rate-control=cbr ! qtmux ! filesink location=test.mp4
3) Haar-BayesShrink preview
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 wavelet-mode=6 ! queue ! vaapiencode_h264 rate-control=cbr ! qtmux ! filesink location=test.mp4
4) Dcp preview
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 defog-mode=dcp ! queue ! vaapiencode_h264 rate-control=cbr ! qtmux ! filesink location=test.mp4
5) Wireframe preview (need face detection plugin)
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 enable-wireframe=true ! queue ! vaapiencode_h264 rate-control=cbr ! qtmux ! filesink location=test.mp4
6) 3D-Denoise preview
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 denoise-3d=yuv ! queue ! vaapiencode_h264 rate-control=cbr ! qtmux ! filesink location=test.mp4
7) DVS preview
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 buffercount=32 enable-warp=1 ! queue ! vaapiencode_h264 rate-control=cbr ! qtmux ! filesink location=test.mp4
8) Stitch preview
$ gst-launch-1.0 filesrc location=input.nv12 ! videoparse width=1920 height=1080 format=nv12 ! xcamfilter copy-mode=1 enable-stitch=true stitch-scale=local stitch-fisheye-map=true stitch-lsc=true stitch-fm-ocl=true stitch-res-mode=1080p ! video/x-raw, foramt=NV12, width=1920, height=960 ! queue ! vaapiencode_h264 rate-control=cbr ! qtmux ! filesink location=test.mp4
Usage: test-dnn-inference [--input filename] [--model-name xx.xml] [--target-dev cpu] [--save 1]
--target-dev target device, default: CPU
--model-file model file name
--input input image
--save save output image
--help usage
Releases
- libxcam 1.5.0 release
- libxcam 1.4.0 release
- libxcam 1.3.0 release
- libxcam 1.2.2 release
- libxcam 1.2.1 release
- libxcam 1.2.0 release
- libxcam 1.1.0 release
- libxcam 1.0.0 release
- libxcam 0.9.0 release
- libxcam 0.8.0 release
- libxcam 0.7.0 release
- libxcam 0.6.1 release
- libxcam 0.6.0 release
- libxcam 0.5.0 release
- libxcam 0.4.0 release
- libxcam 0.2.1 release
- libxcam 0.2.0 release