1819202122232425262728
ocr = OCR.getSpec("test"); } @Test public void test_read1() { ImageFrame f = new ImageFrame("src/main/resources/images/test.png"); String text = ocr.read(f.getBounds()); System.out.println(text); Assert.assertEquals("TEST1234", text); f.close(); }
2728293031323334353637
f.close(); } @Test public void test_read2() { ImageFrame f = new ImageFrame("src/main/resources/images/test2.png"); String text = ocr.read(f.getBounds()); System.out.println(text); Assert.assertEquals("ABCDEFGHIJKL", text); f.close(); }
3637383940414243444546
f.close(); } @Test public void test_read3() { ImageFrame f = new ImageFrame("src/main/resources/images/test3.png"); String text = ocr.read(f.getBounds()); System.out.println(text); Assert.assertEquals("0123456789", text); f.close(); }
4546474849505152535455
f.close(); } @Test public void test_read4() { ImageFrame f = new ImageFrame("src/main/resources/images/test4.png"); String text = ocr.read(f.getBounds()); System.out.println(text); Assert.assertEquals("MNOPRSTUVWXYZ", text); f.close(); }
54555657585960616263
f.close(); } @Test public void test_read5() { ImageFrame f = new ImageFrame("src/main/resources/images/test5.png"); String text = ocr.read(f.getBounds()); System.out.println(text); Assert.assertEquals("ABCD1234", text); }