CN105046697B - A kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting - Google Patents

A kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting Download PDF

Info

Publication number
CN105046697B
CN105046697B CN201510390748.1A CN201510390748A CN105046697B CN 105046697 B CN105046697 B CN 105046697B CN 201510390748 A CN201510390748 A CN 201510390748A CN 105046697 B CN105046697 B CN 105046697B
Authority
CN
China
Prior art keywords
bottleneck
random
circle
degree
fitting
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.)
Active
Application number
CN201510390748.1A
Other languages
Chinese (zh)
Other versions
CN105046697A (en
Inventor
王耀南
周显恩
吴成中
张辉
陈铁健
易国
冯明涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan University
Original Assignee
Hunan University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hunan University filed Critical Hunan University
Priority to CN201510390748.1A priority Critical patent/CN105046697B/en
Publication of CN105046697A publication Critical patent/CN105046697A/en
Application granted granted Critical
Publication of CN105046697B publication Critical patent/CN105046697B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/952Inspecting the exterior surface of cylindrical bodies or wires
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Biochemistry (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting, it is made up of, concretely comprises the following steps acquisition marginal point and detection circle two large divisions:(1) bottleneck outward flange point is obtained by Threshold segmentation, center of gravity calculation and radial scan;(2) three points of bottleneck marginal point stochastical sampling are determined with a random circle;(3) number of the outward flange point to be less than given threshold value to the random distance of round ratio total with marginal point is circle degree of fitting round at random, digital simulation degree;(4) step 2 and step 3 are repeated, until total time successfully realizing the number of times of loop truss or performing 3 points of random loop truss reaches given threshold value;(5) maximum degree of fitting is searched for, bottleneck center is used as using the corresponding random round heart of the value.The problem of this method effectively solves existing beer bottleneck localization method position error is big in bottleneck serious damage or uneven illumination.

Description

A kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting
Technical field
It is more particularly to a kind of based on repeatedly random loop truss and fitting the present invention relates to industrial automation detection technique field Spend the beer bottleneck localization method assessed.
Background technology
The annual beer bottle demand of China is huge, is shown according to Zhong Shang industrial research institute statistics, beer row in 2014 Industry cumulative production is up to 4921.85 ten thousand kilolitres, by every bottled beer 530ml bottled calculation of capacity, then need up to 9.28651 × 1010Individual beer bottle, wherein more than 80% beer bottle is using old bottle is reclaimed, has the damaged bottle of a large amount of bottlenecks, uses bottleneck Damaged bottle may be brought to production line and consumer must detect beer empty bottle bottle before major safety risks, therefore beer filling Mouth quality, using the empty bottle detecting machine based on Machine Vision Detection, (overseas equipment is accounted for mainly current most domestic beer enterprise Market) empty bottle quality testing is carried out, and bottleneck positioning is a necessary process during the empty bottle inspection of view-based access control model, if Bottleneck position error is excessive, and follow-up bottleneck quality testing result will be caused incorrect.At present, there are a large amount of bottleneck localization methods Relevant research.
Foreign countries, empty bottle detecting machine is have developed early in 1960s.1986,《bottle mouth defect inspection apparatus》It is middle to propose to obtain bottleneck image using a kind of arc light source and photoelectric sensor, by radially The bottle mouth defect detection of 5 types is realized in the scanning in direction;1989,《inspection device》A kind of middle detection of design The device of bottleneck surface defect;2004,《fault detection and localization in empty water bottles through machine vision》Middle application Hough transform method realizes that empty mineral water bottle bottom is positioned;2012, 《empty bottle inspection》Middle use color camera and colored annular light source design realize that bottle mouth defect is detected, real The bottle mouth defect detection of existing a variety of colors bottle.External relevant document, describe empty bottle inspection equipment accounts for major part, and is described in detail The document of bottleneck localization method is considerably less.The country, the research to empty bottle detecting machine starts from late 1990s.1999, appoint Scheme exists《Empty glass bottle detection technique and application concept》The open relevant research to Empty Bottle system earliest, but do not grind deeply Study carefully the specific method of bottleneck positioning.2001, Duan Feng, Wang Yaonan etc. existed《Applications of the PLC in Inline Empty Bottle Inspector》In Deploy specifically to study Empty Bottle system and detection and localization algorithm at first, Ma Huimin exists《a glass bottle defect detection system without touching》Disclosed in a kind of simple efficient bottleneck localization method, bottle is obtained first The Roberts edges of mouth image, then ask the center at edge and using it as bottleneck center, this method is few in bottleneck image disruption In the case of, positioning precision, which is met, to be required;2003, Hunan University successfully developed first empty bottle inspector of China, its It is middle to realize bottleneck positioning (see document using four kinds of improved gravity model appoaches《Empty Bottle Inspector based on machine vision is ground Study carefully》);2004, Duan Fengwei improved location algorithm antijamming capability, proposed successive approximation method (see document《a real-time machine vision system for bottle finish inspection》), histogram slip window sampling is (see document 《empty bottle inspector based on machine vision》、《Intelligent Empty Bottle detection based on machine vision Robot research》With《a machine vision inspector for beer bottle》);, Li Xin in 2006《It is based on The beer bottle empty bottle detecting machine of machine vision is designed and developed》In carry in go out the quick positioning side using grid spot scan at equal intervals Method, this method can quickly determine bottleneck target area approximate location, and Yan Xiaoyong exists《Beer bottle bottleneck and bottom of bottle based on image are dirty Damage automatic detection》Middle bottleneck localization method of the discussion based on images match and Hough transform loop truss, and to Hough method of changing Improve, by reasonable selection group of edge points quantity so that improved Hough method of changing meets requirement of real-time;, Duan Feng in 2007 《Beer bottle visual detection robot is studied》It is middle to propose a kind of bottleneck positioning integrated approach, and compare gravity model appoach, Approach by inchmeal Method and integrated approach positioning precision and execution time, integrated approach is obtained by Threshold segmentation, center of gravity calculation and radial scan first Bottleneck inward flange point is taken, then asks circle to obtain a series of Circle Parameters by 3 points marginal point even group-division, then using Nogata Figure slip window sampling obtains bottleneck center, and this method position error is minimum, but execution speed is slightly slow, successive approximation method and synthesis side Method all selects bottleneck inward flange to be fitted, because the inward flange for the bottle bottleneck source images that the empty bottle inspector of section peak research and development is obtained It is more clear than outward flange and disturb it is few, Ma Sile, Huang Bin etc. exist《A kind of detection method and device of empty bottle mouth defect》Middle application Least square method realizes that beer bottleneck is positioned, Luo Lin《The development of laughable bottle mouth defect rapid detection system》In be directed to Coke bottle Mouth defects detection problem, is fitted to bottleneck outer edge using least square ellipse fitting process, then takes center of circle average as bottle Mouth center;2009, Zhang Weidong, Zhang Tiantian existed respectively《Online Empty Bottle systematic research and exploitation》With《Regarded based on machine The research of the beer bottle bottleneck detecting system of feel》Middle analysis Hough loop truss, gravity model appoach, least square method, Zhang Weidong are also proposed A kind of simple smart loop truss method, wherein Hough method of changing is computationally intensive, and center method and least square method speed are fast but anti-interference Ability, simple essence loop truss method obtains a series of Circle Parameters first by with section peak identical method, then according to bottleneck, bottle The center of circle and radius are averaged after bottom structure parameter and empirical data filtering as bottleneck center, the method performs speed and anti-interference It can take into account, Li Li《Mechanical vision inspection technology research in bottle detection》In for lifting least square method antijamming capability, Using the method for inside and outside round positioning combination, the method performs speed compared with single least square method and had and largely reduces, because For when excircle orientation is inaccurate, it is necessary to carry out radial scan from new and obtain inner circle marginal point, therefore time-consuming;, king in 2013 Gui Jin exists《Bottleneck localization method》It is middle to propose the bottleneck positioning that a kind of random calculation sampling consistency algorithm is combined with least square method Method, the method is used with random loop truss method (see document《an efficient randomized algorithm for detecting circles》) (difference is Wang Guijin 3 points of stochastical sampling from marginal point to similar loop truss method, and is justified at random 4 points of detection method stochastical sampling), at the same also integrate least square perform that speed is fast and inside and outside round localization method be combined it is anti-dry The characteristics of ability is strong is disturbed, antijamming capability is stronger compared with all location algorithms before, not excessive bottleneck occurs lacking or existed , it is necessary to detect bottleneck marginal point twice, time-consuming during a large amount of stepwise derivations.
Above-mentioned various localization methods have a common difficulty:When bottleneck marginal portion defect or in the presence of a large amount of interference When, as shown in Fig. 2 wherein edge crumbling or Clutter edge are marked with closure dashed region, it is impossible to realize high-speed, high precision bottle Mouth positioning.
The content of the invention
The present invention is for existing bottleneck localization method is in bottleneck serious defect and position error is big when there is a large amount of interference Problem, it is proposed that a kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting, by repeatedly extracting Random circle simultaneously calculates degree of fitting round at random, positions bottleneck based on random circle degree of fitting, overcomes and asked present in prior art Topic.
A kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting, is comprised the following steps:
Step 1:Beer bottleneck image is gathered, beer bottleneck outward flange point is obtained;
Step 1.1:Global threshold segmentation is carried out to bottleneck image, bottleneck target area is obtained;
Step 1.2:Barycentric coodinates are calculated according to bottleneck target area coordinates value;
Step 1.3:The center of gravity obtained using above-mentioned steps is carried out radial scan and obtains bottleneck outward flange point as the center of circle;
Step 2:Justify Evaluation Method at random with 3 points and carry out loop truss, determine beer bottleneck center;
Step 2.1:Three points are arbitrarily selected in the beer bottleneck outward flange point obtained from step 1 WithOne circle is determined with selected three outward flanges point, random circle is denoted as, and remember that the random center of circle is sat It is designated asIt is with radius
Ie represents i-th e times any three point chosen in the point of outward flange, the i-th obtained e random circles;
Wherein, z represents that the value of any selection is 1,2,3;
Step 2.2:Calculate degree of fitting round at random and judge whether the random round degree of fitting is more than given degree of fitting threshold value TgfIf being more than given degree of fitting threshold value Tgf, then next step is performed, otherwise, return to step 2.1;
Wherein, Tgf>=30%,For the integer more than 10.
The round degree of fitting at random is denoted as gf, for all outward flange points to it is random it is round on distance be less than to set a distance The number of the outward flange point of threshold value and the ratio of outward flange point sum;
Step 2.3:The center of circle for the random circle that above-mentioned steps are obtained completes beer bottleneck and determined as the center of beer bottleneck Position.
The operation of the step 2.2 is specific as follows:
Calculate the degree of fitting gf for the random circle that above-mentioned steps 2.1 are obtained and preserve, Rule of judgment gf>TgfWhether set up:
If condition gf>TgfSet up, current random circle is justified as candidate, judging the number of obtained candidate circle is The no maximum number for reaching settingJustify work if finding out the maximum candidate of degree of fitting from current all candidate's circles if having reached For final testing result, into step 2.3;If not up to, return to step 2.1, repeats the step, until performing step Number of times reaches given frequency threshold valueOr obtained candidate's circle number reaches the maximum number of setting
If condition gf>TgfIt is invalid, then return to step 2.1.
The step 1 obtains the barycentric coodinates (X of beer bottleneck image using gravity model appoacho', Yo') detailed process it is as follows:
First, global threshold dividing processing is carried out to the beer bottleneck image f (x, y) collected, obtains bottleneck binaryzation Image g (x, y), TgrayFor the segmentation threshold of setting;
Secondly, barycentric coodinates are obtained according to center of gravity calculation formula:
Wherein, Nb、xmAnd ymTotal quantity, m-th of the non-zero pixel of pixel non-zero in bottleneck binary image are represented respectively The x and y coordinates of point, 1≤m≤Nb, m ∈ Z+, g (xm,ym) represent that coordinate is (x in bottleneck binary imagem,ym) pixel pair The gray value answered.
Radial scan is carried out in the step 1.3 and obtains comprising the following steps that for bottleneck outward flange point;
Utilize barycentric coodinates and the sweep radius R of settingscan, N is carried out to beer bottleneck imagesSecondary radial scan, obtains N' Individual beer bottleneck outward flange pointI represents ith radial scan, 1≤i≤Ns, Ns=360/ Δ α, Δ α are represented radially Sweep spacing;
The radial scan times NsMore than or equal to 3;
The sweep radius R of settingscanFor 1.5 times of true beer bottle port radius.
The radial scan numbers range is [100,600];
When radial scan numbers range is [100,600], detection speed is most fast, good positioning effect.
Radial direction scanning times are 100 in the step 1.3.
Beneficial effect
Compared with prior art, advantage of the present invention:
(1) strong antijamming capability
The present invention proposes the method for external 3 points of progress loop truss of marginal point multiple repairing weld, and proposes one kind with each marginal point The number of marginal point and the ratio of marginal point sum for being less than given threshold value to random distance of round are intended for evaluation criteria selection is optimal The method for closing circle, improves the resistivity to each noise like.
(2) perform the time and positioning precision is easy to adjust
In proper range, change parameterThe T of sumgfValue, can conveniently adjustment positioning accurate,It is smaller, TgfIt is bigger, Bottleneck positioning precision is higher, performs the time longer;In proper range, change parameter NsValue, can conveniently adjustment positioning calculate Method performs time, RscanIt is smaller, perform the time shorter.
Brief description of the drawings
Fig. 1 is the inventive method program circuit schematic diagram, wherein (a) is the presence of the bottleneck image schematic diagram largely disturbed, (b) be edge missing bottleneck image schematic diagram;
Fig. 2 is that bottleneck has the bottleneck image schematic diagram that a large amount of interference and marginal portion are lacked;Wherein (a) is damaged bottleneck Image schematic diagram, (b) is normal bottleneck image schematic diagram;
Fig. 3 is bottleneck source images schematic diagram;
Fig. 4 is radial scan schematic diagram;
Fig. 5 is the inventive method implementation effect schematic diagram, wherein (a) is Threshold segmentation result schematic diagram, (b) is bottleneck mesh Marking area gray scale reduces by 100 later schematic diagrames, and (c) is bottleneck edge schematic diagram, and (d) is candidate's circle schematic diagram, and (e) is to wait Choosing circle and corresponding round degree of fitting relation schematic diagram, (f) is final positioning result schematic diagram;
Embodiment
Below in conjunction with drawings and examples, the present invention is further illustrated.
As shown in figure 1, a kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting, including obtain Marginal point and the step point of loop truss two are taken, is comprised the following steps:
Step 1:Obtain outward flange point
For bottleneck image, as shown in figure 3, there is following three feature:(1) brightness of the fringe region in bottle sealing face Apparently higher than background area;(2) for normal bottleneck, bottleneck image is two concentric bright annulus symmetrically;For breakage Bottleneck, inner ring and it is outer change between white portion exist exist in the uneven white portion of light and shade, inner and outer ring white circle ring area compared with Dark breach or crackle;(3) outer shroud white region is bigger than the brightness value of inner ring white region, and the contrast with background is also stronger.
Analyzing above three feature, we are such as drawn a conclusion:(1) bottleneck edge can be split by global threshold Arrive;(2) when bottleneck is normal, bottleneck position of centre of gravity geometry is overlapped with bottleneck center, and when bottleneck is damaged, bottleneck center of gravity is leaned on Nearly bottleneck center of gravity, and the symmetry of bottleneck image is poorer, offset error is bigger.According to above-mentioned conclusion, the present invention proposes to obtain outer The method of marginal point, specifically divides three steps, successively including global threshold segmentation, center of gravity calculation and radial scan.
(1) global threshold is split
When pixel value is less than gray threshold TgrayWhen, 0 is set to, 1 is otherwise put, as shown in formula (1), wherein x, y difference tables Show the x of pixel, y-coordinate, TgrayRepresent the segmentation threshold of setting, the value according to grey level histogram distribution characteristics, with reference to The threshold value that Otso methods are obtained determines TgraySize, select TgrayPrinciple be to try to extract bottleneck edge from background Out, the so treated bright area obtained in bottleneck binary image g (x, y) is referred to as bottleneck target area.
(2) center of gravity calculation
Barycentric coodinates (X is calculated according to bottleneck target area coordinates valueo', Yo'), as shown in formula (2) and formula (3), wherein, Nb、 xmAnd ymTotal quantity, the x and y coordinates of m-th non-zero pixel, 1≤m≤N of non-zero pixel are represented respectivelyb, m ∈ Z+, g (xm,ym) denotation coordination be (xm,ym) the corresponding gray value of pixel, g (xm,ym) obtained by formula (1), therefore, it is only 1 Or 0.
(3) radial scan
As shown in figure 4, the position of centre of gravity O' obtained using the above-mentioned first step is the center of circle, with RscanFor radius, a circle is drawn, The circle is referred to as scanning circle (as shown in solid white line circle maximum in Fig. 4), (selects herein clockwise or counterclockwise Carry out 360 degree of radial scan in the counterclockwise direction), radial scan is from radius tip PisStart, when scanning to first non-zero Stop during pixel, this non-zero pixels point is marginal point, the marginal point is probably the true outward flange point of noise spot or bottleneck, such as In Fig. 4 shown in small filled circles, still do not found if scanned always along sweep radius direction to scanning round heart O' positions Gray value non-zero pixels point, then illustrate that the marginal point is lacked, the situation occur when bottleneck edge occurs compared with large fracture, scan The extreme coordinates of radiusIt can be obtained by formula (4) and formula (5), determine radius O'P after O' and P point coordinatesisSeat Mark can be obtained using dotted line algorithm, and N is carried out altogethersSecondary radial scan, central angle Δ α=360/ of adjacent twice sweep difference NsIt is referred to as radial scan stepping angle, this paper NsScope is [100,600], finally gives bottleneck outward flange point N' (if bottleneck Image is complete, then N'=NsIf bottleneck image is imperfect, N'<Ns), and edge point coordinates is preserved in order The sequence number of radial scan is represented with corresponding sequence number is, is, is represents the sequence number of the marginal point obtained, often obtains an edge The point sequence number increases by 1 successively, is=10 during such as the 10th radial scan, if non-flanged point is lacked, the correspondence that radial scan is obtained Marginal point is P10'。
Step 2:Detection circle
Detection circle method proposed by the present invention mainly includes 3 points of random loop truss, circle degree of fitting is assessed and bottleneck center is true Fixed three processes.
(1) three point of random loop truss
JudgeWithIt is the entrance of loop truss with the presence or absence of a condition establishment, i.e. radial scan obtains N' After the point of outward flange, judge firstWithSet up with the presence or absence of a condition, it is next as long as there is a condition establishment Step carries out bottleneck center determination;If two conditions are invalid, 3 points of random loop truss are performed, first from N' outward flange point In arbitrarily selection three points, it is assumed that i-theThe coordinate for three outward flange points that secondary stochastical sampling is obtained is respectively WithThen a circle can be determined according to this 3 points, the circle be called with Machine is justified, and the centre coordinate justified at random is calculated by formula (7), formula (7) and formula (8)And radiusFor example 3rd time 3 points obtained of sampling are (x3_1, y3_1)、(x3_2, y3_2) and (x3_3, y3_3), it must can be corresponded to according to this 3 points random Round parameter (C_X3, C_Y3) and radius C_R3, and it is stored in oneThe two-dimensional array that row three is arrangedIn, I-theThe random Circle Parameters of secondary 3 points of determinations of stochastical sampling are stored in array CXYRIn i-theIn three capable row, wherein first and second He Three row are respectively used to preserve candidate parameterWithPerform operation ie=ie+ 1, then, carry out random circle and intend It is right to assess.
(2) circle degree of fitting is assessed
After above-mentioned random loop truss, corresponding random Circle Parameters are obtainedWithFirst, according to formula (9) each marginal point is obtained to distance round at randomWhereinRepresent s marginal point of jth to i-theSecondary stochastical sampling is obtained Random circle distance;Then, can obtaining interior point, (interior point refers to random distance of round less than threshold value TdistMarginal point) number nin, then degree of fitting gf=n is justifiedin/ N', and degree of fitting is stored inThe array that row one is arrangedI-theOK In, i.e. ArrayGOF (ie)=gf;Next, it is determined that gf>TgfWhether set up, if set up, illustrate this random loop truss into Work(is performed, and is performing ns=nsThe entrance of loop truss is returned after+1, otherwise, the entrance of random loop truss is directly returned to.
(3) bottleneck center is determined
Assuming that current ieIt is worth and isI after 3 points of random loop truss and circle degree of fitting assessment is performedeValue, to obtain 'sIt is individual to justify corresponding round degree of fitting at random and be estimated, determine that a Circle Parameters are allowed to try one's best with bottleneck center close, it is The final step of loop truss in location algorithm, whenOrPerformed during establishment.First, from the 1 of array ArrayGOF ArriveIn row, greatest circle degree of fitting GF is searched formax, obtain maximum degree of fitting GFmaxLine number GF in arraymax_i;Secondly, exist Two-dimensional array CXYRMiddle search GFmax_iThe corresponding Circle Parameters of row and using it as loop truss final output result;Finally, will The center of the circle is exported as bottleneck center.
Below by the concrete application instance analysis localization method, parameter set in advance is needed to have 7 in this method, respectively Parameter value setting is as follows:Tgray=160, Ns=100, Rscan=600, Tdist=2,Tgf=4/10.Profit Bottleneck centre coordinate in Fig. 2 (a) is obtained with image processing software or other modes, wherein, the center of circle x of bottleneck outward flange circle is sat Mark, y-coordinate and radius are respectively 499,650 and 283, Fig. 2 (a) is inputted into this paper algorithms, algorithm performs effect as shown in figure 5, Wherein, Fig. 5 (a) is the bottleneck image after global threshold segmentation, and Fig. 5 (b) is that object edge gray value in Fig. 5 (a) is reduced into 100 (purpose of gray value reduction is in Fig. 5 (c), (d) and projecting edge point, candidate's circle and final detection result in (f)) is obtained, Wherein solid roundlet represents that solid small square represents the marginal point that radial scan is obtained, Fig. 5 in bottleneck position of centre of gravity, Fig. 5 (c) (d) solid white line circle represents that the parameter of black ' * ' nearby in all candidate's circles, Fig. 5 (e) represents n-th successively insSecondary success with X, y-coordinate and the radius for the round heart of candidate that machine loop truss is obtained, such as work as nsFor 4 when, correspondence candidate circle degree of fitting be 0.55, X coordinate, y-coordinate and the radius of candidate's circle central coordinate of circle are respectively that the white '+' in 497,650 and 280, Fig. 5 (e) represents final Obtained bottleneck center.

Claims (5)

1. a kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting, it is characterised in that including with Lower step:
Step 1:Beer bottleneck image is gathered, beer bottleneck outward flange point is obtained;
Step 1.1:Global threshold segmentation is carried out to bottleneck image, bottleneck target area is obtained;
Step 1.2:Barycentric coodinates are calculated according to bottleneck target area coordinates value;
Step 1.3:The center of gravity obtained using above-mentioned steps is carried out radial scan and obtains bottleneck outward flange point as the center of circle;
Step 2:Justify Evaluation Method at random with 3 points and carry out loop truss, determine beer bottleneck center;
Step 2.1:Three points are arbitrarily selected in the beer bottleneck outward flange point obtained from step 1 WithOne circle is determined with selected three outward flanges point, random circle is denoted as, and remember that the random center of circle is sat It is designated asIt is with radius
Step 2.2:Calculate degree of fitting round at random and judge whether the random round degree of fitting is more than given degree of fitting threshold value TgfIf, More than given degree of fitting threshold value Tgf, then next step is performed, otherwise, return to step 2.1;
The round degree of fitting at random is denoted as gf, for all outward flange points to it is random it is round on distance be less than given distance threshold Outward flange point number and the ratio of outward flange point sum;
Step 2.3:The center of circle for the random circle that above-mentioned steps are obtained completes the positioning of beer bottleneck as the center of beer bottleneck;
The operation of the step 2.2 is specific as follows:
Calculate the degree of fitting gf for the random circle that above-mentioned steps 2.1 are obtained and preserve, Rule of judgment gf>TgfWhether set up:
If condition gf>TgfSet up, current random circle is justified as candidate, judges whether the number of obtained candidate circle reaches To the maximum number of settingIt is used as most if finding out the maximum candidate's circle of degree of fitting if having reached from current all candidate's circles Whole testing result, into step 2.3;If not up to, return to step 2.1, repeats the step, until performing the number of times of step Reach given frequency threshold valueOr obtained candidate's circle number reaches the maximum number of setting
If condition gf>TgfIt is invalid, then return to step 2.1;
Wherein, Tgf>=30%,For the integer more than 10.
2. a kind of beer bottleneck positioning side assessed based on multiple random loop truss and degree of fitting according to claim 1 Method, it is characterised in that the step 1 obtains the barycentric coodinates (X of beer bottleneck image using gravity model appoacho', Yo') detailed process It is as follows:
First, global threshold dividing processing is carried out to the beer bottleneck image f (x, y) collected, obtains bottleneck binary image g (x, y), TgrayFor the segmentation threshold of setting;
g ( x , y ) = 1 f ( x , y ) &GreaterEqual; T g r a y 0 f ( x , y ) < T g r a y
Secondly, barycentric coodinates are obtained according to center of gravity calculation formula:
X O &prime; = &Sigma; m = 1 N b x m g ( x m , y m ) N b
Y O &prime; = &Sigma; m = 1 N b y m g ( x m , y m ) N b
Wherein, Nb、xmAnd ymThe total quantity of non-zero pixel in bottleneck binary image, m-th non-zero pixel are represented respectively X and y coordinates, 1≤m≤Nb, m ∈ Z+, g (xm,ym) represent that coordinate is (x in bottleneck binary imagem,ym) pixel it is corresponding Gray value.
3. a kind of beer bottleneck positioning side assessed based on multiple random loop truss and degree of fitting according to claim 1 Method, it is characterised in that radial scan is carried out in the step 1.3 and obtains comprising the following steps that for bottleneck outward flange point;
Utilize barycentric coodinates and the sweep radius R of settingscan, N is carried out to beer bottleneck imagesSecondary radial scan, obtains N' beer Bottle mouthful outward flange pointI represents ith radial scan, 1≤i≤Ns, Ns=360/ Δ α, Δ α represent radial scan Interval;
The radial scan times NsMore than or equal to 3;
The sweep radius R of settingscanFor 1.5 times of true beer bottle port radius.
4. a kind of beer bottleneck positioning side assessed based on multiple random loop truss and degree of fitting according to claim 3 Method, it is characterised in that the radial scan numbers range is [100,600].
5. a kind of beer bottleneck positioning side assessed based on multiple random loop truss and degree of fitting according to claim 3 Method, it is characterised in that radial direction scanning times are 100 in the step 1.3.
CN201510390748.1A 2015-07-06 2015-07-06 A kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting Active CN105046697B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510390748.1A CN105046697B (en) 2015-07-06 2015-07-06 A kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510390748.1A CN105046697B (en) 2015-07-06 2015-07-06 A kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting

Publications (2)

Publication Number Publication Date
CN105046697A CN105046697A (en) 2015-11-11
CN105046697B true CN105046697B (en) 2017-07-28

Family

ID=54453215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510390748.1A Active CN105046697B (en) 2015-07-06 2015-07-06 A kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting

Country Status (1)

Country Link
CN (1) CN105046697B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339711B (en) * 2016-08-30 2020-02-04 广西科技大学 Method for improving random circle detection speed under specific condition
CN106546174B (en) * 2016-10-26 2017-08-29 湖南大学 A kind of circle detection method based on model filtering
CN106546605B (en) * 2016-10-26 2019-07-16 湖南大学 A kind of beer bottle mouth defect detection method using 4 circumferential registrations and hysteresis threshold
CN106529551B (en) * 2016-11-02 2020-01-17 南通大学 Intelligent recognition counting detection method for round-like objects in packaging industry
CN107220664B (en) * 2017-05-18 2019-12-31 南京大学 Oil bottle boxing and counting method based on structured random forest
CN108389179B (en) * 2018-01-15 2020-10-13 湖南大学 Machine vision-based can cover surface defect detection method
CN108416765B (en) * 2018-01-30 2020-08-18 华南理工大学 Method and system for automatically detecting character defects
CN110246121B (en) * 2019-05-15 2021-06-29 湖北工程学院 Electronic assembly part assembling precision detection method based on vision
CN111896556B (en) * 2020-08-04 2021-05-28 湖南大学 Glass bottle bottom defect detection method and system based on machine vision
CN112734847A (en) * 2021-01-15 2021-04-30 中国科学技术大学 Multi-target optical fiber position accurate detection positioning system and method
CN114018946B (en) * 2021-10-20 2023-02-03 武汉理工大学 OpenCV-based high-reflectivity bottle cap defect detection method
CN116977310B (en) * 2023-08-01 2024-01-26 山东明佳科技有限公司 Image detection method, system, equipment and storage medium for bottle mouth gap of milk glass bottle

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101063662A (en) * 2007-05-15 2007-10-31 广州市万世德包装机械有限公司 Method for detecting empty bottle bottom defect and device for detecting empty bottle bottom defect based on DSP

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DOP2011000300A (en) * 2011-09-28 2011-10-31 Polanco Ayban Carlos Garcia DEVICE THAT MAGNETIZES AND HARMONIZES WATER PACKED IN BOTTLES (GARRAFON) 5 GAL

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101063662A (en) * 2007-05-15 2007-10-31 广州市万世德包装机械有限公司 Method for detecting empty bottle bottom defect and device for detecting empty bottle bottom defect based on DSP

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Application of Digital Image Process Technology to the Mouth of Beer Bottle Defect Inspection;Zhang Yepeng等;《The Eighth International Conference on Electronic Measurement and Instruments》;20070816;第905-908页 *
基于机器视觉的啤酒瓶瓶口检测系统的研究;张田田;《中国优秀硕士学位论文全文数据库信息科技辑》;20111215(第S1期);摘要,第36-46页 *
高速自动化灌装线上视觉检验系统研究;国新毅;《中国优秀硕士学位论文全文数据库信息科技辑》;20100515(第05期);第30-54页 *

Also Published As

Publication number Publication date
CN105046697A (en) 2015-11-11

Similar Documents

Publication Publication Date Title
CN105046697B (en) A kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting
CN105334219A (en) Bottleneck defect detection method adopting residual analysis and dynamic threshold segmentation
CN108389179B (en) Machine vision-based can cover surface defect detection method
CN103606167B (en) A kind of outer bottle cap profile for defects detection determines method
WO2022027949A1 (en) Machine vision-based detecting method and system for glass bottle bottom defects
CN105654097B (en) The detection method of quadrangle marker in image
CN102288613B (en) Surface defect detecting method for fusing grey and depth information
CN101256157B (en) Method and apparatus for testing surface defect
CN105157563B (en) A kind of medicated beer bottleneck localization method based on machine vision
CN109900711A (en) Workpiece, defect detection method based on machine vision
CN103606169A (en) Method for detecting defects of bottle cap
CN105954301A (en) Bottleneck quality detection method based on machine vision
CN102974551A (en) Machine vision-based method for detecting and sorting polycrystalline silicon solar energy
CN104990926A (en) TR element locating and defect detecting method based on vision
CN105488503A (en) Method for detecting circle center image coordinate of uncoded circular ring-shaped gauge point
CN105427324B (en) The magneto-optic image defects detection method searched for automatically based on binary-state threshold
CN106981060A (en) A kind of Empty Bottle Inspector bottom of bottle localization method
CN103499590A (en) Method and system for detecting and screening end defects in circular parts
CN104122271A (en) Automated optical inspection (AOI)-based bullet apparent defect detection method
CN104700423A (en) Method and device for detecting bottle cap
CN106643549A (en) Machine vision-based tile size detection method
CN104282018A (en) Method for on-line detection of overall diameter of industrial product based on machine vision
CN107392849A (en) Target identification and localization method based on image subdivision
CN106529551B (en) Intelligent recognition counting detection method for round-like objects in packaging industry
CN107358628A (en) Linear array images processing method based on target

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant