User Tools

Site Tools


open_cv_set_up

Differences

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

Link to this comparison view

Next revision
Previous revision
open_cv_set_up [2019/06/21 04:23] – created myeonggeonkimopen_cv_set_up [2019/06/21 04:59] (current) myeonggeonkim
Line 10: Line 10:
 {{ mgkim:opencv_7.jpg?800 |}} {{ mgkim:opencv_7.jpg?800 |}}
 \\ \\
-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 work.+It will help you to understand how OpenCV video system works.
 \\ \\
 ==== Example ==== ==== Example ====
 \\ \\
 \\ \\
-For controlling actuating time, we will use "sleep" function in "window.hheader file.+"videocapture_basic.cppis made by two big parts.
 \\ \\
-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:opencv_8.jpg?600 |}}
 \\ \\
-sleep(time)+This is opening camera part.
 \\ \\
-</fc>+"cap.open()" function helps opening the camera.
 \\ \\
-In this function, Time is millisecond(1/1000 second).+We can shorten this function like below.
 \\ \\
-<fc blue>+{{ mgkim:opencv_10.jpg?600 |}}
 \\ \\
-=======================================================================================================+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/file/d/1_BO2PKD7thJg1jXfoisZ7NxwpFquCt0c/view?usp=sharing|answer}}+{{ mgkim:opencv_9.jpg?600 |}}
 \\ \\
 +This part is image capturing fuction.
 \\ \\
-=======================================================================================================+OpenCV makes real time video by showing captured images constantly.
 \\ \\
-</fc> +Frame is how many images are showing in 1 sec.
-\\ +
-\\ +
-==== Direction Change ==== +
-\\ +
-\\ +
-Know how to change the direction of rotation is important for controlling Dynamixel. +
-\\ +
-Dynamixel speed has its own speed scale. +
-\\ +
-Read e-manual http://emanual.robotis.com/docs/en/dxl/mx/mx-28/#control-table-data-address +
-\\ +
-{{ mgkim:ds_15.jpg?600 |}} +
-\\ +
-As you can see,  +
-\\ +
-<fc blue> +
-\\ +
-CW speed + 1024 = CCW speed +
-\\ +
-</fc> +
-\\ +
-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->write2ByteTxRx(portHandler, DXL1_ID, ADDR_MOVING_SPEED, spd, &dxl_error); +
-\\ +
-dxl_comm_result = packetHandler->write2ByteTxRx(portHandler, DXL2_ID, ADDR_MOVING_SPEED, spd + 1024, &dxl_error); +
-\\ +
-\\ +
-======================================================================================================= +
-\\ +
-</fc>+
 \\ \\
-Now you know how to move gantry.+"imshow" function is a function that shows image on window.
 \\ \\
 ==== Final Words ==== ==== Final Words ====
open_cv_set_up.txt · Last modified: 2019/06/21 04:59 by myeonggeonkim