Match local features between a pattern image and a larger image
feature-matchMatch local features between a pattern image and a larger image: detects ORB or SIFT keypoints in both, matches them with a brute-force matcher and Lowe's ratio test (OpenCV BFMatcher.knnMatch), and returns the good matches as point pairs sorted by distance. Use it to see which parts of a pattern are present and where, even when the pattern is scaled or rotated; for the pattern's outline use /v1/homography. Price: $0.004 a call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Base64 of a PNG, JPEG, BMP or WebP file (a data: URI also works). At most 4 million pixels and about 2 MB. Alpha is dropped. | |
| ratio | No | Lowe's ratio test threshold, 0.5-0.95 (default 0.75): a match is kept when its distance is below ratio times the second-best distance | |
| detector | No | Keypoint detector and descriptor: orb (default, fast, binary descriptors, Hamming distance) or sift (slower, better with scale changes, L2 distance) | |
| template | Yes | Base64 of the pattern to find, same formats. At most 1 million pixels and about 1 MB. | |
| max_matches | No | Most matches listed, 1-200 (default 50); goodMatches always counts all of them | |
| max_features | No | Most keypoints kept per image, 100-5000 (default 2000) |