applyMaskPenaltyRule1 static method

int applyMaskPenaltyRule1(
  1. ByteMatrix matrix
)

Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and give penalty to them. Example: 00000 or 11111.

Implementation

static int applyMaskPenaltyRule1(ByteMatrix matrix) {
  return _applyMaskPenaltyRule1Internal(matrix, true) +
      _applyMaskPenaltyRule1Internal(matrix, false);
}