open_cv_set_up
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
open_cv_set_up [2019/06/21 04:23] – created myeonggeonkim | open_cv_set_up [2019/06/21 04:59] (current) – myeonggeonkim | ||
---|---|---|---|
Line 10: | Line 10: | ||
{{ mgkim: | {{ mgkim: | ||
\\ | \\ | ||
- | This tutorial is for whom wants to build opencv library. | + | This tutorial is for whom wants to build opencv library. Visual studio is required for this tutorial. |
\\ | \\ | ||
\\ | \\ | ||
Line 55: | Line 55: | ||
After setting up, Let's take a look functions in video example code. | After setting up, Let's take a look functions in video example code. | ||
\\ | \\ | ||
- | It will help you to understand how OpenCV video system | + | It will help you to understand how OpenCV video system |
\\ | \\ | ||
==== Example ==== | ==== Example ==== | ||
\\ | \\ | ||
\\ | \\ | ||
- | For controlling actuating time, we will use "sleep" function in " | + | "videocapture_basic.cpp" |
\\ | \\ | ||
- | Search on Google if you have no idea about sleep function. | + | One is opening camera and the other is capturing images. |
\\ | \\ | ||
- | function is | + | Let's take a look. |
\\ | \\ | ||
- | <fc blue> | + | {{ mgkim: |
\\ | \\ | ||
- | sleep(time) | + | This is opening camera part. |
\\ | \\ | ||
- | </fc> | + | " |
\\ | \\ | ||
- | In this function, Time is millisecond(1/ | + | We can shorten |
\\ | \\ | ||
- | <fc blue> | + | {{ mgkim: |
\\ | \\ | ||
- | ======================================================================================================= | + | If you have more than two cameras in your system, you can easily change cameras by change the number inside (). |
\\ | \\ | ||
+ | Number means priority of cameras in your system. | ||
\\ | \\ | ||
- | Exercise. Modify previous code for Dynamixels to actuate during input time | ||
\\ | \\ | ||
- | Here is {{https://drive.google.com/ | + | {{ mgkim:opencv_9.jpg?600 |}} |
\\ | \\ | ||
+ | This part is image capturing fuction. | ||
\\ | \\ | ||
- | ======================================================================================================= | + | OpenCV makes real time video by showing captured images constantly. |
\\ | \\ | ||
- | </ | + | Frame is how many images are showing in 1 sec. |
- | \\ | + | |
- | \\ | + | |
- | ==== Direction Change ==== | + | |
- | \\ | + | |
- | \\ | + | |
- | Know how to change the direction of rotation | + | |
- | \\ | + | |
- | Dynamixel speed has its own speed scale. | + | |
- | \\ | + | |
- | Read e-manual http:// | + | |
- | \\ | + | |
- | {{ mgkim: | + | |
- | \\ | + | |
- | As you can see, | + | |
- | \\ | + | |
- | <fc blue> | + | |
- | \\ | + | |
- | CW speed + 1024 = CCW speed | + | |
- | \\ | + | |
- | </ | + | |
- | \\ | + | |
- | Now you know how to change direction. | + | |
- | \\ | + | |
- | <fc blue> | + | |
- | \\ | + | |
- | ======================================================================================================= | + | |
- | \\ | + | |
- | \\ | + | |
- | Exercise. Modify previous code for two Dynamixels to rotate on different direction. | + | |
- | \\ | + | |
- | \\ | + | |
- | Answer : | + | |
- | \\ | + | |
- | dxl_comm_result = packetHandler-> | + | |
- | \\ | + | |
- | dxl_comm_result = packetHandler-> | + | |
- | \\ | + | |
- | \\ | + | |
- | ======================================================================================================= | + | |
- | \\ | + | |
- | </fc> | + | |
\\ | \\ | ||
- | Now you know how to move gantry. | + | " |
\\ | \\ | ||
==== Final Words ==== | ==== Final Words ==== |
open_cv_set_up.txt · Last modified: 2019/06/21 04:59 by myeonggeonkim