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

def mouseTrap::ocvfw::ocvfw::cmGetHaarPoints (   self,
  haarCascade,
  method = cv.CV_HAAR_DO_CANNY_PRUNING 
)

Search for points matching the haarcascade selected.

Arguments:
- self: The main object pointer.
- haarCascade: The selected cascade.
- methode: The search method to use. DEFAULT: cv.CV_HAAR_DO_CANNY_PRUNING.

Returns a list with the matches.

Definition at line 81 of file ocvfw.py.

00081                                                                                   :
        """
        Search for points matching the haarcascade selected.
        
        Arguments:
        - self: The main object pointer.
        - haarCascade: The selected cascade.
        - methode: The search method to use. DEFAULT: cv.CV_HAAR_DO_CANNY_PRUNING.
        
        Returns a list with the matches.
        """

        cascade = cv.cvLoadHaarClassifierCascade( haarCascade, self.imgSize )
        
        cv.cvResize( self.img, self.smallImg, cv.CV_INTER_LINEAR )
        
        cv.cvClearMemStorage( self.storage )
        
        if cascade:
            points = cv.cvHaarDetectObjects( self.smallImg, cascade, self.storage,
                                    1.2, 2, method, cv.cvSize(20,20) )
        else:
            debug.exception( "ocvfw", "The Haar Classifier Cascade load failed" )

        if points:
            matches = [ [ cv.cvPoint( int(r.x*self.imageScale), int(r.y*self.imageScale)), \
                          cv.cvPoint( int((r.x+r.width)*self.imageScale), int((r.y+r.height)*self.imageScale) )] \
                          for r in points]
            
            debug.debug( "ocvfw", "cmGetHaarPoints: detected some matches" )
            return matches

    def cmGetHaarROIPoints( self, haarCascade, rect, origSize = (0,0), method = cv.CV_HAAR_DO_CANNY_PRUNING ):


Generated by  Doxygen 1.6.0   Back to index