#NEWLINE# def surf( im , mask = None , extended = False , hessianThreshold = 500 , nOctaves = 3 , nOctaveLayers = 4 ) : #NEWLINE# #INDENT# '\n    Keypoints contain a\n      0: center point\n      1 sign of laplacian (-1,0,+1)\n      2 scale - diameter or radius\n      3 angle\n      4 response value\n    \n    Descriptors contain 64 floating point numbers\n    \n    @param im: image to extract features from.\n    @type im:  pv.Image\n    @param mask: a mask that controls where features are extracted from.\n    @type mask:  OpenCV 8bit image\n    @return: (keypoints,descriptors)\n    ' #NEWLINE# cvim = im . asOpenCVBW ( ) #NEWLINE# ( keypoints , descriptors ) = cv . ExtractSURF ( cvim , mask , cv . CreateMemStorage ( ) , ( int ( extended ) , hessianThreshold , nOctaves , nOctaveLayers ) ) #NEWLINE# return ( keypoints , descriptors )