Color difference between argus_camera software and Gstreamer pipeline


I am using this gstreamer pipeline to capture video from csi camera. The color of the image produced by using pipeline is very different with the image recorded using argus_camera software(default setting). Is there a solution to achieve similar color with image output from the argus_camera software.

cap = cv2.VideoCapture("nvarguscamerasrc sensor-id=0 sensor-mode=2 wbmode=0 ! video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1 ! nvvidconv ! video/x-raw, width=1280, height=720, format=BGRx ! videoconvert ! video/x-raw, format=BGR ! appsink", cv2.CAP_GSTREAMER)

ret, frame =


You may need to confirm these two APP launch the same sensor mode.
Also check wbmode setting is the same.

Hi ShaneCCC,

Thank you for your suggestion.
Below is default setting from argus_camera.

I have tried using the same setting and tuning different sensor mode + wbmode but they still look different.

When launching the camera, Gstreamer log shows that my setting have Invalid Gain Range input and Invalid Exposure Time Range Input, this maybe the reason.

After checking some threads on the forum, e.g Link, I found that I need to modify gstnvarguscamerasrc.cpp and build this lib again, besides, I need to download some jetpack patches to fix the error “segmentation fault” caused by rebuilt nvarguscamerasrc.

Is this the only option I have to follow in order to resolve my problem? The solution from the link is applied for Jetpack 32.4.3 so it may not work with my version 32.7.1.

Please check sensor mode. Looks like argus_camera is using 3856x2180 but nvarguscamerasrc using 1080p

I have tried different sensor modes(even with sensor-mode=0 like argus_camera) and still, they are not close.
How about the Exposure Time Range/Gain Range input? It always show Invalid input if I set the range to 27000-660000000/1-256, respectively. How to fix it properly?

Suppose it could be the sensor driver or device tree report the exposure/gain incorrect cause the problem.

The argus_camera software can use those ranges so I suppose there is no problem with the driver.
I am sorry that I am not familiar with device tree, if it falls to this case, how can i fix it? It would be great if there are references or sample steps.

What’s your sensor module? I would suggest consult with vendor for the driver and device tree configuration.

It is IMX 678.
Thanks, I will contact them for more information
I have 1 more question. When I turn off the light, the argus_camera software adapts with new dark scene extremely well, and It is able to capture objects clearly in such case. However, I am not able to reproduce it with gstreamer pipeline, Is it b/c the argus_camera has an algorithm to adjust the setting with variable lightning condition?

Suppose they should be the same.
Have a try below gstreamer command.

gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM), width=(int)3856, height=(int)2180,format=(string)NV12, framerate=(fraction)30/1" ! nvvidconv ! xvimagesink sync=false

Thank you, I will try it.

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