User Tools

Site Tools


opencv_tutorials_t1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
opencv_tutorials_t1 [2016/06/06 15:00] joaomatosopencv_tutorials_t1 [2017/05/13 16:55] (current) – [Using your Webcam Image] acater
Line 9: Line 9:
 {{::basic_operations_using_webcam.rar|Basic operations using webcam}} {{::basic_operations_using_webcam.rar|Basic operations using webcam}}
  
-{{ ::basic_op.jpg?direct |}}+
  
 ---- ----
 +===== Basic Operations =====
 +
 +{{ ::basic_op.jpg?direct |}}
  
 <Code:c++ linenums:1> <Code:c++ linenums:1>
Line 92: Line 95:
 **Line 1 to 11**: **Line 1 to 11**:
  
- First we have to include the modules from OpenCV that will be used on the program. Each modules has its own functions and Variables type. (For example: the Mat variable type , the cvtColor function , the imshow function , etc... - each one is inside of one OpenCV module , that needs to be included in order to make the program compile).+ First we have to include the modules from OpenCV that will be used on the program. Each modules has its own functions and Variables type. (For example: the Mat variable type , the cvtColor function , the imshow function , etc... - each one is inside of one OpenCV module , that needs to be included in order to make the program compile). The "usingnamespace" is convenient to declare always because it avoid us to type cv::OpenCVFunction  or std::StandardFunction always before using the function for the opencv scope or standard scope.
  
  
Line 284: Line 287:
 </Code> </Code>
 The loop will run until the "q" key on the keyboard is pressed (we need to declare the key variable first ). The video shown on the images will be a collection of frames took from your webcam ( using the assign **capture >> colorimage**) the color image will store the webcam frame . The rest of the code is the same thing as the last code , converting to gray scale and HSV.  At the end we just need to assign the **"waitKey"** command to the key variable and close the loop. The loop will run until the "q" key on the keyboard is pressed (we need to declare the key variable first ). The video shown on the images will be a collection of frames took from your webcam ( using the assign **capture >> colorimage**) the color image will store the webcam frame . The rest of the code is the same thing as the last code , converting to gray scale and HSV.  At the end we just need to assign the **"waitKey"** command to the key variable and close the loop.
 +
 +\\
 +The video below demonstrates the program as it is run in real time.
 +\\
 +{{youtube>PqW0GsMVRd0?medium}}
opencv_tutorials_t1.1465250431.txt.gz · Last modified: by joaomatos