Locate a pattern image inside a larger image even when it is scaled, rotated or
homographyLocate a pattern image inside a larger image even when it is scaled, rotated or viewed at an angle: ORB or SIFT feature matching plus cv2.findHomography with RANSAC. Returns whether it was found, the 3x3 homography (pattern pixels to image pixels), the four projected corners, the bounding box, and the inlier count as confidence. Use it to find a UI element, logo or object in a screenshot or photo. 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. Needs visible texture or corners; a flat-coloured pattern has no features. | |
| min_inliers | No | Fewest RANSAC inliers for found to be true, 4-200 (default 10) | |
| max_features | No | Most keypoints kept per image, 100-5000 (default 2000) | |
| reproj_threshold | No | RANSAC reprojection error in pixels below which a match is an inlier, 0.5-20 (default 3) |