CN106951814B - Circular grating eccentricity calculation method of encoder eccentricity adjustment system - Google Patents

Circular grating eccentricity calculation method of encoder eccentricity adjustment system Download PDF

Info

Publication number
CN106951814B
CN106951814B CN201610002530.9A CN201610002530A CN106951814B CN 106951814 B CN106951814 B CN 106951814B CN 201610002530 A CN201610002530 A CN 201610002530A CN 106951814 B CN106951814 B CN 106951814B
Authority
CN
China
Prior art keywords
code channel
base circle
circular grating
eccentric
encoder
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.)
Expired - Fee Related
Application number
CN201610002530.9A
Other languages
Chinese (zh)
Other versions
CN106951814A (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.)
Harbin University of Science and Technology
Original Assignee
Harbin University of Science and Technology
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 Harbin University of Science and Technology filed Critical Harbin University of Science and Technology
Priority to CN201610002530.9A priority Critical patent/CN106951814B/en
Publication of CN106951814A publication Critical patent/CN106951814A/en
Application granted granted Critical
Publication of CN106951814B publication Critical patent/CN106951814B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/26Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Optical Transform (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

At present, most of domestic enterprises adopt a manual assembly method, and in the assembly process, the proficiency of workers has great influence on the assembly precision and the assembly efficiency of products, and the quality stability of the products is not high. With the wide application of automatic production lines, the manual assembly mode by workers cannot meet the requirements of modern production. A circular grating eccentricity calculation method for an encoder eccentricity adjustment system comprises the following steps: step 1, shooting eight position images uniformly distributed on a circular grating code channel by using a CCD industrial camera; step 2, preprocessing such as filtering the graph; step 3, extracting and recording coordinate values of the feature points by the features; step 4, fitting a code channel base circle to obtain the maximum value of the base circle abscissa; and 5, calculating the eccentric angle position and the eccentric value of the circular grating. The calculation and image processing processes are realized by VC and OpenCV, the eccentric position and size of the circular grating of the encoder can be accurately calculated, the adjustment precision and adjustment efficiency in the adjustment process of the encoder are effectively improved, the calculation process is efficient and accurate, and the calculation process is conveniently combined with a control system.

Description

Circular grating eccentricity calculation method of encoder eccentricity adjustment system
Technical Field
The invention belongs to the field of encoder production, and particularly relates to a circular grating eccentricity calculation method for an encoder eccentricity adjustment system.
Background
The grating code disc of the photoelectric shaft angle encoder is arranged on a main shaft of the encoder and rotates along with the main shaft to perform precise indexing, the working precision of a main shaft system determines the performance and precision of the photoelectric shaft angle encoder to a great extent, and the working precision of the main shaft system is ensured by the processing precision of each part of the grating and the main shaft and the assembly precision of the grating and the main shaft. The correct assembly and adjustment of the circular grating code disc can fully exert the high-precision performance of parts of the photoelectric shaft-position encoder or compensate the defects of some parts.
At present, most of domestic enterprises adopt a manual assembly method, and in the assembly process, the proficiency of workers has great influence on the assembly precision and the assembly efficiency of products, and the quality stability of the products is not high. With the wide application of automatic production lines, the manual assembly mode by workers cannot meet the requirements of modern production. The automatic adjusting and assembling system for the encoder grating can effectively improve assembling precision and efficiency and can be integrated into an automatic production line of an encoder. In order to improve the detection efficiency and detection precision of the encoder circular grating automatic adjustment assembly system in the encoder circular grating eccentricity detection process and facilitate subsequent eccentricity adjustment, a method for calculating the eccentric position and size of the encoder circular grating based on machine vision is provided.
Disclosure of Invention
According to the characteristics of the encoder circular grating in the eccentric adjustment process, the invention provides a method for calculating the eccentric position of the encoder circular grating based on machine vision, the method can accurately calculate the eccentric position and size of the encoder circular grating, and the adjustment precision and adjustment efficiency of the encoder in the adjustment process are effectively improved.
The technical scheme adopted by the invention is as follows:
a circular grating eccentricity calculation method of an encoder eccentricity adjustment system comprises the following steps:
step 1, shooting eight position images uniformly distributed on a circular grating code channel by using a CCD industrial camera;
step 2, preprocessing such as filtering the image;
step 3, extracting and recording coordinate values of the feature points by the features;
step 4, fitting a code channel base circle to obtain the maximum value of the base circle abscissa;
step 5, calculating the eccentric angle position and the eccentric value of the circular grating;
in step 1, the camera with the eight position images uniformly distributed on the circular grating code track takes a base circle image every 45 degrees.
In step 2, the image processing process is realized through vc + + and OpenCV, and the required image is obtained through gray level transformation, image gaussian filtering, binarization and reverse color operation of the image.
In step 3, the feature extraction process adopts a minimum external rectangle mode to extract the code channel contour, eliminates the interference of other contours and obtains the code channel vertex.
In step 4, the fitting code channel base circle adopts a least square method to fit the points obtained by the characteristic extraction into the code channel base circle. Thereby obtaining the maximum value of the abscissa of the code track base circle and recording the maximum value as
Figure 144573DEST_PATH_IMAGE001
Wherein
Figure 61714DEST_PATH_IMAGE002
In step 5, the eccentric angle position of the circular grating and the calculated eccentric value are obtained through the above steps
Figure 841451DEST_PATH_IMAGE001
The following formula is used to obtain the eccentric angle positionθAnd size of eccentricitye
Figure 236660DEST_PATH_IMAGE003
Figure 51032DEST_PATH_IMAGE004
This technical scheme has following beneficial effect:
1. the calculation method of the invention is used for calculating the eccentric position of the circular grating of the encoder, namely calculating the relative position between the rotation center of the main shaft of the encoder and the center of the circle of the code channel base circle of the circular grating. The invention fully considers the relative change of the main shaft position and the CCD camera position when the encoder is adjusted and replaced each time due to machining errors and the like in the production process, thereby accurately calculating the position and the eccentric size of the encoding eccentric angle.
2. The invention considers the relation between the coordination adjustment efficiency and the adjustment precision, and selects reasonable image shooting times, so that the calculation efficiency is fully improved under the condition that the calculation precision meets the requirement.
3. The invention considers the processing error of the code channel and the outer edge of the grating, and selects reasonable image shooting times, so that the calculation efficiency is fully improved under the condition that the calculation precision meets the requirement.
4. The invention considers the processing error between the code channel and the outer edge of the grating and the processing error between the code channel and the base circle of the grating, and directly adopts the code channel as the eccentric center as the calculation standard when selecting the calculation eccentric standard, which is favorable for improving the precision of the eccentric calculation result.
5. In the process of extracting the code channel contour, the minimum circumscribed rectangle is adopted to extract the code channel contour, and the interference of other contours in the image on the calculation process can be effectively eliminated by limiting the length and the width of the rectangle.
6. In the process of fitting the code channel base circle, the least square method is adopted, so that the adverse effect of the code channel processing error on the calculation result can be effectively reduced.
Description of the drawings:
FIG. 1 is a flow chart of a computing method
FIG. 2 shows the relative position of the circular grating of the encoder and the spindle
FIG. 3 is a drawing of a base circle of code channel by fitting
The specific implementation mode of the invention is as follows:
embodiments of the invention will be described in detail below with reference to the accompanying drawings. As shown in fig. 1, a flow chart of a calculation method.
The method comprises the following steps: as shown in fig. 2, a CCD industrial camera is used to take eight position images uniformly distributed on a code track of a circular grating, which is rotated by a servo motor. In the calculation process, the more points are taken on the circular grating code track, the higher the precision is, and meanwhile, the longer the image shooting process time is along with the increase of the number of the taken points, the lower the efficiency in the detection process is. Through multiple tests, the factors of precision and efficiency are comprehensively considered, and eight points are most suitable to be selected on the circular grating code channel.
Step two: and (4) carrying out gray level transformation, image Gaussian filtering, binarization and color reversal on the eight images obtained in the step one to obtain a required binary image. The image processing process is realized by vc + + and OpenCV. Since the raster code track is black in the image, a reverse color process is required.
Step three: and D, extracting the binary image obtained in the step two to obtain all the contours in the image. Because the grating code track has the same space and width, the shape is similar to a long rectangle. Aiming at the characteristics of the grating code channel, a minimum external rectangle surrounding a code channel base circle is adopted to extract the code channel outline. The minimum external rectangle has four vertexes, two points near the outer side of the edge of the rectangle are taken out and drawn, the coordinate values of the middle points of the two points are calculated, and the coordinate values of the points are recorded as
Figure 811178DEST_PATH_IMAGE005
Wherein
Figure 15894DEST_PATH_IMAGE006
Step four: obtaining points in the third step by adopting a least square method
Figure 214795DEST_PATH_IMAGE005
The fitting of (1) is a code track base circle. The least square method is used for fitting the code channel base circle, so that not only is the precision high, but also the influence of the code channel processing error on the calculation can be eliminated. First, the type of the fitting function is determined, and then the coefficients of the various items of the fitting function are determined.
The grating code channel base circle equation is set as:
Figure 883673DEST_PATH_IMAGE007
sample point coordinates
Figure 877037DEST_PATH_IMAGE005
Wherein
Figure 631367DEST_PATH_IMAGE006
The distance from the center of the code channel base circle is
Figure 368378DEST_PATH_IMAGE008
Figure 891764DEST_PATH_IMAGE009
Dot
Figure 259291DEST_PATH_IMAGE005
The difference between the square of the distance to the center of the code track base circle and the square of the radius is as follows:
Figure 500917DEST_PATH_IMAGE010
in the formula
Figure 713723DEST_PATH_IMAGE011
Figure 357194DEST_PATH_IMAGE012
By derivation, find
Figure 630044DEST_PATH_IMAGE013
At minimum valueabcValue of
Figure 358965DEST_PATH_IMAGE014
Solving the system of equations to obtain
Figure 437780DEST_PATH_IMAGE015
Wherein
Figure 935757DEST_PATH_IMAGE016
By passing
Figure 707404DEST_PATH_IMAGE017
The coordinates of the center of the base circle of the grating code track are obtained through
Figure 586937DEST_PATH_IMAGE018
And (5) calculating the base circle radius of the grating code track. And drawing the calculated grating code track base circle into a picture by using a drawing function in OpenCV (open circuit graphics library), as shown in FIG. 3. Then, the maximum point of the abscissa of the point on the grating code track circle is calculated, and the abscissa of the point is recorded as
Figure 469442DEST_PATH_IMAGE019
Step five: using the abscissa values obtained in step three
Figure 821926DEST_PATH_IMAGE019
And calculating the eccentric position and size of the circular grating. The relative position of the lens and the rotation center is fixed in single clamping, and the relative distance between the lens and the rotation center is set asLThen the distance from each point on the grating code track base circle to the rotation center is the distance
Figure 764474DEST_PATH_IMAGE020
. The distance between the center of a circle of the grating code track and the rotation center is set aseEccentric angle ofθ
As shown in FIG. 2, the relative positions of the track center and the rotation center can be seen
Figure 202409DEST_PATH_IMAGE021
Thus, it is obtained that,
Figure 623026DEST_PATH_IMAGE022
after the eccentric angle position and the eccentric size of the encoder circular grating are calculated by the calculation method, the eccentric direction of the grating is rotated to the direction of the push rod, and the circular grating is adjusted by the adjusting device, so that the eccentric adjustment of the circular grating can be completed.

Claims (4)

1. A circular grating eccentricity calculation method of an encoder eccentricity adjustment system is characterized by comprising
Step 1, shooting eight position images uniformly distributed on a circular grating code channel by using a CCD industrial camera;
step 2, preprocessing the image;
step 3, extracting and recording coordinate values of the feature points by the features;
step 4, fitting the code channel base circle to obtain the maximum value of the horizontal coordinate of the code channel base circle;
the code channel base circle equation is: r2=(x-x′)2+(y-y′)2
Sample point coordinates (x)i,yi) Wherein the distance from i epsilon (1, 2.. N) to the center of the code channel base circle is Ri
Figure FDA0002686045610000011
Point (x)i,yi) The difference between the distance from the circle center of the code track base circle and the square of the radius is as follows:
Figure FDA0002686045610000012
wherein x' is-a/2,
Figure FDA0002686045610000013
Figure FDA0002686045610000014
by derivation, find
Figure FDA0002686045610000015
A, b, c value at minimum
Figure FDA0002686045610000016
Figure FDA0002686045610000017
Figure FDA0002686045610000018
Solving the system of equations to obtain
Figure FDA0002686045610000019
Wherein,
Figure FDA00026860456100000110
K=N∑xiyi-∑xi·∑yi
Figure FDA00026860456100000111
Figure FDA00026860456100000112
Figure FDA00026860456100000113
by passing x '═ -a/2, y' ═ -b/2
Figure FDA0002686045610000021
Calculating the radius of a code track base circle, and then calculating the maximum point of the abscissa of the point on the grating code track circle;
step 5, calculating the eccentric angle position and the eccentric value of the circular grating;
in step 1, a camera with eight position images uniformly distributed on the circular grating code channel takes a code channel base circle image every 45 degrees;
in the step 5, the eccentric angle position of the circular grating and the size of the calculated eccentric value are calculated, and the eccentric angle position theta and the eccentric size e are obtained through the following formulas;
Figure FDA0002686045610000022
Figure FDA0002686045610000023
2. the eccentricity calculation method according to claim 1, wherein in step 2, the preprocessing of the image in step 2 is implemented by vc + + and OpenCV, and the image is subjected to gray scale transformation, image gaussian filtering, binarization and inverse color operation to obtain a desired image.
3. The eccentricity calculation method according to claim 1, wherein in step 3, the feature extraction process adopts a minimum bounding rectangle to extract the code channel contour, to exclude interference of other contours, and to obtain the code channel vertex.
4. The eccentricity calculation method according to claim 1, wherein in step 4, the fitted code track base circle is obtained by extracting the features using least square methodFitting the obtained characteristic points into a code channel base circle, and recording the maximum value of the abscissa of the code channel base circle as XimaxWhere i ∈ (1, 2.. 8).
CN201610002530.9A 2016-01-06 2016-01-06 Circular grating eccentricity calculation method of encoder eccentricity adjustment system Expired - Fee Related CN106951814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610002530.9A CN106951814B (en) 2016-01-06 2016-01-06 Circular grating eccentricity calculation method of encoder eccentricity adjustment system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610002530.9A CN106951814B (en) 2016-01-06 2016-01-06 Circular grating eccentricity calculation method of encoder eccentricity adjustment system

