roaldarbol / bux Goto Github PK
View Code? Open in Web Editor NEW๐ A simple GUI for running experiments
License: MIT License
๐ A simple GUI for running experiments
License: MIT License
When working on a RPi, the CSI camera is not discoverable by OpenCV (libcamera support is an open issue). Instead, use picamera2
when the OS is Raspberry Pi OS. Append as the last camera.
We'll need to be able to schedule recording - both recording time, time between and number of recordings preferably. Have a look at how it's implemented for RPi in Jolle's picamera.
Uses from mpremote import pyboard
- see screenshot:
To list available serial ports, see here
Should preferably be a solution where a serial.write
sends a command to begin and end.
(Let's make the serial connection into its own module to be published on PyPi - then others should be able to easily access a serial connection in Tkinter (or other GUI) applications.)
VidGear is a wrap-around library that works both for webcams and picamera, can thread multiple processes seamlessly. Idea will be to edit the record_video.py
file to manage recording irrespective of the OS.
The edits from commit 90656b2 needs to be entered into cam_record
too.
Currently, frame numbers will all end in the same log file, even when multiple videos are recorded sequentially from the same camera.
For controlling microcontrollers, Belay will be the chosen direction. Currently, the script establishes the connection to the board which may complicate things a bit as you'll need to tell the script which port to connect to. Could possibly use a class that takes the port as an input, establishes the connection in init, and then has @device.task methods.
Look at the logging module.
Running code from micropython or arduino will make a difference. Additionally, I could enable WebREPL support for ESP's and other WiFi-enabled boards.
Would be great to spawn a new window for video streams, adjusting settings, maybe something serial related.
VidGear looks like it provides a really good frontend - simpler than OpenCV, and really wide support. They're changing to a higher-performing ffmpeg backend. Not currently supporting picamera2, but that can be supported separately until then.
The issues related to settings are beginning to build up, so it is about time that settings are properly implemented. Should there be a pop-up box, a settings file, ability to save/load settings etc. Can we write generic methods in a settings class?
Can be done with multi-threading, only I'm still not sure what exactly needs to be done and what the UI will look like - but it will be exciting!
Because we're iterating through the camera objects, they record too slow (my guess is at around 50%). Tried briefly with asyncio
without luck. I think using threading
or multiprocessing
is the way (see links).
mp4
and avi
. Just add the drop-down menu.
Make a button for importing settings.
Finishing multiprocessing processes gracefully is a bit intricate. Send something to the queue (one value per process) so shut them down gracefully. Similarly, you can use the queue to synchronise the start of the recordings.
https://pymotw.com/3/multiprocessing/communication.html#multiprocessing-queues
The serial connection in gui.py
needs to be moved. Also this is a test of making issues directly from VSCodium.
When initializing the app, utils.list_ports()
tries to initialize cameras on all channels and throws errors in return for most.
There's both a README
and mkdocs
to be written for good documentation.
In the serial window, the keyboard is laggy when cameras are being previewed.
Currently, errors are thrown and a tiny window is generated.
poetry
has some good documentation on how to do this. Preferably start out with TestPyPI.
Currently the toml file doesn't have categories, but it would be a convenient thing to have, making it more understandable. A loop needs to be made which can still access the items()
.
Would be great if it can automatically populated with the OpenCV parameters that the camera can take on.
The process needs to exit gracefully. Make a new class which inherits from mp.Process()
, and modify the terminate
method to do cv2
stuff.
Get system info - which platform is being used, which camera driver framework is being used (e.g. v4l2
or av-foundation
). Use this information to automatically set possible settings.
Could be either Qt or something that runs in the browser like streamlit
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.