Capture Images using the OAK Camera

Hello Team,

We want to capture few images using the OAK Camera on the Amiga. Is there any instruction on how should we proceed?

Regards,
Amlan

Were you wanting to just take photo from the Amiga using the camera or just use the camera by itself to take photos perhaps using a computer or some other device through the PoE Switch?

We want the Amiga to capture pictures automatically after a certain time interval while it is moving. Do you have any instructions for that?

Hello Amlan,

We do not have instructions for this published, but this should be a fun small project for you! There are a number of ways you can do this. What I would recommend is the following:

  1. Create a custom app using the app template

  2. Base your app entirely off of the camera-streamer

  3. Add opencv-python as a dependency in setup.cfg

  4. Add a kivy ToggleButton in the main.kv file. This will be used to enable / disable the image capture timer.

  5. Use time.monotonic() timestamps for your timer.

  6. Create a folder in your python code named something like ~/my_data/ (this = /data/home/amiga/my_data) for writing images to

  7. Use cv2.imwrite() to write images to the folder if the ToggleButton state is 'down' and the timer has hit the threshold to capture the next image in the stream_camera method.

  8. After capturing data when the Amiga is back connected to the same network as your development station is connected to, use scp command line tool to transfer the files to your computer

  9. After transferring the files (and recommended saving a backup somewhere) you can delete the files in ~/my_data off the Amiga if you start running low on available disk space (seen in the lower right hand corner on the Brain home page)

These are just recommendations, so feel free to put your own twist on it. I also may have omitted a few implementation details, but the key concepts should be here.

If you’d like to make an open source app for this (by making your repository created based on the app-template public), I’d be happy to collaborate with you!

– Kyle

1 Like