CN104502359A - Method for accurately detecting bottle blank and bottle opening defects - Google Patents
Method for accurately detecting bottle blank and bottle opening defects Download PDFInfo
- Publication number
- CN104502359A CN104502359A CN201410765297.0A CN201410765297A CN104502359A CN 104502359 A CN104502359 A CN 104502359A CN 201410765297 A CN201410765297 A CN 201410765297A CN 104502359 A CN104502359 A CN 104502359A
- Authority
- CN
- China
- Prior art keywords
- bottleneck
- arrow
- circle
- outline
- internal periphery
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
The invention provides a method for detecting bottle blank and bottle opening outline defects. The method comprises the following steps: developing a round positioning tool; acquiring an image comprising the bottle blank and bottle opening before automatic detection, and displaying the image on the screen; pulling the round positioning tool by utilizing a mouse, so that the bottle opening outline is positioned; pulling the round positioning tool by utilizing the mouse, so that the inner contour of the bottle opening is positioned; acquiring an image comprising the bottle blank and bottle opening during automatic detection; determining the outer contour and inner contour of the bottle blank and bottle opening for the input original drawing; and judging whether the bottle opening deforms or notches are formed in the inner and outer contours. A screen tool is utilized, and the defects such as the deformation of the bottle blank and the bottle opening and the notches existing in the inner and outer contours of the bottle opening can be rapidly and accurately detected.
Description
Art
The invention belongs to Digital Image Processing, relate to a kind of method detecting bottle base bottle mouth defect.
Background technology
Bottle base in process of production, because injection machine injection moulding is bad or bottle base bottleneck is collided with, extrudes, and bottle base bottleneck can be caused to be out of shape or the inside and outside contour of bottleneck exists breach.
Summary of the invention
The object of this invention is to provide a kind of detection method that can detect bottle base bottleneck whether existing defects rapidly and accurately.Technical scheme of the present invention is as follows:
A method for accurate detection bottle base bottle mouth defect, comprises the following steps:
(1) a round orientation tool is developed: this instrument is a screen display instrument, comprise a circle, circumferentially be uniformly distributed multiple rectangle, the arrow overlapped with the normal of circle is provided with at the center of each rectangle, the direction of arrow can set, the position of this instrument can change under the dragging of mouse, be circumferentially provided with one for the dragging at mouse under can change the icon of the size of corresponding circle; The number of rectangle can change, division more, and accuracy of detection is higher;
(2) before automatically detecting, first gather the image that a width comprises bottle base bottleneck, and on screen, show this image
(3) mouse drag circle orientation tool is utilized, move it the position of the bottle base bottleneck outline in image, the size changing circle makes it as far as possible identical with the size of bottle base bottleneck outline in image, make in arrow points circle, and determine suitable rectangle number, according to position and the size of determined round orientation tool, by 5 variable saves such as the home position of circle orientation tool, radius size, arrow number, arrow length and the directions of arrow in the array of outline location;
(4) mouse drag circle orientation tool is utilized, move it the position of the bottle base bottleneck Internal periphery in image, the size changing circle makes as far as possible identical with the size of bottle base bottleneck Internal periphery in image, makes outside arrow points circle, and determines suitable rectangle number; According to position and the size of determined round orientation tool, 5 variable saves such as the home position of circle orientation tool, radius size, arrow number, arrow length and the direction of arrow are saved in the array of Internal periphery location;
(5) when carrying out automatically detecting, under identical shooting condition and position, the image comprising bottle base bottleneck is gathered;
(6) to a former figure of input, outline contrast threshold is preset, by judging whether the contrast of bottleneck outline and background reaches outline contrast threshold, and determine the outline of bottle base bottleneck, method is as follows:
Take out 5 variablees of the outline location array of preserving in step (3), the pixel coordinate of all arrow positions in round orientation tool is calculated by these 5 variographs, when searching in the direction of the arrow from arrow top, when judging that the absolute value that current pixel value deducts a pixel is more than or equal to set outline contrast threshold, record the position of this pixel, think that this pixel is the point on bottleneck excircle configuration, continue the point on the excircle configuration of the next arrow position of search;
(7) these bottleneck outline point Hough transformation methods found are carried out matching, obtain central coordinate of circle and the radius of bottleneck outline;
(8) ask ultimate range and the minor increment in the outline point middle distance center of circle, obtain offset distance;
(9) if offset distance is greater than the threshold value of the deviation distance that outline is preset, then judge that bottleneck distortion or outline exist breach.
(10) to a former figure of input, Internal periphery contrast threshold is preset, by judging whether the contrast of bottleneck Internal periphery and background reaches Internal periphery contrast threshold, and determine the Internal periphery of bottle base bottleneck, method is as follows:
Take out 5 variablees of the Internal periphery location array of preserving in step (4), the pixel coordinate of all arrow positions in round orientation tool is calculated by these 5 variographs, when searching in the direction of the arrow from arrow top, when judging that the absolute value that current pixel value deducts a pixel is more than or equal to set Internal periphery contrast threshold, think that this pixel is the point on bottleneck Internal periphery, continue the point on the interior circle contour of the next arrow position of search;
(11) these bottleneck Internal periphery point Hough transformation methods found are carried out matching, obtain central coordinate of circle and the radius of bottleneck Internal periphery;
(12) ask ultimate range and the minor increment in the Internal periphery point middle distance center of circle, obtain offset distance;
(13) if offset distance is greater than the threshold value of the deviation distance that Internal periphery is preset, then judge that bottleneck distortion or Internal periphery exist breach.
(14) only have when bottleneck inside and outside contour not existing defects time, think that bottleneck is certified products, otherwise think bottleneck existing defects.
The present invention utilizes a screen instrument, can detect that the distortion of bottle base bottleneck and bottleneck inside and outside contour exist the defect of breach rapidly and accurately.
Accompanying drawing explanation
The former figure of Fig. 1 (bottleneck outline is jagged, and Internal periphery does not have breach);
Fig. 2 circle orientation tool;
Bottleneck outline position, Fig. 3 circle orientation tool location;
Bottleneck Internal periphery position, Fig. 4 circle orientation tool location;
Fig. 5 bottleneck outline testing result.
Fig. 6 bottleneck Internal periphery testing result.
Fig. 7 (a) be mouse is moved to round orientation tool circumference near time the cursor shape that becomes;
Fig. 7 (b) is the shape that mouse becomes when moving near the little square icon on the right side of round orientation tool circumference.
Embodiment
Fig. 1 is the former figure collected, and below in conjunction with drawings and Examples, the present invention will be described.
(1) a round orientation tool is developed, as shown in Figure 2.This instrument is by a circle, form at some arrows of circumferentially decile, and the position of the circle of this instrument and size can change arbitrarily; On circle, the length of equidistributed arrow and number also can change (, between 20-50 pixel, number scope is between 4-360 for length range); The direction of arrow also can be decided to point in circle circle or from circle by selection and point in circle.
(2) embodiment of inside and outside contour detecting bottleneck is identical, and just detected parameters arranges difference, below be mainly described to detect bottleneck outline.
(3) size of circle orientation tool is arranged to position as shown in Figure 3 and size, near circumference mouse being moved to round orientation tool, now, cursor becomes the shape as Fig. 7 (a), press left mouse button and drag the position of mobile circle orientation tool left to position shown in Fig. 3, at this moment, the position of circle, equidistributed rectangle on circle and arrow also changes simultaneously; Time near little square (this little foursquare icon is the icon that can change radius of circle under the towing of mouse) on the right side of circumference mouse being moved to round orientation tool, now, cursor becomes the shape as Fig. 7 (b), press left mouse button and drag the size (size of some rectangles on circle and arrow can not be changed) changing circle orientation tool left, as shown in Figure 3;
The size of arrow and rectangle, when position of bottleneck is constant, can not impact detection.But each position in the picture of bottleneck may different (may have about 40 pixels beat), what at this moment need the length of arrow and rectangle to arrange is larger, can ensure like this to search the point on bottleneck outline exactly.In this example, the length of arrow is set to 32 pixels.Rectangle on circle and the number of arrow more, testing result is more accurate, and detection time is also longer, in this example, is set to 70.After accomplishing the setting up, by the home position of circle orientation tool, 5 variable saves such as radius size, arrow number, arrow length and the direction of arrow.
(4) because bottle base bottleneck is transparent, the contrast of the image obtained is lower, want more difficult for good for target and background segregation ratio by binary map, so directly to former figure process, former figure as shown in Figure 1, by judging whether the contrast of bottleneck outline and background reaches certain certain value, determines the outline of bottle base bottleneck.
Take out 5 variablees preserved in step (2), calculated the pixel coordinate of all arrow positions in round orientation tool by these 5 variographs.If the direction of arrow of circle orientation tool be from point in circle is round in, when searching in the direction of the arrow from arrow top, when judging that the absolute value that current pixel value deducts the difference of a pixel value is more than or equal to set outline contrast threshold, record the position of this pixel, think that this pixel is the point on bottleneck excircle configuration.Continue the point on the excircle configuration of the next arrow position of search.
If the direction of arrow of circle orientation tool points to circle in circle, when searching in the direction of the arrow from arrow top, when judging that the absolute value that current pixel value deducts the difference of a pixel value is more than or equal to set outline contrast threshold, record the position of this pixel, think that this pixel is the point on bottleneck excircle configuration.Continue the point on the excircle configuration of the next arrow position of search.
The bottleneck excircle configuration point that on the right side of the always first search of circle orientation tool, the arrow of little square region is determined, then searches for the bottleneck excircle configuration point of whole circumferentially arrow region counterclockwise.
In this example, the contrast threshold of bottleneck outline and background is set to 48, when searching in the direction of the arrow from arrow top, when the absolute value that current pixel value deducts the difference of a pixel value is more than or equal to 48, think that this point is the point on bottleneck outline.Under continuation search a bit, until search for all point obtained on bottleneck excircle configuration, the position of cross mark as medium and small in Fig. 5.
(5) these point Hough transformation methods are carried out matching, obtain central coordinate of circle and the radius of bottleneck outline.As shown in Figure 5, wherein the position of the little square mark at bottleneck center is central coordinate of circle position, and radius is 174 pixels.
(6) ask ultimate range and the minor increment in the excircle configuration point middle distance center of circle, obtain offset distance.
Bottleneck occurs distortion or when there is breach, the pixel on bottleneck profile departs from the distance of standard round position will be larger.And in recently and farthest 2 of the bottleneck point middle distance center of circle a bit, can be the maximum position of offset distance.By obtaining ultimate range and the minor increment in the point middle distance center of circle, then asking for the difference (point departs from the distance of standard round) of ultimate range and minor increment and standard round radius respectively, being offset distance.When bottleneck occur distortion or when there is breach, the offset distance asked for will be larger.
Obtain the distance of each excircle configuration point to the center of circle, after relatively, obtain distance maximal value and minimum value, be i.e. the ultimate range in the outline point middle distance center of circle and minor increment.Required maximal value and minimum value compare with radius respectively, and obtain the offset distance of outline point and standard round, gained offset distance is less, illustrate that excircle configuration is more near the mark circle.If offset distance exceedes default offset distance threshold value (camera resolution is 300,000, and offset distance threshold value is set to 8 pixels), bottleneck distortion is described or there is breach.
In this example, calculating outline point is 176.77 to the ultimate range in the center of circle, and minor increment is 163.08, as shown in the straight line of two in Fig. 5.The difference that can be obtained ultimate range and radius by above-mentioned numerical value is 2.77, and namely offset distance is 2.27.The difference of minor increment and radius is 10.92, and namely offset distance is 10.92.One of them offset distance has exceeded offset distance threshold value 8 pixel values preset, and the bottleneck distortion of this bottle base or bottleneck outline exist breach as seen.
(7) by the order of step (3) to step (6), detection bottleneck whether there is distortion or bottleneck Internal periphery exists breach.By the home position of circle orientation tool, radius size, arrow number, arrow length and the direction of arrow are stored in an array, and as shown in Figure 4, arrow number is set to 74, and arrow length is 32, and the direction of arrow is point to circle in circle.
The contrast threshold of bottleneck outline and background is set to 13, searches for by circle orientation tool the bottleneck Internal periphery point obtained, shown in the position of cross mark as medium and small in Fig. 6.The radius obtained by Hough transformation matching is 130 pixels, and calculating Internal periphery point is 134,37 to the ultimate range in the center of circle, and minor increment is 125.10, as shown in the straight line of two in Fig. 6.The difference that can be obtained ultimate range and radius by above-mentioned numerical value is 4.37, and namely offset distance is 4.37.The difference of minor increment and radius is 4.90, and namely offset distance is 4.90.Offset distance threshold value is set to 8 pixels, and two offset distances are all less than 8 pixels, as seen the bottleneck Internal periphery not existing defects of this bottle base.
(8) in this example, the bottleneck outline existing defects of bottle base, Internal periphery is existing defects not, to sum up, thinks the bottleneck existing defects of this bottle base.
Claims (1)
1. accurately detect a method for bottle base bottle mouth defect, comprise the following steps:
(1) a round orientation tool is developed: this instrument is a screen display instrument, comprise a circle, circumferentially be uniformly distributed multiple rectangle, the arrow overlapped with the normal of circle is provided with at the center of each rectangle, the direction of arrow can set, the position of this instrument can change under the dragging of mouse, be circumferentially provided with one for the dragging at mouse under can change the icon of the size of corresponding circle; The number of rectangle can change, division more, and accuracy of detection is higher.
(2) before automatically detecting, first gather the image that a width comprises bottle base bottleneck, and on screen, show this image;
(3) mouse drag circle orientation tool is utilized, move it the position of the bottle base bottleneck outline in image, the size changing circle makes it as far as possible identical with the size of bottle base bottleneck outline in image, make in arrow points circle, and determine suitable rectangle number, according to position and the size of determined round orientation tool, by 5 variable saves such as the home position of circle orientation tool, radius size, arrow number, arrow length and the directions of arrow in the array of outline location;
(4) mouse drag circle orientation tool is utilized, move it the position of the bottle base bottleneck Internal periphery in image, the size changing circle makes as far as possible identical with the size of bottle base bottleneck Internal periphery in image, makes outside arrow points circle, and determines suitable rectangle number; According to position and the size of determined round orientation tool, 5 variable saves such as the home position of circle orientation tool, radius size, arrow number, arrow length and the direction of arrow are saved in the array of Internal periphery location;
(5) when carrying out automatically detecting, under identical shooting condition and position, the image comprising bottle base bottleneck is gathered;
(6) to a former figure of input, outline contrast threshold is preset, by judging whether the contrast of bottleneck outline and background reaches outline contrast threshold, and determine the outline of bottle base bottleneck, method is as follows:
Take out 5 variablees of the outline location array of preserving in step (3), the pixel coordinate of all arrow positions in round orientation tool is calculated by these 5 variographs, when searching in the direction of the arrow from arrow top, when judging that the absolute value that current pixel value deducts a pixel is more than or equal to set outline contrast threshold, record the position of this pixel, think that this pixel is the point on bottleneck excircle configuration, continue the point on the excircle configuration of the next arrow position of search;
(7) these bottleneck outline point Hough transformation methods found are carried out matching, obtain central coordinate of circle and the radius of bottleneck outline;
(8) ask ultimate range and the minor increment in the outline point middle distance center of circle, obtain offset distance;
(9) if offset distance is greater than the threshold value of the deviation distance that outline is preset, then judge that bottleneck distortion or outline exist breach.
(10) to a former figure of input, Internal periphery contrast threshold is preset, by judging whether the contrast of bottleneck Internal periphery and background reaches Internal periphery contrast threshold, and determine the Internal periphery of bottle base bottleneck, method is as follows:
Take out 5 variablees of the Internal periphery location array of preserving in step (4), the pixel coordinate of all arrow positions in round orientation tool is calculated by these 5 variographs, when searching in the direction of the arrow from arrow top, when judging that the absolute value that current pixel value deducts a pixel is more than or equal to set Internal periphery contrast threshold, think that this pixel is the point on bottleneck Internal periphery, continue the point on the interior circle contour of the next arrow position of search;
(11) these bottleneck Internal periphery point Hough transformation methods found are carried out matching, obtain central coordinate of circle and the radius of bottleneck Internal periphery;
(12) ask ultimate range and the minor increment in the Internal periphery point middle distance center of circle, obtain offset distance;
(13) if offset distance is greater than the threshold value of the deviation distance that Internal periphery is preset, then judge that bottleneck distortion or Internal periphery exist breach.
(14) only have when bottleneck inside and outside contour not existing defects time, think that bottleneck is certified products, otherwise think bottleneck existing defects.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410765297.0A CN104502359A (en) | 2014-12-10 | 2014-12-10 | Method for accurately detecting bottle blank and bottle opening defects |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410765297.0A CN104502359A (en) | 2014-12-10 | 2014-12-10 | Method for accurately detecting bottle blank and bottle opening defects |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104502359A true CN104502359A (en) | 2015-04-08 |
Family
ID=52943774
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410765297.0A Pending CN104502359A (en) | 2014-12-10 | 2014-12-10 | Method for accurately detecting bottle blank and bottle opening defects |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104502359A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105424722A (en) * | 2015-11-05 | 2016-03-23 | 天津大学 | Bottle cap unqualified product marking method based on machine vision |
CN106841229A (en) * | 2016-12-20 | 2017-06-13 | 浙江工业大学 | A kind of online PE bottles of detection method of bottle sealing defect based on machine vision |
CN110132974A (en) * | 2018-02-08 | 2019-08-16 | 克朗斯股份公司 | The monitoring method and bottle washing machine of bottle unit |
CN111627009A (en) * | 2020-05-27 | 2020-09-04 | 歌尔股份有限公司 | Screen detection method and device and head-mounted display equipment |
CN112881289A (en) * | 2021-01-20 | 2021-06-01 | 成都泓睿科技有限责任公司 | Device and method for detecting breakage of bottle opening of infusion bottle |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1109008A8 (en) * | 1999-12-15 | 2001-08-16 | S.G.C.C. | Method for quality-control of articles particularly of glass |
CN101315338A (en) * | 2008-07-18 | 2008-12-03 | 北京中星微电子有限公司 | Defect detecting system and method for glass product |
CN102519973A (en) * | 2011-12-10 | 2012-06-27 | 山东明佳包装检测科技有限公司 | Method for detecting lip defect of PET bottle or bottle parison |
CN103606167A (en) * | 2013-12-04 | 2014-02-26 | 天津普达软件技术有限公司 | Outer bottle cap profile determining method for defect detection |
CN103605470A (en) * | 2013-12-04 | 2014-02-26 | 天津普达软件技术有限公司 | Circle positioning tool for detecting defect image of bottle cap |
CN103606169A (en) * | 2013-12-04 | 2014-02-26 | 天津普达软件技术有限公司 | Method for detecting defects of bottle cap |
-
2014
- 2014-12-10 CN CN201410765297.0A patent/CN104502359A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1109008A8 (en) * | 1999-12-15 | 2001-08-16 | S.G.C.C. | Method for quality-control of articles particularly of glass |
CN101315338A (en) * | 2008-07-18 | 2008-12-03 | 北京中星微电子有限公司 | Defect detecting system and method for glass product |
CN102519973A (en) * | 2011-12-10 | 2012-06-27 | 山东明佳包装检测科技有限公司 | Method for detecting lip defect of PET bottle or bottle parison |
CN103606167A (en) * | 2013-12-04 | 2014-02-26 | 天津普达软件技术有限公司 | Outer bottle cap profile determining method for defect detection |
CN103605470A (en) * | 2013-12-04 | 2014-02-26 | 天津普达软件技术有限公司 | Circle positioning tool for detecting defect image of bottle cap |
CN103606169A (en) * | 2013-12-04 | 2014-02-26 | 天津普达软件技术有限公司 | Method for detecting defects of bottle cap |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105424722A (en) * | 2015-11-05 | 2016-03-23 | 天津大学 | Bottle cap unqualified product marking method based on machine vision |
CN106841229A (en) * | 2016-12-20 | 2017-06-13 | 浙江工业大学 | A kind of online PE bottles of detection method of bottle sealing defect based on machine vision |
CN110132974A (en) * | 2018-02-08 | 2019-08-16 | 克朗斯股份公司 | The monitoring method and bottle washing machine of bottle unit |
CN111627009A (en) * | 2020-05-27 | 2020-09-04 | 歌尔股份有限公司 | Screen detection method and device and head-mounted display equipment |
CN111627009B (en) * | 2020-05-27 | 2023-10-20 | 歌尔光学科技有限公司 | Screen detection method and device and head-mounted display equipment |
CN112881289A (en) * | 2021-01-20 | 2021-06-01 | 成都泓睿科技有限责任公司 | Device and method for detecting breakage of bottle opening of infusion bottle |
CN112881289B (en) * | 2021-01-20 | 2022-11-29 | 成都泓睿科技有限责任公司 | Device and method for detecting breakage of bottle opening of infusion bottle |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103606167B (en) | A kind of outer bottle cap profile for defects detection determines method | |
CN103604808B (en) | A kind of bottle cap defective vision detection method | |
CN104502359A (en) | Method for accurately detecting bottle blank and bottle opening defects | |
CN103606169A (en) | Method for detecting defects of bottle cap | |
US10006836B2 (en) | Method and apparatus for detecting defects on tyres in a tyre production process | |
US9230318B2 (en) | Analysis of the digital image of the external surface of a tyre and processing of false measurement points | |
CN103168220A (en) | Method for identifying and defining basic patterns forming the tread design of a tyre | |
US20180150969A1 (en) | Information processing device, measuring apparatus, system, calculating method, storage medium, and article manufacturing method | |
CN103954213A (en) | Method for analyzing measured drawing of part | |
CN104361605A (en) | Method for detecting outer contour defects of blank bottle mouths | |
JP2014215163A (en) | Inspection apparatus | |
US8538165B2 (en) | Image measuring apparatus, program, and teaching method of image measuring apparatus | |
CN104614386A (en) | Lens defects type identification method | |
CN104463879A (en) | Method for detecting inner contour defect of opening of semi-finished bottle | |
WO2020209046A1 (en) | Object detection device | |
CN110440709A (en) | The inspection method of tire-mold side plate | |
CN103606128B (en) | A kind of method detecting outer circle of bottle cap burr | |
CN103604806B (en) | A kind of method detecting O-ring seal defect | |
CN104438126A (en) | Removal method of defective bottle parisons | |
CN103605470A (en) | Circle positioning tool for detecting defect image of bottle cap | |
JP7397100B2 (en) | Work image analysis device, work image analysis method, and program | |
CN103617620A (en) | Rapid partition method for seal ring image detected in on-line mode | |
US10048131B2 (en) | Chromaticity test method and chromaticity test apparatus | |
JP5812284B2 (en) | Belt-like structure detecting device, method and program | |
KR102212318B1 (en) | Apparatus for display inspection and method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20150408 |