protected void findOnePixels ( GrowQueue_I32 ones ) { for ( int y = 0 ; y < binary . height ; y ++ ) { int index = binary . startIndex + y * binary . stride ; for ( int x = 0 ; x < binary . width ; x ++ , index ++ ) { if ( binary . data [ index ] != 0 ) { ones . add ( index ) ; } } } }
Scans through the image and record the array index of all marked pixels