Logo Search packages:      
Sourcecode: gnome-mousetrap version File versions  Download package

def mouseTrap::ocvfw::ocvfw::cmSetLKPoints (   self,
  label,
  point 
)

Set a point to follow it using the L. Kallman method.

Arguments:
- self: The main object pointer.
- label: The label to identify the point. Example: "Pointer", so self.Pointer = Pointer.
- point: A cv.cvPoint Point.

Definition at line 145 of file ocvfw.py.

00145                                           :
        """
        Set a point to follow it using the L. Kallman method.
        
        Arguments:
        - self: The main object pointer.
        - label: The label to identify the point. Example: "Pointer", so self.Pointer = Pointer.
        - point: A cv.cvPoint Point.
        """
        
        self.imgLKPoints["current"] = [ cv.cvPointTo32f ( point ) ]
        
        if self.imgLKPoints["current"]:
            cv.cvFindCornerSubPix (
                self.grey,
                self.imgLKPoints["current"],
                cv.cvSize (20, 20), cv.cvSize (-1, -1),
                cv.cvTermCriteria (cv.CV_TERMCRIT_ITER | cv.CV_TERMCRIT_EPS, 20, 0.03))
                
            self.imgLKPoints["labels"].append( label )
            setattr(self, label, point)
            
            if len(self.imgLKPoints["last"]) > 0:
                self.imgLKPoints["last"].append( self.imgLKPoints["current"][0] )

            debug.debug( "ocvfw", "cmSetLKPoints: New LK Point Added" )
        else:
            self.imgLKPoints["current"] = []
    
    def cmCleanLKPoints( self ):


Generated by  Doxygen 1.6.0   Back to index