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

def mouseTrap::ocvfw::ocvfw::cmQueryCapture (   self,
  bgr = False,
  flip = False 
)

Queries the new frame.

Arguments:
- self: The main object pointer.
- bgr: If True. The image will be converted from RGB to BGR.

Returns The image even if it was stored in self.img

Definition at line 256 of file ocvfw.py.

00256                                                          :
        """
        Queries the new frame.
        
        Arguments:
        - self: The main object pointer.
        - bgr: If True. The image will be converted from RGB to BGR.
        
        Returns The image even if it was stored in self.img
        """
        
        frame = highgui.cvQueryFrame( self.capture )

        if not  self.img:
            self.storage        = cv.cvCreateMemStorage(0)
            self.imgSize        = cv.cvGetSize (frame)
            self.img            = cv.cvCreateImage ( self.imgSize, 8, 3 )
            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 )
            self.pyramid        = cv.cvCreateImage ( self.imgSize, 8, 1 )
            self.prevPyramid    = cv.cvCreateImage ( self.imgSize, 8, 1 )
            self.smallImg       = cv.cvCreateImage( cv.cvSize( cv.cvRound ( self.imgSize.width/self.imageScale), 
                                    cv.cvRound ( self.imgSize.height/self.imageScale) ), 8, 3 )
        self.img = frame
        if bgr:
            highgui.cvConvertImage( self.img, self.img, highgui.CV_CVTIMG_SWAP_RB )
            
        if flip:
            cv.cvFlip( self.img, self.img, 1)
        return self.img
        
    def cmGetMotionPoints( self, imgRoi = None):


Generated by  Doxygen 1.6.0   Back to index