image processing - Shape Detection using OpenCV from live video stream -


in post, topic of shape detection (from images) in opencv considered. extend topic, how possible detect shapes opencv live video stream in real time?

yes, possible detect shapes using opencv video stream - miki mentioned, videocapture , grabbing each frame single image way that. code in c++ like:

//inside method, make sure bring in libraries needed videocapture capture(0); //opens first webcam on computer mat frame;  while (true) {      capture >> frame; //pulls next frame in     if (frame.empty()) { //makes sure it's not empty     printf("no frame!");     break;}     //do whatever want frame here     imshow("framename", frame); //displays frame user     waitkey(1); //longer gives longer delay between frames } 

doing in real-time little more difficult - depending on how fast frame-rate on camera , how powerful computer processing program is, can trim update rate down fractions of second. if it's still not fast enough, going through opencv cuda or opencv gpu libraries might faster speed need.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -