Machine Vision Method

A. Introduction 

Non-destructiveTo detect defects in hermetic packages by computer evaluation of images with previously defined patterns of acceptance.> 50 μm microleaksOn-line, > 5 s> $20,000

B. Operation 

Machine vision system is designed to eliminate visual inspection of packages. Packages are positioned before a camera to present a consistent pattern. The video image obtained is digitized. Both grayscale and color density may be evaluated. The computer compares coded patterns with acceptable patterns stored in memory. Some systems evaluate one image at a time. Others use parallel computers to evaluate different segments of the video image in less time. Patterns that do not match the acceptance criteria are rejected and the package is automatically rejected from the production line.

In general, two methods are rested in machine vision for the evaluation of package seals: pixel distribution comparison and edge detection. The Hough transform can be evaluated as a method to measure the seal width and simple thresholding is used to analyze the body of the packages.

  • Pixel Distribution Comparison
    This method uses pixel intensity distributions (or histograms) for the detection of flaws in package seals. The distribution for a seal without any flaw is narrow, provided there are no large wrinkles in the seal and the lighting is uniform. This distribution of intensity for a defective seal has a much wider range due to the reflections and shadows caused by the defect.

  • Edge Detection
    The term "edge" in this context refers to sharp changes in intensity in the image. Star defects and seal boundaries produce such changes in intensity. Edge information will form groups (particles) around the defect that can be characterized by pixel area.

  • Hough Transform
    The Hough transform is a technique that is used to detect parametric shapes occurring in an image, such as straight lines, circles, or composite shapes, and the outline of letters. The Hough transform can be used to detect horizontal and vertical lines on a processed image of a package. Specifically, this technique is used to test whether the inner and outer seal edges could be detected and the seal width measured. Images are processed by filtering with a 2-kernel Sobel filter and thresholding the remaining image. Data were taken for the Hough transform analysis by collecting the x-y coordinates of the points remaining after thresholding the image in the areas of interest. These points are imported into a program that applied the Hough transform for the detection of horizontal and vertical lines.

  • Simple Thresholding
    Package body analysis consisted of using thresholding for the detection of defects. Punctures in the package were darker than the rest of the package body, so simple thresholding was used to segment the defects form the rest of the package.
  • Video imaging system
  • Computer with stored images for acceptance criteria
  • Strobe light (optional)
  • Packages

Not applicable.


Image does not match acceptance criteria.


Image matches acceptance criteria.

False positive

Image was not presented to camera correctly and does not match acceptance criteria.

False negative

Acceptance criteria include defects.

C. Application 


DEFECTS Flexible Pouch Semi-rigid and
Rigid plastic container
Plastic Can (Double-seam Metal End) Paperboard
Corner Dent      
Cut (Fracture)
Double Seam Defects*      
Foreign Matter Inclusion    
Label Foldover      
Leaker (Channel)  
Leaker (Corner)      
Leaker (Notch)      
Leaker (Perforation)      
Leaker (Pulltab)      
Leaker (Seal)      
Loose Flap or Ear      
Puncture (Pinhole)
Seal Defects (Blister)      
Seal Defects (Blocked)      
Seal Defects (Burnt)      
Seal Defects (Compressed)      
Seal Defects (Contaminated)  
Seal Defects (Convolution/Embossing)      
Seal Defects (Creep)      
Seal Defects (Crooked)      
Seal Defects (Incomplete)      
Seal Defects (Misaligned/Deformed)    
Seal Defects (Nonbonding/Weak)      
Seal Defects (Plastic Lumps)      
Seal Defects (Seal-width Variation)      
Seal Defects (Stringy)      
Seal Defects (Uneven Impression)      
Seal Defects (Uneven Juncture)      
Seal Defects (Wrinkle)    
Swell (Swollen Package)

The application is limited by the need for characterization of all possible combinations of material properties and defects. Defects characterization usually involves the examination of large sample sets of representative around the seal area has also been recognized as a limitation. Defection of cracks and crevice is difficult with conventional image processing equipment due to low contrast around the seal area.

D. Source 

  • Cognex Corporation. One Vision Drive, Natick, MA, 01760-2059, United States. TEL (508)-650-3333 ( INC. 210 Brunswick, Pointe-Claire, Quebec, Canada. TEL (514)-694-9290 ( STATES,
  • Teledyne TapTone Headquarters. 49 Edgerton Drive, North Falmouth, MA 02556, USA. TEL (508)-563-1000 (, G.W. JR. 1998. Chapter 22C Examination of Flexible and Semirigid Food Containers for Integrity.
  • FDA Bacteriological Analytical Manual (8th Ed)
  • Blakistone and C. Harper. 1995. Pressure differential technique for package integrity inspection. In Plastics Package Integrity Testing, Assuring Seal Integrity. FPA, Washington, DC.
  • Kerr, D., Shi, F., Brown, N., Jackson M., and R Parkin. 2003. Quality inspection of food packaging seals using machine vision with texture analysis. Proc. Instn Mech. Engrs Vol. 218 Part B: J. Engineering Manufacture. 
  • Xiang, X., He, J., and Yang, S. 2009. Pinhole Defects Detection of Aluminum Foil Based on Machine Vision. The Ninth International Conference on Electronic Measurement & Instruments.