Did you know that barcodes are helpful and beneficial to your business? Check out a demonstration and see how they actually work. It's important to know that what you are purchasing, whether it's a barcode scanner or other barcode equipment, is really going to do what you think it is. Check out all your barcode scanning and barcode printing options and make sure you're getting the best deals on your barcode scanners, barcode printers, and barcode software before you buy!

EymBarcode Reader demonstration application v2.4

 

This demonstration application allows its user to decode 1D barcodes from image data that may either come from the user’s webcam or from image files. It is intended to showcase the features of the EymBarcodeReader.ocx ActiveX component, which is available for licensing on a one-time fee basis (i.e. royalty free runtime distribution).

To install this application, download EymBCdemo25Install.zip (5,377KB - built 06/23/2009), unzip it and run the included setup.exe.

Application overview

Barcode reader OCX configuration

Troubleshooting

Video capture device

System display setting

Camera focus

Acknowledgments

Video device management

Barcode information and specification

 

Major changes from version 1.0:

The most notable functional enhancement consists of the addition of a “Thorough” mode, allowing the OCX to pull multiple barcodes from the same image.

This additional functionality required a slight modification to the OCX interface. In version 2.x, most output properties (data, confidence levels, location, etc) take an index value as argument.

Version 2.x also benefits from other improvements that increased the OCX’s accuracy and speed.

Version 2.1 has also added support for Codabar (a.k.a. Ames Code/USD-4/NW-7/2 of 7 Code) and Patch codes

Version 2.2 has been further optimized leading to drastic speed increase that are most noticeable in thorough mode when processing large image files.

Version 2.3 has added support to color maps so that the host computer no longer needs to be set to true color (24 or 32 bits). This revision also added a new stage of “reality check” which should both decrease the occurrences of false positives and also slightly speed up the processing of large image files.

Version 2.4 has added a few controls that further optimize the system’s speed and accuracy. It also fixed am intermittent bug in “Fast mode”.

Application overview

 

The application itself does very little more than managing the connection with your webcam or file system and passing images to the ActiveX component where all image processing and decoding stages take place. The application’s user interface subsequently echoes the decoding results that are returned from the ActiveX component.

ImageSource

The application’s graphic user interface consists of the preview area (image box on the right) and the decoding results on the left.

Using the application’s “File” menu the user my chose two modes of operation for the demo: image files of live video.

·          Live video mode: The application will attempt to connect to an available video device such as a webcam and proceed to pull barcodes from that live video feed. For this mode the OCX is set to run in its “Fast” mode, restricting its attention to only one barcode per image.

·          Image file mode: The user may browse the local file system and import an image file. This mode illustrates the OCX’ “Thorough” mode which requires a bit more computation but allows the decoding of multiple barcodes from the same image.

These choices are available from the application’s “File” menu. Depending on which mode we’re in, the graphic user interface will exhibit slight variations.

VideoModeAnnotated

Demo running in “Live video” / “Fast” mode, looking for no more than one barcode at a time

If you select to use live video as your image source, the demo application will set the OCX in its “Fast” mode. In that mode, the system will look for the most likely location for a barcode within the image and attempt to read from this location only

FileModeAnnotated

Demo running in “Image file” / “Thorough” mode, looking for a potential multitude of barcodes

If you select an image file as your image source, the demo application will set the OCX in its “Thorough” mode. In that mode, the system will look for likely barcode locations throughout the image and attempt to decode as many as it can find.

The application’s user interface is organized as follows:

1: Image preview area. 

2: Barcode location feedback. The estimated location and orientation of the barcode(s) is overlaid on top of the live image capture. In the “Live video” / “Fast” mode of operation (2a), this will never show more than a single location. In the “Image file” / “Thorough” mode of operation (2b), this can show multiple locations. The location corresponding to the code displayed on the left is shown in red while the others are shown in white.

3: Current image source. The name and resolution of the video capture device or the current image file name is shown above the live video image. The application will give the user a chance to chose which video device to use each time the mode of operation is switched to “Live video” from the “File” menu. Further properties of the video device are accessible from the application’s “Configuration” menu.

VideoSelection

Video device selection tool

VideoConfiguration

Video device properties

4: Raw payload. When a barcode is successfully read, this field shows the raw data that it conveys.

