VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV

I’m getting the above issue.

Here is the output of

v4l2-ctl -d /dev/video0 --list-formats


	Index       : 0
	Type        : Video Capture
	Pixel Format: 'RGGB'
	Name        : 8-bit Bayer RGRG/GBGB

	Index       : 1
	Type        : Video Capture
	Pixel Format: 'RG10'
	Name        : 10-bit Bayer RGRG/GBGB

	Index       : 2
	Type        : Video Capture
	Pixel Format: 'BG10'
	Name        : 10-bit Bayer BGBG/GRGR

	Index       : 3
	Type        : Video Capture
	Pixel Format: 'RG12'
	Name        : 12-bit Bayer RGRG/GBGB

I did cmake with following option:


and then did



Following is build_information part for videoio:

--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  NO
--     FFMPEG:                      YES
--       avcodec:                   YES (ver 56.60.100)
--       avformat:                  YES (ver 56.40.101)
--       avutil:                    YES (ver 54.31.100)
--       swscale:                   YES (ver 3.1.101)
--       avresample:                NO
--     GStreamer:                   NO
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     Aravis SDK:                  NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    NO/YES
--     XIMEA:                       NO
--     Xine:                        NO
--     Intel Media SDK:             NO
--     gPhoto2:                     NO

Let me know where I’m doing wrong

It is unclear what you are trying to do, but it seems you are trying to use the onboard camera with opencv.
The onboard camera with v4l2 works only in 10 bits modes. (you may check:

Opencv expects 8bits BGR. So you would have to build opencv with gstreamer support (not gstreamer-0.10).
Then you could get frames from onboard camera in opencv (see:

Thanks for your reply.

I’m trying to onboard logitech WebCam.