CN110220495A - A kind of visual token system and method based on infrared beam - Google Patents
A kind of visual token system and method based on infrared beam Download PDFInfo
- Publication number
- CN110220495A CN110220495A CN201910548135.4A CN201910548135A CN110220495A CN 110220495 A CN110220495 A CN 110220495A CN 201910548135 A CN201910548135 A CN 201910548135A CN 110220495 A CN110220495 A CN 110220495A
- Authority
- CN
- China
- Prior art keywords
- target object
- line segment
- spacing
- target area
- light beam
- 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
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C3/00—Measuring distances in line of sight; Optical rangefinders
Landscapes
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The invention discloses a kind of visual token system and method based on infrared beam, the present invention carries out profile lookup by the image acquired to target object, extract the target area in image, then the dotted line feature of target area is extracted, calculate the upper and lower side spacing of target object and be incident upon the spacing of body surface infrared light beam, using between the two away from ratio relation calculate target object at a distance from light source.Quick, the high-precision measurement for realizing distance may be implemented in the present invention.
Description
Technical field
The present invention relates to automation control areas, and in particular to a kind of visual token system and side based on infrared beam
Method.
Background technique
With the rapid development of industry, more and more factories introduce the production equipment of automation or semi-automation all to mention
High efficiency.The introduction of automation equipment also brings the hidden danger in production safety while improving the production efficiency.And it shuts out
The most effective means of exhausted production safety hidden danger are exactly the distance in control production process at any time.
Currently, thering is laser ranging, binocular distance measurement and infrared ray to survey using more extensive ranging technology in the market
Away from.These, which exist, involves great expense, the problem of hardware complexity.And these distance measuring methods are often deposited when in use to ranging background
It is required that high or algorithm is complicated, because being the most important thing to the extraction of target object during visual token.It is only perfect
Be extracted the operation that just can be carried out next step after target object.It is required by being improved to ranging background, being allowed to unification can be with
Effectively simplify the extraction of target object, but cost is exactly that the robustness of this method substantially reduces.And pass through complicated algorithm raising side
Complexity while method robustness due to algorithm also reduces the efficiency of measurement.
Summary of the invention
In order to overcome shortcoming and deficiency of the existing technology, the present invention provides a kind of visual token based on infrared beam
System and method.
The present invention is suitable for the close-in measurement of shape regular object, carries out profile by the image acquired to target object
It searches, extracts the target area in image, then the dotted line feature of extraction target area, between the upper and lower side for calculating target object
Away from and be incident upon the spacing of body surface infrared light beam, using between the two away from ratio relation calculate target object and light source
Distance.Have the characteristics that cheap and hardware is simple.
The present invention adopts the following technical scheme:
A kind of visual token system based on infrared beam, including camera, linear light sorurce and target object, the linear light
The side of target object is arranged in source, and projects two-beam line to target object surface, and target object surface is in the visual field of camera
In range.
The two-beam line that the linear light sorurce projection angle is 30 degree, two-beam line are parallel in target object surface.
The target object is disposed vertically.
A kind of visual token method based on infrared beam, comprising:
It extracts target area;
The surface characteristics for extracting target area, obtains the spacing of two collimated light beams;
According to the spacing of two collimated light beams, the actual range of linear light sorurce and target object is obtained.
The target area is extracted, specific steps are as follows:
Camera calibration obtains calibrating parameters, then obtains the source images of target object;
Edge detection is carried out after pre-processing to source images, extracts the external frame of target object, by external edge circle
Source images are taken to obtain target area.
The surface characteristics for extracting target area, obtains the spacing of two collimated light beams, specifically:
Calculate the upper and lower end-point distances of target object;
Extract target area line segment, and by all line segments be stored in a Vector Groups V1 (v1, v2 ... vi ... vn)
In;
The horizontal line section in Vector Groups V1 is filtered out, and is stored in Vector Groups V2;
The light beam line segment that target area is extracted in Vector Groups V2, further obtains the spacing of two light beam line segments.
The spacing according to two collimated light beams, obtains the actual range of light source and target object, using following formula
It calculates:
Wherein, R indicates target object at a distance from linear light sorurce, and S is the top of target object to the actual range of bottom end,
Angle of the θ between light beam, L are the spacing of light beam on image, and D is the upper bottom margin of target object in image.
The upper and lower end-point distances of the calculating target object, specifically:
The vertical component of the endpoint of all line segments is stored in vector A by all line segments for extracting frame outside target object
In (Y1, Y2, Y3...Yi...Yn);
Vertical component in vector A is ranked up, the maximum value Ymax and minimum value Ymin of Y-component is obtained, obtains target
Object upper and lower side space D=| Ymax-Ymin |.
The light beam line segment that target area is extracted in Vector Groups V2, specifically:
The interference line segment on top and bottom end is rejected, the line segment in specifically ten pixel point ranges is all considered as edge line segment,
It rejects;
Line segment by length in remaining line segment less than 1/3 target area width is all rejected, and light beam line segment is obtained.
The spacing of two light beam line segments, specifically:
The endpoint Y-component mean value of obtained light beam line segment is stored in a vector, the maximum value in vector is then sought
Ymax and minimum value Ymin calculates the spacing L=Ymax-Ymin of light beam line segment.
Beneficial effects of the present invention:
(1) present invention projects parallel laser in target object surface, by calculating beam separation and target lower edges ruler
Very little ratio obtains object at a distance from light source, and this method hardware is simple, low in cost, measurement efficiency is high.
(2) present invention has very strong usability, of less demanding to shooting background, and hardware configuration is simply portable
Height has very big promotional value in industrial settings.
Detailed description of the invention
Fig. 1 is the device of the invention structural schematic diagram;
Fig. 2 is work flow diagram of the invention;
Fig. 3 is target area line segment schematic diagram of the invention.
Specific embodiment
Below with reference to examples and drawings, the present invention is described in further detail, but embodiments of the present invention are not
It is limited to this.
Embodiment
As shown in Figures 1 and 2, a kind of visual token system based on infrared beam, including camera 1, linear light sorurce 2 and mesh
Object 5 is marked, in the present embodiment, target object vertical level is placed, and linear light sorurce and camera are each provided at the same of target object
Side, linear light sorurce project the two-beam line 3 of angle theta=30 degree, and two-beam line is parallel in target object surface, target object surface
Camera within sweep of the eye.
The visual token method realized using above-mentioned apparatus, specifically:
It extracts the target area S1
S1.1 camera calibration: needing to extract line segment in the picture in the method, and calculates in distance such as Fig. 3 between line segment
The spacing of surface parallel laser line segment.So the distortion of camera can have an immense impact on to the precision of measurement result, the present embodiment
Camera calibration is carried out using OpenCV, source images are corrected after obtaining calibrating parameters to improve measurement accuracy.
S1.2 obtains source images, opens camera and obtains the source images comprising parallel rays;
S1.3 extracts target area: being filtered with gaussian filtering to source images, again with canny operator to image after denoising
Edge detection is carried out, the external frame of target object is extracted, is taken using this external frame in non-filtered source figure center
Target area.Because filtering can lose imaging surface details, with non-filtered place when extracting target object surface feature
The source figure of reason.
S2 extracts the surface characteristics of target area, obtains the spacing of two collimated light beams, specifically:
S2.1 calculates the upper and lower end-point distances 9 of target object, since target object is regular or irregular figure, above and below
Endpoint is the highest point and the lowest point of target object on image.
It in S1.3 is the edge of target object in image with the frame that canny operator obtains, it is possible to from frame
The endpoint up and down of middle searching object, and endpoint is centainly on the endpoint of frame line segment up and down, specific steps are as follows:
All line segments of the external frame of S2.1.1 extraction, such as in Fig. 34,6,10;
S2.1.2 by the vertical component of the endpoint of all line segments, that is, Y-component be stored in a vector A (Y1, Y2,
Y3...Yi...Yn in).
The S2.1.3 built-in ranking functions sort vector order of C++, obtains the maximum value Ymax and minimum value of Y-component
Ymin, it can thus be concluded that target object upper and lower side space D=| Ymax-Ymin |.
The line segment of S2.2 extraction target area: carrying out gray processing processing to target area, uses again suddenly after obtaining gray level image
Husband's function extract target area all line segments such as in Fig. 3 11,12, and by all line segments be stored in a Vector Groups V1 (v1,
V2 ... vi ... vn) in.
S2.3 filters out all horizontal line sections: every line segment is made of two endpoint, and each endpoint is by two points
Measure X, Y composition.Screening principle is to calculate the horizontal component difference of every line segment vi endpoint in V1 | X1-X2 | and vertical component
Difference | Y1-Y2 |, then according to the horizontal component difference of horizontal line section | X1-X2 | it is big, and its vertical component | Y1-Y2 | very little is come
Filter out horizontal line section and be stored in new vector V2 (v1, v2 ... vi ... vn) in.
2.4 extraction target area laser line segments: it screens out the line segment that upper and lower side is likely to occur and extracts swashing for target area again
Light section.There are the noise jammings of scratch and image for target object surface, since laser is across whole object surface, so sieve
It selects in remaining line segment longest two and seeks to the laser line segment extracted.But also tend to that there are various interference shadows in extraction process
Ring the extraction of laser line segment.
2.4.1 the interference line segment for rejecting top and bottom end, since the line segment extracted in target area is all not stringent water
Flat, so being all considered as edge line segment to the line segment in ten pixel point ranges on top and bottom end, gives and exclude.
2.4.2 laser line segment is extracted according to difference in length, the line as caused by target object surface scratch, noise jamming
Section is universal very short and unhorizontal, it is possible to screen out these interference by length condition.By length in remaining line segment less than 1/3 mesh
The line segment of mark peak width is all dispelled.Shown in Fig. 3, it is big that surface laser line segment often shows as continuous and length in the picture
Width in 1/3 target area.
2.4.3 the distance 8 between two collimated light beams is calculated, since light beam line segment cannot be guaranteed absolute water in target area
It is flat, so can occur a laser line segment when extracting line segment is divided into several line segments (the laser line segment of label 11 in such as Fig. 3).Cause
This spacing for calculating light beam line segment cannot be calculated directly by two accurate line segments.Passing through in the present invention will be all
The endpoint Y-component mean value of laser line segment is stored in a vector, is then asked maximum value Ymax and minimum value Ymin in vector, is calculated
The spacing L=Ymax-Ymin of laser line segment out.
S3 obtains the actual range of linear light sorurce and target object according to the spacing 8 of two collimated light beams.
Wherein R indicates target object at a distance from light source, and S is that low side is arrived on the top of target object
Actual range, angle of the θ between light beam, L are the spacing of light beam on image, and D is the upper bottom margin of middle target object on image, this
S is actual range of the target object top to bottom end in embodiment, and D refers to that target object is taken upper and lower endpoint in the picture
Coordinate difference in vertical direction.
The above embodiment is a preferred embodiment of the present invention, but embodiments of the present invention are not by the embodiment
Limitation, other any changes, modifications, substitutions, combinations, simplifications made without departing from the spirit and principles of the present invention,
It should be equivalent substitute mode, be included within the scope of the present invention.
Claims (10)
1. a kind of visual token system based on infrared beam, which is characterized in that including camera, linear light sorurce and target object,
The side of target object is arranged in the linear light sorurce, and projects two-beam line to target object surface, and target object surface exists
Camera is within sweep of the eye.
2. visual token method according to claim 1, which is characterized in that the linear light sorurce projection angle is 30 degree
Two-beam line, two-beam line are parallel in target object surface.
3. visual token method according to claim 1, which is characterized in that the target object is disposed vertically.
4. a kind of method based on the described in any item visual token systems of claim 1-3 characterized by comprising
It extracts target area;
The surface characteristics for extracting target area, obtains the spacing of two collimated light beams;
According to the spacing of two collimated light beams, the actual range of linear light sorurce and target object is obtained.
5. according to the method described in claim 4, it is characterized in that, target area extraction, specific steps are as follows:
Camera calibration obtains calibrating parameters, then obtains the source images of target object;
After being pre-processed to source images, edge detection is carried out, the external frame of target object is extracted, external edge circle is taken into source
Image obtains target area.
6. according to the method described in claim 5, it is characterized in that, the surface characteristics for extracting target area, obtains two
The spacing of collimated light beam, specifically:
Calculate the upper and lower end-point distances of target object;
Extract target area line segment, and by all line segments be stored in a Vector Groups V1 (v1, v2 ... vi ... vn) in;
The horizontal line section in Vector Groups V1 is filtered out, and is stored in Vector Groups V2;
The light beam line segment that target area is extracted in Vector Groups V2, further obtains the spacing of two light beam line segments.
7. according to the method described in claim 4, it is characterized in that, the spacing according to two collimated light beams, obtains light source
With the actual range of target object, calculated using following formula:
Wherein, R indicates target object at a distance from linear light sorurce, and S is the top of target object to the actual range of bottom end, and θ is
Angle between light beam, L are the spacing of light beam on image, and D is the upper bottom margin of target object in image.
8. according to the method described in claim 6, it is characterized in that, the upper and lower end-point distances of the calculating target object, specifically
Are as follows:
All line segments for extracting frame outside target object, by the vertical component of the endpoint of all line segments deposit vector A (Y1, Y2,
Y3...Yi...Yn in);
Vertical component in vector A is ranked up, the maximum value Ymax and minimum value Ymin of Y-component is obtained, obtains target object
Upper and lower side space D=| Ymax-Ymin |.
9. according to the method described in claim 6, it is characterized in that, the light beam line for extracting target area in Vector Groups V2
Section, specifically:
The interference line segment on top and bottom end is rejected, the line segment in specifically ten pixel point ranges is all considered as edge line segment, rejects;
Line segment by length in remaining line segment less than 1/3 target area width is all rejected, and light beam line segment is obtained.
10. according to the method described in claim 6, it is characterized in that, the spacing of two light beam line segments, specifically:
The endpoint Y-component mean value of obtained light beam line segment is stored in a vector, then ask maximum value Ymax in vector with
Minimum value Ymin calculates the spacing L=Ymax-Ymin of light beam line segment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910548135.4A CN110220495A (en) | 2019-06-24 | 2019-06-24 | A kind of visual token system and method based on infrared beam |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910548135.4A CN110220495A (en) | 2019-06-24 | 2019-06-24 | A kind of visual token system and method based on infrared beam |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110220495A true CN110220495A (en) | 2019-09-10 |
Family
ID=67814667
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910548135.4A Pending CN110220495A (en) | 2019-06-24 | 2019-06-24 | A kind of visual token system and method based on infrared beam |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110220495A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112330599A (en) * | 2020-10-15 | 2021-02-05 | 浙江大学台州研究院 | Size measurement scoring device, adjusting method and scoring method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6088106A (en) * | 1997-10-31 | 2000-07-11 | Lap Gmbh Laser Applikationen | Method for the contact-free measurement of the distance of an object according to the principle of laser triangulation |
CN2699313Y (en) * | 2004-02-12 | 2005-05-11 | 王樂安 | Laser rangefinder |
CN1996346A (en) * | 2005-12-29 | 2007-07-11 | 电子科技大学 | Vehicle recognition algorithm based on contour |
CN102564311A (en) * | 2012-01-13 | 2012-07-11 | 常州环视高科电子科技有限公司 | Method and system for measuring size of object by using traditional camera |
CN106546216A (en) * | 2016-11-01 | 2017-03-29 | 广州视源电子科技股份有限公司 | Distance measurement method, device, camera and mobile terminal |
CN206740977U (en) * | 2017-04-10 | 2017-12-12 | 上海图漾信息科技有限公司 | Structure light measurement device |
-
2019
- 2019-06-24 CN CN201910548135.4A patent/CN110220495A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6088106A (en) * | 1997-10-31 | 2000-07-11 | Lap Gmbh Laser Applikationen | Method for the contact-free measurement of the distance of an object according to the principle of laser triangulation |
CN2699313Y (en) * | 2004-02-12 | 2005-05-11 | 王樂安 | Laser rangefinder |
CN1996346A (en) * | 2005-12-29 | 2007-07-11 | 电子科技大学 | Vehicle recognition algorithm based on contour |
CN102564311A (en) * | 2012-01-13 | 2012-07-11 | 常州环视高科电子科技有限公司 | Method and system for measuring size of object by using traditional camera |
CN106546216A (en) * | 2016-11-01 | 2017-03-29 | 广州视源电子科技股份有限公司 | Distance measurement method, device, camera and mobile terminal |
CN206740977U (en) * | 2017-04-10 | 2017-12-12 | 上海图漾信息科技有限公司 | Structure light measurement device |
Non-Patent Citations (1)
Title |
---|
张浩鹏: "视觉检测系统的若干关键问题研究", 《中国博士学位论文全文数据库 信息科技辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112330599A (en) * | 2020-10-15 | 2021-02-05 | 浙江大学台州研究院 | Size measurement scoring device, adjusting method and scoring method |
CN112330599B (en) * | 2020-10-15 | 2024-02-20 | 浙江大学台州研究院 | Dimension measurement scoring device, adjustment method and scoring method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106934803B (en) | method and device for detecting surface defects of electronic device | |
CN109060836B (en) | Machine vision-based high-pressure oil pipe joint external thread detection method | |
CN111968144B (en) | Image edge point acquisition method and device | |
CN104268872B (en) | Consistency-based edge detection method | |
CN108007388A (en) | A kind of turntable angle high precision online measuring method based on machine vision | |
CN103279956B (en) | A kind of method detecting chip mounter components and parts positioning precision | |
CN109816678A (en) | A kind of the nozzle atomization angle automatic checkout system and method for view-based access control model | |
CN106197612B (en) | A kind of transparent bottled liquid-level detecting method based on machine vision | |
CN106969706A (en) | Workpiece sensing and three-dimension measuring system and detection method based on binocular stereo vision | |
CN110189375B (en) | Image target identification method based on monocular vision measurement | |
CN109813727A (en) | A kind of pcb board weld defects detection method based on depth information | |
CN104268853A (en) | Infrared image and visible image registering method | |
CN105866136A (en) | Camera module optical filter gluing detection apparatus and method | |
CN110261069B (en) | Detection method for optical lens | |
CN110108712A (en) | Multifunctional visual sense defect detecting system | |
CN110986834A (en) | Automatic assembly pipe penetration monitoring method | |
CN108109117A (en) | A kind of method of the color real-time transform based on moving object | |
CN104966302B (en) | A kind of detection localization method of any angle laser cross | |
CN108520260A (en) | The recognition methods of visible foreign matters in bottled oral solution | |
CN110288619B (en) | Vision-based sunflower module surface screw hole position detection method | |
CN108573476A (en) | The heronsbill module surface screw hole site detection method of view-based access control model | |
CN108154506A (en) | A kind of hex nut automatic testing method | |
CN110220495A (en) | A kind of visual token system and method based on infrared beam | |
CN110414521A (en) | Oil level gauge for transformer registration recognition methods in a kind of substation | |
CN115108466A (en) | Intelligent positioning method for container spreader |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190910 |
|
RJ01 | Rejection of invention patent application after publication |