Is it possible to extract only Y data from GStreamer YUV images?

Hello,

I am developing with NX.
Get the YUV image of the camera with the following command:

SENSOR_ID=0
WIDTH=3840
HEIGHT=2160

gst-launch-1.0 v4l2src device=/dev/video$SENSOR_ID \
 	! "video/x-raw, format=(string)UYVY, width=(int)$WIDTH, height=(int)$HEIGHT" \
 	! multifilesink location=/tmp/%d.yuv max-files=100 -e

Is it possible to extract only Y Data with GStreamer options?

Hi,
The format of single Y plane is GRAY8 so you can extract the pane through videoconvert plugin:

gst-launch-1.0 v4l2src device=/dev/video$SENSOR_ID \
 	! "video/x-raw, format=(string)UYVY, width=(int)$WIDTH, height=(int)$HEIGHT" \
 	! videoconvert ! "video/x-raw, format=(string)GRAY8" \
 	! multifilesink location=/tmp/%d.yuv max-files=100 -e
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.