Summary of the invention
In view of this, the purpose of this invention is to provide a kind of embedded high-speed on-line machine vision detection method and device, can carry out quality testing to the product on the production line in the automated production at a high speed, and with low cost, help applying widely.
For this reason, the invention provides a kind of embedded high-speed on-line machine vision detection method, may further comprise the steps:
Under the dedicated illumination light source irradiation that is made of single color LED, high-speed real-time is gathered the picture signal of detected object on the product line;
Image to the detected object gathered is analyzed, and cuts apart and orients the sensitive image zone that occurs quality problems easily;
The feature in the sensitive image zone that utilizes Wavelet Transform to extract to occur quality problems easily;
Whether the feature in the sensitive image zone of being extracted and the standard feature in sensitive image zone are compared, whether reach predetermined value according to both similarity, it is qualified to judge detected object.
Preferably, under the dedicated illumination light source irradiation that constitutes by single color LED, the picture signal of gathering detected object on the production line in real time by high speed linear array Charge Coupled Device (CCD) CCD image sensor camera.
Preferably, on high-speed real-time collection product line, also comprise step after the picture signal of detected object:
Image to the detected object gathered carries out pretreatment operation, improves the quality of image;
Described pretreatment operation comprises: denoising, filtering, background compensation.
Preferably, also comprise step after whether qualified judging detected object:
Judged result is exported to the product mechanism for sorting, filter out underproof product, described product mechanism for sorting is a high-pressure pump.
Preferably, the standard feature in described sensitive image zone is preestablished according to the feature in the sensitive image zone of specification product by the user.
In addition, the present invention also provides a kind of embedded high-speed on-line machine vision pick-up unit, it is characterized in that, includes:
Image acquisition units is used under the dedicated illumination light source irradiation that is made of single color LED, and high-speed real-time is gathered the picture signal of detected object on the product line;
The zone location unit is used for the image of the detected object gathered is analyzed, and cuts apart and orients the sensitive image zone that occurs quality problems easily;
Feature extraction unit, the feature in the sensitive image zone that is used to utilize Wavelet Transform to extract and occurs quality problems easily;
Analytic unit is used for the feature in the sensitive image zone of will be extracted and the standard feature in sensitive image zone and compares, and whether reaches predetermined value according to both similarity, and whether judge detected object qualified.
Preferably, also comprise:
Pretreatment unit is used for the image of the detected object gathered is carried out pretreatment operation, improves the quality of image;
Output control unit is used for judged result is exported to the product mechanism for sorting, filters out underproof product.
Preferably, the feature in the described feature extraction unit sensitive image zone that utilizes Wavelet Transform to extract to occur quality problems easily.
Preferably, the standard feature in described sensitive image zone is preestablished according to the feature in the sensitive image zone of specification product by the user.
By above technical scheme provided by the invention as seen, the present invention proposes a kind of embedded high-speed on-line machine vision detection method and device, can carry out quality testing to the product on the production line in the automated production at a high speed, and with low cost, help applying widely.
Fig. 1 is the process flow diagram of a kind of embedded high-speed on-line machine vision detection method provided by the invention;
Embodiment
Fig. 1 is the process flow diagram of a kind of embedded high-speed on-line machine vision detection method provided by the invention, referring to Fig. 1, the invention provides a kind of embedded high-speed on-line machine vision detection method, may further comprise the steps:
Step S101: high-speed real-time is gathered the picture signal of detected object on the product line;
In the present invention, on the specific implementation, under the irradiation of special light source, (Charge Coupled Device, CCD) camera is gathered the picture signal of detected object on the production line in real time by high speed linear array Charge Coupled Device (CCD) imageing sensor.
Need to prove, constitute the dedicated illumination light source, reasonable illumination can be provided,, guarantee edge of image and orderliness sharpness the best that CCD gathered at the unlike material of product on production line by single color LED.
Step S102: the image to the detected object gathered carries out pretreatment operation, improves the quality of image;
Described pretreatment operation comprises: denoising, filtering, background compensation.
A detected object can produce distinct image under different light sources and light structures irradiation, and the quality of picture quality influences the complexity of detection algorithm.The image that one width of cloth is gathered generally will pass through pre-service (denoising, filtering, background compensation etc.), just can carry out subsequent analysis processing after having improved picture quality, the capture effect better image can be used through pre-service seldom, and this has just saved the processing time.And some are constructed the detected object image that light structures produced cleverly even can handle direct use, are directly used in to carry out following analyzing and processing step, and need not to move this step S102.
Step S103: the image to the detected object gathered is analyzed, and cuts apart and orients the sensitive image zone that occurs quality problems easily;
Need to prove, at first the still image of the detected object that obtains is analyzed, cut apart and orient the sensitive image zone that occurs quality problems easily, the subsequent technology processing region will be locked in the sensitizing range.
Step S104: the feature that extracts the sensitive image zone that occurs quality problems easily;
The present invention on specific implementation, the feature in the sensitive image zone that utilizes Wavelet Transform to extract to occur quality problems easily.
Step S105: whether the feature in the sensitive image zone of being extracted and the standard feature in sensitive image zone are compared, whether reach predetermined value according to both similarity, it is qualified to judge detected object;
In the present invention, the standard feature in described sensitive image zone is preestablished according to the feature in the sensitive image zone of specification product by the user.
According to the similarity between the standard feature in the feature in the sensitive image zone of being extracted and sensitive image zone, draw the qualified or defective conclusion of measurand.
When the similarity that the user can preestablish the standard feature in the feature in the sensitive image zone of being extracted and sensitive image zone reached certain value (as 90%, 95%), it was qualified to draw detected object.
Step S106: judged result is exported to the product mechanism for sorting, filter out underproof product.
On the specific implementation, judged result can be outputed to the product sorting structure with the form of specific voltage signal, by the product mechanism for sorting with underproof product screening to the substandard product retracting device.
In the present invention, described product mechanism for sorting is preferably high-pressure pump.
In the present invention, adopt digital signal processing (Digital Signal Processing, DSP) and field programmable gate array (Field Programmable Gate Array, FPGA) embedded system of Gou Chenging is carried out above-mentioned steps as central processing unit, thereby has properly settled the bottleneck of machine vision on processing speed.
Based on a kind of embedded high-speed on-line machine vision detection method that the invention described above provides, referring to Fig. 2, the present invention also provides a kind of embedded high-speed on-line machine vision pick-up unit, includes:
Image acquisition units 201 is used for the picture signal that high-speed real-time is gathered detected object on the product line;
In the present invention, under the dedicated illumination light source irradiation that constitutes by single color LED, detected object is fixed on the product line, (Charge CoupledDevice, CCD) camera is gathered the picture signal of detected object on the production line to image acquisition units 201 in real time by high speed linear array Charge Coupled Device (CCD) imageing sensor.Need to prove, constitute the dedicated illumination light source, reasonable illumination can be provided,, guarantee edge of image and orderliness sharpness the best that the CCD camera is gathered at the unlike material of product on production line by single color LED.
In addition, in order to realize preparing to demarcate CCD camera and detected object, this device also has the system calibrating module, comprises the collimation location of CCD camera imaging axle and detected object stationary platform face, the automatic gain of CCD camera and the demarcation of qualified checked object;
Pretreatment unit 202 is connected with image acquisition units 201, is used for the image of the detected object gathered is carried out pretreatment operation, improves the quality of image;
Described pretreatment operation comprises: denoising, filtering, background compensation.
A detected object can produce distinct image under different light sources and light structures irradiation, and the quality of picture quality influences the complexity of detection algorithm.The image that one width of cloth is gathered generally will pass through pre-service (denoising, filtering, background compensation etc.), just can carry out subsequent analysis processing after having improved picture quality, the capture effect better image can be used through pre-service seldom, and this has just saved the processing time.And some are constructed the detected object image that light structures produced cleverly even can handle direct use, are directly used in and carry out following analyzing and processing, and need not to move pretreatment unit 202.
In addition, in the pretreatment unit 202 of the present invention, include modulus a/d transducer, signal amplifier, be used for that image acquisition units 201 is gathered the picture signal of exporting and change amplification, the signal transformation that makes simulation is digital signal, carries out data processing for following zone location unit 203, feature extraction unit 204, analytic unit 205;
Zone location unit 203 is used for the image of the detected object gathered is analyzed, and cuts apart and orients the sensitive image zone that occurs quality problems easily;
Need to prove that zone location unit 203 is at first analyzed the still image of the detected object that obtains, cuts apart and orients the sensitive image zone that occurs quality problems easily, and the subsequent technology processing region will be locked in the sensitizing range.
Feature extraction unit 204 is used to extract the feature in the sensitive image zone that occurs quality problems easily;
The present invention is on specific implementation, the feature in the sensitive image zone that feature extraction unit 204 is utilized Wavelet Transform to extract to occur quality problems easily, store random access memory (Random Access Memory into by enhancement mode direct memory access EDMA passage, RAM) in, DSP carries out calculation process in conjunction with FPGA to image afterwards, thereby has properly settled the bottleneck of machine vision on processing speed.
Analytic unit 205 is used for the feature in the sensitive image zone of will be extracted and the standard feature in sensitive image zone and compares, and whether reaches predetermined value according to both similarity, and whether judge detected object qualified;
In the present invention, the standard feature in described sensitive image zone is preestablished according to the feature in the sensitive image zone of specification product by the user.
According to the similarity between the standard feature in the feature in the sensitive image zone of being extracted and sensitive image zone, draw the qualified or defective conclusion of measurand.
When the similarity that the user can preestablish the standard feature in the feature in the sensitive image zone of being extracted and sensitive image zone reached certain value (as 90%, 95%), it was qualified to draw detected object.
Output control unit 206 is used for judged result is exported to the product mechanism for sorting, filters out underproof product.
In the present invention, on the specific implementation, judged result can be outputed to the product sorting structure with the form of specific voltage signal, by the product mechanism for sorting with underproof product screening to the substandard product retracting device.
In the present invention, described product mechanism for sorting is preferably high-pressure pump.
Referring to Fig. 3, use the concrete testing process of embedded high-speed on-line machine vision detection method provided by the invention and device to be:
1) by the realtime graphic signal of the detected workpiece of high-speed CCD imageing sensor high-speed real-time seizure on production line, this detected workpiece moves along the V direction of arrow shown in Figure 3.
2) under the FPGA sequential control, the realtime graphic signal of being gathered carries out digital sample through the high speed analog-digital conversion A/D converter and quantizes.
3) feature extraction unit utilizes Wavelet Transform to extract the feature of definite sensitizing range, store among the random access memory RAM by enhancement mode direct memory access EDMA passage, the embedded system that constitutes in conjunction with FPGA of DSP is used as central processing unit image is carried out calculation process afterwards.
4) will calculate the feature of gained and the standard feature in predefined sensitive image zone compares, mainly be to compare to its details, thereby find out the similarity of destination object and sample object, similarity is compared with default thresholding, obtain the whether qualified conclusion of detected object at last.
5) result of step 4) is outputed on the product letter sorting control gear high-pressure pump by control port, realize screening specification product and substandard product.
In the present invention, embedded high-speed on-line machine vision pick-up unit provided by the invention comprises that melts a high-speed image sampling, transmission, analyzing and processing is in the hardware platform and the high speed image algorithm for pattern recognition that is suitable for this platform of one, this algorithm provides necessary software for the online testing product of exploitation high speed machines vision, hardware platform provides high speed stable calculation function, the software algorithm highly-parallel, to make full use of a plurality of parallel instruction streamlines of DSP, core algorithm adopts FPGA hardware to realize, organic cooperation between the algorithm with DSP, make that reaching of final detection processing speed is optimum, by DSP is that the embedded system and the FPGA hardware algorithm of core combines, and makes image processing speed improve at least one more than the order of magnitude with respect to prior art; For example, be example with the punching press screw, the product quality detection speed is brought up to 12000/min from 600 present/min, thereby reached world level; The present invention has the hard-wired high speed image Processing Algorithm by FPGA; In addition, the present invention can realize that the parallel multi-stage pipeline of DSP Processing Algorithm is carried out and the parallel pipeline processing ability of maximized performance DSP, and can realize running on the seamless link between the algorithm of FPGA and DSP.The embedded high-speed on-line machine vision pick-up unit that the applicant develops voluntarily has high-performance, low cost, can satisfy the requirement of the high-speed real-time detection of enterprise product.
The present invention proposes having under the strong market demand, and therefore numerous to need the automated production enterprise of the online quality testing of high speed be achievement in research potential user of the present invention.The present invention is in line with high speed, high technology content, cheap machine vision online detection instrument theory are provided for domestic enterprise, the enterprise that satisfies each field is to the Machine Vision Detection demand, quicken its commercial production modernization, improve the international competitiveness of domestic enterprise's product.Technology of the present invention and the research of international forward position, comprise scientific instrument development content again, the academic standing in hoisting machine vision field and academic influence on the one hand, its achievement in research has practical space in the related science research field on the other hand, and in industry member good market outlook are arranged, will be of great immediate significance promoting developing rapidly of China's automated production.Simultaneously, device provided by the invention has huge economic and social benefit as the product that the vast market demand is arranged.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.