Publications (2)

Publication Number Publication Date
CN106951814A CN106951814A (en) 2017-07-14
CN106951814B true CN106951814B (en) 2020-11-24

Family

ID=59465232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610002530.9A Expired - Fee Related CN106951814B (en) 2016-01-06 2016-01-06 Circular grating eccentricity calculation method of encoder eccentricity adjustment system

Country Status (1)

Country Link
CN (1) CN106951814B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114839736B (en) * 2021-07-30 2024-01-02 深圳市中图仪器股份有限公司 Composite mechanism and method for reducing eccentricity errors
CN113866229B (en) * 2021-09-23 2022-07-26 北京大学 high-Q-value eccentric artificial local surface plasmon quasi-BIC super surface and implementation method thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103308093A (en) * 2013-06-13 2013-09-18 哈尔滨理工大学 Automatic adjusting set for encoder grating eccentricity
CN104647026A (en) * 2015-02-27 2015-05-27 南京埃斯顿自动控制技术有限公司 Automatic aligning device for grating code channel of encoder

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103308093A (en) * 2013-06-13 2013-09-18 哈尔滨理工大学 Automatic adjusting set for encoder grating eccentricity
CN104647026A (en) * 2015-02-27 2015-05-27 南京埃斯顿自动控制技术有限公司 Automatic aligning device for grating code channel of encoder

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于机器视觉的编码器光栅装配偏心调整技术;王义文等;《计算机应用研究》;20131231;第30卷(第12期);摘要、第1-4章 *

