Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.

Colors of global shutter sensor seems to be wrong

0 votes

Hello,

I have replaced the camera of two Jevois cameras, one with the 90° FOV standard sensor (ov9650) and one with the color global shutter (ar0135). However the colors appears to be completely different, in particular the global shutter camera is blueish and the green color almost gray.

Here is the result with standard cam: https://drive.google.com/open?id=1tQmZuiFTwcPMJwsJLLakqb6fr-2YzGKO

And with the AR0135 (the lens is the 3.6mm IR from the kit): https://drive.google.com/open?id=1IE3MvmVktMj1AvLGkK1f-_e73T3-SRsi

In addition, I have this error at startup on the log output: FTL Camera::getControl: 0xc00c561b failed [22](Invalid argument)

Is this image color normal ? Is there a problem with the hardware ? the configuration of the camera ?

Thank you

asked Sep 4, 2019 in Hardware Questions by gautier (120 points)

1 Answer

0 votes

Yes, this sensor is very "raw" and intended for machine vision tasks, as opposed to our OmniVision sensors which are more intended for consumer products. There is only auto-gain and auto-exposure in the AR0135, no auto white balance, and not even manual white balance. You can ignore the error message, it just means that this sensor does not support a particular control (which may very well be one of the white balance controls). Even though the colors may look different (and maybe not as pleasing), the upside is that they should be more reliable (since the white balance is not continuously adjusted by the sensor).

If you can find the data sheet or developer guide on the web for either AR0135 or AR0134, it will give you some hints (sorry we cannot post it here). For example, looks like these registers are available:

Digital gain:

GreenR: 0x3056
GreenB: 0x305C
Red: 0x305A
Blue: 0x3058

to play with them, do this in the JeVois Inventor console:

setpar camreg 1 # enable access to sensor registers

getcamreg 0x305a # get current value of red gain (should return 20, in hex)

setcamreg 0x305a 0x40 # set new value for red gain (8-bit value)

according to the datasheet: The format for digital gain setting is xxx.yyyyy where 0b00100000 represents a 1x gain setting and 0b00110000 represents a 1.5x gain setting. The step size for yyyyy is 0.03125 while the step size for xxx is 1. Therefore to set a gain of 2.09375 one would set digital gain to 01000011. The maximum digital gain is 7.97x.

Note that setcamreg does not support binary values, only decimal, or hex (with 0x prefix), or octal (with 0 prefix; beware of that one).

You can put those commands into your initscript.cfg if you want them to run each time the camera boots up.

answered Sep 4, 2019 by JeVois (46,580 points)
Thank you for your detailed answer.
After looking at this gains, it appears that they are all equal to 1 (0x20) except for the GreenB which was set by default to 2.5 (0x50). I don't know if this is a desired setting, as it seems that the reset value for this register should have been 0x20 according to the datasheet.
After setting back a gain of 1, I am getting much better results and the image is not blueish anymore.
yes, I am guessing it depends on which kind of light you are using. We indeed have set it to 0x50 as it looked better here under fluorescent tube light (office environment). But indeed maybe keeping the default of 0x20 may work better for most people.
...