This is a simple app to fetch a stream of your webcam and apply some simple effects. It is written in Rust using the opencv-rust crate.
It also supports writing a H.264 WebRTC stream that can be opened in a browser or embedded in a webpage for viewing in real time.
To build this, you need to have Rust nightly installed.
After setting up rust-nightly you can run this project using cargo run --bin opencv or cargo run --bin imageproc
for each of the two implementations.
OpenCV also needs to be installed system-wide along with GStreamer and MediaMTX for the WebRTC livestream.
For the effects checkboxes in the OpenCV implementation, you need to click the paint brush button in the toolbar:
The WebRTC stream can be found at rtsp://localhost:8889/mystream
git clone http://github.com/bertin0/challenge
cd challenge
sudo apt install opencv libgstrtspserver-1.0-dev gstreamer1.0-rtsp
curl https://sh.rustup.rs -sSf | sh
wget https://github.com/bluenviron/mediamtx/releases/download/v1.11.3/mediamtx_v1.11.3_linux_amd64.tar.gz
tar xvf mediamtx*.tar.gz
./mediamtx
cargo run --bin opencv
git clone http://github.com/bertin0/challenge
cd challenge
paru -Syu rustup opencv gstreamer gst-rtsp-server opencv mediamtx-bin
sudo systemctl start mediamtx
rustup install nightly
cargo run --bin opencv

