Same nvcamersrc piplie but with different results on python and c++

Hi,

I used the same pipeline to read video streams from a csi camera,

nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)I420, framerate=(fraction)30/1 ! nvvidconv ! video/x-raw,format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink

. Python version gives normal images, but c++ version get a VIDEOIO ERROR:

VIDEOIO ERROR: V4L: device nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)I420, framerate=(fraction)30/1 ! nvvidconv ! video/x-raw,format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink : Unable to query number of channels

.
The image is like:

Jetpack: 3.3
Opencv: Both opencv 3.3.0 and 3.4.0 are installed, but 3.4.0 is used.

Thx.

Hi,
We have verified it and share a sample in below post:
[url]https://devtalk.nvidia.com/default/topic/1024245/jetson-tx2/opencv-3-3-and-integrated-camera-problems-/post/5210735/#5210735[/url]
Please refer to it.

thx.