Hi there,
I just bought the Raspberry Pi 2 and a new camera module. Excited to get started on a project. Unfortunately after seating and setting up the module for the first time I got really bizarre results from the camera. Looks like an error in color conversion of some sort.
Photos here: http://imgur.com/a/OiArm
I've tested the module on both a Raspberry Pi 1 & 2 with fresh installs of the latest Raspbian distribution with the same results. So I know it's not connection or configuration related. I was quite careful about static electricity so I'm confident I didn't zap it.
In any case, wanted to show you the difference between a photo taken from my iPhone camera and the Raspberry Pi in case it's helpful to track down any sort of manufacturing issue. I'm not sure if I'm going to RMA it because the effect is actually pretty neat. I'd also be very happy is someone can point out that I've made an obvious goof.
- DougieLawson
- Posts: 42142
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Bizzare defect with my RPi Camera
Point it out of a window and take a photo with daylight. Your interior lighting is the wrong colour for the default automatic white balance setting.
Later on tonight try this funky command: for i in off auto sun cloud shade tungsten fluorescent incandescent flash horizon; do raspistill -awb $i -o $i.jpg; done
I think I've got all the valid values for the -awb parameter in that list.
Compare those ten images with another one taken from your iPhone.
Later on tonight try this funky command: for i in off auto sun cloud shade tungsten fluorescent incandescent flash horizon; do raspistill -awb $i -o $i.jpg; done
I think I've got all the valid values for the -awb parameter in that list.
Compare those ten images with another one taken from your iPhone.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
-
- Posts: 667
- Joined: Wed Oct 02, 2013 12:28 pm
Re: Bizzare defect with my RPi Camera
Which camera module have you bought?
It looks like it is a "NOIR" camera module. And then it looks as expected.
It looks like it is a "NOIR" camera module. And then it looks as expected.
Re: Bizzare defect with my RPi Camera
If you are unsure.ethanol100 wrote:Which camera module have you bought?
It looks like it is a "NOIR" camera module. And then it looks as expected.
The regular camera module

The Pi NoIR

