static boolean positionSquareIntensityCheck ( float values [ ] , float threshold ) { if ( values [ 0 ] > threshold || values [ 1 ] < threshold ) return false ; if ( values [ 2 ] > threshold || values [ 3 ] > threshold || values [ 4 ] > threshold ) return false ; if ( values [ 5 ] < threshold || values [ 6 ] > threshold ) return false ; return true ; }
Checks to see if the array of sampled intensity values follows the expected pattern for a position pattern . X . XXX . X where x = black and . = white .