Image-based automation

Also known as: computer vision automation

On this page 7

Image-based automation is an RPA technique in which a software robot locates interface elements by comparing screen pixels against reference images or recognized text, then clicks, types or reads at the matched coordinates. It is also called computer vision automation, and within Automation it serves as the fallback when an application exposes no usable object model, such as a Citrix session, a remote desktop or a legacy terminal.

Where conventional UI automation asks the operating system which button exists and where it sits, image-based automation asks only what the screen looks like. That independence from the underlying technology makes it universal, but it also makes it more fragile and slower than selector-based approaches, so experienced teams use it deliberately rather than by default.

How image-based automation locates elements

Image-based automation works by capturing the screen as a bitmap and searching that bitmap for a target pattern. The robot developer stores a small reference image, often called an anchor or template, of a button, icon or label. At run time the engine scans the current frame, scores each candidate region and acts on the best match if its score exceeds a similarity threshold.

Most engines use template matching, typically normalized cross-correlation, which tolerates small brightness shifts but not scaling or rotation. Modern platforms add optical character recognition (OCR) to find text such as a field label, and machine learning models that classify regions as buttons, text boxes or check boxes. The click target is then computed as an offset from the anchor, for example 120 pixels to the right of the label “Customer ID”.

The following table summarizes the main recognition methods and what each one tolerates.

MethodWhat it matchesToleratesBreaks on
Template matchingExact pixel patternMinor color noiseScaling, theme changes
OCR text searchRecognized charactersFont and position shiftsLow resolution, unusual fonts
Feature matchingKeypoints and edgesModerate scalingFlat, low-texture icons
ML element detectionLearned control typesLayout and style variationUnfamiliar control designs
Recognition methods in image-based automation

Key parameters that govern match reliability

Reliability depends on a handful of tunable parameters, and most production failures trace back to one of them. The accuracy or similarity setting is the most important: too low and the robot clicks the wrong element, too high and it fails whenever anti-aliasing changes a few pixels.

ParameterTypical rangeEffect of raising it
Similarity threshold0.80 to 0.95Fewer false matches, more missed matches
Search regionFull screen to one window areaSmaller region is faster and safer
Timeout5 to 30 secondsMore tolerance for slow screens
Screen resolutionFixed per bot runnerChanges invalidate stored images
DPI scaling100 percent recommendedNon-default scaling distorts templates
Typical parameters and their effect

Because templates are captured at a given size, resolution, DPI scaling and color depth must be identical on the development machine and every bot runner. A template captured at 100 percent scaling will rarely match on a machine set to 125 percent, which is the single most common cause of a bot that works in testing and fails in production.

Image-based automation compared with selector-based approaches

Image-based automation is the last resort in the targeting hierarchy, not a peer of structural methods. RPA platforms prefer UI selectors, which identify controls through accessibility APIs, browser DOM attributes or Windows UI Automation properties, because those survive moves, resizing and theme changes.

ApproachInformation usedSpeedRobustness
UI selectorControl tree and attributesFastHigh
Screen scrapingText buffer or rendered textMediumMedium
Image-based automationPixels and OCRSlowLow to medium
Keyboard navigationTab order and shortcutsFastMedium
Targeting approaches in RPA

In practice, developers often combine methods. A robot may use keyboard shortcuts to reach a screen, image anchors to confirm the screen has loaded, and OCR to extract a value. Platforms such as UiPath, Automation Anywhere, Blue Prism and Power Automate for desktop all ship image and OCR activities, and several market AI-based computer vision engines designed specifically for virtual desktop automation.

When image-based automation is the right choice

Image-based automation is justified when no structural access exists and the process value outweighs the maintenance cost. The decision table below reflects common practitioner guidance.

SituationRecommended approachReason
Citrix or RDP session without agentImage and OCR targetingOnly pixels reach the client
Citrix with platform remote runtimeUI selectors through extensionRestores structural access
Modern web applicationDOM-based selectorsStable and fast
Legacy mainframe emulatorTerminal API or screen scrapingText buffer is reliable
Graphics-heavy or game-like interfaceImage matching with tight regionsNo accessible controls exist
Decision guide for choosing a targeting method

Before committing, teams should check whether an API, database export or vendor extension can replace the screen entirely. A good process definition document records which screens require visual targeting so that maintenance effort can be estimated honestly.

Limitations, risks and common mistakes

The central weakness of image-based automation is sensitivity to visual change. A vendor redesign, a new Windows theme, a different font smoothing setting or an unexpected pop-up overlay can all break matching without any change to the application logic. Bots also run noticeably slower, because each search processes a full frame and often waits for rendering to settle.

  • Capturing oversized templates that include changing data, such as a date next to a button.
  • Searching the full screen when a defined region would be faster and less ambiguous.
  • Ignoring duplicate matches, where two identical icons make the robot pick the first one found.
  • Skipping verification steps, so the robot continues after a missed click and corrupts later data.
  • Running on unlocked, visible sessions without considering that image targeting requires an active, rendered desktop.

Robust designs add explicit wait conditions, verify each action by checking for an expected next-screen image, and raise a business or system exception when a match fails rather than retrying blindly. Logging a screenshot at the moment of failure dramatically shortens diagnosis.

In simple terms

Image-based automation means a software robot uses its eyes instead of a map. Normally a robot can ask a program where each button is. Some programs, especially those shown through remote screens, cannot answer that question, so the robot looks at a picture of the screen and searches for a button that looks like the one it was shown earlier.

This works almost anywhere, but it is easily confused by visual changes. If the button changes color, size or position, the robot may no longer recognize it. That is why teams treat it as a useful fallback rather than a first choice.

A practical example

An insurance company processes about 1,200 claim updates per day in a legacy claims system that employees reach only through a Citrix published desktop. The RPA team cannot install an extension on the Citrix servers, so selectors return a single blank window. The developers build an unattended bot that uses OCR to find field labels and clicks at fixed offsets, with template matching only for two toolbar icons.

To keep it stable, they lock every bot runner at 1920 by 1080 pixels and 100 percent scaling, restrict each search to the relevant window region, and verify every save by waiting for a confirmation banner. The bot handles roughly 85 percent of updates without human help, while failed matches go to a work queue for staff. The team later reports that a vendor color refresh forced them to recapture 14 templates in one afternoon, which confirmed their decision to keep image targeting to a minimum.