![]() After some experimentation I have come to the conclusion that pyzbar is not completely scale invariant. Also, we have to keep in mind that neither pyzbar nor opencv.QRCodeDetector are 100% reliable. However, my approach assumes there is some contrast (the more the better) between the QR and its surrounding area. I think I have found a simple yet reliable way in which the corners of the QR code can be detected. It's purposely poor lighting quality to approximate the worst case scenario, however the individual codes still detect and decode correctly when cropped. ![]() Here is one of the sample images that I'm using for testing. I am interested in any solutions to improve the detection/decoding performance, but prefer ones that (a) use machine learning techniques (I'm a ML newbie but willing to learn), (b) use OpenCV image pre-processing or (c) make improvements to my basic cropping algorithm. How can I find the approximate location of the QR code(s) so I can crop the image accordingly? The sliding window may catch a symbol more than once, making it difficult to determine if the symbol was present more than once.Problems that may affect other projects where I would use this approach: the symbol size may vary due to being closer/further from the camera.the most reliable window sizes tend to be small and require many iterations,.it causes the entire area to be analyzed nearly 4 times a side effect of shifting the window by 50%,. ![]() The sliding window approach is difficult to tune, inefficient and slow b/c: Problems which affect my current project: I have also tried using OpenCV for detection/decoding but the performance was no better than with pyzbar Problems With My Solution ![]() I move the window by 50% each iteration to ensure I don't miss any symbols at the edge of the window. I have written a loop that slides a crop window over the image, and attempts to decode each cropped frame separately. If I attempt to decode the full image, the symbol is not detected/decoded. We are using high quality industrial cameras and lenses, so images are generally good quality and in focus.Ĭurrently, I am able to detect and decode the image reliably with pyzbar when I crop the image around the QR code using a window of aprox 600x500. The QR code can be at any location in the frame, but the orientation is expected to be normal, i.e. I need to detect and decode a relatively small QR code (110x110 pixels) in a large image (2500x2000) on a Raspberry Pi. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |