I made a change to the file ScanBarcodeTest.java; instead of scanning an image I used a jpg file. But I got:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
at sun.awt.image.ShortInterleavedRaster.getDataElements(ShortInterleavedRaster.java:221)
at java.awt.image.BufferedImage.getRGB(BufferedImage.java:799)
at uk.org.JBarcode_Recognition.JBarcode_Recognition.imageToGreyScale(JBarcode_Recognition.java:105)
at uk.org.JBarcode_Recognition.JBarcode_Recognition.processImage(JBarcode_Recognition.java:87)
at uk.org.JBarcode_Recognition.JBarcode_Recognition.GetBarcode(JBarcode_Recognition.java:76)
at uk.org.JBarcode_Recognition.JBarcode_Recognition.GetBarcode(JBarcode_Recognition.java:199)
at ScanBarcodeTest._getSheet(ScanBarcodeTest.java:102)
at ScanBarcodeTest.main(ScanBarcodeTest.java:85
What are the restrictions to the image used by _getSheet?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I made a change to the file ScanBarcodeTest.java; instead of scanning an image I used a jpg file. But I got:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
at sun.awt.image.ShortInterleavedRaster.getDataElements(ShortInterleavedRaster.java:221)
at java.awt.image.BufferedImage.getRGB(BufferedImage.java:799)
at uk.org.JBarcode_Recognition.JBarcode_Recognition.imageToGreyScale(JBarcode_Recognition.java:105)
at uk.org.JBarcode_Recognition.JBarcode_Recognition.processImage(JBarcode_Recognition.java:87)
at uk.org.JBarcode_Recognition.JBarcode_Recognition.GetBarcode(JBarcode_Recognition.java:76)
at uk.org.JBarcode_Recognition.JBarcode_Recognition.GetBarcode(JBarcode_Recognition.java:199)
at ScanBarcodeTest._getSheet(ScanBarcodeTest.java:102)
at ScanBarcodeTest.main(ScanBarcodeTest.java:85
What are the restrictions to the image used by _getSheet?
There are no restrictions to the size of the image,
but you do have to insure that the rectangle is inside the image. I'll add this as a bug.
logopak and weirdpanda,
I had some problem , and the image I used must be correct, rectangle is inside the image. Any idea what is wrong. Thanks.
Sorry for the delay are you still having the problem?