Research on machine vision inspection technology o

  • Detail

Research on machine vision inspection technology of drug packaging II

using machine vision principle to realize packaging inspection

in the process of drug packaging, packaging products often have quality problems such as missing packaging, wrong packaging, defects, etc. based on the above machine vision principle, we have developed a packaging monitoring system, which adopts CCD imaging technology, digital image processing and computer vision technology, Using computer intelligent detection software system to replace human TZ, it can automatically identify the defects, missing and wrong loading of packaged products, and control the manipulator to remove damaged and unqualified products

according to the actual production environment of packaging, CCD camera and image acquisition system are used to obtain the image of the target. Through the image acquisition card, the image of the target product is transformed into a digital signal that can be recognized by the computer, which is transmitted to the computer. Combined with digital image processing and pattern recognition technology, automatic intelligent recognition, interpretation and detection are realized. The system composition block diagram is shown in Figure 2

3 development of intelligent detection software

as mentioned above, intelligent monitoring software is the core of the monitoring system, which is equivalent to human brain. According to the actual environment of the packaging production line, by analyzing the color of the detection target, the change of the position and direction of the detection target and the background color when the device is used alone in some segment lines, combined with the actual ring filling, digital image processing techniques such as smoothing and median filtering are used to denoise the target image; Point operation, centroid algorithm, projection method, subtraction method and other digital image processing algorithms are used to segment and model the target image; Template matching algorithm is used to automatically identify "3". Among them, target modeling and digital image processing algorithm are the key technologies. The developed intelligent monitoring software can accurately identify the quality problems such as missing installation, wrong installation and defect in products, and realize automatic detection and elimination of "4". In the software program, we define the following main functions to realize intelligent monitoring

image smoothing, filtering and other preprocessing functions:

boolmedicinetemplate:: settemplate (1nvoid*pbmp, match_template*ptemp),

template matching function, input the image to be displayed and relevant information, Output the wrong product location; If there is no error in the relevant industry detection standards, it returns true, otherwise it returns false

bool medicanetemplate:: TemplateMatch (1n void *pbmp, in match_template*ptemp, out match_result* the higher the resolution PRES)

automatic template matching, input template images, relevant information, and output relevant information; If the match is successful, return true, otherwise false

bool medicanetemplate:: automaketemplate (1n void*pbmp, inoutmatch_template*ptemp)

manual template matching, input template image, tablet area, relevant information, and output relevant information; If the generation is successful, return true, otherwise paue

boolmedicinetemplate:: manualmaketemplate (void*pbmp,

in regioninfo*prgion, in out match_template*ptemp)

generate template by subtraction method; Enter the empty template pbmpl, the target template pbmp2, relevant information, and output relevant information. If successful, return true, otherwise false

bool medicanetemplate:: diffmaketemplate (1n void*pbmpl, in void*pbmp2, in out match_template*ptemp)

use the subtraction method to match the template, input the template image, relevant information, and output the error location; True is returned after successful generation, otherwise false

bool medicainetemplate:: diffremplatematch (1n void*pbmp, in match_template*ptemp, out match_re sult*pres)

see Figure 3 for the software flow chart of the drug packaging monitoring system

(to be continued)

Copyright © 2011 JIN SHI