Sorry it took so long to reply. I cannot access
groups.google.com
from work because it is being blocked by our network overlords as a
time wasting chat site. So I am doing my testing at work and making
the entries to this group when I get home.
I had to go back and change the test data because it contained some
protected information. The new test data generated only 2 errors
using the "best pick" mask during the 466 substring tests. However,
the results of substring txtin.substring(0,259) produced a Eureka
scenario.
Two of the 8 masks fail for this particular text string. And the
failure is propagated in two different forms out of zxing.
The first case is the "best pick" mask #2
dataLength=259
Mask=2
mode=byte
eccLevel=Q
version=15
#dataCodewords=295
#EccCodewords=360
Data=CPCS:1.0;name=John J. Coop;title=Information Technology
Specialist;org=ABCD-123-XX/LKJHYU;address=1234 E 4th St Cleveland OH
45678;phone=216-123-4567;fax=
216-890-1234;email=
john...@abcd.com;type=reg;ssn=123-45-6789;wt=SF50;pages=23CPCS:
1.0;name=John J. Coop
When I decoded the mask-2 symbol the following exception was
experienced.
java.lang.IllegalArgumentException: size must be at least 1
at com.google.zxing.common.BitArray.<init>(BitArray.java:31)
at
com.google.zxing.qrcode.detector.AlignmentPatternFinder.find(AlignmentPatternFinder.java:
86)
at
com.google.zxing.qrcode.detector.Detector.findAlignmentInRegion(Detector.java:
348)
at com.google.zxing.qrcode.detector.Detector.detect(Detector.java:
101)
at com.google.zxing.qrcode.QRCodeReader.decode(QRCodeReader.java:64)
at cpwf.qrencode.QREncode.doDecode(QREncode.java:57)
at cpwf.qrencode.QREncode.doEncode(QREncode.java:82)
at testpkg.CPCoverTest.doBuild(CPCoverTest.java:165)
at testpkg.CPCoverTest.jbInit(CPCoverTest.java:243)
at testpkg.CPCoverTest.<init>(CPCoverTest.java:63)
at testpkg.CPCoverTest.main(CPCoverTest.java:58)
Then I tried each of the other 7 masks on the same symbol. Masks
0,1,4,5,6, and 7 were all good. When I apply mask 3 to the same
symbol and then decode I get the following text printed from zxing.
"No barcode found in image"
If an exception is being generated then I must be eating it somewhere
but at first glance it appears that any exception should be getting
printed. I can dig deeper to verify if there is an exception if you
wish.
I then turned to look at other encoders to verify that I am not doing
something stupid.
www.viooli.com and
qrcode.kaywa.com only accept a max of 250
characters of input (just 9 short). However I was able to generate
symbols from
www.swetake.com/qr/sample_e.html and from
chart.apis.google.com. In the past when trying to test by comparison
against other encoders I was frequently thwarted with the other
encoders selecting different default masks than me. In this case
though both swetake and google-charts used mask 2. Comparison showed
that my symbol is dead on with google-charts.
Swetake's symbol only differed by a backwards encoding of the 3
modules for the remainder bits found after the end of the ECC codeword
area. I have actually noticed this before with the remainder bits
from Mr.
Swetake's encoder. Each time it only effected the remainder bits.
After rereading the ISO spec I believe mine is correct. And I presume
it does not matter anyways because I can't imagine they would ever be
looked at during decode.
Decoding both google-chart's and Swetake's symbols using the
GUIRunner.java that came with zxing 1.0 both produced the result
"com.google.zxing.ReaderException: No barcode was detected in this
image."
The url for generation of the symbol from google-charts is found
below.
http://chart.apis.google.com/chart?chs=400x400&chld=Q&cht=qr&choe=ISO-8859-1&chl=CPCS:1.0;name=John%20J.%20Coop;title=Information%20Technology%20Specialist;org=ABCD-123-XX/LKJHYU;address=1234%20E%204th%20St%20Cleveland%20OH%2045678;phone=216-123-4567;fax=216-890-1234;email=john...@abcd.com;type=reg;ssn=123-45-6789;wt=SF50;pages=23CPCS:1.0;name=John%20J.%20Coop
I have not done the analysis for the other error yet
txtin.substring(0,409) as it took me most of the afternoon to get this
far.
Regards
PaulJP
> > PaulJP- Hide quoted text -
>
> - Show quoted text -