Machine Vision Solutions for CIJ Print Inspection · poor print quality or gaps and overlaps of...

10
Technology White Paper Machine Vision Solutions for CIJ Print Inspection Using Vision Tools to Ensure Accurate Text on Products and Packaging

Transcript of Machine Vision Solutions for CIJ Print Inspection · poor print quality or gaps and overlaps of...

Page 1: Machine Vision Solutions for CIJ Print Inspection · poor print quality or gaps and overlaps of printed ink drops), dirty printhead (causing missed dots), and incorrect line speed

Technology White Paper

Machine Vision Solutions for CIJ Print Inspection

Using Vision Tools to Ensure Accurate

Text on Products and Packaging

Page 2: Machine Vision Solutions for CIJ Print Inspection · poor print quality or gaps and overlaps of printed ink drops), dirty printhead (causing missed dots), and incorrect line speed

Technology White Paper

Machine Vision Solutions for CIJ Print Inspection

Continuous Inkjet, or CIJ, is a printing method commonly used in high-speed packaging lines to apply alphanumeric character strings like dates and batch numbers to products for the purpose of allowing humans and machines to identify products and verify product integrity. Machine vision systems are typically employed in packaging lines to ensure the quality and accuracy of printed data to comply with packag-ing and labeling requirements. This is made possible through Optical Character Recognition (OCR), a machine vision tool that interprets printed text on products to ensure data accuracy with high precision, enabling manufacturers to meet regulations and avoid fees and recalls with ultimate production efficiency. However, in the highest-speed packaging lines that employ CIJ printing, even minor fluctuations in prod-uct movement or equipment position may result in printing errors, causing machine vision systems to miss or misinterpret printed charac-ters. This white paper provides guidance on using machine vision tools to account for the most critical CIJ printing errors, and discusses:

- Common challenges in high-speed CIJ printing that result in illegibility or misinterpretation of data by machine vision OCR - How to evaluate errors to identify the key print defects that must be accounted for by vision in a given production environment - Machine vision solutions for CIJ print accuracy inspection and tips on selecting the right vision solution for a production line

Eldad Ben Shalom, Microscan Systems, Inc.

What Is CIJ?CIJ stands for “continuous inkjet” – a non-contact printing method that expels a continuous stream of ink droplets from a printhead nozzle to the surface of a part or package. Inside the print chamber, ink is broken into drops by a pulse from a piezoelectric crystal. The ink droplets needed for printing are charged by an electrode as they form resulting in a controlled, variable electrostatic charge on each droplet. Once the drop-lets are charged, they pass through an electrostatic field and are deflected by electrostatic deflection plates. The speed and charge of each droplet determines the position of the droplet on the substrate. As many as 120,000 droplets are expelled every second, without direct contact of the printer to substrate, mak-ing the CIJ printing method extremely versatile and responsive to changing print requirements. This versatility makes CIJ an ideal printing method for high-speed applications, as well as variable information, such as dates, times, batch codes, product informa-tion, logos, and other text on goods and packaging.

The major advantages of the CIJ printing method are a) the high velocity of the ink droplets, which allows for a relatively long dis-tance between the printhead and the substrate, and b) the very high drop ejection frequency, allowing for high-speed printing. Since the printer’s jet is always in use, its nozzle does not clog, allowing solvents like ketones and alcohols to be employed, giv-ing the ink the ability to “bite” into the substrate and dry quickly. CIJ can also be used with relatively high reliability to legibly mark most materials regardless of substrate type, shape, or texture.

When used appropriately and well-maintained, CIJ printers are one of the most efficient means of direct printing to parts and packaging. However, there are several factors that can cause de-fects and illegibility in CIJ-printed content. In most cases, these include incorrect distance from printhead to substrate (causing poor print quality or gaps and overlaps of printed ink drops), dirty printhead (causing missed dots), and incorrect line speed or setup for an application (causing skewed dots).

What Is OCR?In machine vision applications, Optical Character Recognition (OCR) is the process by which a machine vision system inter-prets arrangements or patterns of pixels in an image as human-readable text. The machine vision system uses OCR tools in its software to recognize letters and numbers within an image by pattern-matching against stored fonts, defining and outputting these characters as alphanumeric data (ASCII data) to a com-puter or control system. Commonly, machine vision systems are programmed with standardized OCR font sets, such as OCR-A,

1 www.microscan.com

Page 3: Machine Vision Solutions for CIJ Print Inspection · poor print quality or gaps and overlaps of printed ink drops), dirty printhead (causing missed dots), and incorrect line speed

Technology White Paper

2 www.microscan.com

OCR-B, MICR, and SEMI, which are commonly used when printing to goods and packaging to enable optical character recognition by machines.

The primary advantage of printing in OCR for product identifica-tion is that OCR encodes information in a format that is both machine- and human-readable, while symbols like barcodes are only machine-readable. However, data encoded in barcodes is commonly more reliable than OCR, since OCR can have a high rate of character substitution (misinterpretation of characters by the machine used to read them). This can be due to defects in the printing method, causing imperfect characters that are undecipherable to the machine vision system. In cases where a non-standard font is used for OCR, the machine vision system may not be able to recognize characters because their pixel ar-rangements do not match what is stored in the machine vision system’s font library. In higher-end machine vision systems, teachable OCR tools can be trained to recognize characters in any user-defined font, not just specialized OCR fonts (OCR-A, OCR-B, MICR, SEMI) and can be taught to recognize a full charac-ter set in any font created for any language.

CIJ Printing Challenges that Impede Machine Vision OCRDue to the technical nature of the CIJ printer combined with the high-speed movement of products in packaging applications, CIJ-printed text is susceptible to variations in character size, shape, orientation, scaling, position, and other defects that may result in illegibility by machine vision systems using OCR. These chal-lenges are compounded by the typical variables of a machine vision system integration, such as ensuring proper illumination, optical setup, and other design considerations.

Common print defects in high-speed CIJ printing are presented below through several image examples. The text has been printed on aluminum cans by a CIJ printer at a production rate of up to 800 PPM (parts per minute), and the images have been captured by the same machine vision system in all examples.

Example 1:

The image to the right shows a clear difference between the positioning of the dots for the character “2” printed at two locations on the can surface.

Example 2:

The range of “1” characters below have been printed by the same printer head. Clearly there are significant differences in the distance between dots from one print instance to the next.

Example 3:

This pair of “5” characters to the right exhibits a drastic difference in appearance as a result of displacing just 2 critical dots in the bottom right, which deviate nearly 15% from the ideal character shape. Machine vision OCR may find it impossible to interpret this second character as a “5,” since even a human reader could make the mistake of interpreting this character to be a “6.”

These variations may have been the result of the high conveyor speed, (which may not be consistent), the bouncing of the can from side to side on the narrow conveyor, or the inconsistent surface substrate (curves, folds, or dents) of the can. These factors can cause minor changes in distance from the can to the printhead, which is unpredictable and an inevitable possibility on any production line.

Example 4:

In the example at right, compare the character “M” on the left with the character “1” on the right. If the “M” were split in the middle, it would look like two “1” characters in mirror image to one another. A machine vision system, not having human logic, could make the mistake of interpreting the right half of the “M” as a “1,” fol-lowed by a consecutive “1” to the right. The mirrored “1” on the left would then be skipped as an unidentified character.

Example 5:

Below are two consecutive, “identical” prints from the same printer. The second set of characters was printed one minute after the first set. Notice the “1” character on the far left. The displacement of just one or two dots in the character’s makeup cause quite a range of patterns, which all must be identified by the machine vision system as “1”.

Example 6:

The image on the next page exhibits a significant change in character size from right to left. A common cause of this is the position of the can while moving on the conveyer together with the curved surface of the can. On the right side, the printer head

Page 4: Machine Vision Solutions for CIJ Print Inspection · poor print quality or gaps and overlaps of printed ink drops), dirty printhead (causing missed dots), and incorrect line speed

Technology White Paper

3 www.microscan.com

is closer to the object. On the left side the printer head is further away. Therefore the characters are smaller on the right side.

It is clear to see why applications like high-speed CIJ printing pose such a challenge for machine vision systems. Vision sys-tems must use their OCR capability to correctly parse and clas-sify each character they see as a known value in the accepted al-phanumeric set for data interpretation (which is commonly called ASCII (American Standard Code for Information Interchange)). The more pattern variations that occur in each instance of a single character, the harder it is for the machine vision system to make a clear distinction between one character and another.

For manufacturers whose processes rely on extracting ASCII data from text printed on their products and packaging, and who face challenges like those illustrated in the above examples, a few questions should be asked:

1. Do I need my machine vision system to read every character on every product in 100% detail?

2. Do I need the data string that is printed on my products to be compared to an intended “match string”?

3. How sensitive is my production line to false rejects?4. How sensitive is my production line to overlooked defects?

The answers to these questions will usually determine the re-quired application of machine vision OCR with the clearest speci-fications for the integrator or machine vision engineer. The result is a machine vision solution for CIJ OCR that solves the core problems, and is simple to design, install, and maintain later.

Identify Print Defects before Implementing Machine VisionBefore beginning to design an OCR machine vision solution for a given application, the first step is to become familiar with the print defects that commonly occur on the production line to understand the greatest OCR challenges and how to overcome them. This will ensure the optimal implementation of OCR to pre-vent the greatest loss. Factory quality managers, technical staff, printer technicians, and any other factory personnel who keep records of production errors can help to identify the common defects on any given production line. This defect identification step is the most critical part of the machine vision implementa-tion process because it uncovers the most critical problems that a machine vision system needs to account for. In some cases, professionals can be outsourced to help factories identify the problems they have on the production line that may cause the greatest obstacles in data capture. It’s not always simple to pinpoint specific print defects and other problems, but there are some reliable methods to use.

Helpful questions to ask quality managers or other technical staff during this critical defect identification stage are:

• May I collect some print defect samples and can you provide me with descriptions of the defects found in the production line?

• When malfunctions happen, can the line recover itself or is the intervention of a human operator required?

• What happens when a defect is found? Is there a full production stop, or do you use stack lights and/or reject kickers?

• Does the inspection system activate a warning immediately after the first defect is found, or does the system only acti-vate a warning after a number of consecutive defects? (This question is most relevant for lines with “sustainable” defect detection, where all products are considered defects from the moment of printer malfunction.)

• Is there one defect type that occurs most frequently in your application, or are there several? How often does each type of defect occur, and under what conditions?

This is only a small selection of diagnostic questions that can be asked. The point is to emphasize the importance of learning a production line’s key problems in order to design a best-fit vision system. This discussion helps to align the manufacturer’s expec-tations with the true needs of the production line.

Basics of CIJ Printer Operation

A closer look at CIJ printer functionality helps to clarify the com-mon problems that can occur with this type of printing method.

In the middle of this diagram, one of the basic CIJ printer components is the ink reservoir. The ink pump at the left of the diagram continuously draws ink from the reservoir and pumps it through the nozzle. Ink droplets are emitted at very high speeds in the direction of the target. Most ink droplets will end up in the gutter, which contains excess ink that returns reservoir to avoid waste and to keep the ink in circulation.

The charging plates at the exit point of the nozzle use an elec-trode to apply a static charge to the droplets. Then the deflec-tion plates pull the droplets upward using high voltage. This pull-ing force can be controlled and, when precisely timed with the movement of the print target, the droplets that are not caught in

Page 5: Machine Vision Solutions for CIJ Print Inspection · poor print quality or gaps and overlaps of printed ink drops), dirty printhead (causing missed dots), and incorrect line speed

Technology White Paper

4 www.microscan.com

the gutter escape and strike the print target, creating the shapes and characters that are printed on the target surface. A very small quantity of ink ultimately ends up on the print target, with the rest being recycled to the ink reservoir.

For more information on inkjet printing, Microscan recommends the article by Hue P. Le, “Progress and Trends in Ink-jet Printing Technology.”

Common CIJ printer Defects

Due to the technical nature of CIJ printers and precise physics used to charge and expel ink droplets onto the print target, print defects are common especially in high-speed production lines. These defects should be noted during the defect identification stage when planning to integrate machine vision:

1. A CIJ printer is a stationary piece of equipment, with a stationary printhead. Therefore, the process of CIJ printing is achieved through the product’s movement. Correctly-timed product movement in front of the CIJ print head is critically important in achieving the desired print results. When there is a problem with the stable movement of products on a conveyor, print quality can be undermined. Stable movement is defined by constant speed and consistent distance of the print surface to the printhead.

2. One of the most common causes of printing defects in CIJ printing is a dirty gutter from accumulated dry ink, which can build a barrier in front of the print nozzle and cause the printer to miss dot rows on the print target.

3. If not installed properly, an unstable printhead can be easily displaced by the vibrations caused by mechanic rotation in the production line equipment. This can result in misprinted dots and distorted characters.

4. When product surface is wet, oily, dirty, distorted, or affected by some other means, this can result in varying sizes of ink spots on the print target due to bleeding or skew.

The images below demonstrate some common print defects that can occur in production lines that employ CIJ printers. (It is important to note that the defects in the following examples are simulated by editing the images for the sake of demonstration. They are not defects from actual applications.)

Image 1:Missing bottom line of dots.

The bottom line of dots is missing from this printed character string. This is commonly caused by dry ink accumulating on the edges of the printer gutter, creating a barrier as the droplets are emitted from the nozzle. This type of defect can render charac-ters unreadable by OCR algorithms.

Image 2:Missing top line of dots.

In this example, the missing dots are located at the top of the character string. The reason for this defect is similar to that of Image 1, but with the dry ink accumulating at another area of the printer gutter.

Image 3:Complete absence of print.

In this example, the printer didn’t manage to transfer ink to the product surface at all. This can be caused by a printer triggering problem or by unintended movement of the printer nozzle, caus-ing it to point away from the target print area. Since there are no characters to be read, the machine vision inspection will fail for OCR.

Image 4:Incorrect print position.

Slight movement of the print head can cause characters to be printed in the wrong area of the target surface, moving them out of the region of interest of a machine vision system and once again causing the machine vision inspection to fail.

Image 5:Ink blots that obscure characters.

Although less common, this print defect can occur as a result of dirty or contaminated print surfaces (oil or water, for example), causing ink dots to bleed and overprint. The machine vision sys-tem would not be able to parse characters with these features using its OCR tools.

Page 6: Machine Vision Solutions for CIJ Print Inspection · poor print quality or gaps and overlaps of printed ink drops), dirty printhead (causing missed dots), and incorrect line speed

Technology White Paper

5 www.microscan.com

These are just a sample of common defects that can occur when using CIJ printers. After a thorough investigation of a given production line’s defects, it may be discovered that 90% of the defects are of one type only – missing rows of print dots causing incomplete characters, for example. Knowing how to identify common CIJ print defects will help guide the correct implementa-tion of machine vision OCR for a specific application. Equipped with a thorough understanding of the true conditions of the production line, the correct vision solution can be designed.

Machine Vision Solutions for CIJ Print Quality InspectionWhen it finally comes to designing a machine vision system for OCR, how is the most appropriate solution determined? In many cases, simple pixel-based algorithms can account for the most common problems caused by CIJ print defects. In fact, pixel-based tools may be more effective than OCR tools for certain applications. Various approaches to machine vision implementa-tion for CIJ printing applications is described below, including the advantages and disadvantages of each method. Guidelines are provided for when to use each strategy, and when one strategy may be more effective than another.

There are a variety of potential machine vision solutions used to perform in-line OCR in challenging high-speed applications using CIJ printing. These solutions are divided into three primary groups:

• Group 1 – Pixel-Based Vision Tools: Machine vision algo-rithms applied to pixel values to find edges or to count pixels within a range of grey levels. Used for a variety of product inspections, these vision tools can be extended to print inspections for unique or challenging applications.

• Group 2 – OCR Tools and Match String Input: Machine vision OCR tools are used to recognize characters in a data string and compare the extracted string to a “match string” that contains the expected result.

• Group 3 – OCR Tools with Custom Pass/Fail Logic: Machine vision OCR tools are employed with advanced logic pro-grammed on the local machine vision system to qualify or disqualify the inspected data strings.

Group 1 – Pixel-Based Vision Tools

The most basic machine vision OCR solution possible is not actually an OCR system at all. This system does not analyze printed characters to convert them to ASCII, but instead ana-lyzes the presence of pixels in an image to check for intended characteristics (which may or may not be text). This method may result in a high number of false rejects, but does not require the same precision patterns of ink dots to ensure that the appropri-ate data is present on a package or product.

For demonstrational purposes, the examples below are all per-formed using Microscan’s AutoVISION® Machine Vision Software as the inspection system.

Option 1: One of the pixel-based machine vision solutions

outlined here, this option checks the presence or absence of printed text by counting the number of pixels that make up text characters on an even background. In the image below, the ma-chine vision system’s Presence/Absence Tool is used to check if there is anything (at all) present in the region of interest that stands in contrast to the background. The pixels highlighted in yellow are pixels that fall inside the range of gray values that are considered printed ink. The nominal count for the ideal pixels in the manufacturer’s printed text string is 7436 pixels, as seen below. When a new product is inspected for text and the result is much lower or much higher, the system will raise a warning. This kind of pixel-based solution is most effective when the overall intensity levels of light and dark elements on a surface are con-sistent. Frequent changes in illumination or changes in ink level would result in a high rate of false failures.

Option 2: Using another pixel-based vision method, this machine vision solution checks the dimensions of the printed charac-ters by detecting character edges and measuring their height or width. The example below uses the machine vision system’s Measure Tool to measure the height of the “B” character. This machine vision solution is effective for finding the most common defect of CIJ printers, which is a missing top line or bottom line of dots. Shorter measurement signifies a print defect, which will raise a warning from the machine vision system and allow the manufacturer to address the issue quickly.

When possible, adding a special character to the end of a printed data string ensures that the results of Measure Tool in-spections are more reliable. The dimensional measurement can be performed on the unchanging special character, rather than the variable data characters, ensuring that the measurements are more consistent. When done correctly, this solution has a low probability of false failures.

Page 7: Machine Vision Solutions for CIJ Print Inspection · poor print quality or gaps and overlaps of printed ink drops), dirty printhead (causing missed dots), and incorrect line speed

Technology White Paper

6 www.microscan.com

Option 3: Using an OCV (Optical Character Verification) Tool, this machine vision solution compares each snapshot of a printed character with a pattern that the machine vision software has been trained to use as an ideal character shape. During the analysis of the acquired image, the vision system translates the difference in pixel levels between the current image and the trained pattern into a numeric percentage. A user-defined toler-ance level of this percentage is used as the pass/fail criteria. This method is effective when printed text is very high quality, and there is not much variation from print to print. This kind of vision solution should therefore be used in applications that employ higher-quality CIJ printers at slower speeds. It is impor-tant to note that this method requires a trained pattern for an expected character string, meaning that it is only appropriate for applications in which the printed character string is the same across all products or for a long period of time (for instance, there isn’t a variable expiration date or changing lot code). A change in the printed data would necessitate that the user train new characters for the vision software to recognize and compare, which would greatly slow production times.

Group 2 – OCR Tools and Match String Input

The machine vision solution options in this group identify the characters in a printed data string using a machine vision system’s standard OCR Tool, converting the characters to ASCII format to either ensure data legibility, compare the output data to an expected “match string” sent from the printer or any other remote device, or log data for tracking and traceability. Unfor-tunately, the probability of false rejects using this kind of OCR Tool-based machine vision solution is very high. The reason is the machine vision system must account for an extremely high number of variations in printed characters from product to prod-uct while continuing to classify every single character correctly. In such conditions, it is very difficult for OCR algorithms to make accurate comparisons of all characters for all products (and their variable data) correctly based on stored OCR font libraries with-out encountering print defects that impede character recognition.

Option 1: The first method uses a machine vision system OCR Tool to first check if characters are legible or not. A read failure will occur when the system cannot recognize a character. This will cause the machine vision system to raise a warning. Such a solution could generate a high rate of false failures if the print quality is not well controlled.

To improve the consistency of the results using this method, the machine vision system may be able to apply morphological image processing algorithms to improve the image, which would yield dramatic improvements in OCR success rate. See the images below for an example of a simple “Connect” function in the machine vision software, which artificially connects the ink dots in the image after applying morphological image processing functions to the pixels, creating a more machine-readable OCR character set.

Before:

After:

Option 2: This machine vision solution reads printed characters using the OCR Tool, and then further compares these characters to a “match string” input sent remotely or saved in the machine vision software’s memory. A match string is a programmed string of intended data that is used as a master record to determine the accuracy of data printed on products during production. Match string data can be sent from a remote device over various communication protocols, such as from a printer or other device on the network. A match string can alternatively be permanently programmed into the machine vision software when applicable, bypassing the need to communicate with a remote device. An example below shows the match string input that has been communicated into the AutoVISION software interface using the software’s proprietary multi-protocol connectivity tool (Microscan Link).

At right is another example where the match string has been communicated remotely to a machine vision camera using a Telnet connection. The remote device communicates the match string data to the camera using text commands. This can be done from any host application or printer with the ability to send text via TCP/IP to a remote device.

Page 8: Machine Vision Solutions for CIJ Print Inspection · poor print quality or gaps and overlaps of printed ink drops), dirty printhead (causing missed dots), and incorrect line speed

Technology White Paper

www.microscan.com7

This machine vision solution also has a high rate of failure. This is because the solution combines the failure rate of an OCR Tool used to recognize printed characters despite variations, with the additional criteria that any recognized text must also pass the match string comparison check. Again, when using this solution, print quality should be well controlled to ensure the machine vi-sion system can reliably determine data accuracy.

Option 3: This machine vision solution uses the OCR Tool for simple “track and trace” data acquisition and logging. The ma-chine vision camera reads printed characters using the OCR Tool, then sends the read data to a remote server as ASCII values to be recorded in a database for later use or audit purposes. As with all other machine vision solutions based on OCR tools, the failure rate will become higher as print quality decreases.

Group 3 – OCR Tools with Custom Pass/Fail Logic

The machine vision solution options in this group also read printed data using an OCR Tool, but they do not use the result-ing ASCII values to compare to an external match string or to output data to a remote system for traceability. The purpose of these solutions is to analyze the accuracy of the content and structure of the OCR text using the logic that is locally stored in the machine vision system’s software, and then provide a pass/fail decision based on that analysis. Here there is no need for a remote device to send match string data to the camera (eliminat-ing the need for communication cables and other connectivity hardware). Instead, all of the machine vision processing is done on the machine vision smart camera itself, using programmable software logic to determine the legibility and accuracy of OCR data strings.

Option 1: This machine vision method checks if the structure of the printed information is correct. For example, ensuring that a best-by date is printed in this format: DD/MM/YYYY. In this case, the machine vision camera would use internal logic to verify that the data structure is as follows: <2 digits><Slash><2 digits><Slash><4 digits>. It would not check that the digits are accurately printed, but would only validate that the character it reads is a numerical digit and not a letter or another kind of character.

The following example illustrates how machine vision software is programmed with an internal match string to instruct the sys-tem which best-by date format to expect. The system will then validate the data it captures in production using the OCR Tool

without needing to communicate data with external systems. In order to program this custom pass/fail criteria (internal match string) into the system, the “Regular Expression” methodology is used. This methodology is a text pattern match/search syntax that is very popular among contemporary software developers.

Regular Expression syntax is beyond the scope of this document. Additional resources for information about Regular Expressions is given in the References section at the end of this white paper.

Regex Example:

Option 2: This machine vision solution relies on another use of Regular Expressions. The example below includes conditional results. Here the full power of the regex language is exemplified, enabling users to define several options as the pass/fail criteria within the machine vision system (in other words, a variable match string). In the expression below, any OCR data matching JUN or FEB is defined as a pass result, while the prefix EXP must be provided on every printed data string. Numerical ranges are also required for the numbers following the month text.

Option 3: This machine vision solution uses an OCR Tool to validate that the number of detected characters is correct, dis-regarding the specific characters that are read or the pass/fail read results. This is a relatively simple inspection, but is a more sophisticated check than presence/absence check for pixel

Page 9: Machine Vision Solutions for CIJ Print Inspection · poor print quality or gaps and overlaps of printed ink drops), dirty printhead (causing missed dots), and incorrect line speed

Technology White Paper

8

values in CIJ printed text, as described in the Group 1 machine vision solutions previously. This is because the unique character count in a data string is much more precise than the count of pixels, which can vary per character for each instance of printed text. Simple inspections like these, however, are usually more than sufficient for providing a real-time warning of production line problems.

The example below shows the output results of the OCR Tool – specifically, the parameter: “Number of Characters Found = 8.” The inspection passes because the machine vision system is expecting eight characters, regardless of which characters are present.

A simplified inspection like this decreases the chances of failure, since the system doesn’t need to distinguish if a digit is classi-fied as 6 instead of 5, or other character-based distinctions. The only point of concern is the total number of the characters found in the line. This method, when combined with other inspection methods explained above, can create a reliable inspection sys-tem with a low rate of false failures.

Option 4: In a similar application, a machine vision software solution can be designed with local pass/fail logic to make sure that printed data is valid simply by determining if each character is a digit or a letter, without precise identification of the specific character as matched with an ASCII value. For example, if the printed text is expected to only contain numbers – with no letters allowed – Regular Expression language can easily be used to program match string criteria that causes a failure if a letter is found among the read characters. The expression [0-9] in regex syntax below means “any digit between zero and nine.” When the system receives input for a letter or any other character that is not a numerical digit, it will raise a failure.

In this example, the match string expression instructs the soft-ware to expect any three numerical digits as output, while the actual digit values are not important:

The OCR inspection here will pass for the below text, since all three detected characters are numerical digits.

The OCR inspection below will fail, since one of the characters is a letter and not a numerical digit.

Option 5: For a more advanced solution, a machine vision system can be programmed with a combination of the functions above. For example, the OCR solution could use match data sent from a printer and then apply regex logic to create custom pass/fail criteria. Or the solution could employ the OCR Tool as well as a pixel-based tool (like Presence/Absence or Measure) to asses the printed data string. With such flexibility for configuration, engineers have the freedom to be creative in meeting CIJ printing challenges with a range of possible solutions.

It is important to note that not all of the data within a text string must be precisely counted, recognized, or communicated for each OCR inspection. In fact, comparing sub strings of data can eliminate the risk of false failures. For instance, the machine vision system may only need to compare the first and last digit of each line of text to ensure the printed text is present, or it may simply be able to randomize which characters it compares on each line of text from product to product to perform “spot checks.” A minimally-complex solution will ensure the reliability of results, since checking less information means there is less room for error. The over-application of inspection methods may cause a machine vision solution to find more data than it needs for evaluation, and mistakenly associate unnecessary input with a failure. Every OCR solution should be programmed to acquire the minimal amount of data required to determine if the printed text actually fails the manufacturer’s required criteria. When the minimal amount of tools are applied to catch the real defects on the production line, there is no need to inspect further.

False Failures and System Reliability

A reliable machine vision solution is a solution that has a low rate of false failures. A false failure is any result that would eliminate, reject, or waste a good product. This is definitely an unwanted result of inspection, and not an acceptable result for any production manager in any factory. Therefore, the machine vision solution engineer should strive to implement reliable inspection systems that raise failures only when there are real defective products on the line. With CIJ OCR inspections, there are a variety of challenges to achieving high reliability if there are also high demands placed on the machine vision system. Introducing limited, but creative custom pass/fail criteria in the inspection system as described in the methods above enables both the reliability of inspection results while effectively solving the true problems in the production line.

Failure Rate Considerations

It is important to note that the rate of failure in each machine vi-sion OCR implementation will vary depending on CIJ print quality, the performance of the machine vision system, and the complex-ity of the machine vision solution. The following table outlines the false reject probability for the CIJ OCR methods described in this white paper based on each solution’s unique features.

www.microscan.com

Page 10: Machine Vision Solutions for CIJ Print Inspection · poor print quality or gaps and overlaps of printed ink drops), dirty printhead (causing missed dots), and incorrect line speed

Technology White Paper

Process Time and Inspection Rate Considerations

In a machine vision application, the time it takes a machine vision smart camera to analyze an image and provide a pass/fail result is called process time. Process time is affected by a number of factors including resolution of the image, algorithmic methods used for image analysis, and more.

The table below summarizes the inspection rates achieved with each one of the machine vision inspection methods mentioned in this document. The inspection rates are measured in PPM units (products per minute).

Inspection Method Vision Tool Used Inspection Rate*

Pixel-based Presence/AbsenceMeasure

2000-3000 PPM

OCV (one line of 10 characters)

OCV 300-1200 PPM

OCR (one line of 10 characters)

OCR 300-1200 PPM

* Varies by camera and sensor. Rates shown for WVGA models of Microscan Vision HAWK® and MicroHAWK® MV-40 smart cameras.

SummaryBefore approaching the design of any machine vision inspection system, identifying and understanding the real problems in the production line is the first and most crucial step. In challenging applications like OCR for CIJ print, this initial step ensures that the problems dictate the solution design so the minimal amount of machine vision tools are applied, targeting only the defective or improperly-printed products. Understanding the pros and cons of each of the possible machine vision solutions for OCR, as outlined in this white paper, should help to define the correct ap-proach and enable manufacturers to apply the most reliable and

Machine Vision Solutions and False Reject Probability

Inspection Method Machine Vision Software

Vision Tool Match String Provided by Printer

Pass/Fail Criteria False Reject Probability

Pixel-based AutoVISION Presence/AbsenceMeasureOCV

NO AutoVISION standard criteria

Medium

OCR AutoVISION OCR YES Simple compare function

High

Custom Pass/Fail AutoVISION OCR IntelliText NO Custom pass/fail logic

Low

Combined AutoVISION + Visionscape®

OCR IntelliText YES/NO Compare parts of the data string and use custom pass/fail logic

Very Low

effective vision strategy for each unique production line.

References:1. Le, Hue P. (1998). Progress and Trends in Ink-jet Printing

Technology. Retrieved June 29, 2016, from http://www.imaging.org/ist/resources/tutorials/inkjet.cfm

2. Microsoft®. (2016). Regular Expression Language – Quick Reference. Retrieved June 30, 2016 from https://msdn.microsoft.com/en-us/library/az24scfc(v=vs.110).aspx

3. RegexOne. (2015). Lesson 1: An Introduction, and the ABCs. Retrieved June 30, 2016 from http://regexone.com

©2016 Microscan Systems, Inc. 07/16

w w w . m i c r o s c a n . c o m

9