motocoder
Posts: 29
Joined: Fri Sep 06, 2013 4:13 pm

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 1:27 am

mikerr wrote:Also don't forget to also do a firmware update:

Code: Select all

sudo rpi-update
which brings in more recent camera firmware
mikerr / jamesh -

I ran rpi-update as Mike suggested, and then repeated the test for three images (raspicam5.jpg - raspicam7.jpg). Firmware update did not seem to do anything, which is not surprising as I was 99% sure I was already running the latest firmware.

https://www.dropbox.com/sh/jastghqo7kd6 ... sure-Issue

motocoder
Posts: 29
Joined: Fri Sep 06, 2013 4:13 pm

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 1:53 am

poing wrote:That said, trying it myself the '-ev' option seems to be broken at the moment like all other exposure settings that used to work. So don't bother just yet.

Positive is that, with a little luck, jamesh should now be able to see where the broken auto exposure problem is which might lead to the so-much-craved-for complete manual mode of the Pi Camera (which doesn't only include the manual exposure but also the manual white balance(!)).
Yes, it's broken. I tried literally every option listed in the documentation before I posted here.

motocoder
Posts: 29
Joined: Fri Sep 06, 2013 4:13 pm

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 2:04 am

Sorry for the triple-post; the server was giving me errors, so I didn't realize it was actually posting.

motocoder
Posts: 29
Joined: Fri Sep 06, 2013 4:13 pm

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 2:08 am

lenkf wrote:The cpu load on the pi with Motion, one usb cam, without overclocking, is reasonable (c. 60-70%) with one visitor to the website.
It's only about 20% for me. It seems to be highly dependent on the resolution of the images you are streaming.

And I think once I am able to switch back to the raspicam, that is going to be a huge advantage - much lower CPU usage due to its leveraging the GPU.

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

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 10:08 am

motocoder wrote:
poing wrote:That said, trying it myself the '-ev' option seems to be broken at the moment like all other exposure settings that used to work. So don't bother just yet.

Positive is that, with a little luck, jamesh should now be able to see where the broken auto exposure problem is which might lead to the so-much-craved-for complete manual mode of the Pi Camera (which doesn't only include the manual exposure but also the manual white balance(!)).
Yes, it's broken. I tried literally every option listed in the documentation before I posted here.
Odd, even after an rpi-update (latest firmware), the -ev option is working fine for me.

-ev -15 shows a dark image, -ev 15 shows a light one.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

poing
Posts: 1131
Joined: Thu Mar 08, 2012 3:32 pm

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 10:51 am

Doesn't work for me, just tried again, but then I'm on the official firmware, didn't install rpi-update. Maybe I should do that.

mikerr
Posts: 2774
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 10:54 am

uname -a gives us firmware version (#545 Sep 20 ), but I'm sure there are more sub versions of raspistill/vid than the version number 1.2 shows ?

Code: Select all

ls -lH /usr/bin/raspi*
-rwxr-xr-x 1 root root 23438 Sep 10 12:43 /usr/bin/raspi-config
-rwxr-xr-x 1 root root 45737 Sep 22 16:12 /usr/bin/raspistill
-rwxr-xr-x 1 root root 41251 Sep 22 16:12 /usr/bin/raspivid
-rwxr-xr-x 1 root root 40027 Sep 22 16:12 /usr/bin/raspiyuv

poing
Posts: 1131
Joined: Thu Mar 08, 2012 3:32 pm

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 11:02 am

jamesh, it seems to depend on the light level. I'm behind my computer while the camera is aimed at a window. Then -15, 0, +15 works. But if I hold my hand in front of the camera so only the dimly lit ceiling is visible (frame is black otherwise) there's no difference when using the -ev option. Something's funny while you'd want to use the -ev option to boost real dark scenes.

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

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 11:08 am

Woot! Have found the exposure problem, I think.

The change that caused the problem was to re-enable the ISO setting function (Code giveth and it taketh away). When you set an ISO value it overrides whatever settings might be changed with exposure changes - in effect it goes in to a fixed exposure mode (not sure why). What happened was that instead of defaulting the ISO to 0 (auto), I was defaulting to 400, which means it was always going in to a fixed ISO mode. By changing the default to 0, unless you specifically set the ISO, it will be in auto mode.

Code change is to set the ISO to 0 in raspicamcontrol_set_defaults instead of 400.

Would appreciate someone trying this out to see if it fixes the problem - I certainly see a change in exposure mode -ex verylong and would expect the low light performance to improve as well.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

poing
Posts: 1131
Joined: Thu Mar 08, 2012 3:32 pm

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 11:11 am

If you tell me how to install your new firmware I'll be glad to oblige.
The -ev problem seems to be the camera won't go lower than 1/15 while indeed stuck at ISO 400.

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

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 11:13 am

poing wrote:If you tell me how to install your new firmware I'll be glad to oblige.
The -ev problem seems to be the camera won't go lower than 1/15 while indeed stuck at ISO 400.
You will need to down load the userland tree, and build the code. I cannot post a binary on here. 'Spose I could figure out how dropbox works...I'll get back to you.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

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

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 11:25 am

No access to dropbox at work, and UbuntuOne account won't let me publish the file for some reason.

Sorry, you will have to build it yourself until it makes it to the release.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."


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

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 1:57 pm

New raspistill with possible exposure fix here (beta)

http://www.raspberrypi.org/phpBB3/viewt ... 41#p426025
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

motocoder
Posts: 29
Joined: Fri Sep 06, 2013 4:13 pm

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 4:01 pm

jamesh wrote:Woot! Have found the exposure problem, I think.

The change that caused the problem was to re-enable the ISO setting function (Code giveth and it taketh away). When you set an ISO value it overrides whatever settings might be changed with exposure changes - in effect it goes in to a fixed exposure mode (not sure why). What happened was that instead of defaulting the ISO to 0 (auto), I was defaulting to 400, which means it was always going in to a fixed ISO mode. By changing the default to 0, unless you specifically set the ISO, it will be in auto mode.

Code change is to set the ISO to 0 in raspicamcontrol_set_defaults instead of 400.

Would appreciate someone trying this out to see if it fixes the problem - I certainly see a change in exposure mode -ex verylong and would expect the low light performance to improve as well.
I'd be more than happy to test it out here, using the same exposure conditions and scene from my other tests.

gordon77
Posts: 4110
Joined: Sun Aug 05, 2012 3:12 pm

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 4:05 pm

same here, happy to test if you give me clear instructions how to install / amend it !

Gordon77

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

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 4:09 pm

Follow the link above - Mikeerr has built it and posted the binary to dropbox - I have no access to that here at work.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

tvjon
Posts: 710
Joined: Mon Jan 07, 2013 9:11 am

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 4:12 pm

Open a terminal window, type in those 2 lines from Mike,

then

./raspistill followed_by_theUsual_arguments

Bear in mind you may have existing multiple copies of raspistill, eg.,


[email protected] ~ $ sudo find / -name raspistill
/root/.rpi-firmware/vc/hardfp/opt/vc/bin/raspistill
/root/.rpi-firmware/vc/softfp/opt/vc/bin/raspistill
/home/pi/raspistill
/usr/bin/raspistill
/opt/vc/bin/raspistill
/opt/vc/userland/build/bin/raspistill

hence make sure you prefix it with

./

in your home dir'.

HTH

motocoder
Posts: 29
Joined: Fri Sep 06, 2013 4:13 pm

Re: Consider a USB camera as an alternative

Mon Sep 23, 2013 4:25 pm

jamesh wrote:Follow the link above - Mikeerr has built it and posted the binary to dropbox - I have no access to that here at work.
Mike / James -

I'm going to be late for work now, but I just had to try it out :)

HUGE improvement. I think the pictures are still a little underexposed, but they are entirely usable, and with this fix in place I would not have bothered to switch to the USB cam. You can see them for yourself:

https://www.dropbox.com/sh/jastghqo7kd6 ... sure-Issue

Thank you both very much for working on this. I will do some more experimenting with it when I get home this evening, and report back here.

TimBacon
Posts: 5
Joined: Wed Sep 25, 2013 10:51 am

Re: Consider a USB camera as an alternative

Tue Oct 01, 2013 11:41 am

FWIW, it worked fine for me, out of box. I set it up last night, used it with the BerryCam app and immediately had outstanding low-light performance. The command line isn't so successful yet, but I suspect that it's me, not them (a very useful assumption to make, IMO, and usually correct). Attached photo is near midnight with low-watt incandescent light source (the bulbs in the ceiling fixture are tiny).

It's an good product and I'm looking forward to using it in all sorts of projects! I didn't realize it had open source roots and I really, really appreciate the incredible work that the volunteers have put into it. Please keep at it - I'd help, but all I'm qualified for is making tea and serving biscuits!

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

Re: Consider a USB camera as an alternative

Tue Oct 01, 2013 12:15 pm

Cool. The system was being forced in to 400 ISO mode which would have affected all sorts of exposure settings.

Will soon be releasing the ability to set the exposure time, but encountering weirdness if goes above about 350ms. Having to talk to Omnivision about it as doesn't seem to be our ISP code, but I think there may be something wrong/unexpected in the low level camera driver code. Will probably release it anyway since people have already seen the issue with -ex extralong, so it's not related to the exposure time setting other than making it easier to make it go wrong.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

gordon77
Posts: 4110
Joined: Sun Aug 05, 2012 3:12 pm

Re: Consider a USB camera as an alternative

Tue Oct 01, 2013 1:16 pm

jamesh wrote:Cool. The system was being forced in to 400 ISO mode which would have affected all sorts of exposure settings.

Will soon be releasing the ability to set the exposure time, but encountering weirdness if goes above about 350ms. Having to talk to Omnivision about it as doesn't seem to be our ISP code, but I think there may be something wrong/unexpected in the low level camera driver code. Will probably release it anyway since people have already seen the issue with -ex extralong, so it's not related to the exposure time setting other than making it easier to make it go wrong.
-ex extralong, that's new :D

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

Re: Consider a USB camera as an alternative

Tue Oct 01, 2013 1:32 pm

gordon77 wrote:
jamesh wrote:Cool. The system was being forced in to 400 ISO mode which would have affected all sorts of exposure settings.

Will soon be releasing the ability to set the exposure time, but encountering weirdness if goes above about 350ms. Having to talk to Omnivision about it as doesn't seem to be our ISP code, but I think there may be something wrong/unexpected in the low level camera driver code. Will probably release it anyway since people have already seen the issue with -ex extralong, so it's not related to the exposure time setting other than making it easier to make it go wrong.
-ex extralong, that's new :D
verylong? Can't remember!

Having real problems with this long exposure issue., No idea what's going on. Numbers appear correct, but when you ask the camera to do stuff....splurgggg
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

motocoder
Posts: 29
Joined: Fri Sep 06, 2013 4:13 pm

Re: USB cameras (webcams) on Raspberry Pi

Tue Oct 01, 2013 2:18 pm

I've updated my original post to be, hopefully. a bit less inflammatory, and in particular to remove any reference to the low light issues with the RPi camera board.

Return to “Camera board”