我正在尝试使用opencv4nodejs向一个用base64编码的网页提供摄像头镜头
我无法可靠地让opencv以超过10fps的速度轮询相机。我相信这是由于性能原因。
我想限制框架的大小以提供帮助。我正在使用
this.cvCap.set(cv.CAP_PROP_FRAME_WIDTH,300);
this.cvCap.set(cv.CAP_PROP_FRAME_HEIGHT,300);但是当我使用这些命令时,我得到以下错误
/home/brandonp/repos/nestwebcam/dist/webcam/webcam.service.js:30
const image = cv.imencode(".jpg", frame).toString('base64');
^
Io::Imencode - OpenCV Error: (Raw image encoder error: Empty JPEG image (DNL not supported)) in throwOnEror, in file /home/brandonp/repos/nestwebcam/node_modules/opencv-build/opencv/opencv/modules/imgcodecs/src/grfmt_base.cpp, line 145, status -10
(Use `node --trace-uncaught ...` to show where the exception was thrown)发布于 2020-08-10 01:06:28
我认为错误是由于您的相机断开连接或无法读取。请检查您的摄像头是否工作正常,是否使用命令raspistill -o testshot.jpg
https://stackoverflow.com/questions/63314329
复制相似问题