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

def mouseTrap::ocvfw::ocvfw::cmGetHaarROIPoints (   self,
  haarCascade,
  rect,
  origSize = (0,0,
  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 113 of file ocvfw.py.

00113                                                                                                              :
        """
        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.cvClearMemStorage( self.storage )

        imageROI = cv.cvGetSubRect( self.img, rect )
        
        if cascade:
            points = cv.cvHaarDetectObjects( imageROI, cascade, self.storage,
                                    1.2, 2, method, cv.cvSize(20,20) )
        else:
            debug.exception( "ocvfw", "The Haar Classifier Cascade load Failed (ROI)" )

        if points:
            matches = [ [ cv.cvPoint( int(r.x+origSize[0]), int(r.y+origSize[1])), \
                          cv.cvPoint( int(r.x+r.width+origSize[0]), int(r.y+r.height+origSize[1] ))] \
                          for r in points]

            debug.debug( "ocvfw", "cmGetHaarROIPoints: detected some matches" )
            return matches
            
    def cmSetLKPoints( self, label, point):


Generated by  Doxygen 1.6.0   Back to index