问题
This is my camera picture:
My camera is special (Not a pure binocular camera), has one usb interface but two device numbersthe. device:/dev/video0 is about left and right camera images, device:/dev/video1 is the depth of the image combined with left and right cameras, I used gscam (gstream) driven out / dev / video0 is this case:The left and right camera images are in a window inside:
How to separate them? divided into two windows, let the left and right camera images are displayed separately?
回答1:
You will probably have to use a tee and two videocrop elements to cut out the pictures.
回答2:
The solution provided is next. Using a width=1280, height=480
videotestsrc the cropping could be done using videocrop
plugin and a tee
.
gst-launch-1.0 videotestsrc pattern=0 ! video/x-raw, width=1280, height=480 ! tee name=t ! videocrop left=640 ! queue ! ximagesink t. ! videocrop right=640 ! queue ! ximagesink
In gstreamer 0.10, the pipeline would be next:
gst-launch-0.10 videotestsrc pattern=0 ! video/x-raw-yuv, width=1280, height=480 ! ffmpegcolorspace ! tee name="t" ! videocrop left=640 ! queue ! ximagesink t. ! videocrop right=640 ! queue ! ximagesink
The original source is the SMPTE color bars from the videotestsrc. The resulting crop is shown in the next link. Adjusting it to your needs, you should have your two separated video images.
来源:https://stackoverflow.com/questions/42064531/gstreamer-ubuntu-gscam-how-to-separate-my-camra-left-and-right-images