[mousetrap/gnome3-wip: 238/240] `cv` no longer exists



commit 6d191ef63d273c947e0a0c6b7bb3136ac7b152b4
Author: Kevin Brown <kevin kevinbrown in>
Date:   Tue Jul 1 21:29:51 2014 -0400

    `cv` no longer exists

 src/mousetrap/vision.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/mousetrap/vision.py b/src/mousetrap/vision.py
index 0e9129f..85d737f 100644
--- a/src/mousetrap/vision.py
+++ b/src/mousetrap/vision.py
@@ -7,7 +7,6 @@ All things computer vision.
 '''
 
 import cv2
-import cv
 from mousetrap.i18n import _
 from mousetrap.image import Image
 import mousetrap.plugins.interface as interface
@@ -41,8 +40,10 @@ class Camera(object):
         return capture
 
     def set_dimensions(self, width, height):
-        self._device.set(cv.CV_CAP_PROP_FRAME_WIDTH, width)
-        self._device.set(cv.CV_CAP_PROP_FRAME_HEIGHT, height)
+        # 3 = cv.CV_CAP_PROP_FRAME_WIDTH
+        self._device.set(3, width)
+        # 4 = cv.CV_CAP_PROP_FRAME_HEIGHT
+        self._device.set(4, height)
 
     def read_image(self):
         ret, image = self._device.read()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]