[mousetrap/gnome3-wip: 72/240] Use NoseLocator to main.
- From: Heidi Ellis <heidiellis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mousetrap/gnome3-wip: 72/240] Use NoseLocator to main.
- Date: Mon, 8 Sep 2014 15:18:36 +0000 (UTC)
commit e40f858458addc62fa4d2c76d8447d41ed390ae1
Author: Stoney Jackson <dr stoney gmail com>
Date: Wed Jun 11 21:08:02 2014 -0400
Use NoseLocator to main.
src/mousetrap/main.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/mousetrap/main.py b/src/mousetrap/main.py
index 7c77108..704e67c 100644
--- a/src/mousetrap/main.py
+++ b/src/mousetrap/main.py
@@ -18,6 +18,7 @@ class Main(object):
self.timeout_id = None
self.camera = vision.Camera(DEVICE_INDEX,
IMAGE_MAX_WIDTH, IMAGE_MAX_HEIGHT)
+ self.locator = vision.NoseLocator()
def run(self):
self.timeout_id = GObject.timeout_add(INTERVAL, self.on_timeout, None)
@@ -25,6 +26,11 @@ class Main(object):
def on_timeout(self, user_data):
self.image = self.camera.read_image()
+ try:
+ location = self.locator.locate(self.image)
+ print location
+ except Exception as exception:
+ print exception.args
gui.show_image('diff', self.image)
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]