CN110426018A - Real training measurement method and device based on camera - Google Patents

Real training measurement method and device based on camera Download PDF

Info

Publication number
CN110426018A
CN110426018A CN201910727289.XA CN201910727289A CN110426018A CN 110426018 A CN110426018 A CN 110426018A CN 201910727289 A CN201910727289 A CN 201910727289A CN 110426018 A CN110426018 A CN 110426018A
Authority
CN
China
Prior art keywords
camera
workpiece
image
real training
measurement method
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
CN201910727289.XA
Other languages
Chinese (zh)
Other versions
CN110426018B (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.)
Jiangsu Huibo Robot Technology Co Ltd
Original Assignee
Jiangsu Huibo Robot 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 Jiangsu Huibo Robot Technology Co Ltd filed Critical Jiangsu Huibo Robot Technology Co Ltd
Priority to CN201910727289.XA priority Critical patent/CN110426018B/en
Publication of CN110426018A publication Critical patent/CN110426018A/en
Application granted granted Critical
Publication of CN110426018B publication Critical patent/CN110426018B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/34Sorting according to other particular properties
    • B07C5/342Sorting according to other particular properties according to optical properties, e.g. colour
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The present invention relates to a kind of measurement methods, are based especially on the real training measurement method of camera, comprising the following steps: S110, save image, carry out preservation of taking pictures to workpiece by the camera of diameter mouth;S120, gray threshold is taken, classified to the pixel of workpiece and background;S130, adjustment Gauss value, are handled by gray threshold and are split to the edge of image;S140, drawing image ROI region;S150, using imfinitesimal method, make equal part;S160, tie point is drawn in the edge intersection of each equal part and workpiece image;S170, it multiple tie points of workpiece two sides is fitted respectively is in line;S180, range pixel L is calculated according to the range formula for two straight lines and straight line being fitted to1, S190, calibration pixel distance L1Obtain actual range L2.The marginal point of each same equal part, by image edge thinning and same equal part, is then fitted to a line segment by imfinitesimal method by this method, finds out the distance of two lines section finally to obtain measurement structure, measurement method is simple, measurement accuracy is high.

Description

