• GB
  • NL
  • DE
  • US
30-50% goedkoper dan concurrent Sterk machine vision camera portfolio Uitstekende support Gecertificeerd door TÜV Rheinland 3 jaar camera garantie
Home How to select camera and software for Barcode and DMC code reading

How to select camera and software for Barcode and DMC code reading

How to select camera and software for Barcode and DMC code reading This article explains how to read barcodes and DMC codes (Datamatrix codes) with the most cost-effective machine vision camera solution. Additionally, we clarify the difference between Barcodes and DMC codes by discussing the pros and cons. We also provide a formula that helps you to calculate the required resolution, and give practical examples reading barcodes and DMC codes.

Barcode versus DMC codes

The best choice for code reading with industrial machine vision cameras is to use DMC codes instead of Barcodes. DMC codes can be read using lower resolution cameras while using the same field of view as Barcodes. Therefore, when reading DMC codes, you can use cheaper cameras. This also means that with DMC codes you can inspect a bigger field of view with the same hardware and price.

DMC code is a matrix of dots, also called a datamatrix. The dot size is specified as module size. For machine vision algorithms, it is easier to read these dots than very thin lines, which barcodes are made of.

The resolution required is determined from the proportion between the field of view area we want to inspect at once (so within one frame / image), and the size of the smallest detail.

DMC codes are also much compacter than Barcodes, so it reduces the required label size. Here an example of a BARCODE and a DMC code label containing the exact same information
 

Price considerations for code reading

For camera resolutions above 1.6MP, the shutter type has a significant influence on the price of the industrial camera. A rolling shutter can be used only when camera and object are still, whilst a global shutter can be used when there is movement. If you want to read more detailed information about the difference between the rolling shutter and the global shutter, read the shutter type in-depth article on our knowledge center.

Practical example: we need camera resolution of 12MP. Below a comparison of costs between a rolling shutter and a global shutter camera system:

12MP Rolling shutter with lens: MER2-1220-32U3M €216 + LCM-10MP-12MM-F2.8-1.5-ND1 €169 = €385

12 MP Global shutter with lens: ME2P-1230-23U3C €1030 + LCM-12MP-16MM-F1.3-1.3-ND1 €318 = €1348

General speaking, the following rules are applicable:
- In case that the object and camera are static -> Rolling shutter camera. Lowest resolution we recommend is 6MP. Prices of a camera + lens set:
  • 6MP camera + lens = €276.
  • 12MP camera + lens solution = €385.
  • 20MP camera + lens solution is €788.
- In case object or camera are moving -> Global shutter camera. Prices of a camera + lens set:
  • 3MP camera + lens = €472.
  • 5MP camera + lens = €737.
  • 12MP camera + lens = €1348.
  • 26MP camera + lens = €1622.
Please take note that not all shutter types are available with the same resolution. Therefore, it is not possible compare the same resolution cameras in the price example above exept for the 12MP cameras.

How to calculate the required camera resolution for Barcode

To calculate the resolution needed to inspect barcode labels, we need to know the width of the thinnest line of the barcode we want to see and the size of the field of view.

To reduce the resolution needed, we can either increase the size of the thinnest line of the barcode or decrease the field of view.

How to calculate the required camera resolution for DMC code

To calculate the resolution needed to inspect DMC code labels, we need to know the size of the smallest dot / square (module size) of the datamatrix and the size of the field of view.

To reduce the resolution needed, we can either increase the module size of the DMC code, or decrease the field of view.

Minimum resolution versus recommended resolution for code reading

Resolution is key for stable, robust DMC code and barcode reading. In this example we calculate the system setup in 2 scenarios: minimum resolution and recommended resolution.

With minimum resolution we want a minimum of 1.5 pixels per linewidth (barcode) or 1.5 pixel per dot (DMC code). If all parameters are optimal (label quality, light, geometry, etc.) or you take multiple images of the same code. This could work stable.  

