GStreamer Color Transfer Tegra Pipelines
GStreamer Color Transfer |
---|
GStreamer Color Transfer Basics |
Evaluating GstColorTransfer |
Building GStreamer Color Transfer |
PC Pipelines |
Tegra Pipelines |
Troubleshooting |
Releases |
Contact Us |
This page provides example pipelines to test GstColorTransfer features on a NVIDIA Jetson TX1 or TX2. These pipelines were tested in JetPack-3.1.
|
GStreamer pipelines
Each pipeline consist on a reference stream "ref", target stream "tar", color transfer element "mix" and displays for the reference and target streams "refsink, tarsink". The sinks forthe target and reference image are completely optional and should be removed for better performance.
"image-overlap" determines the overlap between reference and target image. It assumes reference image is on the left and target on the right. It is a normalized value where 1 indicates 100% (reference and target images are completely overlapped) and 0 turns off the color mapping completely.
videotestsrc -> ball
This pipeline transfer the color distribution from the default video test source to the ball video test source. When the value "image-overlap" is changed to 0 the output image is just the regular ball video test source. For any other value of "image-overlap" the ball represents the only change on the target color distribution, so when the ball is inside the overlap region the mapping is performed, but when it is outside all the color get mapped to black.
gst-launch-1.0 \ videotestsrc ! "video/x-raw,width=640,height=480" ! tee name=ref \ videotestsrc pattern=ball ! "video/x-raw,width=640,height=480" ! tee name=tar \ colortransfer name=mix image-overlap=1 ! nvvidconv ! nvoverlaysink \ ref. ! queue ! videoconvert ! "video/x-raw,format=RGBA" ! mix. \ tar. ! queue ! videoconvert ! "video/x-raw,format=RGBA" ! mix.
videotestsrc -> ball (1080p)
gst-launch-1.0 \ videotestsrc ! "video/x-raw,width=1920,height=1080" ! tee name=ref \ videotestsrc pattern=ball ! "video/x-raw,width=1920,height=1080" ! tee name=tar \ colortransfer name=mix image-overlap=1 ! queue ! nvvidconv ! nvoverlaysink sync=false \ ref. ! "video/x-raw,format=RGBA" ! queue ! mix. \ tar. ! "video/x-raw,format=RGBA" ! queue ! mix.
videotestsrc -> nvcamerasrc
This pipeline uses the default video test source as the reference and a camera source as target.
gst-launch-1.0 \ videotestsrc ! "video/x-raw,width=100,height=100" ! tee name=ref \ nvcamerasrc fpsRange="30.0 30.0" ! "video/x-raw(memory:NVMM),width=1936,height=1100" ! tee name=tar \ colortransfer name=mix image-overlap=0.06 ! nvvidconv ! nvoverlaysink \ ref. ! videoconvert ! "video/x-raw,format=RGBA" ! mix. \ tar. ! nvvidconv ! "video/x-raw,format=RGBA" ! mix.
v4l2src1 -> nvcamerasrc
This pipeline uses the TX1/TX2 default camera as a target via nvcaerasrc and a second camera connected by USB as the reference
gst-launch-1.0 \ v4l2src device=/dev/video1 ! 'video/x-raw, width=1280, height=720' ! tee name=ref \ nvcamerasrc ! 'video/x-raw(memory:NVMM), width=1280, height=720' ! tee name=tar \ colortransfer name=mix image-overlap=1 ! nvvidconv ! 'video/x-raw(memory:NVMM)' ! nvvidconv ! xvimagesink async=false \ ref. ! queue ! xvimagesink async=false name=refsink \ tar. ! queue ! nvvidconv ! xvimagesink async=false name=tarsink \ ref. ! queue ! nvvidconv ! 'video/x-raw(memory:NVMM)' ! nvvidconv ! "video/x-raw,format=RGBA" ! mix. \ tar. ! queue ! nvvidconv ! "video/x-raw,format=RGBA" ! mix.
v4l2src1 -> nvcamerasrc (without visual feedback)
Same as the previous pipeline, but only displaying the output on nvoverlaysink.
gst-launch-1.0 \ v4l2src device=/dev/video1 ! 'video/x-raw, width=1280, height=720' ! tee name=ref \ nvcamerasrc ! 'video/x-raw(memory:NVMM), width=1280, height=720' ! tee name=tar \ colortransfer name=mix image-overlap=1 ! nvvidconv ! nvoverlaysink sync=false \ ref. ! queue ! nvvidconv ! 'video/x-raw(memory:NVMM)' ! nvvidconv ! "video/x-raw,format=RGBA" ! mix. \ tar. ! queue ! nvvidconv ! "video/x-raw,format=RGBA" ! mix.