waveform80 / picamera

A pure Python interface to the Raspberry Pi camera module
https://picamera.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.57k stars 356 forks source link

maximum integration Time for low light capture #162

Closed snoygues closed 9 years ago

snoygues commented 10 years ago

Following example given into 4.8 chapter regarding "capturing in low light", I try to specify long exposure time : camera.framerate = Fraction(1, 6) camera.shutter_speed = 6000000 But real exposure time doesn't exceed about 0.7s I already notice this limitation using "raspistill" Did I do something wrong o forget to set some parameters ?

waveform80 commented 10 years ago

I suspect you may need camera.exposure_mode = 'off' as well. Have a look at the code snippets in #135 (that one doesn't bother setting ISO, but it does set exposure mode to 'off').

snoygues commented 10 years ago

I still have the problem.

With the following code :

with picamera.PiCamera() as camera:

    camera.resolution = (1280, 720)

    camera.framerate = Fraction(1, 6)

    camera.shutter_speed = 6000000

    camera.exposure_mode = 'off'

    # This will take more than 6 seconds (due to mode switches etc.)

    camera.capture('foo.jpg')

    print(camera.shutter_speed)

    print(camera.exposure_speed)

I get :

999777

999777

So about 1s exposure time.

I have the B+ Rpi version and the standard cam (not the NoIR) for the moment.

What’s wrong ?

From: Dave Jones [mailto:notifications@github.com] Sent: mardi 16 septembre 2014 21:02 To: waveform80/picamera Cc: snoygues Subject: Re: [picamera] maximum integration Time for low light capture (#162)

I suspect you may need camera.exposure_mode = 'off' as well. Have a look at the code snippets in #135 https://github.com/waveform80/picamera/issues/135 (that one doesn't bother setting ISO, but it does set exposure mode to 'off').

— Reply to this email directly or view it on GitHub https://github.com/waveform80/picamera/issues/162#issuecomment-55795860 . https://github.com/notifications/beacon/8523224__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyNjUxMzM0NCwiZGF0YSI6eyJpZCI6NDE3ODYzOTh9fQ==--198fde4938a830139694e2d3d5ac36f7cc735022.gif


Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com

waveform80 commented 10 years ago

Can you check what firmware version and picamera versions you have? Use uname -a to output firmware version (it's the number after the #) and this FAQ has instructions on checking the picamera version that Python is using. The longer exposure functionality only works properly in picamera 1.8 (it was deficient in 1.7) and requires a relatively recent firmware (I don't recall the exact number but anything over 700 is probably okay).

snoygues commented 10 years ago

Picamera version is : 1.8.

Firmware is : 3.15.3+ #12 from 3rd July 2014.

I can’t upgrade it to the last one because in that case, PiTft Touchscreen doesn’t work anymore.

Could be the reason of my problem ?

From: Dave Jones [mailto:notifications@github.com] Sent: lundi 22 septembre 2014 23:19 To: waveform80/picamera Cc: snoygues Subject: Re: [picamera] maximum integration Time for low light capture (#162)

Can you check what firmware version and picamera versions you have? Use uname -a to output firmware version (it's the number after the #) and this FAQ http://picamera.readthedocs.org/en/release-1.8/faq.html#how-can-i-tell-what-version-of-picamera-i-have-installed has instructions on checking the picamera version that Python is using. The longer exposure functionality only works properly in picamera 1.8 (it was deficient in 1.7) and requires a relatively recent firmware (I don't recall the exact number but anything over 700 is probably okay).

— Reply to this email directly or view it on GitHub https://github.com/waveform80/picamera/issues/162#issuecomment-56444793 . https://github.com/notifications/beacon/8523224__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyNzAzOTkxNywiZGF0YSI6eyJpZCI6NDE3ODYzOTh9fQ==--c8ea8625f38fa18164d2120ce8d31db31b1b1bb5.gif


Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com

waveform80 commented 10 years ago

Ahhh ... that's almost certainly the reason. The PiTFT screen requires a custom firmware which necessarily lags behind the official firmware. It looks like they use different numbers as well (back in July the official firmware was in the 600s, not 12). Either way, July is likely too old to contain the changes that the official firmware included to enable long exposures.

waveform80 commented 9 years ago

Note to self: add one or more FAQs about the PiTFT screen to the docs - several issues are related to it now (all to do with the custom firmware requirement)