public ArrayList < IntPoint > process ( ImageSource fastBitmap ) { //FastBitmap l = new FastBitmap(fastBitmap); if ( points == null ) { apply ( fastBitmap ) ; } int width = fastBitmap . getWidth ( ) ; int height = fastBitmap . getHeight ( ) ; points = new ArrayList < IntPoint > ( ) ; if ( fastBitmap . isGrayscale ( ) ) { for ( int x = 0 ; x < height ; x ++ ) { for ( int y = 0 ; y < width ; y ++ ) { if ( fastBitmap . getRGB ( y , x ) == 255 ) points . add ( new IntPoint ( y , x ) ) ; } } } else { for ( int x = 0 ; x < height ; x ++ ) { for ( int y = 0 ; y < width ; y ++ ) { // TODO Check for green and blue? if ( fastBitmap . getR ( y , x ) == 255 ) points . add ( new IntPoint ( y , x ) ) ; } } } return points ; }
Get points after extract boundary .