Real training measurement method and device based on camera
Technical field
The present invention relates to a kind of measurement methods, are based especially on the real training measurement method and device of camera.
Background technique
Measuring technique, such as engineering survey, liquid measurement can be all used in many industries, measuring technique is in all trades and professions Play increasing importance.Industrially the specification of product is needed to carry out by measurement to detect whether qualification, or carried out Classification.
Current measuring system measurement method is complicated, and measurement accuracy is not high.
Summary of the invention
To solve the above problems, the present invention provides one kind by imfinitesimal method for image edge thinning and same equal part, then will The marginal point of each same equal part is fitted to a line segment, finds out the distance of two lines section finally to obtain measurement structure, measurement side Method is simple, the high real training measurement method based on camera of measurement accuracy, the specific technical proposal is:
Real training measurement method based on camera, comprising the following steps:
S110, image is saved, preservation of taking pictures is carried out to workpiece by the camera of diameter mouth;
S120, gray threshold is taken, classified to the pixel of workpiece and background;
S130, adjustment Gauss value, are handled by gray threshold and are split to the edge of image;
S140, drawing image ROI region;
S150, using imfinitesimal method, make 10-15 equal part;
S160, tie point is drawn in the edge intersection of each equal part and workpiece image;
S170, it multiple tie points of workpiece two sides is fitted respectively is in line;
ax+by+c1=0 (1)
ax+by+c2=0 (2)
In formula, x, y are the coordinate of tie point, a, b, c1、c2For the parameter of fitting a straight line;
Wherein a, b, c1、c2Formula (1) is brought by each coordinate and (2) are found out;
S180, according to a, b, c1、c2And the range formula (3) for two straight lines being fitted to calculates range pixel L1,
S190, calibration pixel distance L1Obtain actual range L2
By using above-mentioned technical proposal, first passes through adjustment gray threshold and realizes and classify to the pixel of workpiece and background, The range of gray threshold is 0-255;Then the good image border of segmentation effect is obtained by adjusting Gauss value;Region of interest into The drafting of row measured zone;Comprehensively consider measurement request, the score such as setting, equal part score is higher, and measurement accuracy is higher;Then Automatically the tie point for drawing the edge intersection of each equal part and workpiece image can ignore it not for workpiece in irregular shape The part of rule, is averaged;Due to tie point at least ten of the every side of workpiece, at least ten groups of x, y of every side, because This can calculate a, b, c by formula (1) and formula (2)1、c2, and then derive the pixel between the straight lines of workpiece two sides away from From then being demarcated according to demarcating file, pixel distance be converted into actual range.
The precision of measurement can achieve 0.05mm, and measurement accuracy is high.
Preferably, the file and pixel distance L that pixel is the scaling board image that will be acquired are demarcated in the step S1901Into Rower is fixed.
Preferably, the workpiece is the object of regular shape.
It preferably, further include the adjustment time for exposure in the step S110.
By using above-mentioned technical proposal, clear workpiece image is obtained by adjusting the time for exposure.
The embodiment of the present invention also provides a kind of measuring system of real training robot, surveys applied to the real training based on camera Amount method, the system comprises image capturing system, described image acquisition system is configured to clap workpiece by camera According to and save image;System is arranged in time for exposure, and the time for exposure setting system is configured to adjust the time for exposure of camera; System is arranged in gray threshold, and the gray threshold setting system is configured to be arranged the threshold value of gray scale;Gauss adjusts system, described Gauss adjusts system and is configured to adjust Gauss value;ROI manufacturing system, the ROI manufacturing system are configured to manual drawing survey Measure region;Etc. subsystems, the subsystems such as described be configured to carry out ROI region etc. point to divide;Measurement result system, the survey Amount result system is configured to successively draw tie point, multiple tie points of workpiece two sides are fitted respectively are in line, calculate picture Element distance L1, calibration pixel distance L1Obtain actual range L2
The embodiment of the present invention also provides a kind of measuring device of real training robot, including processor;Memory, it is described The computer program that can be run on the processor is stored on memory, wherein the computer program is by the processing The step of real training measurement method based on camera is realized when device executes.
The embodiment of the present invention also provides a kind of computer readable storage medium, deposits on the computer readable storage medium Data processor is contained, the step of the real training measurement method based on camera is realized when the data processor is executed by processor Suddenly.
Compared with prior art the invention has the following advantages:
Real training measurement method provided by the invention based on camera passes through imfinitesimal method by image edge thinning and same equal part, so The marginal point of each same equal part is fitted to a line segment afterwards, the distance of two lines section is found out finally to obtain measurement structure, surveys Amount method is simple, measurement accuracy is high.
In conjunction with training examination system platform, which can allow real training measurement method provided by the invention based on camera Beginner really understands robot and how to operate and by Survey Software, by measurement result in such a way that TCP/IP is communicated handle Data are transferred to robot, and robot corresponds to the different product of measurement result and classifies, and meet industrial automation demand.It begins to learn Persons can more take action on one's own to grasp measuring technique by the training examination system, understand automation, move towards modernization.
Detailed description of the invention
Fig. 1 is flow chart of the invention;
Fig. 2 is the figure of the ROI drawn after taking pictures, ten equal parts and tie point;
Fig. 3 is the photo of scaling board.
Specific embodiment
Now in conjunction with attached drawing, the invention will be further described.
As shown in Figure 1 to Figure 3, the real training measurement method based on camera, comprising the following steps:
S110, image is saved, preservation of taking pictures is carried out to workpiece by the camera of diameter mouth;
S120, gray threshold is taken, classified to the pixel of workpiece and background;
S130, adjustment Gauss value, are handled by gray threshold and are split to the edge of image;
S140, drawing image ROI region;
S150, using imfinitesimal method, make 10-15 equal part;
S160, tie point is drawn in the edge intersection of each equal part and workpiece image;
S170, it multiple tie points of workpiece two sides is fitted respectively is in line;
ax+by+c1=0 (1)
ax+by+c2=0 (2)
In formula, x, y are the coordinate of tie point, a, b, c1、c2For the parameter of fitting a straight line;
Wherein a, b, c1、c2Formula (1) is brought by each coordinate and (2) are found out;
S180, according to a, b, c1、c2And the range formula (3) for two straight lines being fitted to calculates range pixel L1,
S190, calibration pixel distance L1Obtain actual range L2
It first passes through adjustment gray threshold and realizes and classify to the pixel of workpiece and background, the range of gray threshold is 0-255; Then the good image border of segmentation effect is obtained by adjusting Gauss value;Region is measured in region of interest, that is, ROI region It draws;Comprehensively consider measurement request, the score such as setting, equal part score is higher, and measurement accuracy is higher;Then automatic to draw each The tie point of the edge intersection of equal part and workpiece image can ignore its irregular part for workpiece in irregular shape, It is averaged;Due to tie point at least ten of the every side of workpiece, at least ten groups of x, y of every side, therefore pass through formula (1) and formula (2) can calculate a, b, c1、c2, and then derive the pixel distance between the straight lines of workpiece two sides, then root It is demarcated according to demarcating file, pixel distance is converted into actual range.
The precision of measurement can achieve 0.05mm, and measurement accuracy is high.
The file and pixel distance L that pixel is the scaling board image that will be acquired are demarcated in step S1901It is demarcated.
Workpiece is the object of regular shape, such as cylindrical body, cuboid.
It further include the adjustment time for exposure in step S110.Clear workpiece image is obtained by adjusting the time for exposure.
The embodiment of the present invention also provides a kind of measuring system of real training robot, surveys applied to the real training based on camera Amount method, the system comprises image capturing system, described image acquisition system is configured to clap workpiece by camera According to and save image;System is arranged in time for exposure, and the time for exposure setting system is configured to adjust the time for exposure of camera; System is arranged in gray threshold, and the gray threshold setting system is configured to be arranged the threshold value of gray scale;Gauss adjusts system, described Gauss adjusts system and is configured to adjust Gauss value;ROI manufacturing system, the ROI manufacturing system are configured to manual drawing survey Measure region;Etc. subsystems, the subsystems such as described be configured to carry out ROI region etc. point to divide;Measurement result system, the survey Amount result system is configured to successively draw tie point, multiple tie points of workpiece two sides are fitted respectively are in line, calculate picture Element distance L1, calibration pixel distance L1Obtain actual range L2
The embodiment of the present invention also provides a kind of measuring device of real training robot, including processor;Memory, it is described The computer program that can be run on the processor is stored on memory, wherein the computer program is by the processing The step of real training measurement method based on camera is realized when device executes.
The embodiment of the present invention also provides a kind of computer readable storage medium, deposits on the computer readable storage medium Data processor is contained, the step of the real training measurement method based on camera is realized when the data processor is executed by processor Suddenly.
Professional is it is to be appreciated that unit described in conjunction with the examples disclosed in the embodiments of the present disclosure and algorithm steps Suddenly, it can be realized with electronic hardware, computer software, or a combination of the two, it can in order to clearly demonstrate hardware and software Interchangeability generally describes each exemplary composition and step according to function in the above description.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In any other form of storage medium well known in field.
Compared with prior art the invention has the following advantages:
Real training measurement method provided by the invention based on camera passes through imfinitesimal method by image edge thinning and same equal part, so The marginal point of each same equal part is fitted to a line segment afterwards, the distance of two lines section is found out finally to obtain measurement structure, surveys Amount method is simple, measurement accuracy is high.
In conjunction with training examination system platform, which can allow real training measurement method provided by the invention based on camera Beginner really understands robot and how to operate and by Survey Software, by measurement result in such a way that TCP/IP is communicated handle Data are transferred to robot, and robot corresponds to the different product of measurement result and classifies, and meet industrial automation demand.It begins to learn Persons can more take action on one's own to grasp measuring technique by the training examination system, understand automation, move towards modernization.

