loading
1Comments

Tell us about yourself!

Complete Your Profile
  • Face detection and tracking with Arduino and OpenCV

    To use this code with OpenCV3, you have to change out the way the program captures frames from the webcamera:At the top of main, swap out "CvCapture* capture;" with "VideoCapture capture(0);".A few lines further down you find the capture attempt with: capture = cvCaptureFromCAM( 3 );, which can be removed entirely. While you're at it, remove the if sentence underneath it as well. It checks if it's able to capture with the camera, but is in reality completely pointless as if the camera isn't working you'll be getting an error before it. An error that you want, mind you, so trying to toss it aside with an if-sentence and exiting the program isn't exactly good code.Next swap out the line "frame = cvQueryFrame( capture );" with "capture >> frame;&quo...see more »To use this code with OpenCV3, you have to change out the way the program captures frames from the webcamera:At the top of main, swap out "CvCapture* capture;" with "VideoCapture capture(0);".A few lines further down you find the capture attempt with: capture = cvCaptureFromCAM( 3 );, which can be removed entirely. While you're at it, remove the if sentence underneath it as well. It checks if it's able to capture with the camera, but is in reality completely pointless as if the camera isn't working you'll be getting an error before it. An error that you want, mind you, so trying to toss it aside with an if-sentence and exiting the program isn't exactly good code.Next swap out the line "frame = cvQueryFrame( capture );" with "capture >> frame;" and you're all done.

    View Instructable »