CN109559294A - A kind of detection method and device of drop circular hole quality - Google Patents

A kind of detection method and device of drop circular hole quality Download PDF

Info

Publication number
CN109559294A
CN109559294A CN201710881015.7A CN201710881015A CN109559294A CN 109559294 A CN109559294 A CN 109559294A CN 201710881015 A CN201710881015 A CN 201710881015A CN 109559294 A CN109559294 A CN 109559294A
Authority
CN
China
Prior art keywords
circle
unit
image
ideal
gray value
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
Application number
CN201710881015.7A
Other languages
Chinese (zh)
Other versions
CN109559294B (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.)
Luster LightTech Co Ltd
Original Assignee
Luster LightTech Co Ltd
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 Luster LightTech Co Ltd filed Critical Luster LightTech Co Ltd
Priority to CN201710881015.7A priority Critical patent/CN109559294B/en
Publication of CN109559294A publication Critical patent/CN109559294A/en
Application granted granted Critical
Publication of CN109559294B publication Critical patent/CN109559294B/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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • 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
    • 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/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

This application discloses a kind of detection method and device of drop circular hole quality, comprising: obtains the gray value of unit image, the gray value of the unit image includes gray value in sum of the grayscale values background hole outside prospect hole;If the unit gray value of image changes, the center of circle and the radius of drop circular hole are sought;According to the center of circle of the drop circular hole and radius, unit ideal image is generated;According to the unit ideal image and the unit image, defect point area and defect point contrast are calculated;If the defect point area and the defect point contrast are greater than preset value, instruction is scrapped in sending.Method provided by the present application can effectively solve the problem that the low problem of the detection method Detection accuracy of existing drop circular hole quality.

Description

