I want to take long exposure (say, up to 300 seconds) images.
How do I setup the camera for this?
I see sensor.set_exposure_cntrl() in the documentation. Is this what I use, how do I use it?
I’ve tried to get the camera type by executing
import sensor
print(“%s” % (sensor.get_id()))
The output is 119, not something like sensor:OV7725 as expected. What am I doing wrong?
You can do time lapse photos by using the blend command. So, basically you take pictures and then blend them together.
See the advanced frame differencing script for how to do this… (Note, this reminds me that I should add an example for this). In the advanced frame differencing script I blend images into a background image.
Wait, here’s the code:
sensor.snapshot().save("temp/bg.bmp")
while(True):
img = sensor.snapshot() # Take a picture and return the image.
img.blend("temp/bg.bmp", alpha=200)
img.save("temp/bg.bmp")
And just do that repeatedly. Note that I just guessed the alpha value up there. You need to figure out what alpha value you’d like.
For the second question the sensor ID value is an enum. So, you have to compare the value output with the enum type. The value of the return doesn’t make sense directly on it’s own. It’s just a number.