I don’t know if it is my camera only, but I am getting strange behavior (“behaviour” for you non-Americans ) in a couple of cases.
The first case is if I use an odd number for the width in the ROI of the set_windowing method, there is some strange distortion.
Secondly, with some even-numbered widths the image jumps around, for example if I use 20 pixels.
sensor.set_windowing((10, 0, 20, 120))
I have a video (with the newest version of the IDE! ) that I can upload if you want to see it.
It doesn’t seem to matter if I use color or B/W or change the frame size.
Anyone else seeing this issue?
Here is my code I’m using to reproduce the issue:
import sensor, image
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QQVGA)
sensor.skip_frames(time = 2000)
sensor.snapshot()
for i in range(1, sensor.width()):
roi = (0, 0, i, sensor.height())
print(roi)
sensor.set_windowing(roi)
sensor.skip_frames(time = 1000)
sensor.snapshot()
I also want to say that I am having issues with the img.save() method. It always seems to add a .bmp extension to the file.
This:
img.save("snapshot" + str(pyb.millis()) + ".jpg", quality=50)
produces files such as “snapshot2827052.jpg.bmp”.
I’m not sure if my app to view the image is just looking at the file headers to display it correctly because I can open it with .bmp or without it.