Class SceneAnalysisCollectionBuilder
SceneAnalysisCollectionBuilder serves as the entry point for comprehensive color analysis workflows in the Brobot framework. It coordinates scene acquisition, target selection, and pixel-level analysis to produce collections ready for matching operations.
Primary responsibilities:
- Acquire scenes through screenshots or provided images
- Determine target images for matching
- Select additional images for classification context
- Coordinate pixel analysis across all scenes
ObjectCollection usage pattern:
- First collection: Target images to find as matches
- Second collection: Additional classification context
- Third+ collections: Scenes to analyze
When scene analysis is not required (non-color matching), scenes are simply wrapped in SceneAnalysis objects without pixel processing.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSceneAnalysisCollectionBuilder
(BrobotProperties brobotProperties, SceneProvider getScenes, ColorAnalysisOrchestrator analyzePixels, StateService allStates, StateMemory stateMemory) -
Method Summary
Modifier and TypeMethodDescriptionget
(List<ObjectCollection> objectCollections, int scenesToCapture, double secondsBetweenCaptures, ActionConfig actionConfig) Creates a collection of analyzed scenes for color-based matching operations.getTargetImages
(List<ObjectCollection> images) Extracts target images from the first ObjectCollection.
-
Constructor Details
-
Method Details
-
get
public SceneAnalyses get(List<ObjectCollection> objectCollections, int scenesToCapture, double secondsBetweenCaptures, ActionConfig actionConfig) Creates a collection of analyzed scenes for color-based matching operations.Orchestrates the complete workflow from scene acquisition to pixel analysis:
- Acquires scenes (screenshots or provided images)
- Determines if color analysis is required
- Identifies target and context images
- Performs pixel analysis on each scene
When color analysis is not required (non-COLOR find operations), scenes are wrapped without pixel processing for efficiency.
Side effects: May capture screenshots if no scenes provided
- Parameters:
objectCollections
- collections containing targets, context, and scenesscenesToCapture
- number of screenshots to take if no scenes providedsecondsBetweenCaptures
- delay between multiple screenshotsactionConfig
- configuration including find type and thresholds- Returns:
- SceneAnalysisCollection ready for matching operations
-
getTargetImages
Extracts target images from the first ObjectCollection.Target images are the primary patterns to find in the scene. These images will be both classified and matched, generating concrete Match objects when found.
The first ObjectCollection by convention contains targets. An empty first collection indicates classify-only mode with no specific matching targets.
- Parameters:
images
- list of ObjectCollections- Returns:
- set of target images to find, may be empty
-