The recommended resolution is at least 2 pixels per linewidth (barcode) or 2 pixel per dot (DMC). The best solution is 3 pixels. The more pixels per linewidth / dot means that the camera resolution is higher than required. The total setup will be more expensive. However more pixels will also result in easier, faster, better, and more stable reading of the DMC codes and barcodes.

Formula for calculating resolution

There is a formula for calculating the resolution you can use:

Camera resolution = Field of view / systemresolution

Systemresolution = (Thinnestline or modulesize) / (minimum or recommended resolution per thinnestline or modulesize).

Eg: Which camera do I need to detect a barcode with a thinnestline of 1mm in a field of view of 1000*600mm. We go for the recommended resolution.

Systemresolution = 1mm/2pixels= 0.5 mm/pixel

Horizontal camera resolution = 1000 mm (horizontal FOV) / 0.5mm (systemresolution) = 2000pixels

Vertical camera resolution = 600 mm (vertical FOV) / 0.5mm (systemresolution) = 1200pixels

Our system will need a camera with a resolution of at least 2000*1200 pixels = 2.4MP camera.

If the object is standing still, so rolling shutter camera, we would recommend the 6MP camera for approx. 276euro (including lens). If the object is moving, we recommend the 3MP global shutter camera for approx. 472euro (inclusding lens).

The importance of image processing software in machine vision barcode / DMC label reading

Software choice is crucial in DMC code and barcode reading. It plays a critical role in the systems performance to recognize and read codes. As a general rule, the better the software algorithms, the better codes can be recognized, read and decoded.

The power of adaptive vision software

Adaptive Vision Image processing software
In Adaptive Vision you can make a very powerful algorithm for code reading with just 2 tools and 5 minutes of time. One tool for acquiring the image and another tool for detecting the barcode or DMC code.

The tools are very fast and powerful. In all our tests, we achieved far better reading success ratio on difficult images compared to customers that are using open-source code reading algorithms. Especially when there is limited resolution or difficult lighting situation (reflections for example).

Below an example of reading barcodes in Adaptive Vision Studio


 

Code reading application in practice

As mentioned, reducing the field of view will reduce the required camera resolution. If the field of view is very wide compared to its height, one smart way to setup a system is to capture several images by means of moving the cameras or the products.

For instance, if your field of view where barcodes or DMC are to be detected is 10 x 2 meter, you could move one camera on a trolley and grab 5 pictures of 2x2meters, rather than use 5 cameras

Line scan cameras vs area scan cameras for code reading

Our customers frequently ask what the difference is between Line scan cameras or Area scan cameras to detect barcodes.

With Line scan cameras an image is reconstructed in software line-by-line for inspection, this happens when an object passes under the sensor. Line scan cameras are preferred when using a conveyor belt to move the products below the camera. For line scan cameras it is very important to know when to capture each pixel line, because it depends on the speed of the object that is passing. Often encoders are used. A line scan camera is very expensive, and encoders are needed to make a stable solution.

Area-scan cameras are much cheaper, more flexible, and easier to install. They can read barcodes and DMC codes in very different environments. Therefore > 95% of the applications for barcode or DMC code reading uses an Area scan camera.

Conclusion

If you want a cost-effective code reading solution, we recommend using DMC codes. The datamatrix is readable with a lower resolution camera and low-resolution cameras are cheaper than high resolution cameras. If you do want to read barcodes, or further lower the price of your DMC code reading solution, we recommend using a rolling shutter if possible, since these are cheaper than global shutter cameras.

You can also reduce the resolution needed by either increase the size of the thinnest line / dot or decrease the field of view. The field of view can also be decreased by using multiple cameras covering the total field of view.

Any other questions about barcode or datamatrix code reading?

In case you have any other questions about code reading, make sure to contact us. We are always happy to help you out.

Get notified about knowledge center articles?

Do you find our knowledge center articles helpful? Make sure to follow GeT Cameras on LinkedIn as we will post new articles there as soon as they are released.

 
  Team GeT Cameras     13-01-2021 14:28
Accepteer onze cookie voor de beste prestaties
Accepteer geselecteerde cookies