Significant speed improvement (2006-05-15 04:36 by drhu00 #21884)
By remove all the set, get, translate method from Point.java, Axis.java and Line.java and set all the attribute to public, I rewrite all code using direct call to the attribute.
Guess how much speed we gain? Here is the my test results of decode:
cc3.jpg 640x480 before 43 sec reduce to 6 sec.
cc5.jpg 640x480 before 59 sec reduce to 7 sec.
For any image 200x200, the decode only take 1 sec.
RE: Significant speed improvement (2006-05-15 08:33 by 匿名 #21888)
On the black/white image, Just scan from the top, left, right, bottom to the opposite site until you reach the black point. Then you get "the frame" of the qr code image area. Decoding this area is slightly faster than decoding the entire image.
RE: Significant speed improvement (2006-05-18 02:49 by umbalaconmeogia #21961)
I don't understand what you are saying but what I did to pre-rotate the image is following:
1. Binarize the image to get the black-white image (same as the thing you did in the QRCodeDecoder.java or by another binarization algorithm).
2. Scan to get the smallest FRAME that surrounds all the black pixels (what I said above).
3. I try to detect three PDP corner points (it needs some stricks here), and detect the rotating angle of the QR code image.
4. Rotate the FRAME and do as (2) above to get the QR code image are.
Notice that the FRAME at (2) not surrounds tightly the QR code image. All of its sides are parallel with the entire image's sides. After rotating, the QR code image's sides are parallel with the entire image's sides, and the sides of the FRAME at (2) turn to the same direction with the sides of the QR code image before.
This seems to work well. I display the pre-rotated image on the screen and its direction looks good. But all the image binarization that I tried is not good enough to deal with the rotated image, so the qr code could not be decoded. And I threw this pre-rotating away.