CN104613869B - Method and system for detecting elliptical hole group based on maximum inscribed circle - Google Patents

Method and system for detecting elliptical hole group based on maximum inscribed circle Download PDF

Info

Publication number
CN104613869B
CN104613869B CN201510043349.8A CN201510043349A CN104613869B CN 104613869 B CN104613869 B CN 104613869B CN 201510043349 A CN201510043349 A CN 201510043349A CN 104613869 B CN104613869 B CN 104613869B
Authority
CN
China
Prior art keywords
circle
ellipse
oval
image
elliptical aperture
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
CN201510043349.8A
Other languages
Chinese (zh)
Other versions
CN104613869A (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.)
Nanjing University of Information Science and Technology
Original Assignee
Nanjing University of Information Science and Technology
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 Nanjing University of Information Science and Technology filed Critical Nanjing University of Information Science and Technology
Priority to CN201510043349.8A priority Critical patent/CN104613869B/en
Publication of CN104613869A publication Critical patent/CN104613869A/en
Application granted granted Critical
Publication of CN104613869B publication Critical patent/CN104613869B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method and a system for detecting an elliptical hole group based on a maximum inscribed circle; the method comprises the steps: acquiring image information of a workpeice, performing image pretreatment to the acquired image information, blocking the image information according to the distribution of elliptical holes on the image information and solving the maximum inscribed circle of the elliptical holes in each block of images; calculating the length of a minor semi-axis, the length of a major semi-axis and an inclined angle of the elliptical holes according to the maximum inscribed circle; comparing the length of the minor semi-axis, the length of the major semi-axis and the inclined angle of the elliptical holes with the size of a standard elliptical hole and judging whether the elliptical hole group on the workpiece is qualified. The method of detecting the elliptical hole group combines with a machine vision technology and an elliptical maximum inscribed circle algorithm and overcomes the disadvantages of high cost, large time consumption and low precision in the traditional detection method for the hole group.

Description

A kind of elliptical aperture group detection method and system based on maximum inscribed circle
Technical field
The invention belongs to workpiece sensing technical field, a kind of more particularly to elliptical aperture group based on maximum inscribed circle is detected Method and system.
Background technology
In mechanical part processing, it is an indispensable ring that the dimensions of the part to producing carries out detection Section.Traditional detection method has receiver ga(u)ge measurement and three coordinate machine detection.But, receiver ga(u)ge measurement inspection is to measured hole group Actual size and shape measurement sensitivity it is not high.Three coordinate machine detection has higher technical requirements to operating personnel, and It is relatively costly.With the continuous improvement of scientific and technological level, machine vision technique is progressively applied to the on-line monitoring of workpiece.For ellipse The machine vision of circular Curve is processed, and researcher is constantly explored in terms of various, by using oval symmetry, string The technologies such as the geometric propertieses such as midpoint, gradient information, random Hough transformation and method, effectively reduce from different perspectives oval inspection The space-time consumption of survey.But ellipse is detected using geometric properties and gradient information, its accuracy of detection is easily made an uproar by image background The interference of sound, and random Hough transformation there is also invalid accumulation that parameter space is caused because of the randomness of sampled point etc. no Foot.
The content of the invention
In order to solve the technical problem that above-mentioned background technology is proposed, the present invention is intended to provide a kind of based on maximum inscribed circle Elliptical aperture group detection method and system, overcome that conventional holes group detection method high cost, time loss be big, the low shortcoming of precision.
In order to realize above-mentioned technical purpose, the technical scheme is that:
A kind of elliptical aperture group detection method based on maximum inscribed circle, comprises the following steps:
(1) workpiece image information is gathered;
(2) image information to gathering carries out Image semantic classification;
(3) piecemeal is carried out to image information according to the oval pore size distribution in image information, there is 1 ellipse on every block of image Hole;
(4) semi-minor axis length, major semiaxis length and the inclination of elliptical aperture in every block of image are gone out using maximum inscribed circle Algorithm for Solving Angle;
(5) the semi-minor axis length of elliptical aperture, major semiaxis length and inclination angle and standard ellipse hole size are contrasted, is judged work Whether the elliptical aperture group on part is qualified.
Wherein, be followed successively by image denoising, to image the step of Image semantic classification described in step (2) carry out binaryzation and Rim detection is carried out to image.
Wherein, the rim detection is Canny rim detections.
Wherein, the particular content of step (4) is as follows:
A () calculates oval m bar horizontal scanning lines, and by i-th horizontal scanning line and oval intersection point ai1、ai2Count collection Close S, i=1,2 ..., m;
B () calculates all in S set | ai1ai2| midpoint ai, horizontal sweep dotted line is obtained by least square fitting, And horizontal sweep dotted line is obtained with oval intersection point A1、A2, calculate line segment | A1A2| midpoint M1
C () solves the vertical scanning dotted line of ellipse and the intersection point institute line of ellipse according to step (a), the method for (b) The midpoint M of section2, with | M1M2| midpoint O1For the center of circle, | M1M2| take round C for diameter1
D () obtained point O1Horizontal linear with ellipse intersection point P1、P2, with O1For the center of circle, max | O1P1|, | O1P2| be Radius makees circle C2
If e () justifies C2There are 4 intersection points with ellipse, P is designated as successively3、P4、P5、P6, or circle C2There are 3 intersection points with ellipse, i.e., P3With P4Overlap or P5With P6Overlap, then with arc lengthWithFor scope, circle C is calculated1Each interior point is in the range of being somebody's turn to do Oval boundary point minimum range dmin, and charge to set H;If circle C2During with oval only one of which or two intersection points, then calculate Circle C1Minimum range d of each the interior point to oval all boundary pointsmin, and charge to set H;
F () obtains the max { d in set Hmin, and max { dminCorresponding C1Interior point O;
(g) centered on O, max { dminIt is radius, make circle and hand over ellipse in N1、N22 points, this circle is oval most imperial palace The circle of contact, | ON1| as oval semi-minor axis is long, and the tiltangleθ and ellipse short shaft place straight line of ellipse are tried to achieve respectively
H () is in line segment | N1N2| above take point Kj, j=1,2 ..., n, will | N1N2| n+1 parts are divided into, K is crossedjMake | N1N2| hang down Line hands over oval and Dj1, Dj2, calculate dj=| Dj1Dj2|/2, by { Kj, djCount set Q;
I () is to the element { K in set Qj, djLeast square fitting is utilized, try to achieve { Kj, djRespective function maximum dmax, i.e., oval major semiaxis is long.
Present invention additionally comprises the detecting system based on above-mentioned elliptical aperture group detection method, including work stage, light-emitting component, take the photograph Light source is radiated at work by camera, image pick-up card, data processing module, memory, console and alarm, the light-emitting component On part platform, video camera shoots the image of workpiece in work stage, and sends workpiece image to data processing by image pick-up card Module, data processing module calculates the sized data of elliptical aperture group on workpiece using maximum inscribed circle algorithm, and the data are protected Deposit in memory, while transmit the data to console, console is by the elliptical aperture packet size for calculating and gauge little progress Row is contrasted, and according to comparison the action of alarm equipment alarm and work stage is driven.
The beneficial effect brought using above-mentioned technical proposal:
Elliptical aperture group detection method of the present invention using machine vision technique in combination with oval maximum inscribed circle algorithm, can With the size for accurately determining elliptical aperture group in a short period of time.Detect relative to traditional elliptical aperture group, with time-consuming short, essence The advantages of spending high, can be efficiently applied to the Aulomatizeted Detect of elliptical aperture group workpiece.
Description of the drawings
Fig. 1 is the flow chart of detection method.
Fig. 2~Fig. 6 is each step schematic diagram that elliptical aperture maximum inscribed circle is obtained in detection method.
Fig. 7 is the structural representation of detecting system of the present invention.
Specific embodiment
Below with reference to accompanying drawing, technical scheme is described in detail.
The flow chart of detection method as shown in Figure 1, a kind of elliptical aperture group detection method based on maximum inscribed circle, Comprise the following steps:
(1) workpiece image information is gathered.
(2) image information to gathering carries out Image semantic classification.Due to there is noise in image sampling process, this is right The late detection precision of part image and it is time-consuming on can all cause certain error.So, in the image sample of device to hole group workpiece Before carrying out relative dimensions measurement, noise is first farthest reduced.To reduce noise, using median filtering method and morphology Opening operation removes the method that Small object method combines.Secondly, rim detection is made to the image after denoising, is calculated using Canny detections Son.
(3) piecemeal is carried out to image information according to the oval pore size distribution in image information, there is 1 ellipse on every block of image Hole.
(4) maximum inscribed circle of elliptical aperture in every block of image is gone out using maximum inscribed circle Algorithm for Solving, and according to most imperial palace The circle of contact calculates semi-minor axis length, major semiaxis length and the inclination angle of elliptical aperture.It is comprised the following steps that:
A () calculates oval m bar horizontal scanning lines, and by i-th horizontal scanning line and oval intersection point ai1、ai2Count collection Close S, i=1,2 ..., m;
B () calculates all in S set | ai1ai2| midpoint ai, horizontal sweep dotted line is obtained by least square fitting, And horizontal sweep dotted line is obtained with oval intersection point A1、A2, calculate line segment | A1A2| midpoint M1, as shown in Figure 2;
C () solves the vertical scanning dotted line of ellipse and the intersection points B of ellipse according to step (a), the method for (b)1、B2Institute The midpoint M of line section2, as shown in Figure 3;Then with | M1M2| midpoint O1For the center of circle, | M1M2| take round C for diameter1
D () obtained point O1Horizontal linear with ellipse intersection point P1、P2, with O1For the center of circle, max | O1P1|, | O1P2| be Radius makees circle C2
If e () justifies C2There are 4 intersection points with ellipse, P is designated as successively3、P4、P5、P6, as shown in Figure 4;Or circle C2Have with ellipse 3 intersection points, i.e. P3With P4Overlap or P5With P6Overlap, then with arc lengthWith(work as P for scope3With P4Overlap or P5With P6During coincidence, corresponding arc length is 1 point), calculate circle C1Most narrow spacing of each the interior point to the oval boundary point in the range of this From dmin, and set H is charged to, as shown in Figure 5;If circle C2During with oval only one of which or two intersection points, then circle C is calculated1Interior is every Minimum range d of the individual point to oval all boundary pointsmin, and charge to set H;
F () obtains the max { d in set Hmin, and max { dminCorresponding C1Interior point O;
(g) centered on O, max { dminIt is radius, make circle and hand over ellipse in N1、N22 points, this circle is oval most imperial palace The circle of contact, | ON1| as oval semi-minor axis is long, and the tiltangleθ and ellipse short shaft place straight line of ellipse are tried to achieve respectivelyIf maximum Inscribed circle is N with the intersection point of ellipse1(x1,y1)、N2(x2,y2), then have:
H () is in line segment | N1N2| above take point Kj, j=1,2 ..., n, will | N1N2| n+1 parts are divided into, K is crossedjMake | N1N2| hang down Line hands over oval and Dj1, Dj2, calculate dj=| Dj1Dj2|/2, by { Kj, djSet Q is counted, as shown in Figure 6;
I () is to the element { K in set Qj, djLeast square fitting is utilized, try to achieve { Kj, djRespective function maximum dmax, i.e., oval major semiaxis is long.
(5) the semi-minor axis length of elliptical aperture, major semiaxis length and inclination angle and standard ellipse hole size are contrasted, is judged work Whether the elliptical aperture group on part is qualified.
The present invention also includes a kind of detecting system based on above-mentioned elliptical aperture group detection method, including work stage, luminous unit Part, video camera, image pick-up card, data processing module, memory, console and alarm, as shown in Figure 7.The detecting system Workflow:Workpiece for measurement is placed in work stage, the illumination that light-emitting component sends is mapped on workpiece for measurement, clapped by video camera The image of elliptical aperture ancestral on workpiece for measurement is taken the photograph, and Jing image pick-up cards send image to data processing module, data processing mould Block tries to achieve elliptical aperture packet size on the workpiece using aforementioned maximum inscribed circle algorithm, and sends the sized data to console, Console pre-sets standard size and error threshold, and the elliptical aperture packet size of measurement is compared with standard size, if both Error is more than error threshold, illustrates that the workpiece is unqualified, and console just drives alarm equipment alarm, and controls work stage by work to be measured Part is moved in substandard product.
Above example technological thought only to illustrate the invention, it is impossible to which protection scope of the present invention is limited with this, it is every According to technological thought proposed by the present invention, any change done on the basis of technical scheme, the scope of the present invention is each fallen within Within.

Claims (3)

1. a kind of elliptical aperture group detection method based on maximum inscribed circle, it is characterised in that comprise the following steps:
(1) workpiece image information is gathered;
(2) image information to gathering carries out Image semantic classification;
(3) piecemeal is carried out to image information according to the oval pore size distribution in image information, there is 1 elliptical aperture on every block of image;
(4) semi-minor axis length, major semiaxis length and the inclination angle of elliptical aperture in every block of image are gone out using maximum inscribed circle Algorithm for Solving;Tool Hold in vivo as follows:
A () calculates oval m bar horizontal scanning lines, and by i-th horizontal scanning line and oval intersection point ai1、ai2Count set S, i =1,2 ..., m;
B () calculates all in S set | ai1ai2| midpoint ai, horizontal sweep dotted line is obtained by least square fitting, and ask Go out the intersection point A of horizontal sweep dotted line and ellipse1、A2, calculate line segment | A1A2| midpoint M1
C () solves the vertical scanning dotted line and the intersection point institute line section of ellipse of ellipse according to step (a), the method for (b) Midpoint M2, with | M1M2| midpoint O1For the center of circle, | M1M2| take round C for diameter1
D () obtained point O1Horizontal linear with ellipse intersection point P1、P2, with O1For the center of circle, max | O1P1|, | O1P2| it is radius Make circle C2
If e () justifies C2There are 4 intersection points with ellipse, P is designated as successively3、P4、P5、P6, or circle C2There are 3 intersection points, i.e. P with ellipse3With P4Overlap or P5With P6Overlap, then with arc lengthWithFor scope, circle C is calculated1Each interior point arrives ellipse in the range of this Minimum range d of circle boundary pointmin, and charge to set H;If circle C2During with oval only one of which or two intersection points, then circle C is calculated1 Minimum range d of each the interior point to oval all boundary pointsmin, and charge to set H;
F () obtains the max { d in set Hmin, and max { dminCorresponding C1Interior point O;
(g) centered on O, max { dminIt is radius, make circle and hand over ellipse in N1、N22 points, this circle is oval maximum inscribe Circle, | ON1| as oval semi-minor axis is long, and the tiltangleθ and ellipse short shaft place straight line of ellipse are tried to achieve respectively
H () is in line segment | N1N2| above take point Kj, j=1,2 ..., n, will | N1N2| n+1 parts are divided into, K is crossedjMake | N1N2| vertical line hand over Oval and Dj1, Dj2, calculate dj=| Dj1Dj2|/2, by { Kj, djCount set Q;
I () is to the element { K in set Qj, djLeast square fitting is utilized, try to achieve { Kj, djRespective function maximum dmax, i.e., It is long for oval major semiaxis;
(5) the semi-minor axis length of elliptical aperture, major semiaxis length and inclination angle and standard ellipse hole size are contrasted, is judged on workpiece Elliptical aperture group it is whether qualified.
2. a kind of elliptical aperture group detection method based on maximum inscribed circle according to claim 1, it is characterised in that:Step (2) being followed successively by the step of Image semantic classification described in image denoising, to image carries out binaryzation and carries out edge inspection to image Survey.
3. a kind of elliptical aperture group detection method based on maximum inscribed circle according to claim 2, it is characterised in that:The side Edge is detected as Canny rim detections.
CN201510043349.8A 2015-01-28 2015-01-28 Method and system for detecting elliptical hole group based on maximum inscribed circle Active CN104613869B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510043349.8A CN104613869B (en) 2015-01-28 2015-01-28 Method and system for detecting elliptical hole group based on maximum inscribed circle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510043349.8A CN104613869B (en) 2015-01-28 2015-01-28 Method and system for detecting elliptical hole group based on maximum inscribed circle

Publications (2)

Publication Number Publication Date
CN104613869A CN104613869A (en) 2015-05-13
CN104613869B true CN104613869B (en) 2017-05-10

Family

ID=53148430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510043349.8A Active CN104613869B (en) 2015-01-28 2015-01-28 Method and system for detecting elliptical hole group based on maximum inscribed circle

Country Status (1)

Country Link
CN (1) CN104613869B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105279756B (en) * 2015-10-19 2018-06-12 天津理工大学 Notch circular arc accessory size visible detection method based on adaptive region segmentation
CN106875832A (en) * 2015-12-10 2017-06-20 北京航天长峰科技工业集团有限公司 The polymerization of identifier and depolymerization method in a kind of situation
CN106679564B (en) * 2016-12-15 2019-08-02 哈尔滨飞机工业集团有限责任公司 A kind of measurement method of slotted hole
CN107454314B (en) * 2017-07-05 2020-06-02 深圳市捷高软件信息有限公司 Image cutting method of single-lens 360-degree panoramic camera
CN107967471A (en) * 2017-09-20 2018-04-27 北京工业大学 A kind of table tool automatic identifying method based on machine vision
CN109741314A (en) * 2018-12-29 2019-05-10 广州博通信息技术有限公司 A kind of visible detection method and system of part
CN111664772B (en) * 2020-05-29 2021-07-02 大冶特殊钢有限公司 Method for rapidly measuring roll hole type long half shaft of three-roll reducing mill

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102445456A (en) * 2011-10-09 2012-05-09 河海大学常州校区 Device and method for nondestructively detecting egg quality based on DSP (Dynamic Signal Processing) machine vision
CN102607410A (en) * 2012-03-01 2012-07-25 上海大学 Method for detecting position and attitude of micro cylindrical cavity target by using target collimating sensor
CN103033126A (en) * 2011-09-29 2013-04-10 鸿富锦精密工业(深圳)有限公司 Annular object location method and system
CN103063159A (en) * 2012-12-31 2013-04-24 南京信息工程大学 Part size measurement method based on charge coupled device (CCD)
CN103925878A (en) * 2014-04-11 2014-07-16 南京信息工程大学 Hole set detection method and system based on Hough round convolution transformation algorithm

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0629697B2 (en) * 1989-08-04 1994-04-20 理研電子株式会社 Small hole position detector
JP3593885B2 (en) * 1998-06-01 2004-11-24 富士ゼロックス株式会社 Image analysis apparatus and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103033126A (en) * 2011-09-29 2013-04-10 鸿富锦精密工业(深圳)有限公司 Annular object location method and system
CN102445456A (en) * 2011-10-09 2012-05-09 河海大学常州校区 Device and method for nondestructively detecting egg quality based on DSP (Dynamic Signal Processing) machine vision
CN102607410A (en) * 2012-03-01 2012-07-25 上海大学 Method for detecting position and attitude of micro cylindrical cavity target by using target collimating sensor
CN103063159A (en) * 2012-12-31 2013-04-24 南京信息工程大学 Part size measurement method based on charge coupled device (CCD)
CN103925878A (en) * 2014-04-11 2014-07-16 南京信息工程大学 Hole set detection method and system based on Hough round convolution transformation algorithm

Also Published As

Publication number Publication date
CN104613869A (en) 2015-05-13

Similar Documents

Publication Publication Date Title
CN104613869B (en) Method and system for detecting elliptical hole group based on maximum inscribed circle
CN110163853B (en) Edge defect detection method
CN109670441B (en) Method, system, terminal and computer readable storage medium for realizing wearing recognition of safety helmet
CN104504388B (en) A kind of pavement crack identification and feature extraction algorithm and system
CN110146516B (en) Fruit grading device based on orthogonal binocular machine vision
CN106290394B (en) System and method for detecting aluminum extrusion molding defects of CPU radiator
CN104537651B (en) Proportion detecting method and system for cracks in road surface image
CN106018422B (en) Based on matched special-shaped stamping parts profile defects vision detection system and method
CN113375566B (en) Accurate measurement method and system for object size
CN104315977B (en) Rubber stopper quality detection device and detection method
CN108230307B (en) Corn broken grain detection method based on contour centroid distance and neural network
CN104197836A (en) Vehicle lock assembly size detection method based on machine vision
CN106896110A (en) Product quality detection means and method based on monocular camera machine vision
CN210071686U (en) Fruit grading plant based on orthogonal binocular machine vision
CN106529551B (en) Intelligent recognition counting detection method for round-like objects in packaging industry
CN106248680A (en) A kind of engine commutator quality detecting system based on machine vision and detection method
CN105334228A (en) Bottled liquid impurity and liquid level detection method based on image processing
CN110807354B (en) Industrial assembly line product counting method
CN101726265A (en) Online detection method of parallelism of spring by machine vision system
CN105973903B (en) A kind of Oral liquid bottle lid detection method
CN107403444A (en) Identifying system
WO2023134251A1 (en) Clustering-based light bar extraction method and apparatus
CN113834814B (en) Glove surface defect detection device
CN109406534A (en) A kind of medicine bottle bottom pull ring defect detecting device and method
CN103453840A (en) Automatic detection method for lock core precision of cylinder lock

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20191129

Address after: 221300 No.22, Fumin Road, Pizhou high tech Industrial Development Zone, Xuzhou City, Jiangsu Province (in Pizhou high tech Zone New Energy Technology Research Institute Co., Ltd.)

Patentee after: Jiangsu Xinda environmental remote sensing Big Data Application Research Institute Co., Ltd

Address before: 210044 Nanjing City, Pukou Province, Nanjing Road, No. 219, No. six, No.

Patentee before: Nanjing University of Information Science and Technology

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201120

Address after: 210044 No. 219 Ningliu Road, Jiangbei New District, Nanjing City, Jiangsu Province

Patentee after: NANJING University OF INFORMATION SCIENCE & TECHNOLOGY

Address before: 221300 No.22, Fumin Road, Pizhou high tech Industrial Development Zone, Xuzhou City, Jiangsu Province (in Pizhou high tech Zone New Energy Technology Research Institute Co., Ltd.)

Patentee before: Jiangsu Xinda environmental remote sensing Big Data Application Research Institute Co.,Ltd.