Claims (7)

1. the real training measurement method based on camera, which comprises the following steps:
S110, image is saved, preservation of taking pictures is carried out to workpiece by the camera of diameter mouth;
S120, gray threshold is taken, classified to the pixel of workpiece and background;
S130, adjustment Gauss value, are handled by gray threshold and are split to the edge of image;
S140, drawing image ROI region;
S150, using imfinitesimal method, make 10-15 equal part;
S160, tie point is drawn in the edge intersection of each equal part and workpiece image;
S170, it multiple tie points of workpiece two sides is fitted respectively is in line;
ax+by+c1=0 (1)
ax+by+c2=0 (2)
In formula, x, y are the coordinate of tie point, a, b, c1、c2For the parameter of fitting a straight line;
Wherein a, b, c1、c2Formula (1) is brought by each coordinate and (2) are found out;
S180, according to a, b, c1、c2And the range formula (3) for two straight lines being fitted to calculates range pixel L1,
S190, calibration pixel distance L1Obtain actual range L2
2. the real training measurement method according to claim 1 based on camera, which is characterized in that further include
The file and pixel distance L that pixel is the scaling board image that will be acquired are demarcated in the step S1901It is demarcated.
3. the real training measurement method according to claim 1 based on camera, which is characterized in that the workpiece is regular shape Object.
4. the real training measurement method according to claim 1 based on camera, which is characterized in that also wrapped in the step S110 Include the adjustment time for exposure.
5. a kind of measuring system of real training robot, which is characterized in that be applied to described in any one of Claims 1-4 Real training measurement method based on camera, the system comprises
Image capturing system, described image acquisition system are configured to take pictures to workpiece by camera and save image;
System is arranged in time for exposure, and the time for exposure setting system is configured to adjust the time for exposure of camera;
System is arranged in gray threshold, and the gray threshold setting system is configured to be arranged the threshold value of gray scale;
Gauss adjusts system, and the Gauss adjusts system and is configured to adjust Gauss value;
ROI manufacturing system, the ROI manufacturing system are configured to manual drawing measured zone;
Etc. subsystems, the subsystems such as described be configured to carry out ROI region etc. point to divide;And
Measurement result system, the measurement result system are configured to successively draw tie point, multiple connections by workpiece two sides Fitting is in line, calculates pixel distance L point respectively1, calibration pixel distance L1Obtain actual range L2
6. a kind of measuring device of real training robot, which is characterized in that including
Processor;And
Memory is stored with the computer program that can be run on the processor on the memory,
Wherein, it realizes when the computer program is executed by the processor and is based on according to any one of claims 1 to 4 The step of real training measurement method of camera.
7. a kind of computer readable storage medium, which is characterized in that be stored at data on the computer readable storage medium Program is managed, is realized when the data processor is executed by processor and is based on camera according to any one of claims 1 to 4 Real training measurement method the step of.
CN201910727289.XA 2019-08-07 2019-08-07 Practical training measurement method and device based on camera Active CN110426018B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910727289.XA CN110426018B (en) 2019-08-07 2019-08-07 Practical training measurement method and device based on camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910727289.XA CN110426018B (en) 2019-08-07 2019-08-07 Practical training measurement method and device based on camera