Also Published As

Publication number Publication date
CN106951814A (en) 2017-07-14

Similar Documents

Publication Publication Date Title
CN109598762B (en) High-precision binocular camera calibration method
CN111260731B (en) Self-adaptive detection method for checkerboard sub-pixel level corner points
CN108921865B (en) Anti-interference sub-pixel straight line fitting method
CN112223285B (en) Robot hand-eye calibration method based on combined measurement
CN114279357B (en) Die casting burr size measurement method and system based on machine vision
CN107228860B (en) Gear defect detection method based on image rotation period characteristics
CN109272574B (en) Construction method and calibration method of linear array rotary scanning camera imaging model based on projection transformation
CN106204610A (en) Peg-in-hole assembly automatic centering system based on image procossing
CN113592955B (en) Round workpiece plane coordinate high-precision positioning method based on machine vision
CN101038163A (en) Single-vision measuring method of space three-dimensional attitude of variable-focus video camera
CN115096206B (en) High-precision part size measurement method based on machine vision
CN111311618A (en) Circular arc workpiece matching and positioning method based on high-precision geometric primitive extraction
CN115830018B (en) Carbon block detection method and system based on deep learning and binocular vision
CN106951814B (en) Circular grating eccentricity calculation method of encoder eccentricity adjustment system
CN116188544A (en) Point cloud registration method combining edge features
CN110751690B (en) Visual positioning method for milling machine tool bit
CN109887038B (en) Machine vision image correction method for online detection
CN108520533B (en) Workpiece positioning-oriented multi-dimensional feature registration method
CN109345500A (en) A kind of machine tool knife position of cusp calculation method based on machine vision
CN111968182B (en) Calibration method for nonlinear model parameters of binocular camera
CN113538399A (en) Method for obtaining accurate contour of workpiece, machine tool and storage medium
CN111105418B (en) High-precision image segmentation method for rectangular targets in image
CN116596987A (en) Workpiece three-dimensional size high-precision measurement method based on binocular vision
CN110349169A (en) A kind of line measurement method
CN113074672B (en) Method for calculating eccentric position of grating disc in encoder eccentric adjustment system

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201124

Termination date: 20220106