java - 构造函数 VideoCapture(long) 不可见
问题描述
我无法创建 VideoCapture(0) 构造函数。
public WritableImage capureFrame() {
WritableImage writableImage = null;
// Loading the OpenCV core library
System.loadLibrary( Core.NATIVE_LIBRARY_NAME );
// Instantiating the VideoCapture class (camera:: 0)
VideoCapture capture = new VideoCapture(0);
// Reading the next video frame from the camera
Mat matrix = new Mat();
capture.read(matrix);
// If camera is opened
if(!capture.isOpened()) {
System.out.println("camera not detected");
} else {
System.out.println("Camera detected ");
我是这个 openCV 的新手,请帮助我使用网络摄像头捕捉视频。我使用的是 openCV-4.3.0 版本及其 jars 和 x64 dll 文件。
解决方案
推荐阅读
- dataweave - Mulesoft DataWeave:如何为带引号的字符串转义 $
- javascript - 有没有办法在 React JS 中查看已映射数组中的特定项目?
- node.js - 开始使用 Google Sheets API 无法获取配置/令牌文件
- vb6 - 获取点的颜色
- reactjs - 为什么背景颜色只应用于可见部分
- java - Android:切换案例和案例中的随机数代码
- angular - Angular 单元测试永远不会达到断言
- asp.net-core - 如果来自特定 URL 或同一站点 asp.net core 3 的请求,则允许匿名访问
- javascript - Mapbox GL - 突出显示功能和 queryRenderedFeatures(),同时允许更改底图样式
- react-native - 如何访问导航容器之外的导航