aboutsummaryrefslogtreecommitdiff
path: root/nicla/downscale.py
diff options
context:
space:
mode:
authorheavydemon21 <48092678+heavydemon21@users.noreply.github.com>2023-06-07 11:21:52 +0200
committerGitHub <noreply@github.com>2023-06-07 11:21:52 +0200
commit96b0d8f65fd7d7bd8cd2177c2e6d3f1679239519 (patch)
treeb897da8c55c140f49229e82d383af16da921fc89 /nicla/downscale.py
parentb62bcc004fc0dd3d53fbbaf02d3af516b7cb47e0 (diff)
parentc537c7ad294107b1804975c4e7ed0dc9886990cf (diff)
Merge branch 'lonkaars:dev' into dev
Diffstat (limited to 'nicla/downscale.py')
-rw-r--r--nicla/downscale.py19
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()