
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)

[((172, 188), 'pybrisk.create', 'pybrisk.create', ([], {}), '()\n', (186, 188), False, 'import pybrisk\n'), ((221, 263), 'pybrisk.destroy', 'pybrisk.destroy', (['self.descriptor_extractor'], {}), '(self.descriptor_extractor)\n', (236, 263), False, 'import pybrisk\n'), ((307, 380), 'pybrisk.detect', 'pybrisk.detect', (['self.descriptor_extractor', 'img', 'self.thresh', 'self.octaves'], {}), '(self.descriptor_extractor, img, self.thresh, self.octaves)\n', (321, 380), False, 'import pybrisk\n'), ((452, 510), 'pybrisk.compute', 'pybrisk.compute', (['self.descriptor_extractor', 'img', 'keypoints'], {}), '(self.descriptor_extractor, img, keypoints)\n', (467, 510), False, 'import pybrisk\n')]