User avatar
KarlS
Posts: 42
Joined: Fri Oct 12, 2012 1:10 pm

Re: Red color in the middle of the camera

Wed Aug 27, 2014 2:49 pm

Ahhh ... so there were some firmeware updates (that I was unaware of). Thanks to @DougieLawson and @AndrewS for pointing that out. Now let's hope that this really was the problem and that it can be resolved shortly.

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

Re: Red color in the middle of the camera

Wed Aug 27, 2014 3:34 pm

I'm trying to pull in the latest lens shading updates which I'm hoping will fix it, but note the updated sig - the clock really is ticking.
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.

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

Re: Red color in the middle of the camera

Wed Aug 27, 2014 4:31 pm

I've also noticed this, but I have another fisheye lens on top of the built-in lens, so ...

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26413
Joined: Sat Jul 30, 2011 7:41 pm

Re: Red color in the middle of the camera

Wed Aug 27, 2014 5:28 pm

sharix wrote:I've also noticed this, but I have another fisheye lens on top of the built-in lens, so ...
..all bets are off in that case....although as its automatic, it may be able to cope, but probably the fisheye is outside of its tuning parameters.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
KarlS
Posts: 42
Joined: Fri Oct 12, 2012 1:10 pm

Re: Red color in the middle of the camera

Sat Sep 13, 2014 3:06 pm

A few weeks have gone by since the last post in this thread, but - sadly - the problem didn’t go away. I’ve updated the system and firmware, but the images still show the red/magenta center and blue/cyan border.

The pictures below were taken on a gray, foggy morning (with absolutely no blue sky!). The command was:

Code: Select all

raspistill -n -mm matrix -ISO 100 -o image.jpg
.
Image

Since updating the system didn’t work, I took the other route and downgraded to an old 2014-01-07-wheezy-raspbian image … and the error is gone. Some “apt-get upgrade” since January apparently has introduced the error.

Image

Now, I don’t consider this a solution to the problem since I don't like to run a possibly unsafe system. Maybe someone can figure out which update was responsible for the error?

pleriche
Posts: 90
Joined: Mon Oct 14, 2013 8:44 am

Re: Red color in the middle of the camera

Sat Sep 13, 2014 5:43 pm

Thank you KarlS for that observation. I'd really like to see a solution to this problem as it's a show-stopper for anything but pure toy applications.

Regards - Philip

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

Re: Red color in the middle of the camera

Sat Sep 13, 2014 7:05 pm

All of the Broadcom engineers that were volunteering on Pi have now been made redundant. Access to the firmware source is therefore now significantly trickier.
Integrating in the update to the lens shading algorithm were far from trivial and didn't get done before we were kicked out the door.

There's an option being investigated which optionally reintroduces the statistics pass through the ISP that the lens shading algorithm wanted. It will be an extra command line option. The downside is that AWB and AGC may shift between capture and preview as they will both recompute based on the statistics of the capture frame. The undesirability of that shift is the reason that the stats pass was removed in the first place. Currently you can't have the ideal behaviour though.
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.

gabriel.klein
Posts: 19
Joined: Mon Jul 28, 2014 1:50 pm

Re: Red color in the middle of the camera

Sun Sep 14, 2014 8:41 am

It seams to be a defect (that could be fixed by an update of the firmware).

As the update of the firmware is not a wish of Raspberry/Broadcom, should we ask for a recall of the product?

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

Re: Red color in the middle of the camera

Sun Sep 14, 2014 4:08 pm

gabriel.klein wrote:It seams to be a defect (that could be fixed by an update of the firmware).

As the update of the firmware is not a wish of Raspberry/Broadcom, should we ask for a recall of the product?
Do you not read what is posted by others?
There's an option being investigated which optionally reintroduces the statistics pass through the ISP that the lens shading algorithm wanted.
What bit of that says that it is not a wish of The Pi Foundation or Broadcom?! Well, each to their own - good luck on demanding a recall.
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.

gabriel.klein
Posts: 19
Joined: Mon Jul 28, 2014 1:50 pm

Re: Red color in the middle of the camera

Sun Sep 14, 2014 7:17 pm

