diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-06-08 09:33:12 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-06-08 09:33:12 +0200 |
commit | c81c6223b7d9e5973f5d2825c399d5777e093c58 (patch) | |
tree | a7eceaf2e0b6525f6aeacaedb1b33e42582529e8 /nicla/downscale.py | |
parent | 97939ee4eaad5937a0a2eee190b2b9028d009a97 (diff) | |
parent | 2903e61cbe2eeff3121f67da516ea195999f0bba (diff) |
merge dev into master
Diffstat (limited to 'nicla/downscale.py')
-rw-r--r-- | nicla/downscale.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nicla/downscale.py b/nicla/downscale.py new file mode 100644 index 0000000..738b4bb --- /dev/null +++ b/nicla/downscale.py @@ -0,0 +1,19 @@ +import sensor, image, time, math + +sensor.reset() +sensor.set_pixformat(sensor.RGB565) +sensor.set_framesize(sensor.HVGA) +sensor.skip_frames(time = 2000) +sensor.set_vflip(True) +sensor.set_hmirror(True) +clock = time.clock() + +def main(): + img = sensor.snapshot() + img.to_grayscale() + img.scale(copy_to_fb=True, x_size=100) + +if __name__ == "__main__": + while(True): + main() + clock.tick() |