private HashSet < Point > hitMissHashSet ( BinaryFast b , HashSet < Point > input , int [ ] kernel ) { HashSet < Point > output = new HashSet < Point > ( ) ; Iterator < Point > it = input . iterator ( ) ; while ( it . hasNext ( ) ) { Point p = it . next ( ) ; if ( kernelMatch ( p , b . getPixels ( ) , b . getWidth ( ) , b . getHeight ( ) , kernel ) ) { // System.out.println("Match "+p.x+" "+p.y); output . add ( p ) ; } } // System.out.println(output.size()); return output ; }
Applies the hitmiss operation to a set of pixels stored in a hash table .