Dear 6by9,

My message means you did a great job. You are now an ex-broadcom employee.

The raspberry + cam is one of the best web camera available on the market (the cost/performance is just amazing).
You really get crap for under 150-200$ on the market, and the raspberry is even energy efficient in comparison to these cameras.

I spent some money to buy many cameras, many prototypes to be built, but my expectations are not met due to this bug. :(

My complaint is not that the issue was not fixed, but due to the fact that you are not paid anymore. You were providing a great product, with a great potential, and broadcom is making money by selling this device. Paying a few employees to support this camera is an investment and not a cost for them!!!

I know you work during your free time, as other broadcom employees do. And I thank you for that!

Regards

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

Re: Red color in the middle of the camera

Mon Sep 15, 2014 10:18 am

gabriel.klein wrote:I spent some money to buy many cameras, many prototypes to be built, but my expectations are not met due to this bug. :(
You say it yourself, it's a £25 camera on a £30 processor board. How high do you really set your expectations?!
gabriel.klein wrote:My complaint is not that the issue was not fixed, but due to the fact that you are not paid anymore. You were providing a great product, with a great potential, and broadcom is making money by selling this device. Paying a few employees to support this camera is an investment and not a cost for them!!!
Not going to go into details, but the Foundation are now employing several of the ex-Broadcom people, and Broadcom have retained several folk especially for Pi support. There were options presented to me for staying with Broadcom to develop the Pi multimedia side further and I chose not to go down that route. They are paying people to provide support, but Broadcom has lost a fair chunk of the detailed knowledge via their decision to close down the MPS team, so those new support people have to learn their way around a large amount of code.

That's my last comment on the politics. I will try to fish my Pi out in the next day or so to check out the potential workaround of the issue.
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.

gabriel.klein
Posts: 19
Joined: Mon Jul 28, 2014 1:50 pm

Re: Red color in the middle of the camera

Mon Sep 15, 2014 10:23 am

Thank you for the answer... so it's not as bad as I have imagined!

Honestly I have compared many different web camera, and raspberry + picam is way better than many of them for my usage! You need more work as a user to configure the camera, but you get way more out of it!

Sadly for me this red circle is a "show stopper" (and other people). I'm sad because Raspberry/cam is almost an amazing product.

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

Re: Red color in the middle of the camera

Fri Sep 19, 2014 5:21 pm

Update pushed to https://github.com/6by9/userland (master or PR-20140919 branches) that adds a -st or --stats option to raspistill. (Pull request has been made to get it into the main code tree)

That should enable the stats pass that will hopefully allow the dynamic lens shading code to do the right thing. I haven't tested it in detail, but hopefully that will resolve your colour tinge issue. Please test and report back.

edit As an alternate option, using "-md 2" may also resolve the issue as it forces preview to use the same sensor mode, so there shouldn't need to be a change between preview and capture.
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.

ethanol100
Posts: 637
Joined: Wed Oct 02, 2013 12:28 pm

Re: Red color in the middle of the camera

Sun Sep 21, 2014 2:50 pm

Thank you, 6by9!

original: raspistill -o test.jpg
Image
additional statistics run: raspistill -st -o test.jpg
Image
and finally: raspistill -md 2 -o test.jpg
Image

The additional statistics run makes the difference! Only changing sensor mode does not seem to help.

But with the additional statistics run we can not force the awb gains. Is it possible to calculate the additional statistics only for the first image captured to find the right lens shading values and then continue without recalculating them? Are they else always taken from the preview mode and need recalculation for each single frame? As you mentioned, the white colour balance will look "changing" for a time-lapse recording.

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

Re: Red color in the middle of the camera

Mon Sep 22, 2014 6:11 pm

Many many thanks for this fix. It will simplify my code a lot, I won't have to normalize the photos anymore which is very CPU-intensive.

pleriche
Posts: 90
Joined: Mon Oct 14, 2013 8:44 am

Re: Red color in the middle of the camera

Mon Sep 22, 2014 6:28 pm

Thank you 6by9 - this is most encouraging. When might we see this in the standard Raspian update stream - days? Weeks? I'm not sure I've got the stomach to install the build environment and build it from the git sources though I'm sure it's not that hard really. Is it just a raspistill or firmware binary required?

One other point that I was wondering: what was broke that needed fixing, which introduced this red shading? I presume it isn't a case of the lens going red with age?


Regards - Philip

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

Re: Red color in the middle of the camera

Mon Sep 22, 2014 7:48 pm

Keep and eye on https://github.com/Hexxeh/rpi-firmware/commits/master for updates (it also gets announced on https://twitter.com/RPF_Dev_Updates). I'd expect it to be days - Dom normally does it when he knows there is something useful to be released.
It's only a raspistill that has changed so rebuilding userland isn't too tricky IIRC:

Code: Select all

git clone https://github.com/raspberrypi/userland.git
cd userland
./buildme
I think all the required tools are installed on Raspbian by default, but I could be wrong.

The behaviour is still broken, but we have a workaround now. Some more details on http://www.raspberrypi.org/forums/viewt ... 8&p=537981
The whole dynamic lens shading algorithm had been written around running a stats pass. That was disabled back in March due to it rerunning the AWB and AGC algos (deliberately required under some circumstances). It had been reworked to be based on previous frame stats but that hasn't been merged onto the Pi branch due to divergence. I have been into Pi Towers today to investigate whether it is possible to get that merged, but I already know it isn't an easy task - it's pretty much recreate the change line by line.
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.

User avatar
DougieLawson
Posts: 38821
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Red color in the middle of the camera

Mon Sep 22, 2014 8:13 pm

6by9 wrote: I think all the required tools are installed on Raspbian by default, but I could be wrong.
Mostly, I'd recommend that folks install the "build essential" package with sudo apt-get install build-essential to ensure gcc and make are likely to work.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

SirNight
Posts: 36
Joined: Fri Jul 18, 2014 1:01 pm

Re: Red color in the middle of the camera

Tue Oct 07, 2014 1:24 pm

Hello all,

How can I add a -st or --stats option to raspistill ? Do I just need to do simply "sudo rpi-update" ?

Thx,

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

Re: Red color in the middle of the camera

Sat Nov 01, 2014 11:17 am

Has this fix been included in https://github.com/raspberrypi/firmware yet?

gabriel.klein
Posts: 19
Joined: Mon Jul 28, 2014 1:50 pm

Re: Red color in the middle of the camera

Sun Nov 09, 2014 11:27 pm

I think yes :)

I'll give it a try in a few days.

raspistill
raspistill Camera App v1.3.8
-st, --stats : Force recomputation of statistics on stills capture pass

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

Re: Red color in the middle of the camera

Sat Nov 15, 2014 12:58 pm

Yes, I saw that later but forgot to write the feedback here. Anyway, has anyone experienced worse auto white balance performance with the -st flag? Most of the time it works fine as before, but I occasionally get a picture that is too red (whole picture, not the center). This didn't happen before and the scene did not change.

SirNight
Posts: 36
Joined: Fri Jul 18, 2014 1:01 pm

Re: Red color in the middle of the camera

Wed Nov 19, 2014 7:49 pm

Hi,

I can not understand how to update ans use the new commands.
Fallowing doesn't do it.. :(

apt-get update
apt-get upgrade
sudo rpi-update

Thanks in advance

User avatar
DougieLawson
Posts: 38821
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Red color in the middle of the camera

Wed Nov 19, 2014 7:52 pm

SirNight wrote:apt-get update
apt-get upgrade
sudo rpi-update
You need to run those three commands with sudo, you then need to use sudo reboot to get the new firmware active.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

SirNight
Posts: 36
Joined: Fri Jul 18, 2014 1:01 pm

Re: Red color in the middle of the camera

Wed Nov 19, 2014 7:55 pm

DougieLawson wrote:
SirNight wrote:apt-get update
apt-get upgrade
sudo rpi-update
You need to run those three commands with sudo, you then need to use sudo reboot to get the new firmware active.
Thanks for the fast respond.
I used them and restarted. It doesn't like -st still...
Do you think adding "sudo" on apt-get update
apt-get upgrade make differance ?

Return to “Camera board”