mirror of
https://github.com/AntoineHX/LivingMachine.git
synced 2025-05-04 05:40:46 +02:00
Premier log
This commit is contained in:
commit
d9edd298f6
45 changed files with 2306 additions and 0 deletions
27
code/DisplayImage.cpp
Normal file
27
code/DisplayImage.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
#include <stdio.h>
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
using namespace cv;
|
||||
|
||||
int main(int argc, char** argv )
|
||||
{
|
||||
|
||||
|
||||
VideoCapture cap(0); // open the default camera
|
||||
if(!cap.isOpened()) // check if we succeeded
|
||||
return -1;
|
||||
Mat frame;
|
||||
|
||||
cvNamedWindow("tests",CV_WINDOW_AUTOSIZE);
|
||||
while(1){
|
||||
|
||||
cap >> frame; // get a new frame from camera
|
||||
|
||||
imshow("tests", frame);
|
||||
if(waitKey(30) >= 0) break; //Arrete la capture
|
||||
|
||||
}
|
||||
cv::waitKey(0); // Termine le programme
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue