Printing quality control with industrial machine vision

Proper packaging and attractive flawless printing on products can have a significant impact on attracting initial customers. Therefore, manufacturers pay great attention to the quality of packaging and printing on products to compete in the market. Products with defective or imperfect printing are removed from the production line, and only products with proper printing enter the market. The image below shows an example of good and defective printing on milk bottles. One of the attractive applications of machine vision is quality control of the printing on manufactured products. In this article, we demonstrate how we used Halcon software for inspecting the accuracy of printing on the caps of mineral water bottles.

Printing Defect

The Best Quality Inspection Software in the Industry

Halcon Software is highly efficient for inspecting printing. In this software, you can easily write a program that receives online images of product printing from a camera and compares them with good printing. In case of any errors in printing, the program generates the necessary signal to remove the product from the production line.

In the image below, you can see a simple view of the Halcon software. The program codes are written in the window on the right, and on the left, it displays an example program of good printing as a template. Clicking on the execute option in the toolbar, indicated by the yellow circle, runs the program codes.

Halcon Software Environment

Next, let’s examine an example of using Halcon software to identify defects in printing.

If you are interested in a detailed education in this field, you can take advantage of the comprehensive Halcon training course.

General Idea in Writing Automatic Printing Quality Control Software

We want to write a program in Halcon to control the quality of printing. The general idea in writing printing inspection programs is to create a suitable template for comparison. If the printing on the products deviates from the template, the program indicates an error. In Halcon software, the creation of the program is done through two methods:

  1. Creating a template from a single image: In this method, the program learns from a sample of good printing. In other words, the program first receives an image of good printing and creates a template for comparison with other prints.
  2. Creating a template from multiple images: In the second method, to make the program more flexible in detecting various defects, training is done with multiple samples of good printing. The program processes multiple good prints and defines a template.

It can be said that program training for printing defect identification is done by defining a template. In the image below, the program has reported the end of the training phase after creating the template.

Printing Quality Control Program Training

Creating a template, along with other program settings, allows us to easily detect any errors in printing.

Printing Defect Detection Program on Bottle Caps

This program can detect defects in the printing on the caps of mineral water bottles. In the first stage, the program learns, and in the next stage, with each program execution, it checks the quality of the printing and displays the result.

First Stage: Training the Printing Inspection Software

By running this program, the image of good printing is first received as a reference, and then the program creates a template using the reference image. It announces the end of the training phase. In the image below, the reference image is shown on the left, and the end of the training phase is reported on the right.

Training the Printing Quality Control Program

Second Stage: Detecting Good and Bad Printing

With each program execution, the image of the bottle cap printing is compared with the template. If the printing is good, an “ok” message is displayed above the image, and if there is any defect in the printing, a “not ok” message is reported above the image. The program is written in a way that it can identify all defects in printing by transparently indicating them with red rectangles. In the image below, the program has reported one good print on the left and one defective print on the right.

Results of Printing Inspection

In the Halcon environment, for a more detailed inspection, you can use the large zoom window. As you can see in the image below, the defective print area has been magnified.

Large Zoom Window in Printing Control

Effect of Rotation and Shifting of Printing on Program Performance

If the printing area is rotated or shifted relative to the template, it does not disturb the program’s performance. In other words, the program detects the printing regions and places them in a fixed location in the image. In the image below, despite the rotation and shifting of the image compared to the template, the error region has been well detected.

Rotation of Printing in Image Quality Control

Quality Control of Printing with a Vision System on the Factory Production Line

As mentioned earlier, the program can be configured to receive images of printing not from stored images on the computer but from an industrial camera. If we change the template in the program training area, we can use the program to inspect various prints.

Also, in the factory production line, the signal generated from the defective printing detection can be transferred to a jack to remove the product from the production line. In the image below, you can see that the jack has removed a bottle with defective printing from the production line.

Removing Defective Printing from Production Line

For consultation or implementation of various projects in the field of packaging inspection printing control, liquid level control inside bottles, etc., the Vision System team will be your dedicated first specialized reference.

[Related Articles]

Leave a Reply

Your email address will not be published. Required fields are marked *