A kind of detection method and device of drop circular hole quality
Technical field
This application involves drop production field more particularly to a kind of detection method and device of drop circular hole quality.
Background technique
In order to enable customer understand the basic condition of commodity, for example, price, manufacturer, material, shelf-life etc., in general, producer It can illustrate the basic condition of commodity by hanging drop in commodity outer packing.The blank space of drop is equipped with circular hole, to wear Line is hung in commodity outer packing.As shown in Figure 1, the substandard products type of drop circular hole, drop circular hole is opened after drop printing It takes, it is easy to perhaps open to take with the character deviation printed on drop and enable on drop information incomplete on character or influence to hang The beauty of board;Alternatively, be easy to causeing and hanging since production drop circular hole is the mode that the drop stacked to multiple while opening takes circular hole Board Circularhole diameter is different, and does not meet the problem of aperture requires.There is likely to be porous dehiscences, dirty or circular hole surrounding for drop circular hole The problems such as waste cleaning is incomplete.Substandard products drop with the above problem comes into the market, and can cause not to the public praise of Brand Good impression influences the experience sense of client, so before drop formally hangs use, it is necessary to detect to the quality of drop circular hole.
Existing drop circular hole quality successively observes whether drop circular hole trains off or drop circular hole whether there is by human eye Porous dehiscence, it is dirty the problems such as.But drop generallys use batch and punches, substantial amounts, and bore size is smaller or prints a piece Biggish drop is difficult to cause the detection efficiency of drop circular hole quality low with eye recognition drop circular hole.In order to improve detection Quality and detection efficiency, usually once method detects drop circular hole quality, and the drop finished first to punching is swept It retouches and takes pictures, obtain the image of drop circular hole, then determine the center of circle and the radius of the image of drop circular hole;According to the figure of drop circular hole The center of circle of the image in the center of circle and punching template circular hole of picture, two kinds of framing to same positions are compared, and analyze circular hole Radius, circular hole positional shift, circular hole surrounding situation etc..For example, as shown in Fig. 2 (1), by the outer profile of drop and punching mould The outer profile of plate is corresponding, compares the center of circle in the center of circle of the image of drop circular hole and the image of punching template circular hole, obtains two The deviation in the center of circle;Or as shown in Fig. 2 (2), by the center of circle in the center of circle of the image of drop circular hole and the image of punching template circular hole It is corresponding, then compare radius and waste of circular of two circular holes etc., prior art can be examined by two kinds Survey method determines drop substandard products.
The applicant encounters some problems when using existing detection method, for example, being hung according to obtained by the above method The image of board circular hole is generally hatched, causes through the center of circle positioning of circular hole come the method inaccuracy of test hole situation.It can See, the Detection accuracy of the detection method of existing drop circular hole quality is low.
Summary of the invention
This application provides a kind of detection method and device of drop circular hole quality, to solve existing drop circular hole quality Detection method, the low problem of Detection accuracy.
In a first aspect, this application provides a kind of detection methods of drop circular hole quality, this method comprises:
The gray value of unit image is obtained, the gray value of the unit image includes outside prospect hole in sum of the grayscale values background hole Gray value;
If the gray value of the unit image changes, the center of circle and the radius of drop circular hole are sought;
According to the center of circle of the drop circular hole and radius, unit ideal image is generated;
According to the unit ideal image and the unit image, defect point area and defect point contrast are calculated;
If the defect point area and the defect point contrast are greater than preset value, instruction is scrapped in sending.
Optionally, the center of circle and the radius of drop circular hole are sought as steps described below:
Unit image described in binaryzation, to obtain binary image;
Closed operation processing is carried out to the binary image, to obtain filling image;
Contour extraction processing is carried out to the filling image, to obtain contour images;
The marginal point for obtaining the contour images is fitted circle according to the marginal point, to obtain the first fitting circle;
The center of circle for obtaining first fitting circle, according to the center of circle of first fitting circle, label and first fitting Marginal point of the round circle center distance in distance threshold is quadratic fit point;
It is fitted circle according to quadratic fit point, to obtain the second fitting circle;
Determine the center of circle and radius of the center of circle and the radius of second fitting circle for drop circular hole.
Optionally, the detection method further include:
Obtain the circular hole center of circle of template image;
Calculate the range difference in the center of circle of the drop circular hole and the circular hole center of circle of the template image;
If the range difference is less than or equal to pre-determined distance threshold value, unit ideal image is generated.
Optionally, the detection method further include:
Obtain the circle hole radius of template image;
Calculate the length difference of the radius of the drop circular hole and the circle hole radius of the template image;
If the length difference is less than or equal to pre-set length threshold, unit ideal image is generated.
Optionally, unit ideal image is generated according to following step:
According to the gray value of the unit image, dividing the unit image is to have intermediate zone semicircle orifice, without intermediate zone half Circular hole has intermediate zone half bore periphery and without intermediate zone half bore periphery;
It is described to have in intermediate zone semicircle orifice, it determines in the range for being greater than first threshold with the circle center distance of the drop circular hole It is interior, and it is the first ideal zone that gray value, which is greater than the region of gray value in the background hole,;
It is described to have in intermediate zone semicircle orifice, it determines and is being less than or equal to first threshold with the circle center distance of the drop circular hole In the range of, and it is secondary ideal region that gray value, which is equal to the region of gray value in the background hole,;
In the no intermediate zone semicircle orifice, determine in the range for being greater than first threshold with the circle center distance of the drop circular hole It is interior, and it is third ideal zone that gray value, which is greater than the region of gray value in the background hole,;
In the no intermediate zone semicircle orifice, determines and be less than or equal to first threshold with the circle center distance of the drop circular hole In the range of, and it is the 4th ideal zone that gray value, which is equal to the region of gray value in the background hole,;
It is described to have in intermediate zone half bore periphery, it determines and is being less than or equal to the second threshold with the circle center distance of the drop circular hole In the range of value, and it is the 5th ideal zone that gray value, which is less than the region of gray value outside the prospect hole,;
It is described to have in intermediate zone half bore periphery, it determines in the model for being greater than second threshold with the circle center distance of the drop circular hole In enclosing, and it is the 6th ideal zone that gray value, which is equal to the region of gray value outside the prospect hole,;
In the no intermediate zone half bore periphery, determines and be less than or equal to the second threshold with the circle center distance of the drop circular hole In the range of value, and it is the 7th ideal zone that gray value, which is less than the region of gray value outside the prospect hole,;
In the no intermediate zone half bore periphery, determine in the model for being greater than second threshold with the circle center distance of the drop circular hole In enclosing, and it is the 8th ideal zone that gray value, which is equal to the region of gray value outside the prospect hole,;
Obtain first ideal zone, the secondary ideal region, the third ideal zone, the 4th ideal area Domain, the 5th ideal zone, the 6th ideal zone, the 7th ideal zone and the 8th ideal zone figure Picture, and it is integrated into unit ideal image.
Second aspect, this application provides a kind of detection device of drop circular hole quality, which includes:
Gray value acquiring unit, for obtaining the gray value of unit image, the gray value of the unit image includes prospect Gray value in sum of the grayscale values background hole outside hole;
Unit is sought, if the gray value for the unit image changes, seeks the center of circle and half of drop circular hole Diameter;
Image generation unit, for according to the drop circular hole the center of circle and radius, generate unit ideal image;
Defect point computing unit, for calculating defect point area according to the unit ideal image and the unit image With defect point contrast;
Instruction issue unit is scrapped, if being greater than preset value for the defect point area and the defect point contrast, It then issues and scraps instruction.
Optionally, further include that the center of circle and the radius of drop circular hole and are sought with lower unit as steps described below:
Binarization unit, for unit image described in binaryzation, to obtain binary image;
Closed operation unit, for carrying out closed operation processing to the binary image, to obtain filling image;
Contours extract unit, for carrying out contour extraction processing to the filling image, to obtain contour images;
Fitting unit, for obtaining the marginal point of the contour images, be fitted according to the marginal point it is round, to obtain the One fitting circle;
Match point marking unit, for obtaining the center of circle of first fitting circle, according to the center of circle of first fitting circle, Marginal point of the circle center distance of label and first fitting circle in distance threshold is quadratic fit point;
The fitting unit is also used to be fitted circle according to quadratic fit point, to obtain the second fitting circle;
The center of circle and radius determination unit, for determining the center of circle and the radius of second fitting circle for the center of circle of drop circular hole And radius.
Optionally, the detection device further include:
Template circular hole center of circle acquiring unit, for obtaining the circular hole center of circle of template image;
Distance of center circle deviation computing unit, for calculating the center of circle of the drop circular hole and the circular hole center of circle of the template image Range difference;
Described image generation unit generates unit if being less than or equal to pre-determined distance threshold value for the range difference Ideal image.
Optionally, the detection device further include:
Template circle hole radius acquiring unit, for obtaining the circle hole radius of template image;
Radius length difference computing unit, for calculating the radius of the drop circular hole and the circle hole radius of the template image Length difference;
Described image generation unit generates unit if being less than or equal to pre-set length threshold for the length difference Ideal image.
Optionally, further include with lower unit, and according to following step generate unit ideal image:
Division unit, for the gray value according to the unit image, dividing the unit image is to have intermediate zone semicircle Hole, without intermediate zone semicircle orifice, have intermediate zone half bore periphery and without intermediate zone half bore periphery;
First ideal zone determination unit has in intermediate zone semicircle orifice for described, determine with the drop circular hole Circle center distance is greater than in the range of first threshold, and it is the first ideal area that gray value, which is greater than the region of gray value in the background hole, Domain;
Secondary ideal area determination unit has in intermediate zone semicircle orifice for described, determine with the drop circular hole Circle center distance is less than or equal in the range of first threshold, and it is second that gray value, which is equal to the region of gray value in the background hole, Ideal zone;
Third ideal zone determination unit, in the no intermediate zone semicircle orifice, determine with the drop circular hole Circle center distance is greater than in the range of first threshold, and it is third ideal area that gray value, which is greater than the region of gray value in the background hole, Domain;
4th ideal zone determination unit, in the no intermediate zone semicircle orifice, determine with the drop circular hole Circle center distance is less than or equal in the range of first threshold, and it is the 4th that gray value, which is equal to the region of gray value in the background hole, Ideal zone;
5th ideal zone determination unit has in intermediate zone half bore periphery for described, determine with the drop circular hole Circle center distance be less than or equal in the range of second threshold, and it is that gray value, which is less than the region of the outer gray value in the prospect hole, Five ideal zones;
6th ideal zone determination unit has in intermediate zone half bore periphery for described, determine with the drop circular hole Circle center distance be greater than in the range of second threshold, and it is the 6th ideal that gray value, which is equal to the region of the outer gray value in the prospect hole, Region;
7th ideal zone determination unit, in the no intermediate zone half bore periphery, determine with the drop circular hole Circle center distance be less than or equal in the range of second threshold, and it is that gray value, which is less than the region of the outer gray value in the prospect hole, Seven ideal zones;
8th ideal zone determination unit, in the no intermediate zone half bore periphery, determine with the drop circular hole Circle center distance be greater than in the range of second threshold, and it is the 8th ideal that gray value, which is equal to the region of the outer gray value in the prospect hole, Region;
Image integration unit, for obtaining first ideal zone, the secondary ideal region, the third ideal area Domain, the 4th ideal zone, the 5th ideal zone, the 6th ideal zone, the 7th ideal zone and described The image of 8th ideal zone, and it is integrated into unit ideal image.
By the above technology it is found that this application provides a kind of detection method and device of drop circular hole quality, unit is obtained The gray value of image, the gray value of the unit image include gray value in sum of the grayscale values background hole outside prospect hole;Described in judgement The gray value of unit image with the presence or absence of variation, by simple gray-value variation can quickly judge drop whether aperture at Function.If the gray value of the unit image changes, illustrate drop aperture success, seeks the center of circle and half of drop circular hole at this time Diameter;According to the center of circle of the drop circular hole and radius, unit ideal image is generated;According to the unit ideal image and the list Bit image calculates defect point area and defect point contrast;If the defect point area and the defect point contrast are greater than Preset value illustrates that drop circular hole there are biggish mass defect, be can not ignore, and issues scrap instruction at this time.The application passes through inspection Survey the gray-value variation of drop circular hole and with the unit ideal image of the shadow-free intermediate zone of generation and the unit figure that in real time generates The gray value of picture compares, to accurately check drop circular hole quality.
Detailed description of the invention
In order to illustrate more clearly of the technical solution of the application, letter will be made to attached drawing needed in the embodiment below Singly introduce, it should be apparent that, for those of ordinary skills, without any creative labor, It is also possible to obtain other drawings based on these drawings.
Fig. 1 is the substandard products type schematic diagram of drop circular hole provided by the embodiments of the present application;
Fig. 2 (1) is a kind of existing drop circular hole error correction method schematic diagram provided by the present application;
Fig. 2 (2) is the existing drop circular hole error correction method schematic diagram of another kind provided by the present application;
Fig. 3 is a kind of detection method flow chart of drop circular hole quality provided by the embodiments of the present application;
Fig. 4 is the flow chart of a kind of center of circle for seeking drop circular hole provided by the embodiments of the present application and radius;
Fig. 5 is a kind of flow chart of test hole offset provided by the embodiments of the present application;
Fig. 6 is a kind of flow chart for detecting aperture radius provided by the embodiments of the present application;
Fig. 7 is a kind of flow chart for generating unit ideal image provided by the embodiments of the present application;
Fig. 8 is a kind of structure diagram of detection device of drop circular hole quality provided by the embodiments of the present application;
Fig. 9 is the structure drawing of device of a kind of center of circle for seeking drop circular hole provided by the embodiments of the present application and radius;
Figure 10 is a kind of structure drawing of device for generating unit ideal image provided by the embodiments of the present application.
It illustrates:
Wherein: 1- gray value acquiring unit, 2- seek unit, 21- binarization unit, 22- closed operation unit, 23- profile Extraction unit, 24- fitting unit, 25- match point marking unit, the center of circle 26- and radius determination unit, 3- image generation unit, 301- division unit, 302- the first ideal zone determination unit, 303- secondary ideal area determination unit, 304- third ideal area Domain determination unit, the 4th ideal zone determination unit of 305-, the 5th ideal zone determination unit of 306-, the 6th ideal zone of 307- Determination unit, the 7th ideal zone determination unit of 308-, the 8th ideal zone determination unit of 309-, 310- image integration unit, 4- defect point computing unit, 5- scrap instruction issue unit, 6- template circular hole center of circle acquiring unit, and 7- distance of center circle deviation calculates single Member, 8- template circle hole radius acquiring unit, 9- radius length difference computing unit.
Specific embodiment
Fig. 3 is a kind of detection method flow chart of drop circular hole quality provided by the present application.
Present embodiments provide a kind of detection method of drop circular hole quality, comprising:
S100, the gray value for obtaining unit image, the gray value of the unit image include sum of the grayscale values back outside prospect hole Gray value in scape hole.
Staff is scanned shooting to drop using photographing devices such as line-scan digital cameras first, obtains the overall diagram of drop Picture, and the color for the drop image shot and brightness are analyzed by computer, it is especially desirable to pay attention to word on drop The gray value for according with region, forbids in character region, and away from character region certain distance range open interior, from And mark off permission opening area.
Drop can generate the subtle protrusion of small bending and circular, will lead to drop in drill process Product generates certain tilt angle when horizontal positioned, with platform.And during being shot using line-scan digital camera, due to Line-scan digital camera belongs to dynamic and shoots, and the shooting resolution ratio on transverse and longitudinal direction is different, will cause the error of imaging.It is horizontal by analysis Longitudinal resolution ratio, does affine transformation to drop circular hole image, to obtain the high figure of the identical validity of transverse and longitudinal resolution ratio Picture, to improve detection accuracy.
According to certain size, being divided on each drop and obtain unit area, the unit area can be entire drop, Or the part drop comprising circular hole, the corresponding image obtained of unit area are known as unit image.For example, entire drop is in The rectangle of 20mm × 40mm, on the symmetry axis of drop length direction, the position apart from drop one end 3mm is provided with radius and is 3mm circular hole.According to above-mentioned condition, the unit area can be entire 20mm × 40mm rectangular region, can also for The part rectangular region of the 3mm circular hole.
Since the color of each point on unit image and brightness are different, different degrees of ash can be presented in the image shot Color, is the entity part on drop in addition to circular hole outside prospect hole, in the circular hole hole of drop in background hole, i.e., after drop stripping Hollow parts, in drop hole, outside hole since one be entity one is air part, the color of the two and brightness are inevitable not Together;And prospect hole is outside upper is printed on character, and character and the color of drop blank space and brightness are inevitable different.By obtaining unit figure The gray value of picture, the grey value profile inside and outside the circular hole for analyzing unit image that can be clear and accurate, to judge that drop is No aperture success, and whether in the permission opening area aperture.
If the gray value of S200, the unit image change, the center of circle and the radius of drop circular hole are sought.
If there are biggish differences with gray value in background hole for gray value outside prospect hole, i.e., the contrast outside in hole and hole Clearly, i.e. the gray value of unit image changes, and illustrates drop aperture success, needs further to detect opening for drop circular hole at this time If position, the problems such as whether circle hole radius and stripping are qualified.If the difference of gray value and gray value in background hole outside prospect hole Unintelligible, explanation may fail for drop aperture;It may be not thorough for stripping after aperture, the corresponding entity part of circular hole is not clear Reason.
For example, calculating gray value and gray value in background hole outside prospect hole after the gray value of acquisition unit image Difference, the difference is compared with preset gray scale difference value threshold value, gray scale difference value threshold value people according to the actual situation For setting.If the difference is greater than or equal to the gray scale difference value threshold value, illustrate outside prospect hole in gray value and background hole The resolution of gray value is sufficiently high, and the gray value of unit image changes, and change it is significant enough, drop aperture and stripping at Function.If the difference is less than the gray scale difference value threshold value, illustrate point of gray value and gray value in background hole outside prospect hole Degree of distinguishing is not high enough, and the gray value of unit image is unchanged, and drop aperture failure or stripping are unqualified.
Meanwhile by obtaining gray value outside prospect hole, the gray value of character on drop can be obtained, according to the gray scale of character Gray value in value and background hole, both analyses, which whether there is, to intersect, and whether the distance of both generations gray-value variation is less than The safe distance of preset character zone.Intersect if the gray value of gray value and character exists outside prospect hole, illustrates Drop mistake aperture is in character zone;If the distance of gray-value variation is less than the peace of preset character zone outside prospect hole Full distance illustrates that drop position of opening is excessively close apart from character zone, influences client's sense organ, and when in use, is easily destroyed and hangs The character zone of board.
If drop aperture success, the center of circle and half of drop circular hole can be sought by the method for analyzing the gray value Diameter marks off the dramatically different region of gray value, to distinguish drop and drop circular hole region, finds drop circular hole region, It determines that the equidistant point of drop bore edges be the center of circle, is radius from the center of circle to the distance of drop bore edges.
S300, the center of circle according to the drop circular hole and radius generate unit ideal image.
When shooting drop image due to line-scan digital camera, belong to dynamic screening-mode, when circular hole is imaged, camera and it is non-perpendicular to Lower shooting;And drop, in aperture, there is shearing protrusion in circular hole surrounding, influencing drop itself, there are fluctuations, enable drop It can not be bonded completely with horizontal plane, so that there are certain angles.By shooting speed and shooting angle collective effect, circle after shooting is enabled Hole image is oval, and the circular of the upper semi-circle of drop circular hole is there are the shade intermediate zone of black, and the circle of lower half circle There is no shade intermediate zone around hole.So simple compares the unit image of whole drop with template image, due to yin The influence of shadow intermediate zone and deformation can not accurately detect the aperture quality of drop circular hole.It needs through comparison drop circular hole and week The gray value of shade transition band part is enclosed, to distinguish drop circular hole and shade intermediate zone, and marks off relatively accurate discharge The drop circular hole portion of shade intermediate zone, i.e. unit ideal image.
S400, according to the unit ideal image and the unit image, calculate defect point area and defect point contrast.
The unit ideal image and unit image that are integrally formed are compared and analyzed, unit of account ideal image and unit The error image of image carries out Blob analysis to the connected region of same pixel in error image, passes through analysis error image Grey value profile, so that the part that unit ideal image and unit image can not be completely coincident is found, what this can not be completely coincident Part is defect point.It is analyzed according to Blob as a result, obtaining the area and contrast of defect point.
If S500, the defect point area and the defect point contrast are greater than preset value, instruction is scrapped in sending.
According to drop area, the conditions such as character zone on drop set a preset value, as whether judging defect point Continue available standard.In defect point area comprising shade intermediate zone area and really due to damage generate defect point face Product, when the area of defect point is greater than preset value, the area for illustrating that unit ideal image can not be overlapped with unit image is excessive, example Such as, when punching caused by drop bending it is excessive, to enable shade intermediate zone excessive, be reacted in result just as defect point area mistake Greatly;Or aperture is excessive, aperture is too small;Or circular tearing it is damaged area it is excessive etc..If defect point area is excessive, It is then issued by system control and scraps instruction, such as entity indicia is carried out to waste product drop, or directly record waste product in computer The place station of drop perhaps produces serial number etc. and is again automatically rejected waste product drop by artificial or machine.
Fig. 4 is the flow chart of a kind of center of circle for seeking drop circular hole provided by the embodiments of the present application and radius.
Unit image described in S201, binaryzation, to obtain binary image.
In Digital Image Processing, in order to highlight the circular hole profile in unit image, need unit image carrying out two-value Change processing, that is, entire unit image is showed into apparent black and white effect.Gray value in unit image is greater than or is waited It is judged to belonging to certain objects in the pixel of pre-set gray threshold, it is corresponding, drop circular hole is determined as certain objects, Gray value outside prospect hole is indicated that gray value is indicated with 0 in background hole with 255, in this way for unit image, image Set property it is only related with the position of point that pixel value is 0 or 255, not in the multilevel values for being related to pixel, enable image procossing Become simpler, and data processing and decrement reduce, to improve image processing efficiency.
S202, closed operation processing is carried out to the binary image, to obtain filling image.
The binary image obtained after binary conversion treatment is first expanded, then carrying out the process of corrosion treatment is binaryzation The closed operation of image is handled.Expansion process is carried out to binary image first, is all background dots that will be contacted with certain objects It being incorporated into the certain objects, the boundary of certain objects is enabled to expand to outside, the certain objects that can be will be switched off are connected, from And fill up the cavity in object.Binary image after expansion process is subjected to corrosion treatment, the side of certain objects can be eliminated Boundary's point, enables the boundary of certain objects internally shrink, small to eliminate certain objects, that is, other than drop circular hole and is not intended to The object of justice, for example, small dirty point etc..By closed operation, treated that binary image can not only fill inside certain objects Minuscule hole connects adjacent object, smooth boundary, and can not change the area of certain objects, and subsequent image is effectively ensured The accuracy of comparison.
S203, contour extraction processing is carried out to the filling image, to obtain contour images.
By closed operation treated filling image carry out contour extraction processing, will fill image internal point all eliminate after Remaining point is extracted, the profile point of image is as filled, is contour images by the image that the profile point forms.
S204, the marginal point for obtaining the contour images are fitted circle according to the marginal point, to obtain the first fitting Circle.
The marginal point of the contour images is determined according to the contour images of acquisition, and whole marginal points are passed through into minimum Square law is fitted, and obtains the first fitting circle.
S205, the center of circle for obtaining first fitting circle, according to the center of circle of first fitting circle, label and described first Marginal point of the circle center distance of fitting circle in distance threshold is quadratic fit point.
There is the pseudo-edge point that part is unable to satisfy fitting condition in the marginal point, for example, with the first fitting circle Circle center distance is more than or less than the point of pre-set distance threshold, these pseudo-edge points can generate the process of fitting circle dry It disturbs, enables the fitting circle of generation deviate normal position, there are deviations to enable testing result.It is discharged after pseudo-edge, it will be remaining The marginal point with the circle center distance of the first fitting circle in distance threshold be marked, be used as quadratic fit.
S206, circle is fitted according to quadratic fit point, to obtain the second fitting circle.
It according to the quadratic fit of label point, is fitted again, obtains the second fitting circle, second fitting circle can change The fitted figure that the kind interference due to pseudo- match point generates drag partially, deformation the problems such as, to effectively improve the accuracy of detection.
S207, the center of circle for determining second fitting circle and radius are the center of circle and the radius of drop circular hole.
Computer can obtain the center of circle and the radius of second fitting circle, so that it is determined that hanging according to the second fitting circle The center of circle of board circular hole and radius are prepared to be subsequently generated ideal image.
Fig. 5 is a kind of flow chart of test hole offset provided by the embodiments of the present application.
S601, the circular hole center of circle for obtaining template image.
When punching for drop, the punching template of a reference is needed, which can be metal plate of the entity with circular hole, wood Plate or hard plastic board etc., or computer virtual template simulates suitable template by computer software, and manipulation is mechanical The machines such as shearing or laser cutting carry out aperture to drop.According to existing template image, the circle of template image can be obtained The hole center of circle, and subsequent comparison work is carried out according to the circular hole center of circle.
The range difference in the circular hole center of circle of S602, the center of circle for calculating the drop circular hole and the template image.
Drop circular hole is compared with the circular hole of template image, can choose the outer profile of drop and Prototype drawing first The outer profile of picture is overlapped, and will be overlapped perspective image scanning or shooting, is uploaded in computer, then measures the circle of drop circular hole The variation of the distance between circular hole center of circle of the heart and template image difference and angle;Also can choose first by the outer profile of drop with The outer profile of template image is overlapped, and coordinate system is then established on drop, and label obtains the central coordinate of circle and mould of drop circular hole The circular hole central coordinate of circle of plate image calculates the range difference in two centers of circle by following formula (1),
In formula, d is expressed as the range difference in two centers of circle, x1It is expressed as the abscissa in the drop center of circle, y1It is expressed as the drop center of circle Ordinate, x2It is expressed as the center of circle abscissa of template image, y2It is expressed as the center of circle ordinate of template image.
If S603, the range difference are less than or equal to pre-determined distance threshold value, unit ideal image is generated.
The artificial preset distance of conditions such as the area size for allowing to punch according to the size of drop and visual appearance Threshold value will measure or calculate resulting distance of center circle deviation and is compared with distance threshold.If distance of center circle deviation is greater than setting Distance threshold, illustrate the opened circular hole of drop compared with the circular hole position of template, deviate it is excessive.The reason of causing this problem may It is that drop position of opening allows other than opening area in drop, for example, aperture influences user's use, give user in character zone Cause bad experience sense;It may be position of opening too close to drop edge, be easy that drop circular hole is enabled to tear, lose drop Effect;Be also possible to be that drop circular hole stripping itself is not thorough enough, cause the positioning of the circular hole center of circle inaccurate, show circle center distance deviation compared with Big phenomenon.At this point, computer, which needs to send, scraps instruction, after staff, which receives, scraps instruction, screens and mark The underproof drop of circle center distance deviation, then according to the reason of causing circle center distance deviation, classification handles drop.
If range difference is less than or equal to pre-determined distance threshold value, illustrate that the position of opening of drop circular hole meets regulation, It does not influence the normal use of user not only, but also meets public Visual Aesthetics, and drop is not easy to damage in tapping.This When, according to the center of circle of drop circular hole and radius, can continue to acquire unit ideal image.
Method provided by the embodiments of the present application, can be by comparing the center of circle of drop circular hole and the circular hole circle of template image The heart quickly and accurately finds out circle center distance deviation drop substandard products against regulation, thus scrapped, in case it flows into city , user's usability and corporate image are impacted.
Fig. 6 is a kind of flow chart for detecting aperture radius provided by the embodiments of the present application.
S701, the circle hole radius for obtaining template image.
According to existing template image, the circular hole center of circle of template image can be obtained, and according to circular hole center of circle measurement or The circle hole radius of template image is calculated, carries out subsequent comparison work.
The length difference of the circle hole radius of S702, the radius for calculating the drop circular hole and the template image.
Drop circular hole is compared with the circular hole of template image, can choose the drop circular hole center of circle and Prototype drawing first The circular hole center of circle of picture coincides, and will be overlapped perspective image scanning or shooting, is uploaded in computer, then measures drop circular hole Length difference between radius and the circle hole radius of template image;Also it can choose and drop circle hole radius data be all uploaded to meter It in calculation machine, is compared one by one with the circle hole radius of template image, (2) calculate drop circle hole radius and template according to the following formula respectively The length difference of circle hole radius,
C=| s1-s2| (2),
In formula, c is expressed as the length difference of radius, s1It is expressed as drop circle hole radius, s2It is expressed as the circular hole half of template image Diameter.
If S703, the length difference are less than or equal to pre-set length threshold, unit ideal image is generated.
According to the size of drop, the conditions such as the area size punched and visual appearance is allowed artificially to preset length Threshold value.The length difference is absolute value, if the length difference of the circle hole radius of drop circle hole radius and template image is greater than length Threshold value, explanation may be that drop aperture compared with the circular hole of template image is too small or aperture is excessive;It may be drop circular hole portion It distinguishes and gives up not enough thoroughly, lead to have residual at circular hole, so that the resulting drop circle hole radius of measurement be enabled to become smaller;It is also possible to be to hanging When board circular hole portion stripping, excessive tearing is caused to circular hole, so that the resulting drop circle hole radius of measurement be enabled to become larger.At this point, meter Calculation machine, which needs to send, scraps instruction, after staff, which receives, scraps instruction, screens and to mark radius length underproof Drop, then according to the reason of causing radial misalignment, classification handles drop.
If the length difference of the circle hole radius of drop circle hole radius and template image is less than or equal to length threshold, explanation is hung Board aperture radius is suitble to, will not be excessively close apart from drop edge because aperture is excessive, causes drop tearable;It will not be because of opening Hole is too small, causes drop threading difficult.At this point it is possible to can continue to acquire unit reason according to the center of circle of drop circular hole and radius Think image.
Method provided by the embodiments of the present application, can be by comparing the radius of drop circular hole and the circular hole half of template image Diameter quickly and accurately finds out radius drop substandard products against regulation, thus scrapped, in case it comes into the market, to user Usability and corporate image impact.
Fig. 7 is a kind of flow chart for generating unit ideal image provided by the embodiments of the present application.
S301, according to the gray value of the unit image, dividing the unit image is to have intermediate zone semicircle orifice, without transition Band semicircle orifice has intermediate zone half bore periphery and without intermediate zone half bore periphery.
Due to dynamic shooting and the factor of drop placed angle, the circular in shooting gained unit image is enabled to exist Shade intermediate zone, and usually can be according to the position where shade intermediate zone, circular hole, which is divided into, has intermediate zone semicircle orifice, without transition Band semicircle orifice, and corresponding with the two have intermediate zone half bore periphery, without intermediate zone half bore periphery.
S302, it is described have in intermediate zone semicircle orifice, determine with the circle center distance of the drop circular hole be greater than first threshold In the range of, and it is the first ideal zone that gray value, which is greater than the region of gray value in the background hole,.
S303, it is described have in intermediate zone semicircle orifice, determine and be less than or equal to the with the circle center distance of the drop circular hole In the range of one threshold value, and it is secondary ideal region that gray value, which is equal to the region of gray value in the background hole,.
In S304, the no intermediate zone semicircle orifice, determines and be greater than first threshold with the circle center distance of the drop circular hole In the range of, and it is third ideal zone that gray value, which is greater than the region of gray value in the background hole,.
In S305, the no intermediate zone semicircle orifice, determines and be less than or equal to the with the circle center distance of the drop circular hole In the range of one threshold value, and it is the 4th ideal zone that gray value, which is equal to the region of gray value in the background hole,.
S306, it is described have in intermediate zone half bore periphery, determination be less than or equal in the circle center distance with the drop circular hole In the range of second threshold, and it is the 5th ideal zone that gray value, which is less than the region of gray value outside the prospect hole,.
S307, it is described have in intermediate zone half bore periphery, determine with the circle center distance of the drop circular hole be greater than the second threshold In the range of value, and it is the 6th ideal zone that gray value, which is equal to the region of gray value outside the prospect hole,.
In S308, the no intermediate zone half bore periphery, determination is less than or equal in the circle center distance with the drop circular hole In the range of second threshold, and it is the 7th ideal zone that gray value, which is less than the region of gray value outside the prospect hole,.
In S309, the no intermediate zone half bore periphery, determines and be greater than the second threshold with the circle center distance of the drop circular hole In the range of value, and it is the 8th ideal zone that gray value, which is equal to the region of gray value outside the prospect hole,.
For example, if drop circle hole radius is R, first threshold 0.8R is having transition in the circular hole of unit image In band semicircle orifice, with circular hole center of circle distance d1In the range of 0.8R, i.e., in 0.8R < d1In the range of < R, by gray value Zone marker greater than gray value in background hole is the first ideal zone, corresponding, in no intermediate zone semicircle orifice, marks the Three ideal zones;With circular hole center of circle distance d2In the range of 0.8R, i.e., in 0 < d2It, will in the range of≤0.8R Gray value is secondary ideal region equal or close to the zone marker in gray value in background hole, corresponding, in no intermediate zone In semicircle orifice, the 4th ideal zone is marked;Second threshold is being set as 1.1R, is being had in intermediate zone half bore periphery, with circular hole circle The distance d of the heart3In the range of 1.1R, i.e., in R < d3In the range of≤1.1R, gray value is less than outside prospect hole The zone marker of gray value is the 5th ideal zone, corresponding, in no intermediate zone half bore periphery, marks the 7th ideal area Domain;Having in intermediate zone half bore periphery, with circular hole center of circle distance d4In the range of 1.1R, i.e., in d4The range of > 1.1R It is interior, by gray value be greater than or close to gray value outside prospect hole zone marker be the 6th ideal zone, it is corresponding, in no intermediate zone In half bore periphery, the 8th ideal zone is marked.
S310, first ideal zone, the secondary ideal region, the third ideal zone, the described 4th are obtained Ideal zone, the 5th ideal zone, the 6th ideal zone, the 7th ideal zone and the 8th ideal zone Image, and be integrated into unit ideal image.
Resulting each ideal zone will be marked to integrate, obtain unit ideal image.
The method provided in this embodiment for generating unit ideal image, by the way that using shade intermediate zone as condition, drop is justified It is divided into two parts inside and outside hole, and marks respective ideal zone respectively, to finally be integrated into unit ideal image.Can have Effect excludes influence of the shade intermediate zone to detection accuracy, to improve the accuracy to drop circular hole quality testing.
Fig. 8 is a kind of structure diagram of detection device of drop circular hole quality provided by the embodiments of the present application.
As shown in figure 8, corresponding with the detection method of drop circular hole quality provided by the present application, present invention also provides one The detection device of kind drop circular hole quality, for executing detection method provided by the present application, comprising:
Gray value acquiring unit 1, for obtaining the gray value of unit image, the gray value of the unit image includes prospect Gray value in sum of the grayscale values background hole outside hole;
Unit 2 is sought, if the gray value for the unit image changes, seeks the center of circle and half of drop circular hole Diameter;
Image generation unit 3, for according to the drop circular hole the center of circle and radius, generate unit ideal image;
Defect point computing unit 4, for calculating defect point area according to the unit ideal image and the unit image With defect point contrast;
Instruction issue unit 5 is scrapped, if being greater than preset value for the defect point area and the defect point contrast, It then issues and scraps instruction.
Fig. 9 is the structure drawing of device of a kind of center of circle for seeking drop circular hole provided by the embodiments of the present application and radius.
As shown in figure 9, the device of a kind of center of circle for seeking drop circular hole provided in this embodiment and radius, comprising:
Binarization unit 21, for unit image described in binaryzation, to obtain binary image;
Closed operation unit 22, for carrying out closed operation processing to the binary image, to obtain filling image;
Contours extract unit 23, for carrying out contour extraction processing to the filling image, to obtain contour images;
Fitting unit 24 is fitted circle according to the marginal point for obtaining the marginal point of the contour images, to obtain First fitting circle;
Match point marking unit 25, for obtaining the center of circle of first fitting circle, according to the circle of first fitting circle Marginal point of the circle center distance of the heart, label and first fitting circle in distance threshold is quadratic fit point;
The fitting unit 24 is also used to be fitted circle according to quadratic fit point, to obtain the second fitting circle;
The center of circle and radius determination unit 26, for determining the center of circle and the radius of second fitting circle for the circle of drop circular hole The heart and radius.
As shown in figure 8, a kind of detection device of drop circular hole quality provided in this embodiment, further includes:
Template circular hole center of circle acquiring unit 6, for obtaining the circular hole center of circle of template image;
Distance of center circle deviation computing unit 7, for calculating the center of circle of the drop circular hole and the circular hole circle of the template image The range difference of the heart;
Described image generation unit 3 generates unit if being less than or equal to pre-determined distance threshold value for the range difference Ideal image.
Further, the detection device further include:
Template circle hole radius acquiring unit 8, for obtaining the circle hole radius of template image;
Radius length difference computing unit 9, for calculating the radius of the drop circular hole and the circular hole half of the template image The length difference of diameter;
Described image generation unit 3 generates unit if being less than or equal to pre-set length threshold for the length difference Ideal image.
Figure 10 is a kind of structure drawing of device for generating unit ideal image provided by the embodiments of the present application.
As shown in Figure 10, a kind of device generating unit ideal image provided by the present application, further includes with lower unit, and root Unit ideal image is generated according to following step:
Division unit 301, for the gray value according to the unit image, dividing the unit image is to have intermediate zone half Circular hole, without intermediate zone semicircle orifice, have intermediate zone half bore periphery and without intermediate zone half bore periphery;
First ideal zone determination unit 302 has in intermediate zone semicircle orifice for described, determine with the drop circular hole Circle center distance be greater than in the range of first threshold, and it is first ideal that gray value, which is greater than the region of gray value in the background hole, Region;
Secondary ideal area determination unit 303 has in intermediate zone semicircle orifice for described, determine with the drop circular hole Circle center distance be less than or equal in the range of first threshold, and it is that gray value, which is equal to the region of gray value in the background hole, Two ideal zones;
Third ideal zone determination unit 304, in the no intermediate zone semicircle orifice, determine with the drop circular hole Circle center distance be greater than in the range of first threshold, and it is that third is ideal that gray value, which is greater than the region of gray value in the background hole, Region;
4th ideal zone determination unit 305, in the no intermediate zone semicircle orifice, determine with the drop circular hole Circle center distance be less than or equal in the range of first threshold, and it is that gray value, which is equal to the region of gray value in the background hole, Four ideal zones;
5th ideal zone determination unit 306 has in intermediate zone half bore periphery for described, determines round with the drop The circle center distance in hole is less than or equal in the range of second threshold, and gray value is less than the region of gray value outside the prospect hole 5th ideal zone;
6th ideal zone determination unit 307 has in intermediate zone half bore periphery for described, determines round with the drop The circle center distance in hole is greater than in the range of second threshold, and it is the 6th reason that gray value, which is equal to the region of gray value outside the prospect hole, Think region;
7th ideal zone determination unit 308, in the no intermediate zone half bore periphery, determining round with the drop The circle center distance in hole is less than or equal in the range of second threshold, and gray value is less than the region of gray value outside the prospect hole 7th ideal zone;
8th ideal zone determination unit 309, in the no intermediate zone half bore periphery, determining round with the drop The circle center distance in hole is greater than in the range of second threshold, and it is the 8th reason that gray value, which is equal to the region of gray value outside the prospect hole, Think region;
Image integration unit 310, for obtaining first ideal zone, the secondary ideal region, third reason Think region, the 4th ideal zone, the 5th ideal zone, the 6th ideal zone, the 7th ideal zone and The image of 8th ideal zone, and it is integrated into unit ideal image.

Claims (10)

1. a kind of detection method of drop circular hole quality characterized by comprising
The gray value of unit image is obtained, the gray value of the unit image includes gray scale in sum of the grayscale values background hole outside prospect hole Value;
If the gray value of the unit image changes, the center of circle and the radius of drop circular hole are sought;
According to the center of circle of the drop circular hole and radius, unit ideal image is generated;
According to the unit ideal image and the unit image, defect point area and defect point contrast are calculated;
If the defect point area and the defect point contrast are greater than preset value, instruction is scrapped in sending.
2. detection method according to claim 1, which is characterized in that seek as steps described below drop circular hole the center of circle and Radius:
Unit image described in binaryzation, to obtain binary image;
Closed operation processing is carried out to the binary image, to obtain filling image;
Contour extraction processing is carried out to the filling image, to obtain contour images;
The marginal point for obtaining the contour images is fitted circle according to the marginal point, to obtain the first fitting circle;
The center of circle for obtaining first fitting circle, according to the center of circle of first fitting circle, label and first fitting circle Marginal point of the circle center distance in distance threshold is quadratic fit point;
It is fitted circle according to quadratic fit point, to obtain the second fitting circle;
Determine the center of circle and radius of the center of circle and the radius of second fitting circle for drop circular hole.
3. detection method according to claim 1, which is characterized in that the detection method further include:
Obtain the circular hole center of circle of template image;
Calculate the range difference in the center of circle of the drop circular hole and the circular hole center of circle of the template image;
If the range difference is less than or equal to pre-determined distance threshold value, unit ideal image is generated.
4. detection method according to claim 3, which is characterized in that the detection method further include:
Obtain the circle hole radius of template image;
Calculate the length difference of the radius of the drop circular hole and the circle hole radius of the template image;
If the length difference is less than or equal to pre-set length threshold, unit ideal image is generated.
5. detection method according to claim 1, which is characterized in that generate unit ideal image according to following step:
According to the gray value of the unit image, divide the unit image be have intermediate zone semicircle orifice, without intermediate zone semicircle orifice, There is intermediate zone half bore periphery and without intermediate zone half bore periphery;
It is described to have in intermediate zone semicircle orifice, it determines in the range of being greater than first threshold with the circle center distance of the drop circular hole, And it is the first ideal zone that gray value, which is greater than the region of gray value in the background hole,;
It is described to have in intermediate zone semicircle orifice, it determines in the model for being less than or equal to first threshold with the circle center distance of the drop circular hole In enclosing, and it is secondary ideal region that gray value, which is equal to the region of gray value in the background hole,;
In the no intermediate zone semicircle orifice, determine in the range of being greater than first threshold with the circle center distance of the drop circular hole, And it is third ideal zone that gray value, which is greater than the region of gray value in the background hole,;
In the no intermediate zone semicircle orifice, determine in the model for being less than or equal to first threshold with the circle center distance of the drop circular hole In enclosing, and it is the 4th ideal zone that gray value, which is equal to the region of gray value in the background hole,;
It is described to have in intermediate zone half bore periphery, it determines and is being less than or equal to second threshold with the circle center distance of the drop circular hole In range, and it is the 5th ideal zone that gray value, which is less than the region of gray value outside the prospect hole,;
It is described to have in intermediate zone half bore periphery, it determines in the range for being greater than second threshold with the circle center distance of the drop circular hole It is interior, and it is the 6th ideal zone that gray value, which is equal to the region of gray value outside the prospect hole,;
In the no intermediate zone half bore periphery, determines and be less than or equal to second threshold with the circle center distance of the drop circular hole In range, and it is the 7th ideal zone that gray value, which is less than the region of gray value outside the prospect hole,;
In the no intermediate zone half bore periphery, determine in the range for being greater than second threshold with the circle center distance of the drop circular hole It is interior, and it is the 8th ideal zone that gray value, which is equal to the region of gray value outside the prospect hole,;
Obtain first ideal zone, the secondary ideal region, the third ideal zone, the 4th ideal zone, The image of 5th ideal zone, the 6th ideal zone, the 7th ideal zone and the 8th ideal zone, and It is integrated into unit ideal image.
6. a kind of detection device of drop circular hole quality characterized by comprising
Gray value acquiring unit, for obtaining the gray value of unit image, the gray value of the unit image includes outside prospect hole Gray value in sum of the grayscale values background hole;
Unit is sought, if the gray value for the unit image changes, seeks the center of circle and the radius of drop circular hole;
Image generation unit, for according to the drop circular hole the center of circle and radius, generate unit ideal image;
Defect point computing unit, for calculating defect point area and lacking according to the unit ideal image and the unit image Trapping spot contrast;
Instruction issue unit is scrapped, if being greater than preset value for the defect point area and the defect point contrast, is sent out Instruction is scrapped out.
7. detection device according to claim 6, which is characterized in that further include and being asked as steps described below with lower unit Take the center of circle and the radius of drop circular hole:
Binarization unit, for unit image described in binaryzation, to obtain binary image;
Closed operation unit, for carrying out closed operation processing to the binary image, to obtain filling image;
Contours extract unit, for carrying out contour extraction processing to the filling image, to obtain contour images;
Fitting unit is fitted circle according to the marginal point for obtaining the marginal point of the contour images, quasi- to obtain first Close circle;
Match point marking unit, for obtaining the center of circle of first fitting circle, according to the center of circle of first fitting circle, label It is quadratic fit point with the marginal point of the circle center distance of first fitting circle in distance threshold;
The fitting unit is also used to be fitted circle according to quadratic fit point, to obtain the second fitting circle;
The center of circle and radius determination unit, for determining the center of circle and the radius of second fitting circle for the center of circle of drop circular hole and half Diameter.
8. detection device according to claim 6, which is characterized in that the detection device further include:
Template circular hole center of circle acquiring unit, for obtaining the circular hole center of circle of template image;
Distance of center circle deviation computing unit, for calculate the center of circle of the drop circular hole and the circular hole center of circle of the template image away from Deviation;
Described image generation unit generates unit ideal if being less than or equal to pre-determined distance threshold value for the range difference Image.
9. detection device according to claim 8, which is characterized in that the detection device further include:
Template circle hole radius acquiring unit, for obtaining the circle hole radius of template image;
Radius length difference computing unit, for calculating the length of the radius of the drop circular hole and the circle hole radius of the template image It is poor to spend;
Described image generation unit generates unit ideal if being less than or equal to pre-set length threshold for the length difference Image.
10. detection device according to claim 6, which is characterized in that further include with lower unit, and it is raw according to following step At unit ideal image:
Division unit, for the gray value according to the unit image, dividing the unit image is to have intermediate zone semicircle orifice, nothing Intermediate zone semicircle orifice has intermediate zone half bore periphery and without intermediate zone half bore periphery;
First ideal zone determination unit has in intermediate zone semicircle orifice for described, determines in the center of circle with the drop circular hole Distance is greater than in the range of first threshold, and it is the first ideal zone that gray value, which is greater than the region of gray value in the background hole,;
Secondary ideal area determination unit has in intermediate zone semicircle orifice for described, determines in the center of circle with the drop circular hole Distance is less than or equal in the range of first threshold, and it is secondary ideal that gray value, which is equal to the region of gray value in the background hole, Region;
Third ideal zone determination unit, for determining in the center of circle with the drop circular hole in the no intermediate zone semicircle orifice Distance is greater than in the range of first threshold, and it is third ideal zone that gray value, which is greater than the region of gray value in the background hole,;
4th ideal zone determination unit, for determining in the center of circle with the drop circular hole in the no intermediate zone semicircle orifice Distance is less than or equal in the range of first threshold, and it is the 4th ideal that gray value, which is equal to the region of gray value in the background hole, Region;
5th ideal zone determination unit has in intermediate zone half bore periphery for described, determines in the circle with the drop circular hole Heart distance is less than or equal in the range of second threshold, and it is the 5th reason that gray value, which is less than the region of gray value outside the prospect hole, Think region;
6th ideal zone determination unit has in intermediate zone half bore periphery for described, determines in the circle with the drop circular hole Heart distance is greater than in the range of second threshold, and it is the 6th ideal area that gray value, which is equal to the region of gray value outside the prospect hole, Domain;
7th ideal zone determination unit, for determining in the circle with the drop circular hole in the no intermediate zone half bore periphery Heart distance is less than or equal in the range of second threshold, and it is the 7th reason that gray value, which is less than the region of gray value outside the prospect hole, Think region;
8th ideal zone determination unit, for determining in the circle with the drop circular hole in the no intermediate zone half bore periphery Heart distance is greater than in the range of second threshold, and it is the 8th ideal area that gray value, which is equal to the region of gray value outside the prospect hole, Domain;
Image integration unit, for obtain first ideal zone, the secondary ideal region, the third ideal zone, 4th ideal zone, the 5th ideal zone, the 6th ideal zone, the 7th ideal zone and the described 8th The image of ideal zone, and it is integrated into unit ideal image.
CN201710881015.7A 2017-09-26 2017-09-26 Method and device for detecting quality of circular hole of drop Active CN109559294B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710881015.7A CN109559294B (en) 2017-09-26 2017-09-26 Method and device for detecting quality of circular hole of drop

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710881015.7A CN109559294B (en) 2017-09-26 2017-09-26 Method and device for detecting quality of circular hole of drop

