How to convert RGRG/GBGB format to RGB or YUV format?


Is there any way to convert 12-bit Bayer RGRG/GBGB to RGB or YUV?
I found that mmapi does not support.


There is no support for debayer in Isaac SDK 2021.1 itself. You can however process raw Bayer using VPI (Vision Programming Interface) as described in this post: Debayering with VPI

There is a chance , however , to emulate v4l2 camera from bayers camera via a loopback, but it has high computation cost for CPU so not a great thing in terms of performance. but nevertheless it works e.g. with default AGX devkit sensor etc in a way it becomes possible to use it as a generic webcamera e.g. for web browser conferences etc

gst-launch-1.0 -v nvarguscamerasrc ! 'video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080, framerate=30/1' ! nvvidconv ! 'video/x-raw, width=640, height=480, format=I420, framerate=30/1' ! videoconvert ! identity drop-allocation=1 ! 'video/x-raw, width=640, height=480, format=RGB, framerate=30/1' ! v4l2sink device=/dev/video2

ref: VizioChron - Xavier