// How far down can we skip before resuming looking for the next\r
// pattern? In the worst case, only the difference between the\r
// difference in the x / y coordinates of the two centers.\r
- // This is the case where you find top left first. Draw it out.\r
+ // This is the case where you find top left last.\r
hasSkipped = true;\r
return (int) (Math.abs(firstConfirmedCenter.getX() - center.getX()) -\r
- Math.abs(firstConfirmedCenter.getY() - center.getY()));\r
+ Math.abs(firstConfirmedCenter.getY() - center.getY())) / 2;\r
}\r
}\r
}\r
public QRCodeBlackBox1TestCase() {
super(new File("test/data/blackbox/qrcode-1"), new MultiFormatReader(), BarcodeFormat.QR_CODE);
- addTest(17, 18, 0.0f);
+ addTest(18, 18, 0.0f);
addTest(14, 14, 90.0f);
addTest(18, 18, 180.0f);
addTest(13, 14, 270.0f);
public QRCodeBlackBox2TestCase() {
super(new File("test/data/blackbox/qrcode-2"), new MultiFormatReader(), BarcodeFormat.QR_CODE);
- addTest(23, 23, 0.0f);
+ addTest(22, 22, 0.0f);
addTest(18, 18, 90.0f);
addTest(22, 22, 180.0f);
addTest(17, 17, 270.0f);
public QRCodeBlackBox3TestCase() {
super(new File("test/data/blackbox/qrcode-3"), new MultiFormatReader(), BarcodeFormat.QR_CODE);
- addTest(28, 28, 0.0f);
+ addTest(29, 29, 0.0f);
addTest(26, 26, 90.0f);
addTest(30, 30, 180.0f);
- addTest(26, 26, 270.0f);
+ addTest(29, 29, 270.0f);
}
}
\ No newline at end of file
public QRCodeBlackBox4TestCase() {
super(new File("test/data/blackbox/qrcode-4"), new MultiFormatReader(), BarcodeFormat.QR_CODE);
- addTest(33, 33, 0.0f);
+ addTest(32, 32, 0.0f);
addTest(33, 33, 90.0f);
addTest(32, 32, 180.0f);
addTest(32, 32, 270.0f);