MouseTrap Dev Help
(Difference between revisions)
(→cv 2.4.3) |
(→cv 2.4.3) |
||
Line 13: | Line 13: | ||
* http://docs.opencv.org/doc/tutorials/tutorials.html -> tutorials on opencv | * http://docs.opencv.org/doc/tutorials/tutorials.html -> tutorials on opencv | ||
+ | |||
+ | ==== A cv2 example ==== | ||
+ | Here is a little program that will capture video from the webcam and display it (you might have to CTRL+C) | ||
+ | """ | ||
+ | This module is used for testing the opencv2 capabilities | ||
+ | """ | ||
+ | import cv2 | ||
+ | #get webcam feed | ||
+ | capture = cv2.VideoCapture(0) | ||
+ | while True: | ||
+ | #combines VideoCapture.grab() and VideoCapture.retrieve() | ||
+ | retrieval_value, image = capture.read() | ||
+ | #shows captured image in a window | ||
+ | cv2.imshow("webcam", image) | ||
+ | #will stop capture with capatible webcam | ||
+ | if cv2.waitKey(10) == 27: | ||
+ | break | ||
=== cv 2.1 === | === cv 2.1 === |
Revision as of 19:43, 11 February 2013
Contents |
Opencv
Great Resources
cv 2.4.3
- http://docs.opencv.org -> documentation
- http://docs.opencv.org/opencv2refman.pdf / http://cvhci.anthropomatik.kit.edu/download/visionhci09/opencv.pdf -> pdf documentation resources
- http://nullege.com/codes/search/cv -> Entire collection of opencv examples based on module
- http://fossies.org/dox/OpenCV-2.4.3/index.html -> Complete Hierarchical guide to opencv
- http://docs.opencv.org/doc/tutorials/tutorials.html -> tutorials on opencv
A cv2 example
Here is a little program that will capture video from the webcam and display it (you might have to CTRL+C) """ This module is used for testing the opencv2 capabilities """ import cv2 #get webcam feed capture = cv2.VideoCapture(0) while True: #combines VideoCapture.grab() and VideoCapture.retrieve() retrieval_value, image = capture.read() #shows captured image in a window cv2.imshow("webcam", image) #will stop capture with capatible webcam if cv2.waitKey(10) == 27: break
cv 2.1
Concerns
Here we place all of the concerns when migrating to a newer version of opencv or the repercussions of not upgrading.
Migration to Python 3
- Opencv 2.4.3 does not support Python 3
Camera drivers
- Currently, only some camera drivers are supported with the new version of opencv, leading to problems regarding capture. One issue is the inability to cancel the program webcam capture.
Yum repo
- Right now, only the 2.3.1 version of opencv is available in the yum repository