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

Re: Cyan vignetting after rpi-update

Tue Jan 12, 2016 8:59 pm

gorak9000 wrote:Has this ever been fixed? I just did an rpi-update yesterday and still seem to see the cyan vignetting.
Not in released code. There was something observed recently though which might help.
I'll make a test firmware up if someone who can reproduce this issue is prepared to test it.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

vacuumMarshmallow
Posts: 48
Joined: Sun Jul 07, 2013 3:03 pm

Re: Cyan vignetting after rpi-update

Tue Jan 12, 2016 9:27 pm

After I ran the firmware update, everything got fixed.

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

Re: Cyan vignetting after rpi-update

Tue Jan 12, 2016 9:32 pm

vacuumMarshmallow wrote:After I ran the firmware update, everything got fixed.
Fixed without adding -st, or just now supports -st?
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

vacuumMarshmallow
Posts: 48
Joined: Sun Jul 07, 2013 3:03 pm

Re: Cyan vignetting after rpi-update

Tue Jan 12, 2016 9:39 pm

6by9 wrote:Fixed without adding -st, or just now supports -st?
You are 100% right...
Just checked my scripts, and it is fixed by adding the -st flag.
:)

gorak9000
Posts: 7
Joined: Tue Mar 25, 2014 7:06 pm

Re: Cyan vignetting after rpi-update

Tue Mar 01, 2016 6:25 pm

I can definitely test any updates. For whatever reason I didn't get an email notification that there was activity in this thread again, but I have a camera pointing out a window that shows this issue well, especially on cloudy days, like today (or a lot of them at this time of year here). Example:

https://goo.gl/photos/X18CsWZEoa5uxNbs7

What is this -st flag that was mentioned? Is that for raspistill? I'm unfamiliar with that switch...

Also, this camera shows the green tint at night issue really well. Don't remember if it was this camera I updated when I posted that the green tint problem went from intermittent sometimes, to 100% of the time a few posts ago. I can certainly update this one (or even provide remote access to a dev), and provide a link to the 'live' view (every minute), I'd just rather not post the link here on the open forum.

vacuumMarshmallow
Posts: 48
Joined: Sun Jul 07, 2013 3:03 pm

Re: Cyan vignetting after rpi-update

Tue Mar 01, 2016 7:11 pm

gorak9000,
Yes, the -st flag is for raspistill.

Try using it in your script (or command).
With the latest updates, plus the -st flag, the odd coloring (vignetting?) went away from my cams!

richbw
Posts: 2
Joined: Wed Jan 27, 2016 8:58 pm

Re: Cyan vignetting after rpi-update

Sun Mar 13, 2016 12:04 am

6by9 - I will be happy to test any changes you make to lens shading and auto white balance.

I am struggling to get good images because I am using LED illuminators and taking close up images of various objects including silicon, PCBs and insects. Because the resulting images are nothing like conventional snapshots the auto white balance gets confused – I have tried the various awb modes but none of them are really good enough. This means I want to fix the white balance gains with –awb off –awbg 1.5,1.4 - but as you know, this is only possible without the –st option, so I get magenta vignetting which is really very noticeable on more uniform objects.

Having read all 6by9s posts, I see that this is an issue you are working on but it is rather involved and will take a good deal of time – difficult when you are working in your spare time.

I see from a post by 6by9 earlier in this thread (23rd Nov 2014) that the problem can be fixed by rolling back the firmware, but only for the Pi B (not B+). I am using the compute module – would this approach of rolling back the firmware enable me to have both fixed white balance and no vignetting?

Many thanks for your help!

richbw
Posts: 2
Joined: Wed Jan 27, 2016 8:58 pm

Re: Cyan vignetting after rpi-update

Fri Apr 22, 2016 9:21 am

This problem has been fixed in the firmware update release on Tue Apr 12 at 22:24 BST.

