ArduCAM_USB_Camera_Shield
ArduCAM_USB_Camera_Shield copied to clipboard
chessboard noise in MT9J001
Hi, I have noticed strange noise on images from MT9J001 camera. At first it seemed random to me, but then I've noticed that it has regular, chessboard scheme. I have made simple test and took several images of white surface, choose small part of the image (10x10 pixels, randomly chosen) and calculated average of every pixel for set of images. It seems that there is about 30 intensity levels difference between "white" and "black" fields. In the specification of the sensor there is mentioned "Bayer monochrome pattern" but I haven't found anything about it in the web. Is it physical grayscale filter? Whats the purpose of this?
It is really monochrome, but due to the architecture of the sensor, it should be compatible its color version. So there are 4 registers to control the 2x2 pixel gains separately which is used for color sensor R, GR,GB,B gains. You have to manually tune these 4 gain registers.
Is it possible to change it in the SDK or do you mean "manually" with my own code? Can you tell me gain values for those pixels?
You can change the register through our SDK API function call. www.arducam.com/downloads/modules/industrial/MT9J003_RR_A.pdf Page 11, Change the following registers for different gains REG = 0x0206, 0x24 REG = 0x0208, 0x2a REG = 0x020a, 0x2a REG = 0x020c, 0x24
Glad I found this issue. Below is part of an image with the 'chessboard' effect that @hyperOP mentioned. I assume this is the same thing.
Is there a reason these registers aren't correct out-the-box? Also - besides pointing it at a blank white background and working it out from there, is there a more principled way of getting this scaling correct?
Please find the explanations from: http://www.arducam.com/docs/camera-breakout-board/10mp-mt9j001-mt9j003/
Thanks, I tried adding
["0x0206","0x0024"],
["0x0208","0x002a"],
["0x020a","0x002a"],
["0x020c","0x0024"]
to the AR0134_960p_Mono.json file inside the "register_parameter"
list, but the registers didn't appear to update (I read them back and they didn't change). The image didn't change either.
Maybe I'm missing something or misunderstood...?
ah, I found on a link from the page you linked to that I maybe should try setting
Reg | Description
-------|------------
0x3056 | green1_gain
0x3058 | blue_gain
0x305A | red_gain
0x305C | green2_gain
0x305E | global_gain
This worked nicely, and just needed a slight tweak - those last four values in the list of register settings need to be the same. So this version fixes that, alternatively just edit the last four rows of the register parameter list (l55-l58) to make the four values equal, e.g.:
["0x3056","0x0042"],
["0x3058","0x0042"],
["0x305a","0x0042"],
["0x305c","0x0042"]
Demonstration of it working (pointed at an unevenly lit plain white ceiling).
Congratulations!