CN104537644A - Line finding tool for locating bottle body of bottle blank - Google Patents

Line finding tool for locating bottle body of bottle blank Download PDF

Info

Publication number
CN104537644A
CN104537644A CN201410766763.7A CN201410766763A CN104537644A CN 104537644 A CN104537644 A CN 104537644A CN 201410766763 A CN201410766763 A CN 201410766763A CN 104537644 A CN104537644 A CN 104537644A
Authority
CN
China
Prior art keywords
straight line
line
rectangle
tool
arrow
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
Application number
CN201410766763.7A
Other languages
Chinese (zh)
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.)
Tianjin Puda Software Technology Co Ltd
Original Assignee
Tianjin Puda Software Technology 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 Tianjin Puda Software Technology Co Ltd filed Critical Tianjin Puda Software Technology Co Ltd
Priority to CN201410766763.7A priority Critical patent/CN104537644A/en
Publication of CN104537644A publication Critical patent/CN104537644A/en
Pending legal-status Critical Current

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/66Analysis of geometric attributes of image moments or centre of gravity
    • 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/30172Centreline of tubular or elongated structure

Landscapes

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

Abstract

The invention belongs to the field of digital picture processing technologies and provides a line finding tool for locating a bottle body of a bottle blank. The tool is a screen tool and comprises a straight line and a plurality of rectangles which are distributed on the straight line at equal intervals and are perpendicular to the straight line. An arrow is arranged at some end point of the straight line and represents the terminal of the straight line, and the other end point serves as the starting point of the straight line. An arrow is arranged at one end point of an edge of some rectangle and represents the terminal of the rectangle, the edge is perpendicular to the straight line, and the other end point serves as the starting point of the corresponding rectangle. The straight line direction and the matrix direction can be set by changing the corresponding arrow directions, the length of the straight line of the line finding tool and the number of the rectangles of the line finding tool can be changed at will, the larger the number of the rectangles is, the higher the detecting precision is, and the length of the line is used for simulating the length of the bottle body. By means of the screen tool, a linear equation of the edge of the bottle body can be determined quickly, and the central coordinates of the bottle body are further solved.

Description

A kind ofly look for the Line tool for what locate bottle base body
Art
The invention belongs to Digital Image Processing, relate to a kind of screen instrument of locating bottle base body.
Background technology
In course of conveying, due to the impact of surrounding production environment, in bottle base, there will be the foreign matters such as paper scrap, hair, iron wire.In the process that vision system detects the foreign matter in bottle base body, the position of bottle base body image in whole image that vision system collects at every turn may there are differences, for avoiding the impact because bottle base body change in location causes testing result, need to locate bottle base body center.
Summary of the invention
The object of this invention is to provide a kind of screen instrument contributing to locating rapidly and accurately bottle base body center.Technical scheme of the present invention is as follows:
Look for a Line tool for what locate bottle base body, this instrument is a screen instrument, comprises straight line and equal distribution the some rectangles perpendicular with it on this line; Be provided with arrow at certain end points of straight line, represent the terminal of straight line, another end points is as the starting point of straight line; Be provided with arrow one of certain rectangle and the end points on a limit of linear vertical, represent the terminal of rectangle, another end points is as the starting point of rectangle; Rectilinear direction and matrix directions can by changing the corresponding direction of arrow to set, and this is looked for the length of the straight line of the Line tool, the number of rectangle and can change arbitrarily, the number of rectangle more, and accuracy of detection is higher; The length of straight line is for simulating the length of body.
Utilize screen instrument provided by the invention, the straight-line equation at body edge can be determined rapidly, and then ask for body centre coordinate.
Accompanying drawing explanation
Fig. 1 looks for the Line tool;
The former figure of Fig. 2;
Fig. 3 looks for the Line tool to locate body upper edge;
Fig. 4 looks for the Line tool to locate body lower edge.
Fig. 5 body upper edge is located;
Fig. 6 body lower edge is located;
Mouse is moved to the shape that when looking near the straight line of the Line tool, cursor becomes by Fig. 7 (a);
Fig. 7 (b) is the shape that mouse becomes when moving to straight line starting point, straight line terminal and represent near the arrow of rectangular orientation.
Embodiment
Below to the present invention propose screen instrument and application scenarios be described:
(1) develop one and look for the Line tool.
As shown in Figure 1, this instrument is a screen instrument, and by straight line, on straight line, equidistributed some rectangles, the arrow representing rectangular orientation and the arrow that represents rectilinear direction form.Position, the size and Orientation of this instrument can change arbitrarily.
Straight line upward arrow position is the terminal of straight line, and on the contrary, the other end is the starting point of straight line; Rectangle upward arrow position is the terminal of rectangle, and on the contrary, the other end is the starting point of rectangle;
When mouse moves near straight line, cursor can become the shape as shown in Fig. 7 (a), and now, user can press the position that left mouse button pulling changes straight line, at this moment, the position of straight line, equidistributed rectangle on straight line and arrow also changes simultaneously;
When mouse moves near straight line starting point, cursor can become the shape as shown in Fig. 7 (b), now, user can press the position that left mouse button pulling changes straight line starting point, at this moment, the length of straight line changes, and the equidistributed rectangle on straight line also changes with the position of the arrow representing rectangular orientation simultaneously;
When mouse moves near straight line terminal, cursor can become the shape as shown in Fig. 7 (b), now, user can press the position that left mouse button pulling changes straight line terminal, at this moment, the length of straight line changes, and the equidistributed rectangle on straight line also changes with the position of the arrow representing rectangular orientation simultaneously;
When mouse moves near the arrow representing rectangular orientation, cursor can become the shape as shown in Fig. 7 (b), and now, user can press the size that left mouse button pulling changes equidistributed rectangle on straight line, at this moment, the length of rectangle and width change;
On straight line, equidistributed rectangle number also can change, and number scope is between 2-360.The arrow representing rectangular orientation is positioned at all the time on straight line and is positioned on the rectangle in centre position;
The direction representing the arrow of rectangular orientation also can by selecting to decide to point to which side from which side of straight line.
(2) before automatically detecting, first gather a former figure, and ensure bottle base in the picture as far as possible close to horizontal positioned, by looking for the Line tool, position the body both sides of the edge in former figure, method is as follows:
First the position looking for the Line tool being used for obtaining body upper edge is set.Change position and the size of looking for the Line tool.Moved to by mouse near straight line starting point, now, cursor can become the shape as shown in Fig. 7 (b), presses the position that left mouse button pulling changes straight line starting point, is dragged to the position of starting point as shown in Figure 3; Moved to by mouse near straight line terminal, now, cursor can become the shape as Fig. 7 (b), presses the position that left mouse button pulling changes straight line terminal, is dragged to the position of terminal as shown in Figure 3; The final position of instrument as shown in Figure 3, looks for the straight line in the Line tool to try one's best and the coincident that will search for; The direction of arrow representing rectangular orientation is arranged to point to above straight line below straight line; Moved to by mouse near the arrow representing rectangular orientation, now, cursor can become the shape as Fig. 7 (b), presses the size that left mouse button pulling changes rectangle, is dragged to rectangle size as shown in Figure 3.The each position in the picture of body may different (may have about 30 pixels beat), perpendicular to larger (length range is greater than 35 pixels) that the length of the length of side of straight line is arranged as far as possible in four limits of rectangle, can ensure like this to search the point on body edge exactly.Position as shown in Figure 3 and size is arranged to by looking for the Line tool position and size.
Secondly, according to method similar to the above, by be used for obtaining body lower edge straight-line equation look for the position of the Line tool and size to use the same method being arranged to position as shown in Figure 4 and size.
(3) when automatically detecting on a production line, gathering under the identical station of former figure, shooting condition with (2) step, gather the image comprising body, each width is needed to the image detected, adopts following manner to ask for the upper edge of body and the straight-line equation of lower edge respectively:
The point on each rectangular centre line on straight line is searched for successively from straight line starting point, the starting point and ending point of rectangular centre line search is respectively the mid point of that the two rules rectangle length of side being parallel to straight line, and the direction of arrow representing rectangular orientation determines that the mid point in these two limits on which bar limit is starting point and ending point.If when between the gray-scale value of the gray-scale value of current pixel point and next pixel, the absolute value of difference is greater than predetermined threshold value, think that this point is the point on body edge.On straight line, equidistributed rectangle number determines the point number that body edge will search.By searching for the edge contour point obtained, utilizing least square fitting straight line, obtaining straight-line equation.
In this example, first, the straight-line equation of body upper edge is obtained.The point on each rectangular centre line on straight line is searched for successively from straight line starting point, the starting point of rectangular centre line search be straight line parallel beneath in the mid point of that rectangle length of side of straight line, the terminating point of rectangular centre line search is the mid point of that rectangle length of side being parallel to straight line above straight line.When the absolute value of the difference between the gray-scale value of current pixel point and the gray-scale value of next pixel is greater than 16 pixels, think that this point is the point in body upper edge, finally search 10 point altogether, utilize least square fitting to obtain the straight-line equation y=-0.04x+225.56 of body upper edge these 10 point.
Similarly method, obtains the straight-line equation of body lower edge.When the absolute value of the difference between the gray-scale value of current pixel point and the gray-scale value of next pixel is greater than 16 pixels, think that this point is the point in body lower edge, finally search 10 point altogether, utilize least square fitting to obtain the straight-line equation of body lower edge for y=-0.04x+385.49 these 10 point.
(3) establish the horizontal ordinate X of the central point of image (in the present embodiment, picture traverse is 640, so the horizontal ordinate X of central point is 320) bring in the straight-line equation of both sides of the edge respectively, obtain corresponding ordinate Y1 and Y2 respectively, because body both sides of the edge are substantially parallel, think that so approximate body centre coordinate is for (X, (Y1+Y2)/2).The present embodiment, brings two straight-line equations respectively into by 320, obtain ordinate and be respectively 212.76 and 372.69, so the body centre coordinate obtained is (320,293).
Utilize screen instrument of the present invention, the straight-line equation at body edge can be determined rapidly.Detection time is no more than 0.4ms.Locate the body center of bottle base exactly, positioning error is no more than 2mm.

