Class FindDynamicPixelMatches
java.lang.Object
io.github.jspinak.brobot.action.basic.find.motion.FindDynamicPixelMatches
Finds matches based on dynamic (changing) pixels across multiple patterns. This class analyzes a
collection of patterns to identify pixels that vary between them, then uses this information to
create match results.
The process involves:
- Collecting all patterns from the provided object collections
- Creating a dynamic pixel mask showing which pixels change
- Using the mask to generate matches based on motion areas
Note: Despite the method name suggesting it finds dynamic pixels, the current implementation appears to use the dynamic pixel mask directly, which may be a naming inconsistency.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFindDynamicPixelMatches
(FindDynamicPixels findDynamicPixels, FindFixedPixelMatches findFixedPixelMatches) Constructs a FindDynamicPixelMatches instance with the required services. -
Method Summary
Modifier and TypeMethodDescriptionvoid
find
(ActionResult matches, List<ObjectCollection> objectCollections) Finds matches based on dynamic pixels across multiple patterns.
-
Constructor Details
-
FindDynamicPixelMatches
public FindDynamicPixelMatches(FindDynamicPixels findDynamicPixels, FindFixedPixelMatches findFixedPixelMatches) Constructs a FindDynamicPixelMatches instance with the required services.- Parameters:
findDynamicPixels
- service for finding pixels that change between imagesfindFixedPixelMatches
- service for creating matches from pixel masks
-
-
Method Details
-
find
Finds matches based on dynamic pixels across multiple patterns. This method analyzes all patterns in the object collections to identify pixels that change between them, then creates matches based on these dynamic regions.Side effects:
- Sets the mask in the ActionResult to the dynamic pixel mask
- Populates the ActionResult with matches based on the dynamic regions
- Parameters:
matches
- theActionResult
to populate with found matchesobjectCollections
- list ofObjectCollection
containing patterns to analyze
-