Merge lp:~zedtux/quiestla/1.0 into lp:quiestla

Proposed by Guillaume Hain
Status: Merged
Merged at revision: 2
Proposed branch: lp:~zedtux/quiestla/1.0
Merge into: lp:quiestla
Diff against target: 67 lines (+13/-13)
2 files modified
quiestla/common/opencvclient.py (+5/-12)
quiestla/common/quiestlaservice.py (+8/-1)
To merge this branch: bzr merge lp:~zedtux/quiestla/1.0
Reviewer Review Type Date Requested Status
Guillaume Hain Approve
Review via email: mp+28372@code.launchpad.net

Commit message

Fixing mistake in branches :s

To post a comment you must log in.
Revision history for this message
Guillaume Hain (zedtux) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'quiestla/common/opencvclient.py'
2--- quiestla/common/opencvclient.py 2010-06-23 17:50:59 +0000
3+++ quiestla/common/opencvclient.py 2010-06-24 08:02:29 +0000
4@@ -69,8 +69,6 @@
5 def detect_faces_in_image(self):
6 self.initialize_opencv_objects()
7
8- #self.initialize_detection_meter()
9-
10 log.debug("Starting faces detection")
11
12 for haarcascade in HAARCASCADES:
13@@ -99,8 +97,6 @@
14
15 log.debug("Detection is finished")
16
17- #self.stop_detection_meter()
18-
19 self.emit_signal("detection_is_finished")
20
21 def initialize_opencv_objects(self):
22@@ -118,16 +114,13 @@
23
24 log.debug("OpenCV objects ready for detection !")
25
26- def initialize_detection_meter(self):
27- self.__detection_meter = cvGetTickCount()
28- log.debug("Detecting meter initialized")
29-
30- def stop_detection_meter(self):
31- self.__detection_meter = cvGetTickCount() - self.__detection_meter
32- log.debug("Elapsed time during detection: %gms" % (self.__detection_meter / (cvGetTickFrequency() * 1000.)))
33-
34 def found_faces_count(self):
35 return len(self.__face_validator.get_valid_faces())
36
37 def get_faces_areas(self):
38 return self.__face_validator.get_valid_faces()
39+
40+ def draw_faces_areas_at(self, path):
41+ for face in self.get_faces_areas():
42+ cvRectangle(self.__image, cvPoint(int(face.get_x()), int(face.get_y())), cvPoint(int(face.get_x()+face.get_width()), int(face.get_y()+face.get_height())), CV_RGB(0, 255, 0), 2, 8, 0)
43+ cvSaveImage(str(path), self.__image)
44
45=== modified file 'quiestla/common/quiestlaservice.py'
46--- quiestla/common/quiestlaservice.py 2010-06-23 17:50:59 +0000
47+++ quiestla/common/quiestlaservice.py 2010-06-24 08:02:29 +0000
48@@ -42,7 +42,7 @@
49 self.__opencv_client.set_callback("detection_is_finished", self.DetectionFinished)
50
51 if self.is_dbus_ready():
52- log.debug("DBUSService %s is ready ! Starting listening")
53+ log.debug("DBUSService %s is ready ! Starting listening" % self.get_dbus_name())
54 self.listen()
55 else:
56 log.error("DBUSService instance is invalid !")
57@@ -73,3 +73,10 @@
58
59 print result
60 return dbus.Array(result, signature="aai")
61+
62+ @dbus.service.method(DBUS_SERVICE_NAME + ".WhereArePeople", in_signature="s", out_signature="b")
63+ def DrawFacesAreasAt(self, path):
64+ if self.__opencv_client.found_faces_count() == 0:
65+ return False
66+ else:
67+ return self.__opencv_client.draw_faces_areas_at(path)

Subscribers

People subscribed via source and target branches

to all changes: