Using custom camera in OpenCV (via GStreamer)

前端 未结 2 1394
面向向阳花
面向向阳花 2020-12-03 02:25

I\'m using Nitrogen6x board with ov5640 camera(mipi).

The camera is not using standard v4l/v4l, but we can stream video using GStreamer for its driver (mfw_v4l):

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-03 02:32

    Looks like we can call the camera using a proper GStreamer pipeline like below:

    VideoCapture cap("mfw_v4lsrc ! ffmpegcolorspace ! video/x-raw-rgb ! appsink")
    

    as the camera output is in YUV, we need to convert that to RGB to pass the frames to OpenCV. This is where OpenCV makes sure it gets RGB colorspace.

提交回复
热议问题