Claims (1)

1. look for a Line tool for what locate bottle base body, this instrument is a screen instrument, comprises straight line and equal distribution the some rectangles perpendicular with it on this line; Be provided with arrow at certain end points of straight line, represent the terminal of straight line, another end points is as the starting point of straight line;
Be provided with arrow one of certain rectangle and the end points on a limit of linear vertical, represent the terminal of rectangle, another end points is as the starting point of rectangle; Rectilinear direction and matrix directions can by changing the corresponding direction of arrow to set, and this is looked for the length of the straight line of the Line tool, the number of rectangle and can change arbitrarily, the number of rectangle more, and accuracy of detection is higher.The length of straight line is for simulating the length of body.
CN201410766763.7A 2014-12-10 2014-12-10 Line finding tool for locating bottle body of bottle blank Pending CN104537644A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410766763.7A CN104537644A (en) 2014-12-10 2014-12-10 Line finding tool for locating bottle body of bottle blank

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410766763.7A CN104537644A (en) 2014-12-10 2014-12-10 Line finding tool for locating bottle body of bottle blank

Publications (1)

Publication Number Publication Date
CN104537644A true CN104537644A (en) 2015-04-22

Family

ID=52853163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410766763.7A Pending CN104537644A (en) 2014-12-10 2014-12-10 Line finding tool for locating bottle body of bottle blank

Country Status (1)

Country Link
CN (1) CN104537644A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6310284A (en) * 1986-07-01 1988-01-16 Fanuc Ltd Straight line detecting device
JPH01269185A (en) * 1988-04-20 1989-10-26 Fujitsu Ltd Straight line component extracting system
CN103606169A (en) * 2013-12-04 2014-02-26 天津普达软件技术有限公司 Method for detecting defects of bottle cap
CN103604808A (en) * 2013-12-04 2014-02-26 天津普达软件技术有限公司 Visual detection method for bottle cap defects

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6310284A (en) * 1986-07-01 1988-01-16 Fanuc Ltd Straight line detecting device
JPH01269185A (en) * 1988-04-20 1989-10-26 Fujitsu Ltd Straight line component extracting system
CN103606169A (en) * 2013-12-04 2014-02-26 天津普达软件技术有限公司 Method for detecting defects of bottle cap
CN103604808A (en) * 2013-12-04 2014-02-26 天津普达软件技术有限公司 Visual detection method for bottle cap defects

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
潘忠敏: "不稳定岩层内弯曲砌碹巷道找线方法", 《山东煤炭科技》 *

Similar Documents

Publication Publication Date Title
JP5699788B2 (en) Screen area detection method and system
US10311596B2 (en) Image processing device, robot, robot system, and marker
US10192325B2 (en) Method for calibrating an imaging device and an imaging device
KR102056664B1 (en) Method for work using the sensor and system for performing thereof
US20130106833A1 (en) Method and apparatus for optical tracking of 3d pose using complex markers
JP2017502412A5 (en)
US10339657B2 (en) Character detection apparatus and method
CN103699869A (en) Method and device for recognizing two-dimension codes
CN102750555A (en) Expression robot applied to instant messaging tool
JP2015133049A (en) Image collation device, image sensor, processing system, and image collation method
CN105260740A (en) Element recognition method and apparatus
JP2015049776A (en) Image processor, image processing method and image processing program
CN104502359A (en) Method for accurately detecting bottle blank and bottle opening defects
CN104599267A (en) Cutting track generating method and device
CN104657977A (en) Method for positioning center of bottle body of bottle parison
CN111767912B (en) Marking point identification method, device, equipment and storage medium
US9454808B2 (en) Pattern processing apparatus, pattern processing method, and pattern processing program
CN105139381A (en) Method for positioning bottle preform and body
CN104537644A (en) Line finding tool for locating bottle body of bottle blank
CN104766294A (en) Automatic alignment system and method
CN104361605A (en) Method for detecting outer contour defects of blank bottle mouths
JP2020173584A (en) Object detection device
US20220122290A1 (en) Visual Line Analysis Apparatus, Visual Line Analysis Method, and Visual Line Analysis System
CN101937477B (en) Data processing equipment, system and method for realizing figure file fitting
KR102242891B1 (en) Method for calcurating touch coordinates using gaussian mixture model

Legal Events

Date Code Title Description
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: 20150422