The objective of this project is to point a camera at someone and by using OpenCV tracking systems, it'll automatically follow them with a pan and tilt mechanism
The intended use is for conferences, where you have to follow a person at all times, without losing the person from the frame
- Download the files in the release.
- Write the arduino to the board you're using.
- Connect the arduino to the PC via USB (COM)
- Run the
ACamOperator.exe
- Click on the detected face in the software to track it, if more faces are present, you can click on more than one.
- To stop tracking a face, click on it again
- Press the arrow keys
UP
orDOWN
to increase or decrease the vertical offset - Press the arrow keys
LEFT
orRIGHT
to increase or decrease the horizontal offset - everything should work
- press and hold
Q
for 3 seconds to quit.
This code is designed for the following specifications, your mileage may vary.
- This uses the webcam as input. In theory, anything that can be detected as a webcam can be used
- the output is through a COM port, in this packet format (not final):
$[horizontalSpeedByte][VerticalSpeedByte][CS]
$
is the start byte identifierspeed bytes
are a single char (signed), that is, 127 speeds are available in either directionCS
is the checksum, an Xor of the 2 speed bytes.
This project is developed using the open source license of Jetbrain's Rust Rover. I advise using it for editing this source code as well
- OpenCV Version used in this project: 4.10
- This project source does NOT include the OpenCV binaries. find out on your own how to obtain it and configure them on your system. Tutorial
- The OpenCV Binaries must be included in both the
target/debug
folder while developing and in the release distribution
- This project uses yunet and sface for facial detection and recognition.
- A copy of the models weights are supplied with this project source in the
/models
folder. - These models must be renamed to
yunet.onnx
andsface.onnx
and copied to thetarget/debug/models
folder for development - For the release, these models must also be distributed with the final exe.
- The models are available in the OpenCV/zoo repository and are under the Apache V2 License
This code is licensed under the GPL3 License. TL;DR:
1. Anyone can copy, modify and distribute this software.
2. You have to include the license and copyright notice with each and every distribution.
3. You can use this software privately.
4. You can use this software for commercial purposes.
5. If you dare build your business solely from this code, you risk open-sourcing the whole code base.
6. If you modify it, you have to indicate changes made to the code.
7. Any modifications of this code base MUST be distributed with the same license, GPLv3.
8. This software is provided without warranty.
9. The software author or license can not be held liable for any damages inflicted by the software.
More information on about this license can be found here