Publications (2)

Publication Number Publication Date
CN109559294A true CN109559294A (en) 2019-04-02
CN109559294B CN109559294B (en) 2021-01-26

Family

ID=65862719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710881015.7A Active CN109559294B (en) 2017-09-26 2017-09-26 Method and device for detecting quality of circular hole of drop

Country Status (1)

Country Link
CN (1) CN109559294B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114024106A (en) * 2021-11-03 2022-02-08 合肥国轩高科动力能源有限公司 Hole aligning method and system for liquid injection hole of cylindrical battery

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101201893A (en) * 2006-09-30 2008-06-18 电子科技大学中山学院 Iris recognizing preprocessing method based on grey level information
CN102184878A (en) * 2011-04-01 2011-09-14 无锡睿当科技有限公司 System and method for feeding back image quality of template for wafer alignment
CN104764712A (en) * 2015-04-29 2015-07-08 浙江工业大学 Method for detecting quality of inner wall of via hole of PCB
CN105043254A (en) * 2015-06-24 2015-11-11 东华大学 Method and device for automatically detecting clothes label print quality
CN105303565A (en) * 2015-09-30 2016-02-03 广州超音速自动化科技股份有限公司 Product appearance LOGO detection method
CN105787939A (en) * 2016-02-26 2016-07-20 南京理工大学 Rapid positioning detection method for PCB circular hole
US20160292503A1 (en) * 2015-03-31 2016-10-06 Brother Kogyo Kabushiki Kaisha Computer-readable storage medium storing image processing program, image processing device, and image processing method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101201893A (en) * 2006-09-30 2008-06-18 电子科技大学中山学院 Iris recognizing preprocessing method based on grey level information
CN102184878A (en) * 2011-04-01 2011-09-14 无锡睿当科技有限公司 System and method for feeding back image quality of template for wafer alignment
US20160292503A1 (en) * 2015-03-31 2016-10-06 Brother Kogyo Kabushiki Kaisha Computer-readable storage medium storing image processing program, image processing device, and image processing method
CN104764712A (en) * 2015-04-29 2015-07-08 浙江工业大学 Method for detecting quality of inner wall of via hole of PCB
CN105043254A (en) * 2015-06-24 2015-11-11 东华大学 Method and device for automatically detecting clothes label print quality
CN105303565A (en) * 2015-09-30 2016-02-03 广州超音速自动化科技股份有限公司 Product appearance LOGO detection method
CN105787939A (en) * 2016-02-26 2016-07-20 南京理工大学 Rapid positioning detection method for PCB circular hole

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
TAO YU ET AL.: "Subpixel edge detection of inner hole for ceramic optical fiber ferrules", 《2016 15TH INTERNATIONAL CONFERENCE ON OPTICAL COMMUNICATIONS AND NETWORKS (ICOCN)》 *
周婷: "基于机器视觉的微小零部件质量检测方法及系统研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114024106A (en) * 2021-11-03 2022-02-08 合肥国轩高科动力能源有限公司 Hole aligning method and system for liquid injection hole of cylindrical battery
CN114024106B (en) * 2021-11-03 2024-03-12 合肥国轩高科动力能源有限公司 Method and system for aligning liquid injection holes of cylindrical battery

