This post is part of our 2017 Developer App Series, which showcases apps created by our Support Agents over the course of eight weeks. These apps are intended to be larger, more thoughtful apps with highly practical purposes in mind, as opposed to a basic “how to” for a feature.
This app uses the LEADTOOLS Barcode Engine alongside the LEADTOOLS Image Processing SDK to concurrently run different image processing algorithms in a multithreaded environment on a barcode image until the barcode can be found in one thread and cancel the others. This will help decode barcodes on particularly difficult images by doing 5 sets of image processing commands at the same time that are each optimized to find barcodes on commonly difficult images.
Each barcode pass has a different set of image processing commands that are do the following for each image:
- AutoColorBinary – This set of IP commands will auto color the image to enhance shadows and brighten the image. Then it will apply DynamicBinary to convert it to B/W. This is useful for extracting barcodes on images with glare or shadows on it.
- SmallImageResize – This set of IP Commands will resize smaller images using Bicubic interpolation and then AutoBinarize the image to convert to B/W. This is useful for extracting barcodes on smaller images, such as images under 720p.
- DocumentCleanup – This set of IP commands will run some document cleanup commands. It will despeckle, deskew, then darken the image to try to process the image. This is useful for extracting barcodes on scanned documents.
- SharpenEnhance – This set of IP commands will deskew the image and then try to sharpen the image. This is useful for extracting barcodes on blurry images.
- MaxMedianMin – This set of IP commands will lighten, blend, then darken the image. This is useful for extracting 2D barcodes that are damaged.
Instructions for Running the App
- Download the source code for this app from here
- Extract the contents to the C:\LEADTOOLS 19\Examples\DotNet\CS directory.
- Build csproj file with Visual Studio and run
- Download and test with the attached hard to read barcode images