5: Symbology. When a barcode is successfully read, this field shows the name of its symbology. This field would tell the user whether that barcode is an EAN-13, a Code 128, a Code 39, a Code 93, and EAN-8, a UPC-E etc. The list of symbologies that the ActiveX control should look for can be changed using the

Barcode reader OCX configuration tool that is available from the application’s “Configuration” menu.

6: Code type. When a barcode is successfully read, this field shows the name of its code type. There are many international standards consisting of data formats that reside on top a given symbology. For instance, UPC-A is a subset of EAN-13 codes. More elaborate formats such as UCC/EAN-128, which is a subset of Code128) are designed to convey very specific types of information.

7: Data descriptor. When a barcode is successfully read, this field shows a description of the data it conveys. This information is particularly useful in the context of elaborate code types, which may convey information about dimension, location, packaging, expiration date etc.

8: Data. When a barcode is successfully read, this field shows the formatted data it conveys. The format is a function of the code type and conforms to the numerous standards that the ActiveX is aware of.

9: More information. The confidence level associated with the current code is shown here. Depending on whether we are using the application “Live video” of “Image file” modes, this area may either provide an estimate of the reader’s effective frame rate (in “Live video” mode) or allow the user to scan through the multiple codes that were read from the provided image (in “Image file” mode).

 

Barcode reader OCX configuration

 

EymBCConfiguration-v2_4

Barcode reader OCX configuration tool

The barcode reader OCX configuration tool is available from the application’s “Configuration” menu. You may select all the symbologies you are interested in reading. By default, all supported protocols are enabled except for the UPC 2/5 extensions when they stand by themselves. Selecting only those you wish might both speed up the decoding process and minimize false positive rates.

You may also modify the reader sensitivity by means of two configuration parameters.

·          The confidence threshold. The ActiveX control will report only decoding results that score above that threshold value. The confidence associated with a decoded payload is a number between 0.0 and 1.0. The default value for this threshold is 0.83 (i.e. 83%) and you may modify that value using the provided slider between 0.7 (i.e. 70%) and 0.9 (i.e. 90%).

·          The image contrast sensitivity. The ActiveX control will only pay attention to areas of the image that score above that threshold value in terms of contrast and high spatial frequency energy. This parameter is a number between 0.0 and 1.0. The default value for this threshold is 0.08 (i.e. 8%) and you may modify that value using the provided slider between 0.05 (i.e. 5%) and 0.15 (i.e. 15%).

·          Expected/max nb. of barcode per image. In version 2.4 the system’s “thorough mode” was further optimized and it you may further speed up the process if you know in advance how many barcodes are contained within the image.

·          Expected image resolution. Originally the system was targeting image resolutions in the 100 to 200 dpi. As it turns out many users are using this control to process images that were scanned at much higher resolution. The system doesn’t need to know exactly what the image resolution is but you can help it do a better and faster job by providing a fair guess in that field.

·          Barcode search resolution. Although EymBarcode doesn’t do a traditional “scan-line” process, there is still a concept of search granularity when it first analyses the provided image in order to assess where potential barcodes might live. If you deal with large and high-resolution images, you can get away with a coarser granularity (i.e. larger number), which will subsequently speed up the process.

 

Troubleshooting

 

Video capture device

If no available video device is found on the system the application will notify you. You will still be able to run the application in its “image file” mode of operation.

Camera focus

The image processing algorithms can cope with some amount of blur but the image should be reasonably focused. A webcam is typically intended to focus on objects that are a few feet away from its lens. As you intend to read barcodes from it, you will probably need to tweak your camera a bit so that it can focus on objects that are only a few inches away from its lens. For most webcams, that will require that you turn its lens counter clockwise.

 

Acknowledgments

 

Video device management

In order to connect with your system’s video devices and capture frames, this application makes use of two COM objects that are effectively wrappers around DirectX and DirectShow features. These DLLs (FSFWrap.dll and CapStill.dll) were developed by GDCL (Geraint Davies Consulting Ltd - www.gdcl.co.uk), a small consulting firm based in North Wales specializing in DirectShow software and WDM device driver development. GDCL has made these two wrappers freely available from their website at http://www.gdcl.co.uk/vb.htm.

Barcode information and specification

The development of the Eym Barcode Reader OCX would have never been possible without the great quality information about barcode standards and their specifications the author found online at these sites:

VIS’ Barcode Island - http://www.barcodeisland.com/

Russ Adam’s Barcode1 - http://www.adams1.com/pub/russadam/barcode1.html