zbarna
Posts: 15
Joined: Mon Apr 23, 2018 10:16 am

Picamera with custom lens, color issue

Wed Aug 08, 2018 9:36 am

Hi!

We are using the Raspberry Pi3 B+ model with the picamera V2.
We changed the original lens to an other simple lens, because it was necessary for our project.

Unfortunately with the new lens the colors in the middle of the picture is fine, but on the sides it's pink or magenta.

Original Lens:
Image

Custom Lens:
Image

In the second picture you can see on right side it should be yellow like in the middle, not pink or magenta.

Could you recommend us something how to solve this issue? Should we use a filter in the lens, or need to modify the camera settings on the raspberry?

Thanks for your help in advance!

Best Regards,
Zoltán

PiGraham
Posts: 3389
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Picamera with custom lens, color issue

Wed Aug 08, 2018 9:44 am

Corrections are applied for the standard lens. The issues are discussed here:
viewtopic.php?t=168777

You can get the raw pixel values and apply your own Bayer processing and colour corrections for still images.
Last edited by PiGraham on Wed Aug 08, 2018 11:39 am, edited 1 time in total.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5549
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Picamera with custom lens, color issue

Wed Aug 08, 2018 11:35 am

You can override the lens shading tables - viewtopic.php?p=1199174
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

zbarna
Posts: 15
Joined: Mon Apr 23, 2018 10:16 am

Re: Picamera with custom lens, color issue

Thu Aug 09, 2018 12:03 pm

Thanks for the info, I will check the forums you linked!

zbarna
Posts: 15
Joined: Mon Apr 23, 2018 10:16 am

Re: Picamera with custom lens, color issue

Fri Aug 17, 2018 1:52 pm

Hi!

We disassemblied the picamera sensor, and found that, maybe there is an issue with the sensor itself. If you check the picture, I've taken about the sensor, you can see a dark circle in the middle of it:
Image

The other strange thing is that, if we use the picamera without lens (so only the sensor), this circle color issue also exists on the pictures.
What do you think about this?

One more question: If I override the color shading table, it will also has an effect on the picamera preview or only on the captured pictures?

Thanks for your answer in advance!
Best Regards,
Zoltán

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5549
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Picamera with custom lens, color issue

Fri Aug 17, 2018 2:41 pm

Sorry, you aren't going to get much support when you have so completely stripped down the sensor.
The sensor and lens assembly are designed to work together. In particular there will be some compensation within the micro-lens array to adjust for the chief ray angle and lens vignetting. That is a likely reason for the odd colour effects you are seeing when looking at the sensor.
One more question: If I override the color shading table, it will also has an effect on the picamera preview or only on the captured pictures?
Yes, it applies to all images produced via the ISP.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

PiGraham
Posts: 3389
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Picamera with custom lens, color issue

Sat Aug 18, 2018 5:06 pm

zbarna wrote:
Fri Aug 17, 2018 1:52 pm

The other strange thing is that, if we use the picamera without lens (so only the sensor), this circle color issue also exists on the pictures.
What do you think about this?

I think that is to be expected. The lens introduces a circular shading pattern. The correction for that will be an inverse circular pattern. If you illuminate the sensor with very even illumination you will see the circular inverse pattern. The only situations were you won't see that pattern is either if you use a lanes and matched correction (e.g. the stock lens the correction is designed to cancel out) or if you disable shading correction entirely and illuminate the sensor uniformly.

zbarna
Posts: 15
Joined: Mon Apr 23, 2018 10:16 am

Re: Picamera with custom lens, color issue

Sun Aug 19, 2018 4:08 pm

Hi!

Thanks for the explanation for both of you! :)

Return to “Camera board”

Who is online

Users browsing this forum: No registered users and 7 guests