我使用了以下代码
VideoCapture videoCapture[]=new Videocapture[4];
for(int i=0;i<4,i++)
{
videoCapture[i]=new VideoCapture();
videoCapture[i].open("http://192.168.1.7:80/cgi-bin/view.cgi?chn="+i+"&u=admin&p=");
if(videoCapture[i].isOpened()){
JOptionPane.showMessageDialog(jfrmMsg, "connected");
}
else
{
JOptionPane.showMessageDialog(jfrmMsg, "not connected");
}
}在这里,打开相机需要花费太多的时间。每3-4分钟显示一次连接的消息.我想以最快的速度看相机。有人能告诉我我们该怎么做吗。
发布于 2022-03-09 16:37:16
将video_capture = cv2.VideoCapture(0)更改为video_capture = cv2.VideoCapture(0, cv2.CAP_DSHOW)
https://stackoverflow.com/questions/30297856
复制相似问题