Closed quicklizard99 closed 9 years ago
Some good descriptions at Wikipedia and Inlite. Within the museum have least:
The ideal is we pass the cropped specimen image to a decoder, which returns the data encoded within (ideally also the types and locations) of all barcodes on the image.
OpenCV does not have barcode decoders. This has been slated for a while, e.g. for the 2014 GSoC with Claudia Rapuano as mentor. See also this discussion.
I have investigated the following open-source barcode decoders
None of these three open-source decoders is capable of reliably locating and decoding barcodes within the example specimen images that I have.
I coded up this strategy:
This method works very well for some images by not reliably across the example cropped specimen images that I have.
Look at commercial decoders.
Could you place a selection of images online for which this should work? It would help a lot in coding up some test solutions.
Thanks @stefanv. I will share a few hundred example images, along with some code and results, although probably not until the start of next week.
The open-source decoders are very slow and/or fail to find barcodes - commercial libraries give much better results. Inselect is currently hard-coded to use the Inlite ClearImage library. The library only runs on Windows - if you are using a Mac or Linux then we currently have no good solution. ClearImage supports a wide range of barcode types but Inselect is hard-coded to detect only Data Matrix. See also #130.
NaturalHistoryMuseum/gouda@f8f229435eb1c5765291b8f0a5013c5abda2484d adds supports for libdmtx - tested on Mac OS X only.
libdmtx via pydmtx also tested on Linux and 32-bit Windows. 64-bit windows build of libdmtx fails with core dump.
libdmtx via pydmtx working on Mac OS X, Linux and 32-bit and 64-bit Windows.
v0.1.8 (f8f0667) introduces support for the open-source libdmtx
decoder on all platforms. See
NaturalHistoryMuseum/libdmtx and NaturalHistoryMuseum/dmtx-wrappers.
Adding support for the zbar open-source library would allow 1D barcodes and QR codes to be decoded. The last release (0.10) was on 2009-10-27. There has been no development since and not likely to be any more. zbar is available for all three major OSes but, frustratingly, there is no 64-bit build for Windows - a show stopper.
We would need to
User interface for config will be handled by #156
Support for QR requested by AMNH. Will require that Inselect supports zbar and/or exposes the relevant Inlite functionality.
Inselect now supports Inlite, zbar and libdmtx. The only gap is that zbar is not available on 64-bit Windows, for reasons given on 2015-04-20. Edit, Configure Read barcodes shows a box allowing the user to choose between the three decoders; options are disabled where a decoder is unavailable:
Our fork of ZBarWin64 adds support for zbar on 64-bit Windows.
Metadata fields need to be populated from data decoded from barcodes on cropped specimens images. Decoding should be robost and require as little human intervention as possible.