CN109670499A - A kind of bottle capping detection method - Google Patents
A kind of bottle capping detection method Download PDFInfo
- Publication number
- CN109670499A CN109670499A CN201811380901.2A CN201811380901A CN109670499A CN 109670499 A CN109670499 A CN 109670499A CN 201811380901 A CN201811380901 A CN 201811380901A CN 109670499 A CN109670499 A CN 109670499A
- Authority
- CN
- China
- Prior art keywords
- bottle capping
- bottle
- capping
- image
- detection method
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
- G06F18/2135—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2411—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/19—Recognition using electronic means
- G06V30/192—Recognition using electronic means using simultaneous comparisons or correlations of the image signals with a plurality of references
- G06V30/194—References adjustable by an adaptive method, e.g. learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20024—Filtering details
- G06T2207/20032—Median filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20036—Morphological image processing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Multimedia (AREA)
- Databases & Information Systems (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a kind of bottle capping detection methods, it is realized by building the measuring system constituted by test stand, colored area array cameras, telecentric lens, annular light source and objective table, steps are as follows: the color image of shooting bottle capping, carry out gray processing and binary conversion treatment, expansive working is filtered and corroded using median filter again, finds target area;The multiple characteristic points for selecting bottle capping calculate the eigenmatrix of bottle capping image, carry out PCA dimension-reduction treatment, take out dimensionality reduction and account for the feature that the sum of characteristic value reaches judgment threshold later;Bottle capping sample database is divided into training sample and test sample in proportion, using SVM classifier, selects gaussian kernel function, training pattern is established and is detected for test sample;The ratio that test sample is correctly classified in bottle capping picture library is calculated, the detection accuracy of bottle capping is obtained.Present invention can apply to detect to the wine bottle cover non-defective unit produced on assembly line, have the advantages that accuracy rate is high, fireballing.
Description
Technical field
The present invention relates to technical field of vision detection, and in particular to a kind of bottle capping detection method.
Background technique
In the production of industry, all to checking and measuring aspect, more stringent requirements are proposed for many industries.For example, printing packet
Fill the detection of process, the package detection of semiconductor chip, the detection of plant produced line product qualification, the detection of high-accuracy spare and accessory parts
Deng.In such applications, the factory of most automations needs large batch of production, particularly with certain special spare and accessory parts, core
Piece, instrument etc., the requirement of accuracy are very high.Traditional artificial detection method can no longer meet current technique and need
It asks, largely limits manufacturing development and progress.This aspect derives from traditional artificial detection method low efficiency
Under, error rate is high, and cost of labor is big;On the other hand, the physical endurance of human eye also causes the mankind that can not reach in this aspect
To the precision of computer control and detection technique.And rapidity, reliability, the accuracy of computer are mutually tied with the intelligent of human vision
Close so that machine vision applied in industrial detection it is more and more extensive.Machine vision can be used for the detection of various products, example
As product defects detection, whether there is or not detections.
Summary of the invention
The purpose of the present invention is to solve drawbacks described above in the prior art, provide a kind of bottle capping detection method.
The purpose of the present invention can be reached by adopting the following technical scheme that:
A kind of bottle capping detection method, the detection method include the following steps:
S1, the color image for shooting several bottle cappings are stored in sample database, including qualified product and defect ware, and
Binary conversion treatment and corrosion expansive working are carried out to color image, extract region of interest ROI;
S2, the characteristics of image for selecting bottle capping, calculate each characteristic value in each bottle capping image, obtain wine bottle cover
One eigenmatrix of face detection image, according to PCA method to eigenmatrix carry out dimensionality reduction, take out dimensionality reduction after account for characteristic value it
With the feature for reaching specified threshold;
S3, picture in sample database is divided into training sample and test sample in proportion, using SVM classifier, selects Gauss
Kernel function is trained training sample with obtained feature, establishes detection model, according to the detection model verification test sample
This;
S4, the ratio correctly classified in test sample in bottle capping picture library is calculated, obtains the detection accuracy of bottle capping.
Further, the step S1 process is as follows:
Gray processing processing is carried out to the color image of bottle capping, obtains one 0 to 255 gray level image;
Threshold segmentation processing is carried out according to the maximum gray scale difference value of background and bottle capping;
It is filtered and corrodes expansive working using median filter to the gray level image of bottle capping, extraction obtains
Detected region in bottle capping.
Further, the color image of the bottle capping shot in the step S1, image background are deposited with wine bottle cover
In obvious color difference, wine bottle cover edge clear.
Further, the process for carrying out dimensionality reduction to eigenmatrix according to PCA method in the step S2 is as follows:
Each row of eigenmatrix is subjected to zero averaging and then finds out covariance matrix, finds out the feature of covariance matrix
Value and corresponding feature vector, are arranged in matrix by corresponding eigenvalue size for feature vector from top to bottom.
Further, the characteristics of image includes pixel shared by tri- color value of RGB and each color of bottle capping, half
Diameter, area, height, width, connected region number and each connected region area in one or more combination.
Further, picture ratio is that training sample accounts for 70% in the sample database, and test sample accounts for 30%.
The present invention has the following advantages and effects with respect to the prior art:
1, the present invention increases the extraction of texture characteristic points, altogether in the characteristics extraction and expression to bottle capping
Ten several characteristic values are looked for, the feature for having discrimination can be selected most by carrying out characteristic value calculating then according to PCA dimension-reduction treatment
Point is conducive to the nicety of grading for improving classifier;
2, in bottle capping detection method disclosed by the invention, training algorithm uses extraction 70% for training sample,
30% is test sample, can prevent the phenomenon that training over-fitting, while semi-supervised learning classification may be implemented, improve classification
Accuracy;
3, in bottle capping detection method disclosed by the invention, using the gaussian kernel function of SVM classifier, to bottle capping
Feature classifying quality have greatly promoted, it can be achieved that classification accuracy reach 92%, compared to current vision-based detection
The accuracy rate of algorithm, classification is high, and the speed of service is fast.
Detailed description of the invention
Fig. 1 is the flow chart of bottle capping detection method disclosed by the invention;
Fig. 2 is the structural schematic diagram of bottle capping detection method disclosed by the invention institute application apparatus.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Embodiment
With reference to Fig. 1 and Fig. 2, present embodiment discloses a kind of wine bottle cover facial vision detection method, the visible detection method is logical
It crosses and the measuring system constituted realization is built by test stand 5, colored area array cameras 1, telecentric lens 2, annular light source 4 and objective table 3,
The specific location structural relation of the measuring system building block can referring further to Figure 2, and the hardware installation of measuring system should expire
Football lottery color area array cameras 1, telecentric lens 2, objective table 3 and annular light source 4 axis parallel, and objective table 3 is installed on telecentric mirror
In first 2 field depth.
Using the measuring system as the visible detection method of measuring tool the following steps are included:
S1, the color image for shooting several bottle cappings are stored in sample database, including qualified product and defect ware, and
Gray processing processing is first carried out to the image of bottle capping, one 0 to 255 gray level image is obtained, further according to background and wine bottle cover
The maximum gray scale difference value in face carries out Threshold segmentation processing, then uses intermediate value to the gray level image of the bottle capping after above-mentioned processing
Filter is filtered and corrodes expansive working, i.e., extractable to obtain the detected region in bottle capping;
Wherein, the image of the bottle capping of shooting should be color image, and background and wine bottle cover color difference are big, and edge is clear
It is clear.
S2, the characteristics of image for selecting bottle capping, calculate each characteristic value in each bottle capping image, obtain wine bottle cover
Each row of eigenmatrix is carried out zero averaging and then finds out covariance matrix, asked by one eigenmatrix of face detection image
The characteristic value of covariance matrix and corresponding feature vector out are arranged feature vector by corresponding eigenvalue size from top to bottom
At matrix, accounting is heavy after taking-up dimensionality reduction and reaches the feature of specified threshold;
Wherein, the characteristics of image include pixel shared by tri- color value of RGB and each color of bottle capping, radius,
Area, height, width, connected region number and each connected region area in one or more combination.
In the present embodiment, specified threshold value is 90%, but the value of the specified threshold is exemplary values, value range
It can be adjusted according to specific requirement, not constitute the limitation to technical solution of the present invention.
S3, picture in sample database is divided into training sample and test sample in proportion, using SVM classifier, selects Gauss
Kernel function is trained training sample with obtained feature, establishes detection model, removes verification test according to the detection model
Sample;
Wherein, picture ratio is that training sample accounts for 70% in the sample database, and test sample accounts for 30%.
S4, the ratio correctly classified in test sample in bottle capping picture library is calculated, obtains the detection accuracy of bottle capping.
The above embodiment is a preferred embodiment of the present invention, but embodiments of the present invention are not by above-described embodiment
Limitation, other any changes, modifications, substitutions, combinations, simplifications made without departing from the spirit and principles of the present invention,
It should be equivalent substitute mode, be included within the scope of the present invention.
Claims (6)
1. a kind of bottle capping detection method, which is characterized in that the detection method includes the following steps:
S1, the color image for shooting several bottle cappings are stored in sample database, including qualified product and defect ware, and to coloured silk
Chromatic graph picture carries out binary conversion treatment and corrosion expansive working, extracts region of interest ROI;
S2, the characteristics of image for selecting bottle capping, calculate each characteristic value in each bottle capping image, obtain the inspection of bottle capping
One eigenmatrix of altimetric image carries out dimensionality reduction to eigenmatrix according to PCA method, accounts for the sum of characteristic value after taking-up dimensionality reduction and reach
To the feature of specified threshold;
S3, picture in sample database is divided into training sample and test sample in proportion, using SVM classifier, selects Gaussian kernel letter
Number, is trained training sample with obtained feature, establishes detection model, according to the detection model verification test sample;
S4, the ratio correctly classified in test sample in bottle capping picture library is calculated, obtains the detection accuracy of bottle capping.
2. a kind of bottle capping detection method according to claim 1, which is characterized in that the step S1 process is such as
Under:
Gray processing processing is carried out to the color image of bottle capping, obtains one 0 to 255 gray level image;
Threshold segmentation processing is carried out according to the maximum gray scale difference value of background and bottle capping;
It is filtered and corrodes expansive working using median filter to the gray level image of bottle capping, extraction obtains bottle
Detected region in capping.
3. a kind of bottle capping detection method according to claim 1, which is characterized in that shot in the step S1
The color image of bottle capping, there are obvious color difference, wine bottle cover edge clears with wine bottle cover for image background.
4. a kind of bottle capping detection method according to claim 1, which is characterized in that basis in the step S2
The process that PCA method carries out dimensionality reduction to eigenmatrix is as follows:
Each row of eigenmatrix is subjected to zero averaging and then finds out covariance matrix, find out the characteristic value of covariance matrix with
And corresponding feature vector, feature vector is arranged in matrix by corresponding eigenvalue size from top to bottom.
5. a kind of bottle capping detection method according to claim 1, which is characterized in that the characteristics of image includes wine
Pixel shared by tri- color value of RGB and each color in bottle cap face, radius, area, height, width, connected region number and every
One or more combination in the area of a connected region.
6. a kind of bottle capping detection method according to claim 1, which is characterized in that
Picture ratio is that training sample accounts for 70% in the sample database, and test sample accounts for 30%.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811380901.2A CN109670499A (en) | 2018-11-20 | 2018-11-20 | A kind of bottle capping detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811380901.2A CN109670499A (en) | 2018-11-20 | 2018-11-20 | A kind of bottle capping detection method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109670499A true CN109670499A (en) | 2019-04-23 |
Family
ID=66141815
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811380901.2A Pending CN109670499A (en) | 2018-11-20 | 2018-11-20 | A kind of bottle capping detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109670499A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110211093A (en) * | 2019-04-30 | 2019-09-06 | 上海工程技术大学 | A kind of water outlet control method for automatic drinking water apparatus |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104392432A (en) * | 2014-11-03 | 2015-03-04 | 深圳市华星光电技术有限公司 | Histogram of oriented gradient-based display panel defect detection method |
CN105719291A (en) * | 2016-01-20 | 2016-06-29 | 江苏省沙钢钢铁研究院有限公司 | Surface defect image classification system having selectable types |
CN106338520A (en) * | 2016-09-18 | 2017-01-18 | 南京林业大学 | Recognition method of surface defects of multilayer solid wood composite floor with surface board being jointed board |
CN108389179A (en) * | 2018-01-15 | 2018-08-10 | 湖南大学 | A kind of cover detection method of surface flaw based on machine vision |
CN108765412A (en) * | 2018-06-08 | 2018-11-06 | 湖北工业大学 | A kind of steel strip surface defect sorting technique |
-
2018
- 2018-11-20 CN CN201811380901.2A patent/CN109670499A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104392432A (en) * | 2014-11-03 | 2015-03-04 | 深圳市华星光电技术有限公司 | Histogram of oriented gradient-based display panel defect detection method |
CN105719291A (en) * | 2016-01-20 | 2016-06-29 | 江苏省沙钢钢铁研究院有限公司 | Surface defect image classification system having selectable types |
CN106338520A (en) * | 2016-09-18 | 2017-01-18 | 南京林业大学 | Recognition method of surface defects of multilayer solid wood composite floor with surface board being jointed board |
CN108389179A (en) * | 2018-01-15 | 2018-08-10 | 湖南大学 | A kind of cover detection method of surface flaw based on machine vision |
CN108765412A (en) * | 2018-06-08 | 2018-11-06 | 湖北工业大学 | A kind of steel strip surface defect sorting technique |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110211093A (en) * | 2019-04-30 | 2019-09-06 | 上海工程技术大学 | A kind of water outlet control method for automatic drinking water apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110220917B (en) | Crown cap surface defect online detection method based on image processing | |
CN106934800B (en) | Metal plate strip surface defect detection method and device based on YOLO9000 network | |
CN108169236A (en) | A kind of cracks of metal surface detection method of view-based access control model | |
CN111932501A (en) | Seal ring surface defect detection method based on semantic segmentation | |
CN107966454A (en) | A kind of end plug defect detecting device and detection method based on FPGA | |
CN103593670A (en) | Copper sheet and strip surface defect detection method based on-line sequential extreme learning machine | |
CN104574389A (en) | Battery piece chromatism selection control method based on color machine vision | |
KR20080108116A (en) | Approaches and apparatus for eye detection in a digital image | |
CN113724231A (en) | Industrial defect detection method based on semantic segmentation and target detection fusion model | |
CN106290392A (en) | A kind of little micro-bearing surface pitting defects online test method and system thereof | |
CN116188475B (en) | Intelligent control method, system and medium for automatic optical detection of appearance defects | |
CN111060442B (en) | Oil particle detection method based on image processing | |
CN109215015A (en) | A kind of online visible detection method of silk cocoon based on convolutional neural networks | |
CN106780526A (en) | A kind of ferrite wafer alligatoring recognition methods | |
CN103868924A (en) | Bearing appearance defect detecting algorithm based on visual sense | |
CN109886960A (en) | The method of glass edge defects detection based on machine vision | |
CN110096980A (en) | Character machining identifying system | |
CN110766683A (en) | Pearl finish grade detection method and system | |
CN103258218B (en) | Masking-out detects skeleton generating method, device, defect inspection method and device | |
CN114663457A (en) | Bobbin identification method and system based on circular convolution kernel under complex background | |
CN109670499A (en) | A kind of bottle capping detection method | |
CN112396580B (en) | Method for detecting defects of round part | |
CN108615039A (en) | Cartridge case defect automatic testing method based on computer vision | |
CN114092682A (en) | Small hardware fitting defect detection algorithm based on machine learning | |
CN113808104A (en) | Block-based metal surface defect detection method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190423 |