Take a snapshot with a web camera via OpenCV4.
- libopevncv-dev (opencv4 or higher)
- g++
- pkg-config
- PHP 7.4 or higher with PHP-FFI extension
- GNU Make
$ composer require hanhan1978/php-opencv-webcam
$ cd vendor/hanhan1978/php-opencv-webcam/
$ make
<?php
require_once './vendor/autoload.php';
$camera = new \Hanhan1978\OpenCv\Camera();
$camera->snapshot('test.png');