I tested this by using rpi-update to update to the latest firmware (apt-get upgrade doesn't get the latest firmware version), then recording still images with auto white balance off AND the -st option. Previously adding the -st option fixed the vignetting (due to the auto lens shading not quite working correctly) but it also overrides the auto white balance off (-awb off) option and recalculate the white balance.

Now, with the latest firmware if you run raspistill with the -st option you can now also use the -awb off option and the set manual white balance!

Excellent news! the images look wonderful

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

Re: Cyan vignetting after rpi-update

Fri Apr 22, 2016 10:16 am

I'd forgotten that change had been pushed.
Yes, an approach has been found that allows a stats pass with manual white balance. If manual gains have been specified (not just AWB is off), then AWB doesn't run.

There is a second change that went in (8th Apr 20:21 update) but I haven't had a chance to follow up and verify is good, so it's not on by default.
Add "ov5647_acls=1" to /boot/config.txt and it will enable code that attempts to use the preview Auto Colour Lens Shading (ACLS) state on capture, thereby hopefully not needing the -st flag.

A test firmware version with this was pushed and tested by someone for me, but I couldn't say the results were correct or not. Feel free to play and feed back your results - if it does the right thing then I can make it the default.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

ddahms
Posts: 76
Joined: Tue Mar 18, 2014 3:38 pm

Re: Cyan vignetting after rpi-update

Sun Apr 24, 2016 2:55 am

6x9 -- I checked your new test firmware with "ov5647_acls=1" in /boot/config.txt and no -st flag. The images look good--no cyan vignette. However the overall color balance is a bit different. Adding -st again shifts it back.

sharix
Posts: 200
Joined: Thu Feb 16, 2012 11:29 am
Location: Slovenia

Re: Cyan vignetting after rpi-update

Wed May 11, 2016 9:32 am

Thanks for this!
The auto white balance does produce images that are a bit too red, at least when the weather is cloudy.

Rosentorp
Posts: 7
Joined: Tue Aug 23, 2016 2:47 pm

Re: Cyan vignetting after rpi-update

Tue Aug 23, 2016 2:57 pm

HI! We have updated our image to the latest firmware with rpi-update. Taking pictures with raspistill seems to work but takne from inside of our application (with mmal) we get a picture with very cyan vignetting.

Do you have any suggestion about what to do?

Thanks!

/Anders

chametl
Posts: 9
Joined: Fri Nov 25, 2016 9:42 pm

Re: Cyan vignetting after rpi-update

Thu Feb 09, 2017 5:08 pm

This is also happening with the V2 camera. Is there any way to fix it? Should I install the same firmware?

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

Re: Cyan vignetting after rpi-update

Thu Feb 09, 2017 5:28 pm

chametl wrote:This is also happening with the V2 camera. Is there any way to fix it? Should I install the same firmware?
With the standard lens?
I wouldn't recommend rolling the firmware back that far - go before Mar 2016 and it won't support the V2 sensor at all.
Can you post some examples on dropbox or similar?
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

chametl
Posts: 9
Joined: Fri Nov 25, 2016 9:42 pm

Re: Cyan vignetting after rpi-update

Thu Mar 16, 2017 4:33 am

Yes, with the same lenses, let me see if I can upload an example. Basically what I did was to remove the lens and reverse them, then light them with a green or yellow LED and the center of the image appears a circle like patter of one of this colors. As far as I know, the V2 has a shading correction algorithm but I don't know if it is something related to this.

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

Re: Cyan vignetting after rpi-update

Thu Mar 16, 2017 10:05 am

chametl wrote:Yes, with the same lenses, let me see if I can upload an example. Basically what I did was to remove the lens and reverse them,
You reverse it?! So optically very different to the normal configuration and therefore making any assumptions about pixel vignetting based on the lens are pretty much null and void. If you wear glasses, do they work the same backwards as forwards?
chametl wrote:then light them with a green or yellow LED and the center of the image appears a circle like patter of one of this colors. As far as I know, the V2 has a shading correction algorithm but I don't know if it is something related to this.
Both sensors have pixel vignetting / lens shading compensation enabled. V1 has a static table, V2 has a dynamic algorithm that tries to compensate for some variation, but is still operating within a configured window as there is no calibration phase (it would require an external setup to do one).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

chametl
Posts: 9
Joined: Fri Nov 25, 2016 9:42 pm

Re: Cyan vignetting after rpi-update

Tue Mar 21, 2017 8:50 pm

6by9 wrote:
chametl wrote:Yes, with the same lenses, let me see if I can upload an example. Basically what I did was to remove the lens and reverse them,
You reverse it?! So optically very different to the normal configuration and therefore making any assumptions about pixel vignetting based on the lens are pretty much null and void. If you wear glasses, do they work the same backwards as forwards?
chametl wrote:then light them with a green or yellow LED and the center of the image appears a circle like patter of one of this colors. As far as I know, the V2 has a shading correction algorithm but I don't know if it is something related to this.
Both sensors have pixel vignetting / lens shading compensation enabled. V1 has a static table, V2 has a dynamic algorithm that tries to compensate for some variation, but is still operating within a configured window as there is no calibration phase (it would require an external setup to do one).
Yes, you're right lenses do not work the same backwards as forwards, So what I'm seeing is the camera trying to compensate that I reversed the lens? If yes, Is there a way to fix that?

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

Re: Cyan vignetting after rpi-update

Wed Mar 22, 2017 10:34 am

chametl wrote:Yes, you're right lenses do not work the same backwards as forwards, So what I'm seeing is the camera trying to compensate that I reversed the lens? If yes, Is there a way to fix that?
You can't alter the tables, but you can disable the compensation that is assuming the standard lens.
viewtopic.php?f=43&t=175711
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Camera board”