Also Published As

Publication number Publication date
CN109559294B (en) 2021-01-26

Similar Documents

Publication Publication Date Title
CN110570410B (en) Detection method for automatically identifying and detecting weld defects
CN110672617B (en) Method for detecting defects of silk-screen area of glass cover plate of smart phone based on machine vision
CN101799434B (en) Printing image defect detection method
CN104318225B (en) Detection method of license plate and device
TWI716923B (en) Car damage image generation method and device based on GAN network
CN109767418A (en) Examine Check device, data generating device, data creation method and storage medium
CN108985155A (en) Mouth model training method, mouth recognition methods, device, equipment and medium
CN106803244A (en) Defect identification method and system
CN104867225B (en) A kind of bank note towards recognition methods and device
CN103439348B (en) Remote controller key defect detection method based on difference image method
KR101759496B1 (en) System and Method for Classification of PCB fault and Type of Fault
JPH01502371A (en) license plate reader
CN104574418A (en) Pressure vessel weld defect identification method and device based on neural network
CN109918523B (en) Circuit board component detection method based on YOLO9000 algorithm
CN106340044A (en) Camera external parameter automatic calibration method and calibration device
CN109142383A (en) One kind being based on morphologic character defect inspection method and device
CN111368682B (en) Method and system for detecting and identifying station caption based on master RCNN
CN107194908A (en) Image processing apparatus and image processing method
CN104331693A (en) Symmetry detecting method and system of printing matter
CN115713476A (en) Visual detection method and device based on laser welding and readable storage medium
CN112967221A (en) Shield constructs section of jurisdiction production and assembles information management system
CN111783541A (en) Text recognition method and device
CN109559294A (en) A kind of detection method and device of drop circular hole quality
CN107833210A (en) A kind of appearance detecting method and system based on neutral net
CN106372593A (en) Optic disc area position method based on blood vessel convergence

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100094 Beijing city Haidian District Cui Hunan loop 13 Hospital No. 7 Building 7 room 701

Applicant after: Lingyunguang Technology Co.,Ltd.

Address before: 100094 Beijing city Haidian District Cui Hunan loop 13 Hospital No. 7 Building 7 room 701

Applicant before: Beijing lingyunguang Technology Group Co.,Ltd.

Address after: 100094 Beijing city Haidian District Cui Hunan loop 13 Hospital No. 7 Building 7 room 701

Applicant after: Beijing lingyunguang Technology Group Co.,Ltd.

Address before: 100094 Beijing city Haidian District Cui Hunan loop 13 Hospital No. 7 Building 7 room 701

Applicant before: LUSTER LIGHTTECH GROUP Co.,Ltd.

GR01 Patent grant
GR01 Patent grant