Re: Bizzare defect with my RPi Camera
Hi guys,
To those asking if it was a Noir or a regular camera module, it's a regular camera module. I thought the same thing though when I saw it.
To those asking if it was a Noir or a regular camera module, it's a regular camera module. I thought the same thing though when I saw it.
Re: Bizzare defect with my RPi Camera
The window worked much better: http://imgur.com/a/HVLBD.DougieLawson wrote:Point it out of a window and take a photo with daylight. Your interior lighting is the wrong colour for the default automatic white balance setting.
Later on tonight try this funky command: for i in off auto sun cloud shade tungsten fluorescent incandescent flash horizon; do raspistill -awb $i -o $i.jpg; done
I think I've got all the valid values for the -awb parameter in that list.
Compare those ten images with another one taken from your iPhone.
EDIT: As do photos taken in my living room during daylight with full sunlight: http://imgur.com/a/U2Lp0
But last night I did manually cycle through many of the filters with the same ultra washed out / pastel images. This seems to imply that the camera will never work properly when my apartment is only lit by halogen lights.
I'm curious about where the deficiency lies with the camera. Is the auto white balancing performed in hardware by the camera module itself or is this implemented in the driver and/or image capture software (and therefore correctable)?
What is it about the camera used in modern cellphones and webcams that causes them not to have this issue?
- DougieLawson
- Posts: 42142
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Bizzare defect with my RPi Camera
There's a lot of strange coloured light in your room. The iPhone may be using a different sampling method to determine the average white balance.
It looks like the camera is OK and you just need to tweak awb and the multitude of other settings.
What parms are you passing to raspistill? How long are you running the sensor for before you capture a shot?
It looks like the camera is OK and you just need to tweak awb and the multitude of other settings.
What parms are you passing to raspistill? How long are you running the sensor for before you capture a shot?
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Bizzare defect with my RPi Camera
Certainly an AWB problem. I'm guessing the algorithm is getting its 'guess' at the lighting conditions wrong. Did you try manually setting WB rather than using automatic.
WB is a very difficult problem to solve for all cases.
WB is a very difficult problem to solve for all cases.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Working in the Applications Team.
Re: Bizzare defect with my RPi Camera
Your device _definitely_ lacks an IR filter - so its a PiNOIr sensor on a regular board,
a manufacturing error at a guess.
No amount of white-balance error could make a black settee white! Most black fabric is
very pale in near IR.
a manufacturing error at a guess.
No amount of white-balance error could make a black settee white! Most black fabric is
very pale in near IR.
- DougieLawson
- Posts: 42142
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Bizzare defect with my RPi Camera
That doesn't make sense when you look at the OP's daylight photos, there's nothing wrong with the colours in those. There's lots wrong with the exposure time because it's not in bright sunlight.Mark_T wrote:Your device _definitely_ lacks an IR filter - so its a PiNOIr sensor on a regular board,
a manufacturing error at a guess.
No amount of white-balance error could make a black settee white! Most black fabric is
very pale in near IR.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Bizzare defect with my RPi Camera
Hi Dougie, James,
First, thanks for taking the time to help me out on this.
I just ran a bash script to iterate through all exposures and all auto white balance settings. Each command takes the form of:
raspistill -awb $awb -ex $ex -o awb_${awb}_ex_${ex}.jpg
for example: raspistill -awb off -ex auto -o awb_off_ex_auto.jpg
I've posted the resulting 120 images along with a photo from my iPhone here: http://imgur.com/a/AC7DX
The resulting photos are almost all identical, if the auto white balance is set to anything other than 'off' I get a blue couch, otherwise an all black image.
Videos taken for 5 and 10 seconds produce the exact same image.
If there are any other settings I should be adjusting to try to rectify the problem, please let me know.
First, thanks for taking the time to help me out on this.
I just ran a bash script to iterate through all exposures and all auto white balance settings. Each command takes the form of:
raspistill -awb $awb -ex $ex -o awb_${awb}_ex_${ex}.jpg
for example: raspistill -awb off -ex auto -o awb_off_ex_auto.jpg
I've posted the resulting 120 images along with a photo from my iPhone here: http://imgur.com/a/AC7DX
The resulting photos are almost all identical, if the auto white balance is set to anything other than 'off' I get a blue couch, otherwise an all black image.
Videos taken for 5 and 10 seconds produce the exact same image.
If there are any other settings I should be adjusting to try to rectify the problem, please let me know.
Re: Bizzare defect with my RPi Camera
I dunno, but that 'pastel candyland' pic is fantastic!
note: I may or may not know what I'm talking about...
- DougieLawson
- Posts: 42142
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Bizzare defect with my RPi Camera
Is this another blue & black vs white & gold dress problem.
Try using a lower ISO value as the picture is washing out.
Try using a lower ISO value as the picture is washing out.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Bizzare defect with my RPi Camera
Let me repeat, this is definitely a lack of IR filter, nothing to do with white balance.
Somehow a regular Pi Camera module has been made without the IR filter.
Note the original images the black socks become white. White balance doesn't
affect black objects!
Somehow a regular Pi Camera module has been made without the IR filter.
Note the original images the black socks become white. White balance doesn't
affect black objects!
Re: Bizzare defect with my RPi Camera
+1Mark_T wrote:Let me repeat, this is definitely a lack of IR filter, nothing to do with white balance.
Somehow a regular Pi Camera module has been made without the IR filter.
Note the original images the black socks become white. White balance doesn't
affect black objects!
Re: Bizzare defect with my RPi Camera
Yes, exactly so. I get very similar images where "black" fabrics look light or pastel (because the fabric dyes absorb mostly just visible light), using an old Sony D8 camera with the IR filter moved out of optical path in "Nightshot" mode. The problem was more obvious under incandescent light because those have a large amount of IR, vs daylight. You should be able to "fix" it, if you want to, with an external IR-block filter. If you didn't want a Pi No-IR model, I'd say you should probably return it.Mark_T wrote:Let me repeat, this is definitely a lack of IR filter, nothing to do with white balance.
Somehow a regular Pi Camera module has been made without the IR filter.
Note the original images the black socks become white. White balance doesn't affect black objects!
Re: Bizzare defect with my RPi Camera
I returned the camera and will pick up a new one tomorrow, thanks for the help everyone.