Publications (2)

Publication Number Publication Date
CN110426018A true CN110426018A (en) 2019-11-08
CN110426018B CN110426018B (en) 2021-08-10

Family

ID=68414796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910727289.XA Active CN110426018B (en) 2019-08-07 2019-08-07 Practical training measurement method and device based on camera

Country Status (1)

Country Link
CN (1) CN110426018B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112171668A (en) * 2020-09-21 2021-01-05 河南颂达信息技术有限公司 Rail-mounted robot anti-jamming detection method and device based on artificial intelligence

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09250911A (en) * 1996-03-14 1997-09-22 Nippon Steel Corp Method for measuring dimension based on image
CN103292701A (en) * 2013-06-24 2013-09-11 哈尔滨工业大学 Machine-vision-based online dimensional measurement method of precise instrument
CN107705293A (en) * 2017-09-14 2018-02-16 广东工业大学 A kind of hardware dimension measurement method based on CCD area array cameras vision-based detections

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09250911A (en) * 1996-03-14 1997-09-22 Nippon Steel Corp Method for measuring dimension based on image
CN103292701A (en) * 2013-06-24 2013-09-11 哈尔滨工业大学 Machine-vision-based online dimensional measurement method of precise instrument
CN107705293A (en) * 2017-09-14 2018-02-16 广东工业大学 A kind of hardware dimension measurement method based on CCD area array cameras vision-based detections

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
杨仁民,等: "《基于机器视觉的零件特征尺寸提取算法》", 《包装工程》 *
段振云,等: "《基于点阵标定板的视觉测量系统的标定方法》", 《光学学报》 *
陈至坤,等: "《基于机器视觉的角钢截面几何参数测量》", 《工业控制计算机》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112171668A (en) * 2020-09-21 2021-01-05 河南颂达信息技术有限公司 Rail-mounted robot anti-jamming detection method and device based on artificial intelligence

Also Published As

Publication number Publication date
CN110426018B (en) 2021-08-10

Similar Documents

Publication Publication Date Title
CN107481284A (en) Method, apparatus, terminal and the system of target tracking path accuracy measurement
CN109657607B (en) Face target ranging method, device and storage medium based on face recognition
CN109034017B (en) Head pose estimation method and machine readable storage medium
JP2020161129A (en) System and method for scoring color candidate poses against color image in vision system
CN109087325B (en) Direct method point cloud three-dimensional reconstruction and scale determination method based on monocular vision
CN107705293A (en) A kind of hardware dimension measurement method based on CCD area array cameras vision-based detections
JP6317725B2 (en) System and method for determining clutter in acquired images
JP6519265B2 (en) Image processing method
CN105894521A (en) Sub-pixel edge detection method based on Gaussian fitting
CN111178276B (en) Image processing method, image processing apparatus, and computer-readable storage medium
CN110738644A (en) automobile coating surface defect detection method and system based on deep learning
DE102012222361B4 (en) Environment recognition device
CN110426018A (en) Real training measurement method and device based on camera
JP2672509B2 (en) Method and apparatus for automatically calibrating camera model
CN113610929A (en) Camera and multi-line laser combined calibration method
CN112085752A (en) Image processing method, device, equipment and medium
CN109445229B (en) Method for obtaining focal length of zoom camera with first-order radial distortion
CN109000560B (en) Method, device and equipment for detecting package size based on three-dimensional camera
US11445162B2 (en) Method and device for calibrating binocular camera
CN111968183B (en) Gauge block calibration method for calibrating monocular line laser three-dimensional measurement module
JP2009192483A (en) Three dimensional shape measuring method and three dimensional shape measuring device
CN109544509B (en) Workpiece positioning method and device based on secondary template matching and storage device
CN113587895A (en) Binocular distance measuring method and device
CN113048899A (en) Thickness measuring method and system based on line structured light
Liu et al. Correction of the asymmetrical circular projection in DLT camera calibration

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
GR01 Patent grant
GR01 Patent grant