Jake_J
Posts: 13
Joined: Tue Oct 29, 2019 4:05 pm

Constancy in images of time lapse

Tue Dec 10, 2019 4:53 pm

I am not sure if this is exactly the right place to ask this question, so I apologise if it is not.


I am trying to monitor various different items over time in a fridge and have set up an rpi camera with NeoPixel lights to capture images every ten minutes or so.

I am wondering what the best settings would be to make sure the images are constant.

My current protocol is:

Code: Select all

	lights.lights_on()
	camera = picamera.PiCamera()
	camera.resolution = (3280 , 2464)
	
	# Set ISO to the desired value
	camera.iso = 200
	camera.brightness = 55
	# Wait for the automatic gain control to settle
	time.sleep(10)
	# Now fix the values
	camera.shutter_speed = camera.exposure_speed
	camera.exposure_mode = 'off'
	g = camera.awb_gains
	camera.awb_mode = 'off'
	camera.awb_gains = g


	time.sleep(5)
	
	name = time.time()
	
	output = "{}.jpg".format(name)
	
	camera.capture(output = output, quality = 100)

	lights.lights_off()
	camera.close()

	time.sleep(3600)


while True:
	time_lapse()
	
	

It works quite well, but there is still some slight movement of the objects. (as the camera focuses I assume). Is it possible to 'fix' the focus so that the images are identical each time?
The colour changes ever so slightly on occasion, I assume that there is either some logical error in my code, or I am not using the optimal settings.

any help would be appreciated

An example of what I have captured so far is shown below.

https://www.youtube.com/watch?v=V7c8qrbR0xM

Jake_J
Posts: 13
Joined: Tue Oct 29, 2019 4:05 pm

Re: Constancy in images of time lapse

Mon Jan 06, 2020 10:34 am

I believe I have 'fixed' the issue I was having with colour as I was initiating the camera with all its settings prior to each capture, therefore getting slightly different results.

I have not managed to fix the issue of the focus and therefore the timelapse look a little jumpy. Does anyone have any ideas for this or is it something I will simply have to live with?

I suppose I could capture images more frequently, and then have the timelapse run faster, so that it looks smoother but that would be papering over cracks.

therealdavidp
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1
Joined: Tue Jan 07, 2020 9:15 am

Re: Constancy in images of time lapse

Tue Jan 07, 2020 9:26 am

There is no autofocus on either of the v1 or v2 Raspberry Pi camera boards, so the explanation for the "jumpiness" must lie elsewhere. Are you sure there aren't other factors at work - such as when the fridge turns on or off according to the thermostat, or the door is opened, and everything within the fridge gets a slight "nudge"? (I did enjoy watching the avocado go brown in the video, by the way!)

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

Re: Constancy in images of time lapse

Tue Jan 07, 2020 10:15 am

Great video!

I think the jitter is almost certainly vibration caused by the fridge compressor. Is the camera mounted on rubber shock absorbers?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

Jake_J
Posts: 13
Joined: Tue Oct 29, 2019 4:05 pm

Re: Constancy in images of time lapse

Wed Jan 08, 2020 4:43 pm

therealdavidp wrote:
Tue Jan 07, 2020 9:26 am
There is no autofocus on either of the v1 or v2 Raspberry Pi camera boards, so the explanation for the "jumpiness" must lie elsewhere. Are you sure there aren't other factors at work - such as when the fridge turns on or off according to the thermostat, or the door is opened, and everything within the fridge gets a slight "nudge"? (I did enjoy watching the avocado go brown in the video, by the way!)
Ahh this is interesting information. The fridge is never opened during the capture, so it shouldn't be from this action. The Camera is essentially attached to a piece of foam-board which is fairly flimsy, perhaps it is the cycling of the fridge that is causing minor vibrations causing the 'jumpiness'.

Return to “Camera board”