Principle:A9T9 RPA Coordinate Return
| Knowledge Sources | |
|---|---|
| Domains | Computer_Vision, Coordinate_Normalization |
| Last Updated | 2026-10-22 00:00 GMT |
Overview
Mechanism for normalizing image-search match coordinates from image pixel space to CSS/viewport/page pixel space for correct click targeting.
Description
Coordinate Return is the post-processing step that converts raw match coordinates from the computer-vision engine (which operates in image pixel space) into the coordinate spaces needed for action execution:
- Offset coordinates: relative to the screenshot's top-left corner
- Viewport coordinates: relative to the browser viewport's top-left (accounts for scroll position)
- Page coordinates: relative to the full page's top-left (accounts for page offset)
The conversion uses two factors:
- Scale-down ratio: the inverse of the DPI ratio. If the screenshot was captured at 2x DPI, the match coordinates in image pixels must be divided by 2 to get CSS pixels.
- Crop offset: if the search was restricted to a sub-region, the crop offset must be added back to get coordinates relative to the full screenshot.
The `toFindResult` function in the vision2 adaptor performs this conversion, producing a `FindResult` with all three coordinate spaces, plus width, height, and score.
Usage
Use this principle when a visual automation pipeline needs to convert CV-engine match coordinates to actionable click coordinates. Without this normalization, clicks would land at the wrong position on high-DPI displays.
Theoretical Basis
Coordinate normalization: