private void computeFeatureMask ( int numModules , int [ ] alignment , boolean hasVersion ) { // mark alignment patterns + format info markSquare ( 0 , 0 , 9 ) ; markRectangle ( numModules - 8 , 0 , 9 , 8 ) ; markRectangle ( 0 , numModules - 8 , 8 , 9 ) ; // timing pattern markRectangle ( 8 , 6 , 1 , numModules - 8 - 8 ) ; markRectangle ( 6 , 8 , numModules - 8 - 8 , 1 ) ; // version info if ( hasVersion ) { markRectangle ( numModules - 11 , 0 , 6 , 3 ) ; markRectangle ( 0 , numModules - 11 , 3 , 6 ) ; } // alignment patterns for ( int i = 0 ; i < alignment . length ; i ++ ) { int row = alignment [ i ] ; for ( int j = 0 ; j < alignment . length ; j ++ ) { if ( i == 0 & j == 0 ) continue ; if ( i == alignment . length - 1 & j == 0 ) continue ; if ( i == 0 & j == alignment . length - 1 ) continue ; int col = alignment [ j ] ; markSquare ( row - 2 , col - 2 , 5 ) ; } } }
Blocks out the location of features in the image . Needed for codeworld location extraction