Difference between revisions of "ROS CamShift"
From wikidb
(New page: == Listings == * Track It using CamShift) |
(→Snapshot) |
||
(20 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | == Listings == | + | == For OpenCV 2 == |
+ | |||
+ | For NUC with Ubuntu 14.04 and OpenCV 2.4. | ||
+ | |||
+ | === Source === | ||
+ | |||
+ | [[cam_shift_tracker.cpp v1]] (In progress) | ||
+ | |||
+ | === Build === | ||
+ | |||
+ | Modifications to [[CMakeLists.txt v1]] | ||
+ | |||
+ | Add these to the <tt>Build</tt> section | ||
+ | |||
+ | # cam_shift_tracker | ||
+ | add_executable(cam_shift_tracker src/cam_shift_tracker.cpp) | ||
+ | target_link_libraries(cam_shift_tracker | ||
+ | ${catkin_LIBRARIES} | ||
+ | ${OpenCV_LIBRARIES} | ||
+ | ) | ||
+ | |||
+ | In <tt>/home/eepp/catkin_ws</tt>. | ||
+ | |||
+ | catkin_make | ||
+ | |||
+ | === Execute === | ||
+ | |||
+ | roscore | ||
+ | rosrun usb_cam usb_cam_node ~video_device "/dev/video0" | ||
+ | rosrun follow cam_shift_tracker | ||
+ | rosrun follow move_it_pid | ||
+ | rosrun phidgets motor_control_hc | ||
+ | |||
+ | === Launch Script === | ||
+ | |||
+ | [[camshift_follow.launch]] | ||
+ | |||
+ | === rqt_graph === | ||
+ | |||
+ | [[Image:rosgraph_camshift.png | 700px]] | ||
+ | |||
+ | === Snap Shot === | ||
+ | |||
+ | [[Image:CamShift20160708.png]] | ||
+ | |||
+ | === Notes === | ||
+ | |||
+ | * [http://docs.ros.org/jade/api/opencv_apps/html/camshift__nodelet_8cpp_source.html Camshift Nodelet] - investigate it | ||
+ | |||
+ | == Old == | ||
+ | |||
+ | === Listings === | ||
+ | |||
+ | Based on /usr/share/doc/opencv-doc/examples/c/camshiftdemo.c. See [[CamShift]]. | ||
* [[Track It using CamShift]] | * [[Track It using CamShift]] |
Latest revision as of 10:29, 8 July 2016
Contents
For OpenCV 2
For NUC with Ubuntu 14.04 and OpenCV 2.4.
Source
cam_shift_tracker.cpp v1 (In progress)
Build
Modifications to CMakeLists.txt v1
Add these to the Build section
# cam_shift_tracker add_executable(cam_shift_tracker src/cam_shift_tracker.cpp) target_link_libraries(cam_shift_tracker ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} )
In /home/eepp/catkin_ws.
catkin_make
Execute
roscore rosrun usb_cam usb_cam_node ~video_device "/dev/video0" rosrun follow cam_shift_tracker rosrun follow move_it_pid rosrun phidgets motor_control_hc
Launch Script
rqt_graph
Snap Shot
Notes
- Camshift Nodelet - investigate it
Old
Listings
Based on /usr/share/doc/opencv-doc/examples/c/camshiftdemo.c. See CamShift.