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
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:
Create a custom app using the app template
Base your app entirely off of the camera-streamer
Add opencv-python
as a dependency in setup.cfg
Add a kivy ToggleButton
in the main.kv file. This will be used to enable / disable the image capture timer.
Use time.monotonic()
timestamps for your timer.
Create a folder in your python code named something like ~/my_data/
(this = /data/home/amiga/my_data
) for writing images to
~/my_data/2023_04_18/07_23_17/
(~/my_data/YYYY_MM_DD/HH_MN_SS/
)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.
multiprocessing.Queue
and have another async task for writing images to disk. This will prevent lag of your app displaying the images if the write time is slower than the streaming frame rate of the camera (10 hz by default). See: amiga-xbox-controller for an example of using the queue.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
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