| --- |
| title: "imcui.api.core" |
| description: "Core API module for image matching operations" |
| --- |
|
|
| |
|
|
| Core API module for programmatic image matching operations. |
|
|
| |
|
|
| Main API class for image matching operations. |
|
|
| |
|
|
| ```python |
| from imcui.api import ImageMatchingAPI |
| ``` |
|
|
| |
|
|
| ```python |
| ImageMatchingAPI(conf, device="cuda") |
| ``` |
|
|
| **Parameters:** |
|
|
| | Parameter | Type | Required | Default | Description | |
| |-----------|------|----------|---------|-------------| |
| | `conf` | dict | Yes | - | Matcher configuration from get_matcher_zoo() | |
| | `device` | str | No | "cuda" | Device: "cuda", "cpu", "mps" | |
|
|
| |
|
|
| ```python |
| from imcui.api import ImageMatchingAPI |
| from imcui.ui import get_matcher_zoo |
|
|
| |
| matchers = get_matcher_zoo() |
|
|
| |
| api = ImageMatchingAPI(conf=matchers["superpoint-lightglue"], device="cuda") |
|
|
| |
| result = api(image0, image1) |
| ``` |
|
|
| |
|
|
| Dictionary containing: |
|
|
| ```python |
| { |
| "keypoints0": np.ndarray, |
| "keypoints1": np.ndarray, |
| "matches": np.ndarray, |
| "scores": np.ndarray, |
| "H": np.ndarray |
| } |
| ``` |
|
|
| **Source Code**: [imcui/api/core.py](https://github.com/Vincentqyw/image-matching-webui/blob/main/imcui/api/core.py) |
|
|