05-04-2018 06:31 AM
Hi Xilinx experts,
I'm currently working on a real-time video compression project using reVision stack with ZCU102 card and the IMX274 sensor.
I'm facing problems with the setup of the sensor parameters and the gamma correction.
The default configuration leads to over-exposed (at least in my office) and greeny frames that are not satisfactory for demo.
Here are the parameters I'm currently trying to setup :
- Sensor exposure (imx274_set_exposure).
- Sensor gain (imx274_set_gain).
- Gamma correction of the green, red and blue components. (gamma_set_XXX_correction).
I guess exposure and gain should be configured dynamically depending on the light conditions. Gain should be small to avoid white noise. I will look for a script that setup that once in a while for me. Do you have anything to suggest?
Beside that, gamma correction parameters for each color should be fixed once and for all. Right? Here are the setup I tried :
- The default values are 1-1-1 which means no gamma correction. It's greeny.
- Values 0.45 - 0.45 - 0.45 corresponds to (the invert) of Rec. 709. This is white.
- The best trade-off I found (visually) is 0.7 - 0.7 - 0.7 but the color are still faded.
Beside that, I modified color space converter parameters (namely, brightness, contrast, blue gain, red gain, green gain via csc_set_*** functions) but it does not do anything, apparently. Idk why.
Do you have anything to suggest ?
Thanks in advance,
05-08-2018 04:53 AM - edited 05-08-2018 05:30 AM
I'm experiencing the same problem using defaults for IMX274/GAMMA/CSC IPs and the only info I found is from reVISION getting started guide (10.2 Limitations):
"The provided image signal processor (ISP) pipeline does not include any auto algorithms. The IMX274, gamma, and color correction controls have to be adjusted manually based on the surrounding environment."
However, there is still a hope that someone from Xilinx will share the ISP settings producing a good enough image quality.
05-08-2018 09:48 AM
I don't have a recipe for you but I can offer an easier way of tweaking the various control knobs. Please download the Base TRD design zip file from http://www.wiki.xilinx.com/Zynq+UltraScale+MPSoC+Base+TRD+2017.4. The design is very similar to the reVISION platform, only it has a GUI with sliders that makes tweaking the controls easier.
05-09-2018 01:54 AM
Hi Igor, Hi ckohn,
Thanks for your reply.
@ ckohn: on my side, I already modified the menu_loop of the reVision design so that all the parameters are available for r/w from there. Therefore, it's already pretty easy for me to tweak them. Unfortunately I did not found anything satisfactory so far.
I'm particularly worried about gamma correction as none of the setup I tried lead to correct colors ...
As far as I understand, gamma correction should be set up once and for all and does not depend on the surrounding conditions.
05-23-2018 02:50 AM
I dug into the issue a little bit more and I found out that finding correct gamma parameters won't be enough to solve this issue.
Check this if you want to know more: http://www.comp.nus.edu.sg/~brown/ICIP2013_Tutorial_Brown.pdf
We probably have to add white balancing and color correction into the ISP pipeline if we want to achieve correct color ...
Another useful resources from Xilinx that has not been maintained, apparently ... : https://www.embedded.com/print/4401386
On my side and given the time I have at my disposal, I consider taking a license for some IP cores that will do the job for me :
If someone have another suggestion, it would be very welcome ... !
06-18-2018 06:49 AM - edited 06-18-2018 06:49 AM
I'm still struggling to achieve decent colors.
In particular, I think I should perform sensor calibration in order to find the correct color correction matrix (CCM) to be applied on the signal depending on the lighting conditions.
Anyway, I guess this has been done by someone for the IMX274 sensor in the past. Could someone from Xilinx provide ICC profiles for the IMX274 sensor ?
Thanks in advance,
08-30-2018 11:41 PM
The reVISION Getting Started Guide states: "The provided image signal processor (ISP) pipeline does not include any auto algorithms. The IMX274, gamma, and color correction controls have to be adjusted manually based on the surrounding environment."
I am also struggling with this problem.
09-02-2018 01:20 AM
just in case you went deeper into that, do you see, where the kernel actually communicates with the sensor at all?
There is an i2c interface to the sensor in the schematics, but I can't find the communcation at all.