CN105046697A - Beer bottle opening positioning method based on multi-time random circle detection and fitting degree assessment - Google Patents
Beer bottle opening positioning method based on multi-time random circle detection and fitting degree assessment Download PDFInfo
- Publication number
- CN105046697A CN105046697A CN201510390748.1A CN201510390748A CN105046697A CN 105046697 A CN105046697 A CN 105046697A CN 201510390748 A CN201510390748 A CN 201510390748A CN 105046697 A CN105046697 A CN 105046697A
- Authority
- CN
- China
- Prior art keywords
- circle
- bottleneck
- random
- beer
- degree
- 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.)
- Granted
Links
Classifications
-
- 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
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan 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
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/95—Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
- G01N21/952—Inspecting the exterior surface of cylindrical bodies or wires
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan 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/8887—Scan 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
-
- 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/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial 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 beer bottle opening positioning method based on multi-time random circle detection and fitting degree assessment. The method is composed of two parts: edge point obtaining and circle detection. The concrete steps are that firstly, outer edge points of a bottle opening are obtained through threshold segmentation, gravity center calculation and radial scanning; secondly, a random circle is determined through three points sampled from the outer edge points of the bottle opening randomly; thirdly, a ratio of number of the outer edge points with distances to the random circle being less than a given threshold to edge point total number is employed as a circle fitting degree of the random circle and a fitting degree is calculated; fourthly, the second step and the third step are carried out repeatedly until the situation that number of circle detection or total number of three-point random circle detection reaches the given threshold is achieved successfully; fifthly, the maximum fitting degree is searched, and the circle center of the random circle corresponding to the maximum fitting degree is employed as the center of the bottle opening. The method solves the problem effectively that a present beer bottle opening positioning method has great positioning errors when a bottle opening is damaged seriously or illumination is uneven.
Description
Technical field
The present invention relates to industrial automation detection technique field, particularly a kind of beer bottleneck localization method based on repeatedly random loop truss and degree of fitting assessment.
Background technology
The annual beer bottle demand of China is huge, and according to the statistics display of Zhong Shang industrial research institute, within 2014, beer industry cumulative production is up to 4921.85 ten thousand kilolitres, by the bottled calculation of capacity of every bottled beer 530ml, then needs nearly 9.28651 × 10
10individual beer bottle, wherein the beer bottle of more than 80% uses and reclaims old bottle, there is the bottle of a large amount of bottleneck breakage, use the bottle of bottleneck breakage may bring major safety risks to production line and consumer, therefore beer empty bottle mouth quality must be detected before beer filling, current most domestic beer enterprise uses the empty bottle detecting machine (overseas equipment accounts for principal market) based on Machine Vision Detection to carry out empty bottle quality testing, and bottleneck location is a necessary process in the empty bottle inspection process of view-based access control model, if bottleneck positioning error is excessive, follow-up bottleneck quality testing result will be caused incorrect.At present, the relevant research of a large amount of bottleneck localization method has been had.
Abroad, have developed empty bottle detecting machine as far back as the sixties in 20th century.1986, propose in " bottlemouthdefectinspectionapparatus " to use a kind of arc light source and photoelectric sensor to obtain bottleneck image, the bottle mouth defect being realized 5 types by the scanning of radial direction was detected; 1989, a kind of device detecting bottleneck surface imperfection of design in " inspectiondevice "; 2004, in " faultdetectionandlocalizationinemptywaterbottlesthroughm achinevision ", application Hough transform method realized locating at the bottom of empty mineral water bottle; 2012, use color camera and colour annular light source design to realize bottle mouth defect in " emptybottleinspection " and detect, the bottle mouth defect realizing shades of colour bottle detected.External related documents, what describe empty bottle inspection equipment accounts for major part, and the document describing bottleneck localization method in detail is considerably less.Domestic, late 1990s is started to the research of empty bottle detecting machine.1999, appoint scheme in " empty glass bottle detection technique and application concept " the open relevant research to Empty Bottle system the earliest, but do not further investigate the concrete grammar of bottleneck location.Calendar year 2001, Duan Feng, Wang Yaonan etc. launch at first specifically to study Empty Bottle system and detection and localization algorithm in " application of PLC in Inline Empty Bottle Inspector ", Ma Huimin is open a kind of simple bottleneck localization method efficiently in " aglassbottledefectdetectionsystemwithouttouching ", first the Roberts edge of bottleneck image is obtained, then ask edge center and using it as bottleneck center, the method is when bottleneck image disruption is few, and positioning precision meets the demands, 2003, Hunan University successfully developed China's first empty bottle inspector, wherein used four kinds of gravity model appoaches improved to realize bottleneck location (see document " Empty Bottle Inspector based on machine vision is studied "), 2004, Duan Fengwei improves location algorithm antijamming capability, proposes successive approximation method (see document " areal-timemachinevisionsystemforbottlefinishinspection "), histogram slip window sampling (see document " emptybottleinspectorbasedonmachinevision ", " studying based on the Empty Bottle Inspector of machine vision " and " amachinevisioninspectorforbeerbottle "), 2006, Li Xin goes out to adopt the method for rapidly positioning of net point scanning at equal intervals in carrying in " the beer bottle empty bottle detecting machine based on machine vision is designed and developed ", the method can determine bottleneck target area approximate location fast, Yan Xiaoyong discusses the bottleneck localization method based on images match and Hough transform loop truss in " stained automatic detection at the bottom of based on the beer bottle bottleneck of image and bottle ", and Hough method of changing is improved, by choose reasonable group of edge points quantity to make the Hough method of changing requirement of real time of improvement, 2007, Duan Feng proposes a kind of bottleneck location integrated approach in " research of beer bottle visual detection robot ", and compare gravity model appoach, successive approximation method and integrated approach positioning precision and execution time, first integrated approach passes through Threshold segmentation, center of gravity calculation and radial scan obtain bottleneck inward flange point, circle is asked to obtain a series of Circle Parameters by 3 marginal point even group-division subsequently, histogram slip window sampling is used to obtain bottleneck center subsequently, the method positioning error is minimum, but execution speed is slightly slow, successive approximation method and integrated approach all select the matching of bottleneck inward flange, because the inward flange of bottle bottleneck source images that the empty bottle inspector of section peak research and development obtains is more clear and interference is few than outward flange, Ma Sile, the application least square method in " a kind of detection method of empty bottle mouth defect and device " such as Huang Bin realizes beer bottleneck location, Luo Lin in " development of laughable bottle mouth defect rapid detection system " for laughable bottleneck defects detection problem, adopt least square ellipse fitting process to the matching of bottleneck outer edge, get center of circle average subsequently as bottleneck center, 2009, Zhang Weidong, Zhang Tiantian analyzes Hough loop truss respectively in " online Empty Bottle systematic research and exploitation " and " research based on the beer bottle bottleneck detection system of machine vision ", gravity model appoach, least square method, Zhang Weidong also proposes a kind of simple and easy smart loop truss method, wherein Hough method of changing calculated amount is large, center method and least square method speed fast, but poor anti jamming capability, first simple and easy smart loop truss method uses the method identical with section peak to obtain a series of Circle Parameters, subsequently according to bottleneck, bottom structure parameter and empirical data average the center of circle and radius as bottleneck center after filtering, this method execution speed and interference free performance are taken into account, Li Li is lifting least square method antijamming capability in " the mechanical vision inspection technology research in bottle detection ", in employing, the method that excircle orientation combines, the method execution speed compared with single least square method has and reduces largely, because when excircle orientation is inaccurate, need to obtain inner circle marginal point from newly carrying out radial scan, therefore length consuming time, 2013, Wang Guijin proposes a kind of random bottleneck localization method calculated sampling consistency algorithm and be combined with least square method in " bottleneck localization method ", this method adopts the loop truss method similar with random loop truss method (see document " anefficientrandomizedalgorithmfordetectingcircles "), and (difference is Wang Guijin stochastic sampling three point from marginal point, and random loop truss method stochastic sampling four point), simultaneously also comprehensive least square execution speed fast and in, excircle orientation method combines the strong feature of antijamming capability, antijamming capability is stronger compared with all location algorithms before, there is disappearance or when there is a large amount of stepwise derivation in not excessive bottleneck, need to detect bottleneck marginal point twice, length consuming time.
Above-mentioned various localization method also exists a common difficulty: when bottleneck marginal portion defect or existence are disturbed in a large number, as shown in Figure 2, wherein edge crumbling or Clutter edge all mark by closed dashed region, cannot realize high-speed, high precision bottleneck location.
Summary of the invention
The present invention is directed to the existing bottleneck localization method problem that positioning error is large when bottleneck serious defect and existence a large amount of interference, propose a kind of beer bottleneck localization method based on repeatedly random loop truss and degree of fitting assessment, justify at random by repeatedly extracting and calculate random round degree of fitting, locate bottleneck based on random circle degree of fitting, overcome problems of the prior art.
Based on a beer bottleneck localization method for repeatedly random loop truss and degree of fitting assessment, comprise the following steps:
Step 1: gather beer bottleneck image, obtains beer bottleneck outward flange point;
Step 1.1: carry out global threshold segmentation to bottleneck image, obtains bottleneck target area;
Step 1.2: calculate barycentric coordinates according to bottleneck target area coordinates value;
Step 1.3: the center of gravity obtained with above-mentioned steps is the center of circle, carries out radial scan and obtains bottleneck outward flange point;
Step 2: carry out loop truss by 3 random circle Evaluation Method, determine beer bottleneck center;
Step 2.1: select three points arbitrarily from the beer bottleneck outward flange point that step 1 obtains
with
determine a circle with selected three outward flange points, be denoted as random circle, and remember that random central coordinate of circle is
with radius be
I
erepresent i-th
esecondary any three points chosen in outward flange point, obtain i-th
eindividual random circle;
Wherein, z represents that the value chosen arbitrarily is 1,2,3;
Step 2.2: calculate the degree of fitting of random circle and judge whether this random circle degree of fitting is greater than given degree of fitting threshold value T
gfif be greater than, then perform next step, otherwise, return step 2.1;
Wherein, T
gf>=30%,
for being greater than the integer of 10.
The degree of fitting of described random circle is denoted as gf, for all outward flange points are less than the number of the outward flange point of given distance threshold and the ratio of outward flange point sum to the distance on round at random;
Step 2.3: the center of circle of random circle above-mentioned steps obtained, as the center of beer bottleneck, completes beer bottleneck location.
The operation of described step 2.2 is specific as follows:
Calculate the degree of fitting gf of the random circle that above-mentioned steps 2.1 obtains and preserve, Rule of judgment gf>T
gfwhether set up:
If condition gf>T
gfset up, by current random circle alternatively circle, judge whether the number of the candidate's circle obtained reaches the maximum number of setting
if reach, from current all candidates circle, find out the maximum candidate's circle of degree of fitting as final testing result, enter step 2.3; If do not reach, then return step 2.1, repeat this step, until the number of times performing step reaches given frequency threshold value
or the candidate's circle number obtained reaches the maximum number of setting
If condition gf > is T
gfbe false, then return step 2.1.
Described step 1 utilizes gravity model appoach to obtain the barycentric coordinates (X of beer bottleneck image
o', Y
o') detailed process as follows:
First, global threshold dividing processing is carried out to beer bottleneck image f (x, y) collected, obtains bottleneck binary image g (x, y), T
grayfor the segmentation threshold of setting;
Secondly, barycentric coordinates are obtained according to center of gravity calculation formula:
Wherein, N
b, x
mand y
mrepresent x and the y coordinate of the total quantity of pixel non-zero in bottleneck binary image, a m non-zero pixel respectively, 1≤m≤N
b, m ∈ Z+, g (x
m, y
m) represent that in bottleneck binary image, coordinate is (x
m, y
m) gray-scale value corresponding to pixel.
The concrete steps of carrying out radial scan acquisition bottleneck outward flange point in described step 1.3 are as follows;
Utilize the sweep radius R of barycentric coordinates and setting
scan, N is carried out to beer bottleneck image
ssecondary radial scan, obtains N' beer bottleneck outward flange point
i represents i-th radial scan, 1≤i≤N
s, N
s=360/ Δ α, Δ α represents radial scan interval;
Described radial scan times N
sbe more than or equal to 3;
The sweep radius R of setting
scanfor 1.5 times of true beer bottle port radius.
Described radial scan numbers range is [100,600];
When radial scan numbers range is [100,600], detection speed is the fastest, good positioning effect.
In described step 3, radial scanning times is 100.
Beneficial effect
Compared with prior art, advantage of the present invention:
(1) antijamming capability is strong
The present invention proposes the method that external marginal point multiple repairing weld 3 carries out loop truss, and propose a kind ofly to be less than the number of the marginal point of given threshold value and the ratio of marginal point sum to random distance of round with each marginal point for evaluation criteria and to select the method for optimal fitting circle, improve the resistivity to each noise like.
(2) execution time and positioning precision easy to adjust
In proper range, change parameter
with T
gfvalue, conveniently can adjust positioning accurate,
less, T
gflarger, bottleneck positioning precision is higher, and the execution time is longer; In proper range, change Parameter N
svalue, can conveniently adjust the location algorithm execution time, R
scanless, the execution time is shorter.
Accompanying drawing explanation
Fig. 1 is the inventive method program circuit schematic diagram, and wherein (a) is the bottleneck image schematic diagram that there is a large amount of interference, and (b) is the bottleneck image schematic diagram of edge disappearance;
Fig. 2 is the bottleneck image schematic diagram that bottleneck exists a large amount of interference and marginal portion disappearance; Wherein (a) is damaged bottleneck image schematic diagram, and (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 that bottleneck target area gray level reduces by 100 later schematic diagram, c () is bottleneck edge schematic diagram, d () is candidate's circle schematic diagram, e () is candidate's 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 based on repeatedly random loop truss and degree of fitting assessment, comprises acquisition marginal point and loop truss two step is divided, and comprises the following steps:
Step 1: obtain outward flange point
For bottleneck image, as shown in Figure 3, there are following three features: the brightness of the fringe region in (1) bottle sealing face is apparently higher than background area; (2) for normal bottleneck, bottleneck image is two concentric bright annulus symmetrically; For damaged bottleneck, there is darker breach or crackle in inner and outer ring white circle ring area in inner ring and change the white portion that there is light and shade inequality between white portion outward; (3) outer shroud white region is larger than the brightness value of inner ring white region, also stronger with the contrast of background.
We can obtain as drawn a conclusion to analyze above-mentioned three features: (1) bottleneck edge can obtain through global threshold segmentation; (2) when bottleneck is normal, bottleneck centre of gravity place geometry overlaps with bottleneck center, and when bottleneck is damaged, bottleneck center of gravity is near bottleneck center of gravity, and the symmetry of bottleneck image is poorer, and offset error is larger.According to above-mentioned conclusion, the present invention proposes the method obtaining outward flange point, and concrete point three steps comprise global threshold segmentation, center of gravity calculation and radial scan successively.
(1) global threshold segmentation
When pixel value is less than gray threshold T
graytime, be set to 0, otherwise put 1, shown in (1), wherein x, y represent the x of pixel respectively, y coordinate, T
grayrepresent the segmentation threshold of setting, this value is according to grey level histogram distribution characteristics, and the threshold value simultaneously obtained with reference to Otso method determines T
graysize, select T
grayprinciple be bottleneck edge is extracted from background as far as possible, the bright area obtained in bottleneck binary image g (x, y) so after process is called bottleneck target area.
(2) center of gravity calculation
Barycentric coordinates (X is calculated according to bottleneck target area coordinates value
o', Y
o'), shown in (2) and formula (3), wherein, N
b, x
mand y
mrepresent x and the y coordinate of the total quantity of non-zero pixel, m non-zero pixel respectively, 1≤m≤N
b, m ∈ Z+, g (x
m, y
m) denotation coordination is (x
m, y
m) gray-scale value corresponding to pixel, g (x
m, y
m) through type (1) obtains, and therefore, can only be 1 or 0.
(3) radial scan
As shown in Figure 4, the centre of gravity place O' obtained with the above-mentioned first step is the center of circle, with R
scanfor radius, draw a circle, this circle is referred to as scanning circle (as shown in solid white line maximum in Fig. 4 circle), and (select in the counterclockwise direction) radial scan carrying out 360 degree clockwise or counterclockwise herein, radial scan is from radius tip P
isstart, stop when scanning first non-zero pixels point, this non-zero pixels point is marginal point, this marginal point may be the true outward flange point of noise spot or bottleneck, shown in filled circles as medium and small in Fig. 4, if be scanned up to the round heart O' position of scanning still do not find gray-scale value non-zero pixels point along sweep radius direction always, then illustrate that this marginal point lacks, when bottleneck edge occur comparatively large fracture time there will be this situation, the extreme coordinates of sweep radius
can be obtained by formula (4) and formula (5), radius O'P after determining O' and P point coordinate
iscoordinate can apply dotted line algorithm obtain, carry out N altogether
ssecondary radial scan, the central angle Δ α=360/N of adjacent twice sweep difference
sbe called as radial scan stepping angle, herein N
sscope is [100,600], finally obtain bottleneck outward flange point N' (if bottleneck image is complete, then N'=N
sif bottleneck image is imperfect, then N'<N
s), and preserve marginal point coordinate in order
represent the sequence number of radial scan with the sequence number is of correspondence, is, is represents the sequence number of the marginal point of acquisition, often obtain this sequence number of marginal point and increase by 1 successively, as is=10 during the 10th radial scan, if non-flanged point disappearance, the corresponding edge point that radial scan obtains is P
10'.
Step 2: detect circle
The detection circle method that the present invention proposes mainly comprises 3 random loop truss, the assessment of circle degree of fitting and bottleneck center and determines three processes.
(1) three random loop truss
Judge
with
whether there is the entrance that a condition establishment is loop truss, after namely radial scan obtains N' outward flange point, first judge
with
whether there is a condition to set up, as long as there is a condition to set up, next step carries out bottleneck center and determines; If two conditions are all false, then perform 3 random loop truss, first from N' outward flange point, select three points arbitrarily, suppose i-th
ethe coordinate of three outward flange points that secondary stochastic sampling obtains is respectively
with
then can determine a circle according to these 3, claim this circle for random circle, calculate this centre coordinate round at random by formula (7), formula (7) and formula (8)
and radius
sample obtain 3 for such as the 3rd time for (x
3_1, y
3_1), (x
3_2, y
3_2) and (x
3_3, y
3_3), the parameter (C_X of corresponding random circle can be obtained according to these 3
3, C_Y
3) and radius C _ R
3, and be kept at one
the two-dimensional array that row three arranges
in, i-th
ethe random Circle Parameters that secondary stochastic sampling 3 is determined is kept at array C
xYRin i-th
ein three row of row, wherein first and second and three row are respectively used to preserve candidate parameter
with
executable operations i
e=i
e+ 1, subsequently, justify degree of fitting assessment at random.
(2) degree of fitting assessment is justified
After above-mentioned random loop truss, obtain corresponding random Circle Parameters
with
first, the distance of each marginal point to random circle is obtained according to formula (9)
wherein
represent that jth s marginal point is to i-th
ethe distance of the random circle that secondary stochastic sampling obtains; Subsequently, (interior point refers to random distance of round and is less than threshold value T can to obtain interior point
distmarginal point) number n
in, then round degree of fitting gf=n
in/ N', and degree of fitting is kept at
the array ArrayGOF that row one arranges
i-th
ein row, i.e. ArrayGOF (i
e)=gf; Then, gf>T is judged
gfwhether set up, if set up, then this random loop truss successful execution is described, and at execution n
s=n
sthe entrance of loop truss is returned after+1, otherwise, directly return the entrance of random loop truss.
(3) bottleneck center is determined
Suppose current i
evalue is
namely 3 random loop truss and the rear i of circle degree of fitting assessment is executed
evalue, to obtain L
iethe round degree of fitting that individual random circle is corresponding is assessed, and determine that a Circle Parameters makes it as far as possible close with bottleneck center, it is the final step of loop truss in location algorithm, when
or
perform during establishment.First, from 1 of array ArrayGOF to
in row, search greatest circle degree of fitting GF
max, obtain maximum degree of fitting GF
maxline number GF in array
max_i; Secondly, at two-dimensional array C
xYRmiddle search GF
max_ithe Circle Parameters that row is corresponding using its final Output rusults as loop truss; Finally, the center of this circle is exported as bottleneck center.
Below by this localization method of embody rule instance analysis, need the parameter preset to have 7 in this method, each parameter value is set as follows: T
gray=160, N
s=100, R
scan=600, T
dist=2,
t
gf=4/10.Image processing software or other modes is utilized to obtain bottleneck centre coordinate in Fig. 2 (a), wherein, the center of circle x coordinate of bottleneck outward flange circle, y coordinate and radius are respectively 499, 650 and 283, by Fig. 2 (a) input algorithm herein, algorithm implementation effect as shown in Figure 5, wherein, Fig. 5 (a) is the bottleneck image after global threshold segmentation, Fig. 5 (b) is that (object that gray-scale value reduces is at Fig. 5 (c) by object edge gray-scale value minimizing 100 in Fig. 5 (a), projecting edge point in (d) and (f), candidate's circle and final detection result) obtain, wherein solid roundlet represents bottleneck centre of gravity place, in Fig. 5 (c), solid little square represents the marginal point that radial scan obtains, in Fig. 5 (d), solid white line circle represents all candidates circle, parameter near black ' * ' in Fig. 5 (e) represents n-th successively
sx, y coordinate of the round heart of candidate that the random loop truss of secondary success obtains and radius, as worked as n
swhen being 4, the degree of fitting of corresponding candidate circle is 0.55, and the white '+' that the x coordinate of candidate's circle central coordinate of circle, y coordinate and radius are respectively in 497,650 and 280, Fig. 5 (e) represents the bottleneck center finally obtained.
Claims (6)
1., based on a beer bottleneck localization method for repeatedly random loop truss and degree of fitting assessment, it is characterized in that, comprise the following steps:
Step 1: gather beer bottleneck image, obtains beer bottleneck outward flange point;
Step 1.1: carry out global threshold segmentation to bottleneck image, obtains bottleneck target area;
Step 1.2: calculate barycentric coordinates according to bottleneck target area coordinates value;
Step 1.3: the center of gravity obtained with above-mentioned steps is the center of circle, carries out radial scan and obtains bottleneck outward flange point;
Step 2: carry out loop truss by 3 random circle Evaluation Method, determine beer bottleneck center;
Step 2.1: select three points arbitrarily from the beer bottleneck outward flange point that step 1 obtains
with
determine a circle with selected three outward flange points, be denoted as random circle, and remember that random central coordinate of circle is
with radius be
Step 2.2: calculate the degree of fitting of random circle and judge whether this random circle degree of fitting is greater than given degree of fitting threshold value T
gfif be greater than, then perform next step, otherwise, return step 2.1;
The degree of fitting of described random circle is denoted as gf, for all outward flange points are less than the number of the outward flange point of given distance threshold and the ratio of outward flange point sum to the distance on round at random;
Step 2.3: the center of circle of random circle above-mentioned steps obtained, as the center of beer bottleneck, completes beer bottleneck location.
2. a kind of beer bottleneck localization method based on repeatedly random loop truss and degree of fitting assessment according to claim 1, it is characterized in that, the operation of described step 2.2 is specific as follows:
Calculate the degree of fitting gf of the random circle that above-mentioned steps 2.1 obtains and preserve, Rule of judgment gf>T
gfwhether set up:
If condition gf>T
gfset up, by current random circle alternatively circle, judge whether the number of the candidate's circle obtained reaches the maximum number of setting
if reach, from current all candidates circle, find out the maximum candidate's circle of degree of fitting as final testing result, enter step 2.3; If do not reach, then return step 2.1, repeat this step, until the number of times performing step reaches given frequency threshold value
or the candidate's circle number obtained reaches the maximum number of setting
If condition gf>T
gfbe false, then return step 2.1;
Wherein, T
gf>=30%,
for being greater than the integer of 10.
3. a kind of beer bottleneck localization method based on repeatedly random loop truss and degree of fitting assessment according to claim 1 or 2, it is characterized in that, described step 1 utilizes gravity model appoach to obtain the barycentric coordinates (X of beer bottleneck image
o', Y
o') detailed process as follows:
First, global threshold dividing processing is carried out to beer bottleneck image f (x, y) collected, obtains bottleneck binary image g (x, y), T
grayfor the segmentation threshold of setting;
Secondly, barycentric coordinates are obtained according to center of gravity calculation formula:
Wherein, N
b, x
mand y
mrepresent x and the y coordinate of the total quantity of pixel non-zero in bottleneck binary image, a m non-zero pixel respectively, 1≤m≤N
b, m ∈ Z+, g (x
m, y
m) represent that in bottleneck binary image, coordinate is (x
m, y
m) gray-scale value corresponding to pixel.
4. a kind of beer bottleneck localization method based on repeatedly random loop truss and degree of fitting assessment according to claim 1 or 2, is characterized in that, the concrete steps of carrying out radial scan acquisition bottleneck outward flange point in described step 1.3 are as follows;
Utilize the sweep radius R of barycentric coordinates and setting
scan, N is carried out to beer bottleneck image
ssecondary radial scan, obtains N' beer bottleneck outward flange point
i represents i-th radial scan, 1≤i≤N
s, N
s=360/ Δ α, Δ α represents radial scan interval;
Described radial scan times N
sbe more than or equal to 3;
The sweep radius R of setting
scanfor 1.5 times of true beer bottle port radius.
5., according to a kind of beer bottleneck localization method based on repeatedly random loop truss and degree of fitting assessment shown in claim 4, it is characterized in that, described radial scan numbers range is [100,600].
6., according to a kind of beer bottleneck localization method based on repeatedly random loop truss and degree of fitting assessment shown in claim 4, it is characterized in that, in described step 3, radial scanning times is 100.
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 true CN105046697A (en) | 2015-11-11 |
CN105046697B 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) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106339711A (en) * | 2016-08-30 | 2017-01-18 | 广西科技大学 | Method for improving speed of randomized circle detection in specific condition |
CN106529551A (en) * | 2016-11-02 | 2017-03-22 | 南通大学 | Intelligent recognition, counting, and detection algorithm for quasi-circle object facing packaging industry |
CN106546605A (en) * | 2016-10-26 | 2017-03-29 | 湖南大学 | A kind of medicated beer bottle mouth defect detection method for utilizing 4 circumferential registrations and hysteresis threshold |
CN106546174A (en) * | 2016-10-26 | 2017-03-29 | 湖南大学 | A kind of circle detection method based on model filtering |
CN107220664A (en) * | 2017-05-18 | 2017-09-29 | 南京大学 | A kind of oil bottle vanning counting method based on structuring random forest |
CN108389179A (en) * | 2018-01-15 | 2018-08-10 | 湖南大学 | A kind of cover detection method of surface flaw based on machine vision |
CN108416765A (en) * | 2018-01-30 | 2018-08-17 | 华南理工大学 | A kind of character defect automatic testing method and system |
CN110246121A (en) * | 2019-05-15 | 2019-09-17 | 湖北工程学院 | A kind of electronic assemblies assembly accuracy detection method of view-based access control model |
CN112734847A (en) * | 2021-01-15 | 2021-04-30 | 中国科学技术大学 | Multi-target optical fiber position accurate detection positioning system and method |
CN114018946A (en) * | 2021-10-20 | 2022-02-08 | 武汉理工大学 | OpenCV-based high-reflectivity bottle cap defect detection method |
WO2022027949A1 (en) * | 2020-08-04 | 2022-02-10 | 湖南大学 | Machine vision-based detecting method and system for glass bottle bottom defects |
CN116977310A (en) * | 2023-08-01 | 2023-10-31 | 山东明佳科技有限公司 | Image detection method, system, equipment and storage medium for bottle mouth gap of milk glass bottle |
Citations (2)
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 |
WO2013044929A1 (en) * | 2011-09-28 | 2013-04-04 | Garcia Polanco Ayban Carlos | Device for magnetising and harmonising water contained in five-gallon bottles (carboys) |
-
2015
- 2015-07-06 CN CN201510390748.1A patent/CN105046697B/en active Active
Patent Citations (2)
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 |
WO2013044929A1 (en) * | 2011-09-28 | 2013-04-04 | Garcia Polanco Ayban Carlos | Device for magnetising and harmonising water contained in five-gallon bottles (carboys) |
Non-Patent Citations (3)
Title |
---|
ZHANG YEPENG等: "Application of Digital Image Process Technology to the Mouth of Beer Bottle Defect Inspection", 《THE EIGHTH INTERNATIONAL CONFERENCE ON ELECTRONIC MEASUREMENT AND INSTRUMENTS》 * |
国新毅: "高速自动化灌装线上视觉检验系统研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
张田田: "基于机器视觉的啤酒瓶瓶口检测系统的研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106339711A (en) * | 2016-08-30 | 2017-01-18 | 广西科技大学 | Method for improving speed of randomized circle detection in specific condition |
CN106546605A (en) * | 2016-10-26 | 2017-03-29 | 湖南大学 | A kind of medicated beer bottle mouth defect detection method for utilizing 4 circumferential registrations and hysteresis threshold |
CN106546174A (en) * | 2016-10-26 | 2017-03-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 |
CN106529551A (en) * | 2016-11-02 | 2017-03-22 | 南通大学 | Intelligent recognition, counting, and detection algorithm for quasi-circle object facing packaging industry |
CN107220664A (en) * | 2017-05-18 | 2017-09-29 | 南京大学 | A kind of oil bottle vanning counting method based on structuring random forest |
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 |
CN108389179A (en) * | 2018-01-15 | 2018-08-10 | 湖南大学 | A kind of cover detection method of surface flaw based on machine vision |
CN108416765A (en) * | 2018-01-30 | 2018-08-17 | 华南理工大学 | A kind of character defect automatic testing method and system |
CN110246121A (en) * | 2019-05-15 | 2019-09-17 | 湖北工程学院 | A kind of electronic assemblies assembly accuracy detection method of view-based access control model |
CN110246121B (en) * | 2019-05-15 | 2021-06-29 | 湖北工程学院 | Electronic assembly part assembling precision detection method based on vision |
WO2022027949A1 (en) * | 2020-08-04 | 2022-02-10 | 湖南大学 | Machine vision-based detecting method and system for glass bottle bottom defects |
CN112734847A (en) * | 2021-01-15 | 2021-04-30 | 中国科学技术大学 | Multi-target optical fiber position accurate detection positioning system and method |
CN114018946A (en) * | 2021-10-20 | 2022-02-08 | 武汉理工大学 | OpenCV-based high-reflectivity bottle cap defect detection method |
CN116977310A (en) * | 2023-08-01 | 2023-10-31 | 山东明佳科技有限公司 | Image detection method, system, equipment and storage medium for bottle mouth gap of milk glass bottle |
CN116977310B (en) * | 2023-08-01 | 2024-01-26 | 山东明佳科技有限公司 | Image detection method, system, equipment and storage medium for bottle mouth gap of milk glass bottle |
Also Published As
Publication number | Publication date |
---|---|
CN105046697B (en) | 2017-07-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105046697A (en) | Beer bottle opening positioning method based on multi-time random circle detection and fitting degree assessment | |
CN105334219A (en) | Bottleneck defect detection method adopting residual analysis and dynamic threshold segmentation | |
US11551341B2 (en) | Method and device for automatically drawing structural cracks and precisely measuring widths thereof | |
CN113469177B (en) | Deep learning-based drainage pipeline defect detection method and system | |
CN103606167B (en) | A kind of outer bottle cap profile for defects detection determines method | |
CN102288613B (en) | Surface defect detecting method for fusing grey and depth information | |
CN105157563B (en) | A kind of medicated beer bottleneck localization method based on machine vision | |
CN107966454A (en) | A kind of end plug defect detecting device and detection method based on FPGA | |
CN105913093A (en) | Template matching method for character recognizing and processing | |
CN101105459A (en) | Empty bottle mouth defect inspection method and device | |
CN103606169A (en) | Method for detecting defects of bottle cap | |
CN110334760B (en) | Optical component damage detection method and system based on RESUnet | |
CN105954301A (en) | Bottleneck quality detection method based on machine vision | |
CN102974551A (en) | Machine vision-based method for detecting and sorting polycrystalline silicon solar energy | |
CN107102009A (en) | A kind of method of the cylinder spool quality testing based on machine vision | |
CN104122271A (en) | Automated optical inspection (AOI)-based bullet apparent defect detection method | |
CN106981060A (en) | A kind of Empty Bottle Inspector bottom of bottle localization method | |
CN100491904C (en) | Drinking bottle mouth vision positioning method | |
CN106529551B (en) | Intelligent recognition counting detection method for round-like objects in packaging industry | |
CN103440657A (en) | Method for online screening cracks of road | |
CN104700423A (en) | Method and device for detecting bottle cap | |
CN107392849A (en) | Target identification and localization method based on image subdivision | |
CN104613869A (en) | Method and system for detecting elliptical hole group based on maximum inscribed circle | |
CN107388991A (en) | A kind of more fillet axial workpiece radius of corner measuring methods in end face | |
CN106546185A (en) | A kind of profile quality determining method based on Machine Vision Detection |
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 |