public void process ( GrayS32 pixelToRegion , GrowQueue_I32 regionMemberCount , FastQueue < float [ ] > regionColor , FastQueue < Point2D_I32 > modeLocation ) { stopRequested = false ; initializeMerge ( regionMemberCount . size ) ; markMergeRegions ( regionColor , modeLocation , pixelToRegion ) ; if ( stopRequested ) return ; performMerge ( pixelToRegion , regionMemberCount ) ; }
Merges together similar regions which are in close proximity to each other . After merging most of the input data structures are modified to take in account the changes .