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

Bug#568858: gnome-mousetrap: doesn't work (opencv 1 → 2 problem?)



Hello,

Stefano Costa, le Mon 08 Feb 2010 23:24:51 +0100, a écrit :
> Il giorno lun, 08/02/2010 alle 23.05 +0100, Samuel Thibault ha scritto:
> > Could you try to applied the attached patch?
> 
> Well, one step forward it seems: I can see my image, but it's still
> (grabbed when the program starts and not refreshed apparently). See the
> attached log, which has a different traceback.

Right, I got it too. Could you try the attached patch?  (Ignore the fact
that the second hook may fail)

Samuel
--- /usr/share/pyshared/mouseTrap/ocvfw.py.orig	2010-02-08 23:03:48.000000000 +0100
+++ /usr/share/pyshared/mouseTrap/ocvfw.py	2010-02-09 00:28:49.000000000 +0100
@@ -199,7 +199,7 @@
         for point in self.imgLKPoints["current"]:
             # go trough all the self.imgPoints
 
-            if not status[counter]:
+            if not status or not status[counter]:
                 # we will disable this point
                 continue
             
@@ -270,7 +270,7 @@
             self.storage        = cv.cvCreateMemStorage(0)
             self.imgSize        = cv.cvGetSize (frame)
             self.img            = cv.cvCreateImage ( self.imgSize, 8, 3 )
-            self.img.origin     = frame.origin
+            #self.img.origin     = frame.origin
             self.grey           = cv.cvCreateImage ( self.imgSize, 8, 1 )
             self.yCrCb          = cv.cvCreateImage ( self.imgSize, 8, 3 )
             self.prevGrey       = cv.cvCreateImage ( self.imgSize, 8, 1 )

Reply to: