Exemple #1
0
    def test_2_SURF(self):
        '''SURF Taz: .......................................................'''
        ilog = None
        if 'ilog' in globals().keys():
            ilog = globals()['ilog']

        filename = os.path.join(pv.__path__[0], 'data', 'test', 'TAZ_0010.jpg')
        im = pv.Image(filename)
        timer = pv.Timer()
        keypoints, descriptors = pv.surf(im)
        timer.mark("TazSurf")
        if ilog != None:
            ilog(timer, "SURFTaz")
        for each in keypoints:
            im.annotateCircle(pv.Point(each[0][0], each[0][1]), each[2])
        if ilog != None:
            ilog(im, 'SurfKeypoints')

        self.assertEqual(len(keypoints), len(descriptors))
        self.assertEqual(len(keypoints), 367)
Exemple #2
0
    def test_2_SURF(self):
        '''SURF Taz: .......................................................'''
        ilog = None
        if 'ilog' in globals().keys():
            ilog = globals()['ilog']
                    
        filename = os.path.join(pv.__path__[0],'data','test','TAZ_0010.jpg')
        im = pv.Image(filename)
        timer = pv.Timer()
        keypoints,descriptors = pv.surf(im)
        timer.mark("TazSurf")
        if ilog != None:
            ilog(timer,"SURFTaz")
        for each in keypoints:
            im.annotateCircle(pv.Point(each[0][0],each[0][1]), each[2])
        if ilog != None:
            ilog(im,'SurfKeypoints')

        self.assertEqual(len(keypoints),len(descriptors))
        self.assertEqual(len(keypoints),367)