1 | initial version |
This is the code i used to open USB3.0 IDS camera in opencv.
using namespace cv; using namespace std; int main() { Mat CameraFrame; Mat Grey; VideoCapture cap; char keypressed; cap.open(0); if( !cap.isOpened() ) {cout << "Could not initialize capturing...\n"; return -1;} namedWindow("Camera Preview", CV_WINDOW_AUTOSIZE); for(;;) {cap >> CameraFrame; if( CameraFrame.empty() ) break; imshow("Camera Preview", CameraFrame); keypressed = (char)waitKey(10); if( keypressed == 27 ) break;} cap.release(); return 0;}
2 | No.2 Revision |
This is the code i used to open USB3.0 IDS camera in opencv.
#include<opencv2/opencv.hpp>
#include<iostream>
using namespace cv;
using namespace std;
int main()
{
Mat CameraFrame;
Mat Grey;
VideoCapture cap;
char keypressed;
cap.open(0);
if( !cap.isOpened() )
{cout <<