cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
2,146 Views
Registered: ‎03-21-2018

Setup of IMX274 exposure, gain and gamma

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,

Alexandre

 

0 Kudos
8 Replies
Highlighted
Contributor
Contributor
2,094 Views
Registered: ‎10-05-2017

Hi Alexandre,

 

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.

 

Regards,
Igor

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
2,083 Views
Registered: ‎12-08-2011

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.

 

 

0 Kudos
Highlighted
2,060 Views
Registered: ‎03-21-2018

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.

 

Best regards,

Alexandre

0 Kudos
Highlighted
1,952 Views
Registered: ‎03-21-2018

Hi Igorg,

 

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 :

https://www.xilinx.com/products/intellectual-property/1-5rlwwj.html

 

If someone have another suggestion, it would be very welcome ... !

 

Best regards,

Alexandre

 

 

 

0 Kudos
Highlighted
1,859 Views
Registered: ‎03-21-2018

Hi!

 

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,

Best regards

0 Kudos
Highlighted
Observer
Observer
1,606 Views
Registered: ‎11-05-2013

Anyone?

Just tried the imx274 ion zcu104, and it looks awful :(

Anybody has good values for the initial setup?

 

Thanks!

0 Kudos
Highlighted
Contributor
Contributor
1,585 Views
Registered: ‎02-18-2013

@emu, I have tried the imx274 ion zcu104. When the brightness is low, the picture is green; when the brightness is high, the picture is white.

 

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.

0 Kudos
Highlighted
Observer
Observer
1,552 Views
Registered: ‎11-05-2013

Hello Herry,

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.

 

Any guesses?

0 Kudos