Image Detection

The Image Detection plugin watches your screen while you play. It can spot an image, follow a health bar or other meter, and read text or numbers, then react with its own shocker actions or start a flow. This page describes version 1.4.0, which runs on Windows only. Install it from Manage plugins → Browse. See how nodes work for how to read the node diagrams.

Setup

Plugin pages are hidden from the sidebar until you turn them on; see showing a plugin's pages.

Open Image Detection in the sidebar.

  1. Choose the Monitor your game is on. Leave Backend on Auto (recommended). Windows Graphics Capture works with fullscreen and hardware-accelerated games; Legacy GDI sees black frames in many games.

  2. Click + New Module and give it a name. A module is a set of things to detect, usually one per game.

  3. Click Configure on the module and add targets:

    • Upload Image or Capture Template adds an image to look for.
    • + Health Detection follows a health bar or other meter.
    • + Text/Number Detection reads text or a number with Windows' built-in text recognition, which needs a Windows language pack with OCR support.

    Health and text targets need a screen region: click Arm Region Picker and drag over the area, or enter the coordinates by hand. Each target has a Test Now button.

  4. Click Start Detection at the top of the page.

The Delay setting on the page controls how long detection waits between captures, in milliseconds. Lower values react faster but use more CPU.

Each target also has its own Action Settings: a shock, vibrate, or beep that runs whenever the target is detected, without any flow, as long as shockers are selected there. Leave Shockers empty to use flows only.

Modules can be exported and imported to share them. In the plugin's settings under Manage plugins, you can turn on Auto-start background detection and a global hotkey for the region picker.

Names in filters

The trigger filters match these IDs, ignoring capitalization:

  • Module ID: the module name in lowercase, with spaces and underscores replaced by -. "Boss Fight" becomes boss-fight.
  • Image: the uploaded file's name, such as boss-icon.png, or the same name without the extension.
  • Target: a health or text target's name, "Health Bar" and "Text Detector" by default, or its ID.

Triggers

Image Detection triggers only fire while detection is running, and only for enabled modules and targets.

Image Detected

Fires when an image target is found on screen.

Image DetectedTriggeredModule IDImage IDImage NameConfidenceMatch XMatch Y
Outputs
TriggeredFlow
Module IDString
Image IDString
Image NameString
ConfidenceNumber
How closely it matched, from 0 to 1.
Match XNumber
Where it was found, in pixels.
Match YNumber
Properties
Module Filter
Only fire for this module. Empty fires for every module.
Image Filter
Only fire for this image. Empty fires for every image.
Min Confidence
Ignore matches below this confidence, 0 to 1. Default 0.

It fires once the target has matched as many times in a row as its Consecutive matches to trigger setting, and not during the target's cooldown. For a target limited to a region, Match X and Y are measured from the region's corner.

Meter Changed

Fires when a health bar or meter goes up or down.

Meter ChangedTriggeredModule IDTarget IDTarget NameCurrent %Previous %Delta %Is DecreaseChange Type
Outputs
TriggeredFlow
Module IDString
Target IDString
Target NameString
Current %Number
Previous %Number
Delta %Number
The change: negative when the meter drops.
Is DecreaseBoolean
Change TypeString
DamageTaken or Healed.
Properties
Module Filter
Only fire for this module. Empty fires for every module.
Target Filter
Only fire for this target. Empty fires for every target.
Min Delta %
Ignore changes smaller than this, 0 to 100. Default 0.
Decreases Only
Only fire when the meter drops. Default off.

The first reading only sets the starting point. The target's own settings decide what counts as a change: Min Change % (2% by default) and Decreases only (damage), which is on by default. While that target setting is on, increases never reach this node, so turn it off to react to healing.

Damage Taken

Fires when a health bar or meter drops.

Damage TakenTriggeredModule IDTarget IDTarget NameCurrent %Previous %Delta %
Outputs
TriggeredFlow
Module IDString
Target IDString
Target NameString
Current %Number
Previous %Number
Delta %Number
Negative: the amount lost.
Properties
Module Filter
Only fire for this module. Empty fires for every module.
Target Filter
Only fire for this target. Empty fires for every target.
Min Damage %
Ignore drops smaller than this, 0 to 100. Default 0.

Delta % is negative. To use the damage as an intensity, make it positive first: add a Math node set to Subtract, wire Delta % to its B input, and leave A unconnected so it counts as 0.

OCR Detected

Fires when a text target sees one of its keywords, or its number changes.

OCR DetectedTriggeredModule IDTarget IDTarget NameRaw TextNormalized TextMatched KeywordCurrent NumberPrevious NumberDelta NumberChange Type
Outputs
TriggeredFlow
Module IDString
Target IDString
Target NameString
Raw TextString
Normalized TextString
Matched KeywordString
Current NumberNumber
Previous NumberNumber
Delta NumberNumber
Change TypeString
KeywordMatched, NumberIncreased, or NumberDecreased.
Properties
Module Filter
Only fire for this module. Empty fires for every module.
Target Filter
Only fire for this target. Empty fires for every target.
Change Type
keywordmatched, numberincreased, or numberdecreased. Empty fires for all.
Min Delta
Ignore number changes smaller than this. Default 0.

A keyword fires once when it appears, and not again until it has disappeared and come back. For keyword matches, Previous Number and Delta Number are empty. New text targets look for the keyword "Eliminated" until you change it.

Actions

The two screenshot actions let a flow check the screen on demand instead of using background detection. They continue through Done even when they fail; check Success, Found, or Error.

Take Screenshot

Captures the screen.

Take ScreenshotExecuteMonitor IndexDoneScreenshotWidthHeightSuccessError
Inputs
ExecuteFlow
Monitor IndexNumber
Outputs
DoneFlow
ScreenshotAny
The captured image, for Detect Image.
WidthNumber
HeightNumber
SuccessBoolean
ErrorString
Properties
Monitor Index
The monitor to capture, starting at 1. Default 1.
Use Global Config
Capture the monitor chosen on the Image Detection page instead. Default on.

Detect Image

Looks for an image file inside a screenshot.

Detect ImageExecuteScreenshotTemplate PathDoneFoundConfidenceMatch XMatch YError
Inputs
ExecuteFlow
ScreenshotAny
From Take Screenshot.
Template PathString
Overrides the property when connected and not empty.
Outputs
DoneFlow
FoundBoolean
ConfidenceNumber
Match XNumber
Match YNumber
ErrorString
Properties
Template Image Path
The image file to look for.
Match Threshold
How close a match must be, 0 to 1. Default 0.8.
Algorithm
template-matching or template-matching-masked. Default template-matching.

Found is false when nothing matched well enough; Error explains other failures, such as a missing file or an image larger than the screenshot.

Start Detection

Starts background detection, as if you clicked Start Detection on the page.

Start DetectionExecuteDoneWas Already Running
Inputs
ExecuteFlow
Outputs
DoneFlow
Was Already RunningBoolean

Stop Detection

Stops background detection.

Stop DetectionExecuteDoneWas Running
Inputs
ExecuteFlow
Outputs
DoneFlow
Was RunningBoolean

Contributors

Thank you to everyone who has helped improve this documentation.