question: private static ResultPoint [ ] findVertices180 ( BitMatrix matrix , boolean tryHarder ) { int height = matrix . getHeight ( ) ; int width = matrix . getWidth ( ) ; int halfWidth = width > > 1 ; ResultPoint [ ] result = new ResultPoint [ 8 ] ; boolean found = false ; int [ ] counters = new int [ START_PATTERN_REVERSE . length ] ; int rowStep = Math . max ( 1 , height > > ( tryHarder ? 9 : 7 ) ) ; for ( int i = height - 1 ; i > 0 ; i -= rowStep ) { int [ ] loc = findGuardPattern ( matrix , halfWidth , i , halfWidth , true , START_PATTERN_REVERSE , counters ) ; if ( loc != null ) { result [ 0 ] = new ResultPoint ( loc [ 1 ] , i ) ; result [ 4 ] = new ResultPoint ( loc [ 0 ] , i ) ; found = true ; break ; } } if ( found ) { found = false ; for ( int i = 0 ; i < height ; i += rowStep ) { int [ ] loc = findGuardPattern ( matrix , halfWidth , i , halfWidth , true , START_PATTERN_REVERSE , counters ) ; if ( loc != null ) { result [ 1 ] = new ResultPoint ( loc [ 1 ] , i ) ; result [ 5 ] = new ResultPoint ( loc [ 0 ] , i ) ; found = true ; break ; } } } counters = new int [ STOP_PATTERN_REVERSE . length ] ; if ( found ) { found = false ; for ( int i = height - 1 ; i > 0 ; i -= rowStep ) { int [ ] loc = findGuardPattern ( matrix , 0 , i , halfWidth , false , STOP_PATTERN_REVERSE , counters ) ; if ( loc != null ) { result [ 2 ] = new ResultPoint ( loc [ 0 ] , i ) ; result [ 6 ] = new ResultPoint ( loc [ 1 ] , i ) ; found = true ; break ; } } } if ( found ) { found = false ; for ( int i = 0 ; i < height ; i += rowStep ) { int [ ] loc = findGuardPattern ( matrix , 0 , i , halfWidth , false , STOP_PATTERN_REVERSE , counters ) ; if ( loc != null ) { result [ 3 ] = new ResultPoint ( loc [ 0 ] , i ) ; result [ 7 ] = new ResultPoint ( loc [ 1 ] , i ) ; found = true ; break ; } } } return found ? result : null ; }
target:  Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. This assumes that the image is rotated 180 degrees and if it locates the start and stop patterns at it will re-map the vertices for a 0 degree rotation. TODO: Change assumption about barcode location.