Class BestMatchCapture
java.lang.Object
io.github.jspinak.brobot.action.internal.find.scene.BestMatchCapture
Captures and saves the best matching region when pattern searches fail or find low-similarity
matches. This is useful for debugging why patterns aren't matching as expected.
When enabled, this component will:
- Find the best match regardless of similarity threshold
- Capture the matching region from the scene
- Save it with descriptive filename including similarity score
- Optionally save the pattern image for comparison
- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
captureBestMatch
(Pattern pattern, Scene scene, List<Match> actualMatches) Captures the best matching region for a pattern, regardless of similarity threshold.boolean
Checks if capture is enabled.void
setCaptureEnabled
(boolean enabled) Sets whether capture is enabled (useful for testing).
-
Constructor Details
-
BestMatchCapture
public BestMatchCapture()
-
-
Method Details
-
captureBestMatch
Captures the best matching region for a pattern, regardless of similarity threshold.- Parameters:
pattern
- The pattern being searched forscene
- The scene being searchedactualMatches
- The matches found at the configured threshold (may be empty)
-
isCaptureEnabled
public boolean isCaptureEnabled()Checks if capture is enabled. -
setCaptureEnabled
public void setCaptureEnabled(boolean enabled) Sets whether capture is enabled (useful for testing).
-