|
50 | 50 | -- ^ Is the length of the edges in the image to be discarded by FAST (minimum is 3, as the radius of the circle) |
51 | 51 | -> Features |
52 | 52 | -- ^ Struct containing arrays for x and y coordinates and score, while array orientation is set to 0 as FAST does not compute orientation, and size is set to 1 as FAST does not compute multiple scales |
| 53 | +{-# NOINLINE fast #-} |
53 | 54 | fast (Array fptr) thr (fromIntegral -> arc) (fromIntegral . fromEnum -> non) ratio (fromIntegral -> edge) |
54 | 55 | = unsafePerformIO . mask_ . withForeignPtr fptr $ \aptr -> |
55 | 56 | do feat <- alloca $ \ptr -> do |
|
78 | 79 | -> Float |
79 | 80 | -- ^ struct containing arrays for x and y coordinates and score (Harris response), while arrays orientation and size are set to 0 and 1, respectively, because Harris does not compute that information |
80 | 81 | -> Features |
| 82 | +{-# NOINLINE harris #-} |
81 | 83 | harris (Array fptr) (fromIntegral -> maxc) minresp sigma (fromIntegral -> bs) thr |
82 | 84 | = unsafePerformIO . mask_ . withForeignPtr fptr $ \aptr -> |
83 | 85 | do feat <- alloca $ \ptr -> do |
|
107 | 109 | -- ^ blur image with a Gaussian filter with sigma=2 before computing descriptors to increase robustness against noise if true |
108 | 110 | -> (Features, Array a) |
109 | 111 | -- ^ 'Features' struct composed of arrays for x and y coordinates, score, orientation and size of selected features |
| 112 | +{-# NOINLINE orb #-} |
110 | 113 | orb (Array fptr) thr (fromIntegral -> feat) scl (fromIntegral -> levels) (fromIntegral . fromEnum -> blur) |
111 | 114 | = unsafePerformIO . mask_ . withForeignPtr fptr $ \inptr -> |
112 | 115 | do (feature, arr) <- |
|
144 | 147 | -> (Features, Array a) |
145 | 148 | -- ^ Features object composed of arrays for x and y coordinates, score, orientation and size of selected features |
146 | 149 | -- Nx128 array containing extracted descriptors, where N is the number of features found by SIFT |
| 150 | +{-# NOINLINE sift #-} |
147 | 151 | sift (Array fptr) (fromIntegral -> a) b c d (fromIntegral . fromEnum -> e) f g |
148 | 152 | = unsafePerformIO . mask_ . withForeignPtr fptr $ \inptr -> |
149 | 153 | do (feat, arr) <- |
|
181 | 185 | -> (Features, Array a) |
182 | 186 | -- ^ 'Features' object composed of arrays for x and y coordinates, score, orientation and size of selected features |
183 | 187 | -- ^ Nx272 array containing extracted GLOH descriptors, where N is the number of features found by SIFT |
| 188 | +{-# NOINLINE gloh #-} |
184 | 189 | gloh (Array fptr) (fromIntegral -> a) b c d (fromIntegral . fromEnum -> e) f g |
185 | 190 | = unsafePerformIO . mask_ . withForeignPtr fptr $ \inptr -> |
186 | 191 | do (feat, arr) <- |
@@ -274,6 +279,7 @@ susan |
274 | 279 | -> Int |
275 | 280 | -- ^ indicates how many pixels width area should be skipped for corner detection |
276 | 281 | -> Features |
| 282 | +{-# NOINLINE susan #-} |
277 | 283 | susan (Array fptr) (fromIntegral -> a) b c d (fromIntegral -> e) |
278 | 284 | = unsafePerformIO . mask_ . withForeignPtr fptr $ \inptr -> |
279 | 285 | do feat <- |
@@ -329,6 +335,7 @@ homography |
329 | 335 | -> (Int, Array a) |
330 | 336 | -- ^ is a 3x3 array containing the estimated homography. |
331 | 337 | -- is the number of inliers that the homography was estimated to comprise, in the case that htype is AF_HOMOGRAPHY_RANSAC, a higher inlier_thr value will increase the estimated inliers. Note that if the number of inliers is too low, it is likely that a bad homography will be returned. |
| 338 | +{-# NOINLINE homography #-} |
332 | 339 | homography |
333 | 340 | (Array a) |
334 | 341 | (Array b) |
|
0 commit comments