I was trying to implement the FREAK Descriptor in Python using Opencv. Here is the code i'm using:
def surf_freak_detect(image,hessianThreshold):
surfDetector = cv2.SURF(hessianThreshold)
surfDetector=cv2.GridAdaptedFeatureDetector(surfDetector,50)
keypoints = surfDetector.detect(image,None)
freakExtractor = cv2.DescriptorExtractor_create('FREAK')
keypoints,descriptors= freakExtractor.compute(image,keypoints)
del freakExtractor
return keypoints,descriptors
Is this the correct way to initialise the Freak Descriptor? By doing a little debugging I found out that the interpreter takes a very long time at Computing the Descriptors and then eventually crashes. The keypoints are detected properly. Weirdly, it works sometimes and sometimes just crashes!