I have a Cam M7.
I’m trying to develop a program that can create a picture which is the average of 4 other pictures .
The Idea I had is to take 5 pictures, and modify the fifth one in order to get the average ( by adding pixels)
The program is as follows :
Untitled - By: marc - mer. avr. 18 2018
import sensor, image, time, pyb
clock = time.clock()
L = 320
l = 240
img1 = sensor.snapshot()
img2 = sensor.snapshot()
img3 = sensor.snapshot()
img4 = sensor.snapshot()
img_average = sensor.snapshot()
for i in range(L*l):
img_average = ( ( img1 + img2 + img3 + img4 ) // 4 )
But I noticed that it is not possible to declare 5 Image objects by using sensor.snapshot : It’s like I have one image object instead of 5.
Is there any other way to do that ?