Class FindDynamicPixelMatches

java.lang.Object
io.github.jspinak.brobot.action.basic.find.motion.FindDynamicPixelMatches

@Component public class FindDynamicPixelMatches extends Object
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 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 images
      findFixedPixelMatches - service for creating matches from pixel masks
  • Method Details

    • find

      public void find(ActionResult matches, List<ObjectCollection> objectCollections)
      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 - the ActionResult to populate with found matches
      objectCollections - list of ObjectCollection containing patterns to analyze