-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Camera Properties adjustment & Color Correction #476
Comments
You are currently using nvidia software, and the data is processed by the hardware ISP. Did you try setting the wbmode property of nvarguscamerasrc to a different value? Unfortunately, the inner workings of the ISP are a black box. There is a configuration file at /var/nvidia/nvcam/settings, but its capabilities are undocumented. However, you can try using our software solution: |
Thanks for the spontaneous reply!
|
I think you need to restart the stream in order for the camera_overrides to have an effect. But as I said, it is undocumented, so it might not even be possible to control the behavior you see with that. We provide the software as separate packages, but they are designed to be used together: Only the first of thesse packages is open-source, but if the white balance automatic in one of the libraries is indeed working in unexpected ways, we can look at the reason and figure out how to solve it. |
Ok, |
The tiscamera package contains tcam-capture, a small UI tool to check image quality and modify all available settings. All software linked above is free, no need to purchase licenses. But it only works with The Imaging Source cameras. There are some tiscamera example programs at |
Thanks! |
Can you share the kernel log (dmesg) after booting when the LED stays red? |
The Jetson does not boot up. |
I installed the deb file, however when I launch tcam-capture, I get a pop message that it is unable to find device( I am actually using imaging-source camera as earlier pointed) |
Did you install the tcamtegrasrc package as well? |
@TIS-Tim |
The dutils packages provide optimized debayering and simple image manipulation like gamma, saturation, white balance etc. If they are not installed, there is an implementation inside tiscamera (called tcamconvert) that does not contain all features. https://www.theimagingsource.com/support/downloads-for-linux/install/tiscameradutilsarm64/ https://www.theimagingsource.com/support/downloads-for-linux/install/tcamdutilscudaarm64/ |
@TIS-Tim I tried to adjust different parameters (exposure settings, white balance, enabling tone-mapping). Ideally, it would be better to have the auto-settings do the majority of processing followed by slight additional tunings, I still have to adjust them to look visually correct, The overexposure might be the cause for the tree to look warm As per our requirements
On the receiving side, we use opencv-gstreamer video capture to get the feed and then read the frame It would be good If we could have some tuning parameter setting commands as a gst pipeline ( gst launch) |
You can add the parameters to the pipeline, e.g. gst-launch-1.0 tcambin tcam-properties=tcam,ExposureAuto=Off,ExposureTime=33333 ! ... You can get a string of all settings (for copy+paste) from the tcam-capture options dialog (maybe need to un-stringify the json there to get it to work in a console. The ExposureAutoReference setting is the target brightness for the auto exposure/gain control. You should probably lower this, since avoiding overexposure is important, the best post-processing cannot fix it. Are those colors correct? Or are the red trees because you intentionally don't have an IR-cut-coated lens? Instead of using the WDR function, you could also try setting a low Gamma (e.g. ~0.45) and low ExposureAutoReference (e.g. ~50). Maybe increase saturation a bit. |
Thanks I will try to adopt your advice and observe the outcomes. However, it would be ideal to have parameter combinations that work in most of the outdoor settings |
Are you sure about the lens? If all settings are at their default, and the sky is blue (as I assume it really is) the trees/lawn should be green. If the vegetation is red/pink, it is a usual indicator for the lack of a IR-cut filter. I'm sorry but I have no idea about the receiving end of that stream. In your original question you used a different streaming mechanism; didn't that work for you? You should be able to connect our capture pipeline to the streaming pipeline you already had. This https://stackoverflow.com/questions/50549584/gstreamer-udpsink-udpsrc-versus-tcpserversink-tcpclientsrc looks like the counterpart to tcpserversink is tcpclientsrc. |
I agree with you regarding the color |
@TIS-Stefan The sky color looks dark( probably due to high contrast/ or similar imaging parameters), the other thing is the green color of the plants is completely OFF and appears reddish, Is it due to the unavailability of an IR cut filter? We are using imaging source camera-lens pair |
If you ask me... (which you did), I would say, your lens has no IR cut filter. Look on the back side of your lens, so it reflects light. If there is no red or green reflection, there is no IR cut filter. |
@TIS-Stefan , Thanks |
@TIS-Stefan
As our application demands day-light working conditions, we need to maximize the quality in such conditions Any suggestions would be vital, |
Oh, I see, you use Linux. However, the properties are more or less the same in Windows. A word to "Auto Reference": This value determines the average brightness of the image, that should be achieved by the automatic algorithms. In your case, I would set it to 80.
That is a post processing, in particular, it depends on the image data. For that you must gather the minimum and maximum brightness and then create a LUT with the brightness values and there new substitution. For that, we do not have a camera function. I would do that by post processing on the video frames. (Now your answer came in, while I am writing). Which "Auto ROI" rectangle do you use? Which Autofocus cameras do you use? The MIPI cameras do not have Auto Focus. Stefan |
The -I67 cameras are no auto focus cameras. There is no focus mechanic. Stefan |
Ahh ok, So do we need some extra handling? |
@TIS-Stefan This is how the scene condition looks with cell phone camera |
Please do not compare a cell phone camera with an industrial camera. An industrial camera provides the image the sensor sees. A cell phone camera provides an image of computed photography. Which means, more than one image is taken for HDR and tons of image processing is applied. But it is definitely not the image, you get directly from the sensor. You may also check, how long it lasts, until the image is shown, after you pressed the capture button on the cell phone. Which does not solve your image quality issues. I suppose, you will drive with the cameras around and capture images or a video file, is that correct? If I am right, you can use post processing after image capture for e.g. histogram spreading. |
@TIS-Stefan We intend to use the cameras in real-time scenarios and not just record, store, and do the post-processing for algorithm development. Thanks |
You can play with gamma too. Also you may set saturation to 130% for more saturated colors. That is currently all I can suggest. Also you may use the "WDR/Tonmapping" of tcam-capture. This does histogram spreading on the image, but the values you set may are highly light dependend. But with enabled highlight reduction and a lowered Exposure Auto Reference Value you could create good results. I am sorry, but this is a lot of try and error. Stefan |
There is no support for a focus mechanic on the MIPI and FPD link cameras at all. The USB cameras have auto focus. For example this one: https://www.theimagingsource.com/products/zoom-autofocus-cameras/usb-3.0-color-autofocus-cameras/dfkafux236m12/ (I am sorry for the weird sequence of my answer to you questions. I had some email issues today.) Stefan |
|
We will still have to use MIPI cameras |
Closed due to inactivity. |
@TIS-Stefan
I am using Jetson Nano with nvidia arguscamera lib based on your repo( with gstreamer) to stream live camera (DFM 36CX290-MLBoard camera with FPD-Link III).
The streaming pipeline runs a command with the following settings
wbmode = 1 sensor-mode=0 aelock=false,
resolution= 1948x1096, fps=60
[gst-launch-1.0 nvarguscamerasrc wbmode=1 aelock=false sensor-mode=0 sensor_id=0 ! nvvidconv ! 'video/x-raw(memory:NVMM), width=(int)1948, height=(int)1096, format=(string)I420,framerate=(fraction)60/1' ! omxh264enc bitrate=4000000 ! 'video/x-h264, stream-format=(string)byte-stream ! h264parse ! rtph264pay mtu=1400 ! udpsink host=x.x.x.x port=5002 sync=false async=false ]
The following parameters are adapted to stream in a daylight outdoor scene, however, the color from the images is completely messed up, and appears that the issue is with white balance. The histogram for each channel is left aligned
I tried tweaking the settings as per the available option.
I tried with the auto settings but seems not working
Is it possible to camera-color settings ( maybe with BayerHistogram}
** Even the indoor acquisition is warm-toned**
Here is a sample acquired image, the sky color looks completely weird. It would be great to have your suggestions
Image Daylight { Outdoor]
n
Image [Indoorr]
The text was updated successfully, but these errors were encountered: