[mousetrap/gnome3-wip: 239/240] Convert comments to code.
- From: Heidi Ellis <heidiellis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mousetrap/gnome3-wip: 239/240] Convert comments to code.
- Date: Mon, 8 Sep 2014 15:32:39 +0000 (UTC)
commit 66fceaffaf0590c53194d375cdf1f9bbd549a381
Author: Stoney Jackson <dr stoney gmail com>
Date: Mon Jul 21 11:17:02 2014 -0400
Convert comments to code.
src/mousetrap/vision.py | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/mousetrap/vision.py b/src/mousetrap/vision.py
index 85d737f..953bd98 100644
--- a/src/mousetrap/vision.py
+++ b/src/mousetrap/vision.py
@@ -14,6 +14,11 @@ import mousetrap.plugins.interface as interface
import logging
LOGGER = logging.getLogger(__name__)
+
+FRAME_WIDTH = 3
+FRAME_HEIGHT = 4
+
+
class Camera(object):
S_CAPTURE_OPEN_ERROR = _(
'Device #%d does not support video capture interface')
@@ -40,10 +45,8 @@ class Camera(object):
return capture
def set_dimensions(self, width, 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)
+ self._device.set(FRAME_WIDTH, width)
+ self._device.set(FRAME_HEIGHT, height)
def read_image(self):
ret, image = self._device.read()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]