Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "opencv2/opencv.hpp"
- using namespace cv;
- int main(int, char**)
- {
- /* Ouvrir la caméra */
- VideoCapture cap(0);
- if(!cap.isOpened())
- return -1;
- Mat contours;
- namedWindow("contours",1);
- Mat frame;
- for(;;)
- {
- cap >> frame;
- cvtColor(frame, contours, COLOR_BGR2GRAY);
- GaussianBlur(contours, contours, Size(7,7), 1.5, 1.5);
- Canny(contours, contours, 0, 30, 3);
- imshow("contours", contours);
- if(waitKey(30) >= 0)
- break;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement