CN111189396B - Displacement detection method of incremental absolute grating ruler based on neural network - Google Patents

Displacement detection method of incremental absolute grating ruler based on neural network Download PDF

Info

Publication number
CN111189396B
CN111189396B CN201911131177.4A CN201911131177A CN111189396B CN 111189396 B CN111189396 B CN 111189396B CN 201911131177 A CN201911131177 A CN 201911131177A CN 111189396 B CN111189396 B CN 111189396B
Authority
CN
China
Prior art keywords
grating
image
grating ruler
ruler
displacement
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.)
Active
Application number
CN201911131177.4A
Other languages
Chinese (zh)
Other versions
CN111189396A (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.)
Guangdong University of Technology
Original Assignee
Guangdong University of 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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201911131177.4A priority Critical patent/CN111189396B/en
Publication of CN111189396A publication Critical patent/CN111189396A/en
Application granted granted Critical
Publication of CN111189396B publication Critical patent/CN111189396B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a displacement detection method of an incremental circular grating ruler based on a neural network, which comprises the following steps: the microscopic features of the grid lines on the circular grating ruler are distinguished or marked, so that the circular grating ruler is converted into an incremental absolute grating ruler, and the uniqueness of each grid line is ensured; establishing a deep learning neural network model, training each extracted grating pattern, and storing a well-trained grating classification model for obtaining a current absolute position; based on the image pixel points, the absolute grating position of the final position is counted so as to improve the displacement detection precision. The detection method solves the defects that the incremental circular grating ruler is easy to drop pulses at high speed and needs zero returning operation after power failure, solves the problem that the absolute grating ruler and the incremental grating ruler need to be matched for use at the same time, and overcomes the defect that the grating ruler is high in cost in the high-precision measurement process.

Description

Displacement detection method of incremental absolute grating ruler based on neural network
Technical Field
The application relates to the technical field of measuring instruments, in particular to an incremental circular grating ruler system.
Background
The grating ruler is commonly used in machine tools, modern machining centers, measuring instruments and the like, can be used for detecting linear displacement or angular displacement, and has the characteristics of large measuring range, high detecting precision and high response speed, and the measured output signals of the grating ruler are digital pulses. The grating ruler is usually combined with a reading head, the reading head generates a sine wave signal period every time the reading head scans a grating distance, and the signal is subdivided by an electronic circuit, so that high resolution can be achieved.
The currently used grating scales are mainly divided into an incremental type and an absolute type. An incremental grating scale is a periodic grating line, and only has a zero mark scale and an incremental counting scale with constant intervals, position information is obtained by calculating the increment number from a certain point, and the starting point of counting needs to be determined by a reference point of a machine tool. The output information of the absolute grating ruler corresponds to the position information one by one, each position corresponds to a specific position code, the position codes are carved into a series of code channels on the main grating ruler, and the position codes are obtained through the reading head to determine the absolute position. Therefore, when the power is off or the computer is restarted due to faults, the actual position value of the absolute grating ruler can be known by using the position code of the absolute grating ruler, so that the zero returning operation is avoided. However, the absolute grating ruler has the problems of complex coding, high manufacturing cost and slow reading speed, has higher requirements on scale grating lines and increases the processing cost.
With continuous assistance and driving of factors such as policies, enterprises, capital and the like, robots in China develop a rapid trend. The common robot mechanical arm is generally constructed in a form of combining an integral servo motor and an encoder, and as the demand for miniaturization of the servo motor is more and more vigorous, the requirements for miniaturization and ultra-thinning of the encoder are more and more strong. Servo motor manufacturers demand encoders with small diameters, thin thicknesses, high accuracy and low price. Although the grating encoder is only a fitting within the robot arm, it is functional in-line to play a significant role. How to further integrate and shrink the encoder is a problem that needs to be solved urgently at present.
The document 'performance comparison and analysis of an incremental grating encoder and an absolute encoder', indicates through experimental comparison that the velocity curve goodness of fit of an incremental grating ruler and an absolute grating ruler is good; in terms of speed measurement, the incremental grating ruler has higher precision than the absolute grating ruler; under the same speed rotation condition, the incremental grating ruler works stably. At this stage, in order to combine the high speed and stability of the incremental grating ruler with the rapid positioning of the actual position value of the absolute grating ruler, a method of using the incremental grating ruler and the absolute grating ruler together is adopted in industry. Namely, the absolute grating scale is used for acquiring the current actual initial position, and the incremental grating scale is used for incremental counting.
The invention 201811524343.2 provides a grating scale calibration method, a grating scale calibration device and a visual detection device, which are used for collecting images of a calibration plate placed on a machine platform, extracting the coordinates of the grating scale and the visual coordinates of sampling points on a collected image, and repeating the above processes until all the sampling images are completely read. And then obtaining the coordinates of the image to be detected through coordinate conversion and other modes.
The methods provided by the prior art have the following disadvantages: (1) although the advantages of the incremental grating ruler and the absolute grating ruler are fused, the advantages of the incremental grating ruler and the absolute grating ruler are not integrated, and (2) the positions of the grating ruler are sampled in a visual mode, but the calculation process is complicated, and the calibration precision is not well improved.
In summary, it can be seen that how to combine the high precision and better working stability of the incremental grating scale with the advantage that the absolute grating scale does not need to return to zero, and to improve the detection precision of the grating scale by a visual processing mode is a problem to be solved at present.
Disclosure of Invention
The invention provides a neural network-based incremental circular grating ruler displacement detection method, which can effectively combine the advantages of an incremental grating ruler and an absolute grating ruler, and converts the incremental grating ruler into an incremental absolute grating ruler capable of acquiring an actual position through learning the microscopic features on the incremental grating ruler, so that the zero return operation of the incremental grating ruler is avoided, the mode of using the absolute grating ruler and the incremental grating ruler in a matched manner is improved, and the integration of separated layout is realized. The characteristics of high resolution and uniform pixels of the CCD/COMS are utilized to amplify the movement of the image of the grating lines, accurately position and directly digitize, the conventional method for subdividing the bit image of the Moore stripes is changed, and direct pixel points are counted. The limitation of the grating manufacturing accuracy of conventional grating measurements (typically 20 μm) can be effectively overcome by image processing techniques.
In order to realize the task, the invention adopts the following technical scheme:
an incremental circular grating ruler displacement detection method based on a neural network comprises the following steps:
step 1, analyzing microscopic features on a grating ruler, and if the microscopic features are difficult to identify, making the microscopic features on a grating by marking on an incremental circular grating ruler, so that the incremental circular grating ruler is converted into an incremental absolute circular grating ruler, and the uniqueness of each grating line is ensured;
and 2, acquiring a grating ruler image, extracting grating ruler grids, establishing an image acquisition library of each grid, performing neural network training on the image acquisition library, and outputting a classification model.
And 3, establishing a displacement detection mathematical model, wherein the mathematical model consists of a macro displacement calculation part and a micro displacement calculation part.
And collecting an image of a grating ruler to be detected for displacement, inputting the image into a neural network, carrying out grating pattern recognition by using a trained neural network model, and feeding back the recognized grating pattern number to a mathematical model so as to roughly calculate a displacement detection value. And processing the acquired upper and lower frame related images of the grating ruler, and finely calculating the accurate value of the displacement by adopting a mode of counting pixel points.
Further, the step 1 of marking on the incremental circular grating ruler converts the incremental circular grating ruler into an incremental circular absolute grating ruler, which specifically comprises:
the circular grating ruler is carved in modes of arc lines, oblique lines and the like, different marks are used as the micro characteristics of each grating, and different micro characteristics enable each grating line to have uniqueness, namely, the incremental grating ruler is converted into the incremental absolute grating ruler.
Further, the acquiring of the grating image in step 2 includes:
for the grating ruler on the carrier moving platform, firstly, a camera is aligned with a first grating of the circular grating ruler, a pointer points to the first grating, a circular grating disk is slowly rotated, a plurality of batches of grating images are collected through the camera, and the collected grating ruler images are numbered and named in sequence according to a certain sequence and are stored.
Extracting each complete grating in the grating image through a characteristic window, naming and storing the complete grating in sequence, establishing a deep learning neural network model, training each grating line, and storing the trained grating classification model;
step 3, grating displacement calculation, including macro displacement calculation and micro displacement calculation,
and (3) performing macro displacement calculation, including using the trained grating classification model to identify the initial actual position and the final stop position of the circular grating ruler, so as to obtain macro displacement.
Carrying out micro-displacement calculation, extracting grating lines of the grating ruler from two to three frames related before and after the stop of the collected grating, and comprising the following steps:
firstly, extracting a first complete grating which is farthest from the image and is positioned at the left side of a second frame of grating image before stopping, and matching the same grating of the next frame of grating image by adopting a template matching method, wherein a specific formula is as follows:
their similarity is measured using the following formula:
Figure GDA0003528520680000031
Figure GDA0003528520680000041
the template T (m x n pixels) is overlapped on the searched image S (W x H pixels) and translated, and a block of the template T coincident with the searched image is a sub-image Sij(m, n), i, j are coordinates of the leftmost upper corner of the sub-graph on the p-t coordinate on the searched graph S. By comparing template T (m, n) with sub-graph SijAnd (m, n) similarity, and completing the template matching process. The first term in the above formula is the energy of the subgraph, and the third term is the energy of the template, which are not related to the template matching. The second term is the correlation of the template and the subgraph with each other, varying with (i, j). When the template and subgraph match, the term is bounded by the maximum. In the method, template matching is carried out in a standard square error mode.
Figure GDA0003528520680000042
T represents a template image, I represents an image to be matched, x and y represent the coordinates of the position of the upper left corner of the template relative to the position of the image to be matched, x 'and y' represent the positions of the template superposed on the searched image and (x + x ', y + y') represents the position of the searched subgraph. And (4) moving a pixel point on the image to be matched by the template, and carrying out similarity calculation once. The larger the correlation coefficient of the two pixel point matrixes is, the higher the similarity between the template image and the sub-image in the image to be matched is.
According to the method, the pixel matrix on the image is matched with the pixel matrix of the given template image, the obtained image matrix is compared with the template matrix, and the larger the relative coefficient is, the higher the matching degree is; taking m pixels behind the grating image transversely in the x-axis direction of the grating image as the width of a characteristic window, wherein m is the number of pixels corresponding to the width of the grating pattern of the template; and extracting the same grating pattern by using the characteristic window, reading the next grating pattern after the extraction of the grating pattern image in the current grating pattern is finished, and sequentially extracting the same grating pattern image according to the same method.
The method comprises the steps of obtaining the approximate displacement of a grating by carrying out category identification on an initial grating and a stop grating; and judging the grating of the characteristic window by the frame number before and after stopping, and counting the pixel points at the position of the characteristic window to obtain the accurate displacement of the grating and obtain the final displacement detection value. Therefore, the manufacturing error of the grating is overcome, the manufacturing requirement of the grating ruler is reduced, and the displacement information is obtained to finish displacement detection.
Compared with the prior art, the invention has the following technical characteristics:
1. by learning microscopic features of the incremental circular grating ruler on the stripes (marks are drawn at any time if necessary), the incremental circular grating ruler is converted into an incremental absolute grating ruler, so that the contradiction between the speed and the precision of the incremental circular grating ruler is solved, the absolute grating position of an accurate place can be obtained due to the fact that steps are easy to lose at high speed during high-precision measurement, and the problem that zero returning operation is needed when the incremental circular grating ruler is powered off or restarted is solved.
2. The adopted images are not processed, the grating background is the light source characteristic in the actual scene, and the microscopic characteristic of each grating is learned by constructing a neural network, so that each picture of the set image type learning simple set contains environmental factors and characteristic factors, and the displacement measurement precision and stability are improved.
3. Because a certain precision deviation is inevitably generated in the grating manufacturing process, the scheme provides a method for carrying out fine displacement measurement on a plurality of frames before and after the stop of the grating ruler (if the precision has higher requirements, the method can be adopted in the whole process). The image is marked by adopting a template matching method, so that interference factors such as stains on a lens in the image can be ignored, the template can be well matched with the same grating, and the influence of external interference factors is avoided. The pixel displacement of the motion between the same gratings in the previous frame image and the next frame image is counted, so that the precision of the displacement measurement is improved.
4. The traditional displacement measurement adopts a form of combining an absolute grating ruler and an incremental grating ruler, wherein the absolute grating ruler is used for detecting an initial position, and the incremental grating ruler is used for rapid counting. The method provided by the scheme can output the actual position of the incremental grating ruler and integrate the advantages of the absolute grating ruler and the incremental grating ruler. Therefore, the use of an absolute grating ruler is omitted, and the cost is saved.
5. Acquiring the actual position of the grating ruler through image processing; the method utilizes the characteristics of high CCD/COMS resolution and uniform pixels to amplify the movement of the image of the grating lines, accurately position and directly digitize, changes the prior method for subdividing the bit image of Moore stripes, and improves the detection precision by counting direct pixel points, and when a motor with small rotation is subjected to displacement measurement of a circular grating, the rotation of the motor can be controlled more accurately by adopting the method because the displacement of the grating is small.
Drawings
FIG. 1 is a circular grating scale apparatus;
FIG. 2 is a schematic view of a circular grating ruler feature mark;
FIG. 3 is an expanded view of a feature mark of the circular grating ruler;
FIG. 4 is a schematic diagram of a grid pattern extraction feature window;
FIG. 5 is a schematic diagram of a grid-connected neural network construction;
FIG. 6 is a schematic diagram of micro-displacement measurement template matching;
fig. 7 is a schematic flow diagram of the present invention.
Detailed Description
Generally, the grating pitch of the grating ruler is 20 μm, and the resolution is 0.1 μm. However, the resolution must be subdivided to achieve the maximum resolution, and the detection accuracy cannot be guaranteed.
The invention provides an incremental circular grating ruler based on a neural network and a displacement detection method thereof to solve the problems, on one hand, the actual position of the incremental grating ruler is obtained by learning the microscopic features of the grating; on the other hand, through the counting of the pixel points, the displacement detection precision of the circular grating ruler is improved.
The invention relates to a technical scheme of an absolute displacement detection method based on an incremental absolute grating ruler, which specifically comprises the following steps:
step 1, learning the microscopic features of the incremental grating ruler. If the microscopic features on the incremental grating ruler are not enough to provide the required information, the incremental grating ruler is converted into the incremental grating ruler with marks by making the marks on the incremental grating ruler.
In this embodiment, a simple method is used for marking:
the grating ruler on the circular grating ruler disk is unfolded, diagonal lines are drawn from the upper left to the lower right, and each grating line has uniqueness by using the lineable line as a microscopic feature on the grating ruler. The grating pattern is depicted as fig. 2, the grating pattern is expanded as fig. 3, and the grating ruler mark on the actual circular grating ruler disk is depicted as fig. 1.
And 2, acquiring grating ruler images, extracting grating ruler grids, establishing an image acquisition library of each grid, performing neural network training on the image acquisition library, and outputting a classification model capable of accurately identifying each grid.
2.1 image acquisition
For the circular grating ruler, the camera is aligned with the pointer to execute the first grating of the circular grating ruler, then the circular grating disk is moved slowly, a plurality of batches of grating images are collected continuously through the camera, and the collected grating ruler images are numbered and named in sequence according to a certain sequence and are stored.
2.2 extraction of grid images through the characteristic Window
Positioning a characteristic window as shown in fig. 4, extracting a first complete grating ruler on a grating image, extracting each complete grating pattern image in the image by using the characteristic window in the rear X-axis direction, and recording grating pattern numbers at the same time; and after the complete grating image in the current grating image is completely extracted, reading the next grating image, and sequentially extracting each grating pattern image according to the same method.
2.3 training grid
And taking the collected grid pattern image as an input layer of a neural network, extracting grid pattern characteristic information by adopting a convolution network, and adopting a classical network AlexNet for the grid pattern neural network.
The structure of an Artificial Neural Network (ANN) is formed by a fully connected Neural network, and compared with a Convolutional Neural Network (CNN), both of them are connected by using intermediate nodes layer by layer, and the training process is basically consistent. The difference lies in the connection mode between two adjacent layers of nodes: for the artificial neural network, any two nodes positioned on two adjacent layers are connected; and only part of nodes are connected between two adjacent layers of the convolutional neural network. For a fully connected network, all the information of the input data is utilized, and each point of information makes a "contribution" to the training process. However, when the amount of data is large, the less important information becomes "burdensome" instead. The convolution kernel is the core of the whole convolution neural network, a part of regions in the input image is subjected to weighted average processing, the characteristic information in the input image is extracted, and the process of training the CNN is the process of continuously updating the parameters of the convolution kernel until the parameters are the most important. Through the processing of the multi-turn convolutional layer and the pooling layer, the model processes the image input information into the feature vector with higher information content, and the classification task can be better realized by using the full-connection layer.
According to the scheme, AlexNet is adopted and is an input layer, a convolution layer, a pooling layer, a full connection layer and a classification layer, a weight and an offset are trained based on an SGD optimization algorithm, and a network model is stored after the training.
And 3, establishing a displacement detection mathematical model, wherein the mathematical model consists of a macro displacement calculation part and a micro displacement calculation part.
The displacement measurement principle is as follows:
firstly, extracting a first complete grating which is farthest from the image and is positioned at the left side of a second frame of grating image before stopping, and matching the same grating of the next frame of grating image by adopting a template matching method, wherein a specific formula is as follows:
their similarity is measured using the following formula:
Figure GDA0003528520680000071
the template T (m × n pixels) is superimposed on the searched image S (W × H pixels) and translated, and a block of the template T coinciding with the searched image is a sub-image Sij(m, n), i, j are coordinates of the leftmost upper corner of the sub-graph on the p-t coordinate on the searched graph S. By comparing template T (m, n) with sub-graph SijAnd (m, n) similarity, and completing a template matching process. The first term in the above formula is the energy of the subgraph, and the third term is the energy of the template, and are not related to the template matching. The second term is the correlation of the template and the subgraph with each other, varying with (i, j). When the template and subgraph match, the term is bounded by the maximum. Due to the poor robustness of the above formula, a correlation coefficient method can be adopted to solve the problem in this respect. The correlation coefficient can be used to measure the similarity of two vectors, and its basic theorem is
Figure GDA0003528520680000081
Can be converted into:
Figure GDA0003528520680000082
the numerator is expressed as the inner product of the two vectors and the denominator is the modulo multiplication of the two vectors. If the included angle between the two vectors is 0 ° (corresponding to r being 1), it is indicated that they are completely similar; if the included angle is 90 degrees (corresponding to r being 0), it is indicated that they are completely dissimilar; if the included angle is 180 ° (corresponding to r-1), they are stated to be completely opposite.
In the method, template matching is carried out in a standard square error mode.
Figure GDA0003528520680000083
T represents a template image, I represents an image to be matched, x and y represent the coordinates of the position of the upper left corner of the template relative to the position of the image to be matched, x 'and y' represent the positions of the template superposed on the searched image and (x + x ', y + y') represents the position of the searched subgraph. And (4) moving a pixel point on the image to be matched by the template, and carrying out similarity calculation once. The larger the correlation coefficient of the two pixel point matrixes is, the higher the similarity between the template image and the sub-image in the image to be matched is.
According to the method, the pixel matrix on the image is matched with the pixel matrix of the given template picture, the obtained image matrix is compared with the template matrix, and the larger the correlation coefficient is, the higher the matching degree is; taking m pixels behind the grating image transversely in the x-axis direction of the grating image as the width of a characteristic window, wherein m is the number of pixels corresponding to the width of the grating pattern of the template; and extracting the same grating pattern by using the characteristic window, reading the next grating pattern after the extraction of the grating pattern image in the current grating pattern is finished, and sequentially extracting the same grating pattern image according to the same method.
The method comprises the steps of obtaining the approximate displacement of a grating by carrying out category identification on an initial grating and a stop grating; and judging the grating of the characteristic window by the frame number before and after stopping, and counting the pixel points at the position of the characteristic window to obtain the accurate displacement of the grating and obtain the final displacement detection value. Therefore, the manufacturing error of the grating is overcome, the manufacturing requirement of the grating ruler is reduced, and the displacement information is obtained to finish displacement detection.
When the method is started, the initial position image of the circular grating ruler to be detected for displacement is collected, the trained neural network model is used, the actual position where the current circular grating ruler is located is identified, and the problems that the common incremental grating ruler needs to be subjected to zero returning operation and the actual position of the common incremental grating ruler is known through the absolute grating ruler are effectively solved.
For the circular grating ruler to be detected for displacement, a COMS camera is used for continuously acquiring grating ruler moving images in a rotating state of the circular grating ruler, and three to five frames before and after the circular grating ruler is stopped are taken out as the number of key frames. Taking the second frame image before the CMOS camera stops as the terminal position image, using the trained neural network model to identify the actual position of the current grating ruler, subtracting the initial position to obtain the macro displacement s1
Taking two frames before and after the circular grating ruler stops as an example, as shown in fig. 6, j represents the jth grating stripe of the grating ruler, i is the result identified by the network model, i represents the ith grating ruler image, u represents the second grating ruler image, and u represents the second grating ruler imagei,jIndicating the distance of the jth raster from the leftmost side of the image in the ith raster image. i +1 denotes the i +1 th grating scale image, ui+1,jIndicating the distance of the j-th raster from the leftmost side of the image in the (i + 1) th raster image.
Firstly, extracting a first complete grating ruler in the ith grating image to obtain a characteristic window containing the jth grating pattern, carrying out template matching with the (i + 1) th grating ruler image, and accurately positioning the jth grating pattern to obtain
s2=ui+1,j-ui,j
Obtaining micro-displacement by comparing the same grating in two continuous grating ruler images; and adding the macro displacement and the micro displacement to obtain a final displacement detection value, thereby overcoming the manufacturing error of the grating and reducing the manufacturing requirement of the grating ruler, and obtaining displacement information to finish displacement detection.
In the scheme, the grating displacement measuring system of the grating ruler consists of five parts, namely an industrial camera, the grating ruler, a computer, a parallel light source and a Caffe/TensorFlow-based neural network framework. The industrial camera selects a high-speed camera with the resolution of 512x256 and the highest frame rate of 100 frames, and is used for acquiring and amplifying a moving picture of the grating ruler; the incremental circular grating ruler with the grating pitch of 20um is selected as the grating ruler, the memory of 8GB is selected as the computer, the main frequency is 3.4GHz, and the incremental circular grating ruler is used for image processing and software operation. The flow chart of the displacement measurement principle is shown in fig. 7.

Claims (4)

1. A displacement detection method of an incremental circular grating ruler based on a neural network is characterized by comprising the following steps:
step 1, marking an incremental circular grating ruler to convert the incremental circular grating ruler into an incremental absolute grating ruler, and ensuring the uniqueness of each grating pattern;
wherein, marking comprises the following steps:
expanding the grating ruler on the circular grating ruler disk, drawing a diagonal line from top left to bottom right, and using the line as a microscopic feature on the grating ruler to enable each grating line to have uniqueness;
step 2, acquiring grating images, extracting the grid lines of the grating ruler, constructing a deep learning neural network, training each grid line, and storing a trained neural network classification model;
step 3, establishing a displacement detection mathematical model, wherein the mathematical model consists of a macro displacement calculation part and a micro displacement calculation part, and adding the calculated macro displacement and the micro displacement to obtain a final displacement detection value;
calculating macro displacement, namely continuously acquiring a grating scale moving image by using a camera in a state that a circular grating scale to be detected is rotated, taking three to five frames before and after the circular grating scale stops as a key frame number, taking a second frame image before the camera stops as an end position image, identifying the actual position of the current grating scale by using a trained neural network model, and subtracting the actual position from the initial position to obtain macro displacement;
calculating micro-displacement, namely calculating the displacement of pixel points of the same grating in two to three frames of the collected grating which are associated before and after the stop of the grating;
and 3, calculating the micro displacement, namely acquiring the same grating grain in the grating images of the continuous front and back frames in a template matching mode, wherein the specific formula is as follows:
Figure FDA0003528520670000011
t represents a template image, I represents an image to be matched, x and y represent the position coordinates of the upper left corner of the template relative to the image to be matched, x 'and y' represent the positions of the template overlapped on a searched image, and (x + x ', y + y') represents the positions of searched subgraphs;
matching the pixel point matrix on the image with the pixel point matrix of the given template picture, and comparing the obtained image matrix with the template matrix, wherein the higher the matching degree is, the greater the relativity is; taking m pixels behind the grating image transversely in the x-axis direction of the grating image as the width of a characteristic window, wherein m is the number of pixels corresponding to the width of the grating pattern of the template; extracting the same grating pattern by using the characteristic window, reading the next grating pattern after the extraction of the grating pattern image in the current grating pattern is finished, and sequentially extracting the same grating pattern image according to the same method;
and obtaining the relative displacement by comparing the same grid line in the two continuous grating ruler images.
2. The method for detecting displacement of the incremental circular grating ruler based on the neural network as claimed in claim 1, wherein the step 2 of acquiring the grating image comprises:
for the circular grating ruler, the camera is aligned with the pointer to execute the first grating of the circular grating ruler, then the circular grating disk is moved slowly, a plurality of batches of grating images are collected continuously through the camera, and the collected grating ruler images are numbered and named in sequence according to a certain sequence and are stored.
3. The method for detecting displacement of an incremental circular grating ruler based on a neural network as claimed in claim 1, wherein the step 2 of extracting the grating pattern of the grating ruler comprises:
firstly, extracting a first complete grating ruler on a grating image, extracting each complete grating pattern image in the image by using a characteristic window in the X-axis direction, and simultaneously recording grating pattern numbers; and after the complete grating image in the current grating image is completely extracted, reading the next grating image, and sequentially extracting each grating pattern image according to the same method.
4. The incremental circular grating ruler displacement detection method based on the neural network as claimed in claim 1, wherein the macro displacement calculation in step 3 is performed by acquiring an image of the grating ruler to be detected for displacement, performing grating pattern recognition by using a trained neural network model, and feeding back the recognized grating pattern number to the mathematical model to calculate the displacement detection value.
CN201911131177.4A 2019-11-19 2019-11-19 Displacement detection method of incremental absolute grating ruler based on neural network Active CN111189396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911131177.4A CN111189396B (en) 2019-11-19 2019-11-19 Displacement detection method of incremental absolute grating ruler based on neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911131177.4A CN111189396B (en) 2019-11-19 2019-11-19 Displacement detection method of incremental absolute grating ruler based on neural network

Publications (2)

Publication Number Publication Date
CN111189396A CN111189396A (en) 2020-05-22
CN111189396B true CN111189396B (en) 2022-06-03

Family

ID=70705813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911131177.4A Active CN111189396B (en) 2019-11-19 2019-11-19 Displacement detection method of incremental absolute grating ruler based on neural network

Country Status (1)

Country Link
CN (1) CN111189396B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113101842A (en) * 2021-04-13 2021-07-13 中华人民共和国揭阳海关 Stirring mechanism for food detection

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0526730A1 (en) * 1991-08-03 1993-02-10 Dr. Johannes Heidenhain GmbH Linear or angular position measuring device
CN101619964A (en) * 2009-05-26 2010-01-06 北京理工大学 Quick microscopic detection method and quick microscopic detection device of micro accessory based on process match
CN202974311U (en) * 2012-12-03 2013-06-05 珠海市怡信测量科技有限公司 Reflective single code channel absolute grating ruler
CN103994723A (en) * 2014-06-10 2014-08-20 广东工业大学 Macro and micro composite grating ruler measurement system based on vertical and horizontal transformation amplification segmentation
CN105890634A (en) * 2016-04-07 2016-08-24 广东工业大学 Absolute type encoder and decoding measurement method thereof
CN107966106A (en) * 2017-11-28 2018-04-27 广东工业大学 A kind of absolute grating scale and displacement measurement method
CN108627097A (en) * 2018-05-09 2018-10-09 广东工业大学 A kind of absolute grating scale
CN110207596A (en) * 2019-06-21 2019-09-06 广东工业大学 A kind of image encoding method, optical grating ruler measurement device and measurement method
CN110260795A (en) * 2019-05-31 2019-09-20 广东工业大学 A kind of absolute displacement detection method based on increment absolute grating ruler

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0526730A1 (en) * 1991-08-03 1993-02-10 Dr. Johannes Heidenhain GmbH Linear or angular position measuring device
CN101619964A (en) * 2009-05-26 2010-01-06 北京理工大学 Quick microscopic detection method and quick microscopic detection device of micro accessory based on process match
CN202974311U (en) * 2012-12-03 2013-06-05 珠海市怡信测量科技有限公司 Reflective single code channel absolute grating ruler
CN103994723A (en) * 2014-06-10 2014-08-20 广东工业大学 Macro and micro composite grating ruler measurement system based on vertical and horizontal transformation amplification segmentation
CN105890634A (en) * 2016-04-07 2016-08-24 广东工业大学 Absolute type encoder and decoding measurement method thereof
CN107966106A (en) * 2017-11-28 2018-04-27 广东工业大学 A kind of absolute grating scale and displacement measurement method
CN108627097A (en) * 2018-05-09 2018-10-09 广东工业大学 A kind of absolute grating scale
CN110260795A (en) * 2019-05-31 2019-09-20 广东工业大学 A kind of absolute displacement detection method based on increment absolute grating ruler
CN110207596A (en) * 2019-06-21 2019-09-06 广东工业大学 A kind of image encoding method, optical grating ruler measurement device and measurement method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于模板匹配的全景图像拼接;王诚等;《福建电脑》;20080430(第4期) *

Also Published As

Publication number Publication date
CN111189396A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
Prescott et al. Line-based correction of radial lens distortion
US8103376B2 (en) System and method for the on-machine 2-D contour measurement
CN101762253B (en) System and method for multi-sensor-based on-line multi-dimension measurement of special-shaped shaft-type workpieces
CN109493389B (en) Camera calibration method and system based on deep learning
US8428335B2 (en) Combining feature boundaries
JP5092711B2 (en) Object recognition apparatus and robot apparatus
CN111368906B (en) Pointer type oil level meter reading identification method based on deep learning
CN112132886A (en) Circular hole center rapid positioning and roundness detection method for aviation part
CN110146017B (en) Industrial robot repeated positioning precision measuring method
CN112497219B (en) Columnar workpiece classifying and positioning method based on target detection and machine vision
CN110223355B (en) Feature mark point matching method based on dual epipolar constraint
CN110260795B (en) Absolute displacement detection method based on incremental absolute grating ruler
CN110608685A (en) Object size rapid measurement method based on raspberry pie
CN111829439B (en) High-precision translation measuring method and device
CN106056121A (en) Satellite assembly workpiece fast-identification method based on SIFT image feature matching
CN111189396B (en) Displacement detection method of incremental absolute grating ruler based on neural network
CN112816183B (en) VR head-mounted display device movement characteristic detection device and method
CN113658147A (en) Workpiece size measuring device and method based on deep learning
CN111121637A (en) Grating displacement detection method based on pixel coding
CN115082547B (en) Profile measuring method based on point cloud data and storage medium
CN109785388B (en) Short-distance accurate relative positioning method based on binocular camera
CN116091401A (en) Spacecraft assembly part identification positioning method based on target detection and composite target code
US7177460B2 (en) Structure for sophisticated surveying instrument with coordinate board for position identification
CN115164751A (en) Riveting aperture size detection system and method
CN114266835A (en) Deformation monitoring control method and system for non-measuring camera

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