
import pybrisk

class Brisk:
    def __init__(self, thresh=60, octaves=4):
        self.thresh = thresh
        self.octaves = octaves
        self.descriptor_extractor = pybrisk.create()

    def __del__(self):
        pybrisk.destroy(self.descriptor_extractor)

    def detect(self, img):
        return pybrisk.detect(self.descriptor_extractor,
                img, self.thresh, self.octaves)

    def compute(self, img, keypoints):
        return pybrisk.compute(self.descriptor_extractor,
                img, keypoints)

[((8, 36, 8, 52), 'pybrisk.create', 'pybrisk.create', ({}, {}), '()', False, 'import pybrisk\n'), ((11, 8, 11, 50), 'pybrisk.destroy', 'pybrisk.destroy', ({(11, 24, 11, 49): 'self.descriptor_extractor'}, {}), '(self.descriptor_extractor)', False, 'import pybrisk\n'), ((14, 15, 15, 47), 'pybrisk.detect', 'pybrisk.detect', ({(14, 30, 14, 55): 'self.descriptor_extractor', (15, 16, 15, 19): 'img', (15, 21, 15, 32): 'self.thresh', (15, 34, 15, 46): 'self.octaves'}, {}), '(self.descriptor_extractor, img, self.thresh, self.octaves)', False, 'import pybrisk\n'), ((18, 15, 19, 31), 'pybrisk.compute', 'pybrisk.compute', ({(18, 31, 18, 56): 'self.descriptor_extractor', (19, 16, 19, 19): 'img', (19, 21, 19, 30): 'keypoints'}, {}), '(self.descriptor_extractor, img, keypoints)', False, 'import pybrisk\n')]