A detection method and device for Invar leveling rod

The edge division information of the Inwa level scale is obtained through the detection equipment, and the position of the edge division is extracted and corrected by image processing and mathematical fitting technology, which solves the problem of low detection accuracy in the existing technology and achieves higher accuracy Detection effect.

CN119147009BActive Publication Date: 2025-02-11THE FIRST MONITORING AND APPLICATION CENTER CHINA EARTHQUAKE ADMINISTRATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411604577.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-11
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

The existing Inwa level scale detection method has low measurement accuracy, making it difficult to effectively detect abnormalities such as scratches, wear and deformation on the scale, affecting the accuracy of the measurement results.

Method used

The detection equipment is used to obtain the reference value and division images of the divided edge measurement on the Inwa level scale, and the divided edge position is extracted using the Sobel operator and the difference-resistant quadratic polynomial fitting method. Through the significance test and the slope mean correction, the calculation is calculated. Divide the true location of the edge to determine whether there is an exception.

Benefits of technology

The accuracy of Inwa level scale detection is improved, and abnormalities on the scale can be detected more accurately, ensuring the accuracy and reliability of measurement results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119147009B_ABST
    Figure CN119147009B_ABST
Patent Text Reader

Abstract

The invention discloses a detection method and device for an Invar leveling rod, and belongs to the field of detection technology. The method comprises: using a detection device to obtain a measurement reference value and a division image obtained when aiming at a plurality of division edges on the Invar leveling rod respectively; using a Sobel operator to extract the division edge position line by line from the division image, and using an anti-error quadratic polynomial fitting method to fit the pixel position where the division edge is located in each row of pixels, performing a significance test on the offset quadratic term coefficient in the fitted quadratic polynomial, and calculating the slope mean based on multiple quadratic polynomials that fail the significance test; using the slope mean to correct the measurement reference value of each target division edge, and calculating the true position of the target division edge based on the deviation value of the target division edge and the corrected measurement reference value. The invention has a high detection accuracy when detecting whether there is an abnormality in the division edge.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of detection technology, and in particular to a detection method and device for an Invar leveling rod. Background Art

[0002] The Invar leveling rod is generally composed of an Invar tape and an aluminum alloy or wooden ruler. When used with a precision digital level, it can transmit length (elevation) information through the arrangement and combination of scale lines with different widths and intervals on the tape. The scale accuracy of the Invar leveling rod is one of the important factors affecting the measurement accuracy of the leveling system. During use, the Invar leveling rod may have scratches, wear, deformation, etc., which will affect the measurement results. Therefore, it is necessary to regularly inspect the Invar leveling rod to ensure the accuracy and reliability of the leveling measurement results.

[0003] The detection methods of Invar leveling rods have gone through manual visual aiming, photoelectric microscope and automatic aiming of image sensors. However, the measurement accuracy of the existing detection methods is still low. It is urgent to provide a detection method with higher measurement accuracy. Summary of the invention

[0004] The present invention provides a detection method and device for an Invar leveling rod. The technical solution is as follows:

[0005] On the one hand, a method for detecting an Invar leveling rod is provided, the method comprising:

[0006] Using the detection equipment to obtain the measurement reference value and the scale image obtained when aiming at several scale edges on the Invar leveling rod respectively;

[0007] For each divided image, the following steps are performed: using the Sobel operator to extract the divided edge position of the divided image row by row, and obtaining the pixel position of the divided edge in each row of pixels of the divided image; using the anti-error quadratic polynomial fitting method to fit the pixel position of the divided edge in each row of pixels, and obtaining the quadratic polynomial corresponding to the divided edge in the divided image; performing a significance test on the coefficient of the offset quadratic term in the quadratic polynomial, if the significance test passes, it is determined that the divided edge has an abnormality, and if the significance test fails, obtaining the deviation value of the divided edge based on the quadratic polynomial;

[0008] Calculate the mean slope of multiple quadratic polynomials that failed the significance test;

[0009] The measurement reference value of each target division edge is corrected by using the slope mean value; the target division edge is the division edge corresponding to the quadratic polynomial that fails the significance check;

[0010] For each target division edge, the following steps are performed: using the deviation value of the target division edge and the corrected measurement reference value, calculating the true position of the target division edge; using the true position and the scale standard to determine whether there is any abnormality in the target division edge.

[0011] On the other hand, a detection device for an Invar leveling rod is provided, the device comprising:

[0012] An acquisition unit, used for acquiring, by means of a detection device, a measurement reference value and a division image obtained when aiming at a plurality of division edges on the Invar leveling rod respectively;

[0013] The extraction unit is used to perform the following steps for each divided image: extracting the divided edge position of the divided image row by row using the Sobel operator to obtain the pixel position of the divided edge in each row of pixels of the divided image; fitting the pixel position of the divided edge in each row of pixels using the robust quadratic polynomial fitting method to obtain a quadratic polynomial corresponding to the divided edge in the divided image; performing a significance test on the coefficient of the offset quadratic term in the quadratic polynomial, and if the significance test passes, determining that the divided edge is abnormal, and if the significance test fails, obtaining the deviation value of the divided edge based on the quadratic polynomial;

[0014] A calculation unit, used for calculating a slope mean based on a plurality of quadratic polynomials that fail the significance check;

[0015] A correction unit, used to correct the measurement reference value of each target division edge by using the slope mean; the target division edge is the division edge corresponding to the quadratic polynomial that fails the significance check;

[0016] The determination unit is used to perform, for each target division edge, the following operations: using the deviation value of the target division edge and the corrected measurement reference value to calculate the true position of the target division edge, and using the true position and the scale standard to determine whether there is an abnormality in the target division edge.

[0017] On the other hand, a computer device is provided, which includes a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to implement the steps of the above-mentioned Invar leveling rod detection method.

[0018] On the other hand, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned method for detecting the Invar leveling rod are implemented.

[0019] On the other hand, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the above-mentioned method for detecting the Invar leveling rod are implemented.

[0020] The technical solution provided by the present invention can at least bring the following beneficial effects:

[0021] The detection equipment is used to measure the edge of the scale on the Invar leveling scale, and the scale image is obtained at the same time. The pixel position of the scale edge is extracted from the scale image. If there is damage on the scale, the pixel position of the scale edge in each row of pixels may be different. Based on this, the pixel position of the scale edge in each row of pixels is fitted using the anti-error quadratic polynomial fitting method to obtain a quadratic polynomial. If the significance check of the offset quadratic term coefficient in the quadratic polynomial passes, it indicates that the scale edge is curved on the scale, and then it can be directly determined that the scale edge is abnormal. If the significance check of the offset quadratic term coefficient in the quadratic polynomial fails, it indicates that the scale edge is curved on the scale. Straight line, the deviation value of the division edge can be obtained by using the quadratic polynomial; when obtaining several division images corresponding to several division edges, the same detection device is used to obtain them. If there are multiple quadratic polynomials that fail the significance check, it indicates that the measurement reference value detected by the detection device is detected when the division edge is tilted. Therefore, by calculating the mean of the slope, the measurement reference value of each target division edge is corrected by using the mean of the slope, so that the corrected measurement reference value and the deviation value obtained by using the division image can be used to calculate the true position of the target division edge, and then the true position and the scale standard can be used to determine whether the target division edge is abnormal. It can be seen that this scheme has a high detection accuracy when detecting whether there is an abnormality in the division edge. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 It is a flow chart of a detection method of an Invar leveling rod provided by one embodiment of the present invention;

[0024] Figure 2 It is a schematic diagram of the positional relationship between a dual-frequency laser interferometer and a ruler provided by one embodiment of the present invention;

[0025] Figure 3 is a schematic diagram of a divided image provided by an embodiment of the present invention;

[0026] Figure 4 is another schematic diagram of a divided image provided by an embodiment of the present invention;

[0027] Figure 5 It is a structural diagram of a detection device of an Invar leveling rod provided by one embodiment of the present invention;

[0028] Figure 6 It is a hardware architecture diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0030] Please refer to Figure 1 , an embodiment of the present invention provides a method for detecting an Invar leveling rod, the method comprising:

[0031] Step 100, using a detection device to obtain a measurement reference value and a scale image obtained when aiming at a plurality of scale edges on the Invar leveling rod;

[0032] Step 102, for each divided image, the following steps are performed: using the Sobel operator to extract the division edge position of the divided image row by row, and obtaining the pixel position of the division edge in each row of pixels of the divided image; using the robust quadratic polynomial fitting method to fit the pixel position of the division edge in each row of pixels, and obtaining a quadratic polynomial corresponding to the division edge in the divided image; performing a significance test on the coefficient of the offset quadratic term in the quadratic polynomial, if the significance test passes, it is determined that the division edge is abnormal, and if the significance test fails, obtaining the deviation value of the division edge based on the quadratic polynomial;

[0033] Step 104, calculating the slope mean based on multiple quadratic polynomials that fail the significance check;

[0034] Step 106, using the slope mean to correct the measurement reference value of each target division edge; the target division edge is the division edge corresponding to the quadratic polynomial that fails the significance check;

[0035] Step 108, for each target division edge, execute: using the deviation value of the target division edge and the corrected measurement reference value, calculate the true position of the target division edge, and use the true position and the scale standard to determine whether there is any abnormality in the target division edge.

[0036] In an embodiment of the present invention, a detection device is used to simultaneously obtain a scale image during the measurement of the scale edge on the Invar leveling scale, and the scale image is used to extract the pixel position of the scale edge. If there is damage on the scale, the pixel position of the scale edge in each row of pixels may be different. Based on this, the pixel position of the scale edge in each row of pixels is fitted using an anti-error quadratic polynomial fitting method to obtain a quadratic polynomial. If the significance check of the offset quadratic term coefficient in the quadratic polynomial passes, it indicates that the scale edge is curved on the scale, and then it can be directly determined that the scale edge is abnormal. If the significance check of the offset quadratic term coefficient in the quadratic polynomial fails, it indicates that the scale edge is abnormal. The scale is straight, and the deviation value of the division edge can be obtained by using the quadratic polynomial; when obtaining several division images corresponding to several division edges, the same detection device is used to obtain them. If there are multiple quadratic polynomials that fail the significance check, it means that the measurement reference value detected by the detection device is detected when the division edge is tilted. Therefore, by calculating the mean slope, the measurement reference value of each target division edge is corrected by using the mean slope, so that the corrected measurement reference value and the deviation value obtained by using the division image can be used to calculate the true position of the target division edge, and then the true position and the scale standard can be used to determine whether the target division edge is abnormal. It can be seen that this scheme has a high detection accuracy when detecting whether there is an abnormality in the division edge.

[0037] Described below Figure 1 How the various steps are performed.

[0038] First, with respect to step 100, a detection device is used to obtain measurement reference values ​​and scale images obtained when aiming at a plurality of scale edges on the Invar leveling rod.

[0039] In the embodiment of the present invention, the detection device may include: a host computer, a stepper motor, a guide rail slide, a laser interferometer and an industrial camera. When measuring the edge of the scale on the ruler, the detection device may be used to achieve the measurement.

[0040] Specifically, the measurement reference value and the division image of each division edge to be observed among the plurality of division edges are obtained as follows:

[0041] Step 1000: Using a host computer to control a stepper motor to drive the guide rail slide to move from a reference point to aim at the first edge of the starting scale on the Invar leveling ruler, using a laser interferometer to record the edge position, and using the first edge of the starting scale as the observation starting point;

[0042] The reference point can be located by a sensor. In practical applications, the ruler includes multiple divisions, and a sensor is set at each end of the multiple divisions of the ruler. The upper computer controls the stepper motor to drive the guide rail slide to move. If the sensor is found, it stops automatically. Otherwise, it searches for the sensor in the opposite direction until the sensor is found. The position of the found sensor is used as the reference point.

[0043] The detection device moves from the reference point to the first edge of the starting scale on the ruler, and the displacement length of the guide rail slide is L0, where the starting scale is the first scale closest to the reference point. Since each scale has two edges, the first edge is the edge closest to the reference point. Since the distance between normal scales meets the scale standard, the first edge of the starting scale is used as the observation starting point to detect other scale edges.

[0044] Step 1002: further using the host computer to control the stepper motor to drive the guide rail slide to move a fixed length displacement from the first edge of the starting scale; the fixed length displacement is the standard distance between the first edge of the starting scale and the edge of the scale to be observed as specified by the ruler standard;

[0045] In the embodiment of the present invention, the division edge to be observed may be all division edges except the first edge of the starting division on the ruler, or may be some division edges among all division edges except the first edge of the starting division. After the division edge to be observed is determined, each division edge to be observed needs to be detected according to the detection method in the embodiment of the present invention. Assuming that the division edge to be observed is the i-th division edge, the standard distance between the i-th division edge and the first edge of the starting division can be known according to the ruler standard, assuming it is L d Then, the host computer needs to control the stepper motor to drive the guide rail slide to move a fixed length displacement L from the first edge of the starting scale. d .

[0046] Step 1004: Use the host computer to control the laser interferometer to measure the actual displacement of the guide rail slide, and determine the movement error of the guide rail slide based on the actual displacement, and judge whether the movement error exceeds the maximum tolerance range; if it exceeds, use the host computer to control the stepper motor to drive the guide rail slide to move the displacement of the movement error again and execute this step until the calculated movement error does not exceed the maximum tolerance range; if it does not exceed, the sum of the actual displacements measured by the laser interferometer is determined as the measurement reference value of the division edge to be observed, and use the host computer to control the industrial camera to obtain the division image of the division edge to be observed.

[0047] Since there will be movement errors in the movement of the guide rail slide, although the stepper motor drives the guide rail slide to move L d , but the actual displacement is not necessarily L d Therefore, the actual displacement of the guide rail slide is measured by the laser interferometer. Assuming that the actual displacement measured is L i , then the moving error this time is: L e =L d -L i Among them, L e is the movement error of this time, L d is the fixed length displacement of this move, L i is the actual displacement of this move.

[0048] In an embodiment of the present invention, the maximum tolerance range can be used to determine whether the movement error is acceptable. If the movement error does not exceed the maximum tolerance range, it can be determined that the edge of the division to be observed has been aimed at; if the movement error exceeds the maximum tolerance range, it is determined that the edge of the division to be observed has not been aimed at, and at this time it is necessary to further drive the guide rail slide to move toward the edge of the division to be observed.

[0049] Each fixed-length displacement toward the edge of the scale to be observed after the second time (including the second time) is the movement error measured during the previous movement. When moving from the first edge of the starting scale to the edge of the scale to be observed for the first time, the fixed-length displacement is L d , the actual displacement is L i1 , the moving error is L e1 , the fixed length displacement when moving from the current position to the edge of the division to be observed for the second time is L e1 , the actual displacement L i2 , the moving error is L e2 , and so on, until the movement error does not exceed the maximum tolerance range. If the number of moves is 2, then the measurement reference value of the edge of the division to be observed is the sum of the actual displacement obtained in each measurement: L i1 +Li2 .

[0050] In the embodiment of the present invention, the movement error existing in the displacement process of the guide rail slide driven by the stepper motor is fully considered, and the actual displacement measured in real time by the laser interferometer is used as the reference standard. Through the closed-loop control method, when aiming at the edge of the division to be observed, the guide rail slide can be driven multiple times by calculating the movement error to gradually approach the edge of the division to be observed, thereby compensating for the error caused by the displacement step loss of the stepper motor, weakening the requirements of the detection method on the hardware performance and structure of the stepper motor, guide rail slide, etc., improving the accuracy of aiming, ensuring that the obtained measurement reference value and division image are more accurate, and thus providing the accuracy of subsequent detection results.

[0051] Furthermore, considering that the laser interferometer that measures the actual displacement of the guide rail slide uses laser to measure the displacement, and the laser wavelength is affected by environmental interference, which affects the measurement results, in order to ensure the accuracy of the measurement results, it is necessary to compensate for the measurement results based on environmental interference. Specifically, the laser wavelength change value caused by environmental interference can be calculated by the following formula , and then use the laser wavelength change value to compensate the measurement result:

[0052]

[0053] Where n is the refractive index of air during this measurement, △n is the change in the refractive index of air, which is the change from aiming at the first edge of the starting scale to aiming at the edge of the scale to be observed. The laser wavelength is the first edge of the aiming starting division.

[0054] It can be seen that the measurement values ​​of the laser interferometer in the embodiment of the present invention are all obtained after environmental interference compensation.

[0055] Furthermore, since there may be a horizontal inclination angle between the laser measurement axis and the guide rail slide motion axis, , the horizontal tilt angle will cause Abbe error and affect the measurement result. Based on this, in one embodiment of the present invention, the laser interferometer in the detection device is a dual-frequency laser interferometer, and the two laser beams corresponding to one is a measurement beam and the other is a reference beam; wherein the horizontal distance between the measurement beam and the reference beam is equal to the horizontal distance between the reference beam and the motion axis of the guide rail slide.

[0056] Please refer to Figure 2 , is a schematic diagram of the positional relationship between the dual-frequency laser interferometer and the ruler. The distance between the measuring beam f1 and the reference beam f2 is a1, the distance between the reference beam f2 and the motion axis of the guide rail slide is a2, and the travel difference between the measuring beam f1 and the reference beam f2 is Calculated by the following formula:

[0057]

[0058] According to the travel difference formula, if a1 is equal to a2, the interference caused by the Abbe error can be eliminated. Therefore, in the embodiment of the present invention, the horizontal distance between the measuring beam and the reference beam is adjusted to be equal to the horizontal distance between the reference beam and the axis of motion of the guide rail slide. In this way, the Abbe error is compensated by using the compensation optical path method, thereby improving the detection accuracy.

[0059] According to the above steps 1000-1004, the measurement reference values ​​and the graticule images corresponding to the plurality of graticule edges can be obtained.

[0060] Then, steps 102 to 108 are described simultaneously.

[0061] Before extracting the division edge position of the division image, in order to ensure the accuracy of the extraction result, the division image may be processed first. Specifically, the processing method may include steps 1010-1012:

[0062] Step 1010: Take the central vertical line of the divided image as the reference line, symmetrically select the pixels in the set area on both sides of the reference line as the target area, segment the target area from the divided image to obtain a target image, and use the maximum inter-class variance method to binarize the grayscale image of the target image to obtain a binary image.

[0063] In order to improve the efficiency of binarization, it is not necessary to binarize the entire divided image, but only the target area can be binarized. The target area is determined by taking the central vertical line of the divided image as a reference line and symmetrically selecting pixels in the set area on both sides of the reference line as the target area.

[0064] Please refer to Figure 3 , is a schematic diagram of a graticule image. The dotted line in the figure is the reference line, and the set area is the distance reference line △l The area within the solid line frame is the target area, which includes black pixels and white pixels.

[0065] In one implementation, the target area is determined using △l , is the maximum tolerance range used to measure the movement error of the guide rail slide. In this way, the division edge is binarized within the maximum tolerance range, which can ensure that the area used to extract the division edge position is within the maximum tolerance range, and can further improve the accuracy of the division edge extraction result.

[0066] In the embodiment of the present invention, the binarization processing method is that the white pixel value is 1 and the black pixel value is 0.

[0067] It can be understood that since the division is a solid black line, it includes two edges, and the division image is in black and white. In order to reduce the influence of the camera shooting color on the extraction result during the division edge extraction process, the division image can be grayscale processed first, and then the grayscale processed division image can be segmented to obtain the target image of the target area.

[0068] Step 1012: determine the isolated noise in the binary image, and perform outlier replacement and elimination processing on the isolated noise, and use the processed target image as the divided image to perform the above-mentioned extraction of the divided edge position line by line on the divided image using the Sobel operator.

[0069] The binary image includes N rows and M columns of pixels, and there will be isolated noise in the image. In order to improve the accuracy of extracting the edge position of the division, it is necessary to replace and eliminate the isolated noise with outliers. In one implementation, the isolated noise in the binary image can be determined by the following steps S1-S2:

[0070] S1: For the N rows and M columns of pixels in the binary image, the number of white pixels and black pixels is calculated column by column starting from the first side. If a target column appears for the first time where the number of corresponding color pixels on the first side is less than the number of corresponding color pixels on the second side, the target column is taken as the boundary line;

[0071] S2: For each row of pixels, the following steps are performed: starting from the boundary line, search for the continuous distribution area of ​​the corresponding color pixels on both sides; if there are other color pixels between the continuous distribution area closest to the boundary line and the corresponding side, the other color pixels are regarded as isolated noise; if the number of pixels with the same color pixels continuously distributed exceeds the set value, they are determined to be the continuous distribution area of ​​the corresponding color pixels.

[0072] Please refer to Figure 4 , Figure 4 The first side is the left side, the left side is black pixels, the second side is the right side, the right side is white pixels, then start from the left side to calculate the number of white pixels and black pixels column by column. Generally, the first few columns are all black pixels. If the target column appears for the first time in which the number of corresponding color pixels on the first side is less than the number of corresponding color pixels on the second side, that is, white pixels appear in black pixels, and the number of black pixels is less than the number of white pixels, then the column is taken as the target column, and the target column is the boundary line. Figure 4 The 10th column from the left to the right is the target column, and these 10 columns are used as boundary lines.

[0073] Then, based on the boundary line, for each row of pixels, the continuous distribution area of ​​the corresponding color pixels is searched from the 10th column to both sides. If the number of pixels with the same color pixels continuously distributed exceeds 3, it is determined to be the continuous distribution area of ​​the corresponding color pixels. Specifically, the continuous distribution area of ​​black pixels is searched from the 10th column to the left. On rows 1-14, there is one continuous distribution area, and there are no white pixels between the continuous distribution area and the first side, indicating that there is no isolated noise on these rows. On rows 15-19, there are white pixels between the continuous distribution area closest to the 10th column and the first side, so these white pixels are isolated noise.

[0074] In the embodiment of the present invention, an outlier replacement and elimination process is performed on isolated noise, specifically, white pixels appearing in a black pixel area are changed into black pixels, and black pixels appearing in a white pixel area are changed into white pixels.

[0075] In an embodiment of the present invention, by subjecting the divided image to the above-mentioned processing, the influence of isolated noise on the detection result can be eliminated. After the above-mentioned isolated noise is eliminated, if the detection result determines that the divided edge is normal, it indicates that the divided edge on the ruler can be accurately measured. If, after the above-mentioned isolated noise is eliminated, the detection result of the divided edge is that the divided edge is abnormal, it indicates that the divided edge on the ruler cannot be accurately measured.

[0076] After the graticule image is processed, steps 102 to 108 may be performed using the processed graticule image, thereby improving the accuracy of the detection result.

[0077] In step 102, since the position of the division edge in each row of the division image is different, the Sobel operator can be used to extract the division edge position row by row of the division image. For the N rows and M columns of the division image, the pixel position of the division edge in the k-th row of the i-th division image can be obtained. , where k=1,2,…,N, where N is the total number of rows of pixels in the divided image.

[0078] In order to determine whether the division edge is a straight line, the robust quadratic polynomial fitting method can be used to fit the pixel position of the division edge in each row of pixels to obtain the quadratic polynomial corresponding to the division edge in the division image. The quadratic polynomial is as follows:

[0079]

[0080] Among them, b0, b1, and b2 are the offset, slope, and offset quadratic term coefficients, respectively.

[0081] By performing a significance test on the coefficient of the quadratic term of the offset, if the significance test passes, it indicates that the edge of the division is curved on the ruler, and it can be directly determined that there is an abnormality in the edge of the division. If the significance test of the coefficient of the quadratic term of the offset in the quadratic polynomial fails, it indicates that the edge of the division is straight on the ruler, and the deviation value of the edge of the division can be directly obtained using the quadratic polynomial.

[0082] For the division edge that fails the significance check of the offset quadratic term coefficient, since the division edge is tilted, it indicates that the measurement reference value obtained by the laser interferometer is measured in a tilted state. Therefore, it is necessary to use the slope to correct the measurement reference value obtained by the laser interferometer. The tilted state is the same for all division edges. Therefore, the embodiment of the present invention calculates the slope mean based on multiple quadratic polynomials that fail the significance check, and corrects the measurement reference value of each target division edge by the slope mean. In this way, the correction scales of multiple target division edges are the same, and the corrected measurement reference value is used to characterize the more accurate measurement position obtained by the laser interferometer for measuring the target division edge.

[0083] Since the deviation value of the graticule edge can be determined based on the processing of the graticule image and the position extraction of the graticule edge, the deviation value of the target graticule edge is then added to the corrected measurement reference value to obtain the true position of the target graticule edge. The true position and the scale standard are then used to determine whether the target graticule edge is abnormal. If the position specified by the scale standard is different from the true position, it indicates that the target graticule edge is abnormal.

[0084] Please refer to Figure 5 The embodiment of the present invention provides a detection device for an Invar leveling rod, the device comprising:

[0085] An acquisition unit 500 is used to acquire, by using a detection device, a measurement reference value and a graticule image obtained when aiming at a plurality of graticule edges on an Invar leveling rod respectively;

[0086] The extraction unit 502 is used to perform the following operations for each divided image: extracting the division edge position of the divided image row by row using the Sobel operator to obtain the pixel position of the division edge in each row of pixels of the divided image; fitting the pixel position of the division edge in each row of pixels using the robust quadratic polynomial fitting method to obtain a quadratic polynomial corresponding to the division edge in the divided image; performing a significance test on the coefficient of the offset quadratic term in the quadratic polynomial, if the significance test passes, determining that the division edge is abnormal, if the significance test fails, obtaining the deviation value of the division edge based on the quadratic polynomial;

[0087] A calculation unit 504, configured to calculate a slope mean based on a plurality of quadratic polynomials that fail the significance check;

[0088] A correction unit 506, configured to correct the measurement reference value of each target division edge using the slope mean; the target division edge is a division edge corresponding to the quadratic polynomial that fails the significance check;

[0089] The determination unit 508 is used to perform, for each target division edge, the following operations: using the deviation value of the target division edge and the corrected measurement reference value to calculate the true position of the target division edge, and using the true position and the scale standard to determine whether there is an abnormality in the target division edge.

[0090] In one embodiment of the present invention, the detection equipment includes: a host computer, a stepper motor, a guide rail slide, a laser interferometer and an industrial camera;

[0091] The measurement reference value and the graticule image of each graticule edge to be observed among the plurality of graticule edges are obtained as follows:

[0092] Using a host computer to control a stepper motor to drive the guide rail slide to move from a reference point to aim at the first edge of the starting scale on the Invar leveling scale, using a laser interferometer to record the edge position, and using the first edge of the starting scale as an observation starting point;

[0093] Further, the upper computer is used to control the stepper motor to drive the guide rail slide to move a fixed length displacement from the first edge of the starting scale; the fixed length displacement is the standard distance between the first edge of the starting scale and the edge of the scale to be observed as specified by the ruler standard;

[0094] The upper computer is used to control the laser interferometer to measure the actual displacement of the guide rail slide, and the movement error of the guide rail slide is determined based on the actual displacement, and it is judged whether the movement error exceeds the maximum tolerance range; if it exceeds, the upper computer is used to control the stepper motor to drive the guide rail slide to move the displacement of the movement error again and execute this step until the calculated movement error does not exceed the maximum tolerance range; if it does not exceed, the sum of the actual displacements measured by the laser interferometer is determined as the measurement reference value of the division edge to be observed, and the upper computer is used to control the industrial camera to obtain the division image of the division edge to be observed.

[0095] In one embodiment of the present invention, the laser interferometer is a dual-frequency laser interferometer, and the light beams corresponding to the two lasers are one measuring beam and the other reference beam; wherein the horizontal distance between the measuring beam and the reference beam is equal to the horizontal distance between the reference beam and the motion axis of the guide rail slide.

[0096] In one embodiment of the present invention, the measurement values ​​of the laser interferometer are all obtained after environmental interference compensation.

[0097] In one embodiment of the present invention, the device further comprises:

[0098] The processing unit is used to use the central vertical line of the divided image as a reference line, symmetrically select the pixels in the set area on both sides of the reference line as the target area, segment the target area from the divided image to obtain a target image, use the maximum inter-class variance method to binarize the grayscale image of the target image to obtain a binary image; determine the isolated noise in the binary image, and perform outlier replacement and elimination processing on the isolated noise, and use the processed target image as the divided image to execute the method of extracting the division edge position line by line on the divided image using the Sobel operator.

[0099] In one embodiment of the present invention, when determining isolated noise in a binary image, the processing unit specifically includes:

[0100] For the N rows and M columns of pixels in the binary image, the number of white pixels and black pixels is calculated column by column starting from the first side. If a target column appears for the first time in which the number of corresponding color pixels on the first side is less than the number of corresponding color pixels on the second side, the target column is taken as the boundary line.

[0101] For each row of pixels, the following steps are performed: starting from the boundary line, search for the continuous distribution area of ​​the corresponding color pixels on both sides; if there are other color pixels between the continuous distribution area closest to the boundary line and the corresponding side, the other color pixels are regarded as isolated noise; if the number of pixels with the same color pixels continuously distributed exceeds the set value, they are determined to be the continuous distribution area of ​​the corresponding color pixels.

[0102] It should be noted that the detection device of the Invar leveling ruler provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the detection device of the Invar leveling ruler provided in the above embodiment and the detection method embodiment of the Invar leveling ruler belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0103] The embodiment of the present application also provides a computer device, please refer to Figure 6 The computer device includes a processor and a memory, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the detection method of the Invar leveling rod provided by the above-mentioned method embodiments.

[0104] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the detection method of the Invar leveling rod provided in the above-mentioned method embodiments.

[0105] An embodiment of the present application also provides a computer program product, which includes a computer program. A processor of a computer device reads the computer program from a computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the detection method of the Invar leveling rod described in any of the above embodiments.

[0106] For the convenience of description, the above system or device is described by dividing it into various modules or units according to its functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0107] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0108] Finally, it should be noted that, in this article, relational terms such as first, second, third and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0109] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for detecting an Invar leveling rod, characterized in that: The method comprises: Using the detection equipment to obtain the measurement reference value and the scale image obtained when aiming at several scale edges on the Invar leveling rod respectively; For each divided image, the following steps are performed: using the Sobel operator to extract the divided edge position of the divided image row by row, and obtaining the pixel position of the divided edge in each row of pixels of the divided image; using the anti-error quadratic polynomial fitting method to fit the pixel position of the divided edge in each row of pixels, and obtaining the quadratic polynomial corresponding to the divided edge in the divided image; performing a significance test on the coefficient of the offset quadratic term in the quadratic polynomial, if the significance test passes, it is determined that the divided edge has an abnormality, and if the significance test fails, obtaining the deviation value of the divided edge based on the quadratic polynomial; Calculate the mean slope of multiple quadratic polynomials that failed the significance test; The measurement reference value of each target division edge is corrected by using the slope mean value; the target division edge is the division edge corresponding to the quadratic polynomial that fails the significance check; For each target division edge, the following steps are performed: using the deviation value of the target division edge and the corrected measurement reference value, calculating the true position of the target division edge; using the true position and the scale standard to determine whether there is any abnormality in the target division edge.

2. The method according to claim 1, characterized in that The detection equipment includes: a host computer, a stepping motor, a guide rail slide, a laser interferometer and an industrial camera; The method of using the detection device to obtain the measurement reference value and the scale image obtained when aiming at a plurality of scale edges on the Invar leveling rod respectively comprises: The measurement reference value and the graticule image of each graticule edge to be observed among the plurality of graticule edges are obtained as follows: Using a host computer to control a stepper motor to drive the guide rail slide to move from a reference point to aim at the first edge of the starting scale on the Invar leveling scale, using a laser interferometer to record the edge position, and using the first edge of the starting scale as an observation starting point; Further, the upper computer is used to control the stepper motor to drive the guide rail slide to move a fixed length displacement from the first edge of the starting scale; the fixed length displacement is the standard distance between the first edge of the starting scale and the edge of the scale to be observed as specified by the ruler standard; The upper computer is used to control the laser interferometer to measure the actual displacement of the guide rail slide, and the movement error of the guide rail slide is determined based on the actual displacement, and it is judged whether the movement error exceeds the maximum tolerance range; if it exceeds, the upper computer is used to control the stepper motor to drive the guide rail slide to move the displacement of the movement error again and execute this step until the calculated movement error does not exceed the maximum tolerance range; if it does not exceed, the sum of the actual displacements measured by the laser interferometer is determined as the measurement reference value of the division edge to be observed, and the upper computer is used to control the industrial camera to obtain the division image of the division edge to be observed.

3. The method according to claim 2, characterized in that The laser interferometer is a dual-frequency laser interferometer, wherein one of the light beams corresponding to the two lasers is a measuring beam and the other is a reference beam; wherein the horizontal distance between the measuring beam and the reference beam is equal to the horizontal distance between the reference beam and the motion axis of the guide rail slide.

4. The method according to claim 2, characterized in that: The measured values ​​of the laser interferometer are all obtained after environmental interference compensation.

5. The method according to claim 1, characterized in that Before extracting the division edge position line by line from the division image by using the Sobel operator, the method further includes: The central vertical line of the divided image is used as a reference line, and pixels in a set area on both sides of the reference line are symmetrically selected as a target area, and the target area is segmented from the divided image to obtain a target image, and a maximum inter-class variance method is used to perform a binarization process on the grayscale image of the target image to obtain a binary image; The isolated noise in the binary image is determined, and outlier replacement and elimination processing is performed on the isolated noise. The processed target image is used as a divided image and the divided edge position is extracted line by line on the divided image using the Sobel operator.

6. The method according to claim 5, characterized in that The step of determining isolated noise in the binary image comprises: For the N rows and M columns of pixels in the binary image, the number of white pixels and black pixels is calculated column by column starting from the first side. If a target column appears for the first time in which the number of corresponding color pixels on the first side is less than the number of corresponding color pixels on the second side, the target column is taken as the boundary line. For each row of pixels, the following steps are performed: starting from the boundary line, search for the continuous distribution area of ​​the corresponding color pixels on both sides; if there are other color pixels between the continuous distribution area closest to the boundary line and the corresponding side, the other color pixels are regarded as isolated noise; if the number of pixels with the same color pixels continuously distributed exceeds the set value, they are determined to be the continuous distribution area of ​​the corresponding color pixels.

7. A detection device for an Invar leveling rod, characterized in that: The device comprises: An acquisition unit, used for acquiring, by means of a detection device, a measurement reference value and a division image obtained when aiming at a plurality of division edges on the Invar leveling rod respectively; The extraction unit is used to perform the following steps for each divided image: extracting the divided edge position of the divided image row by row using the Sobel operator to obtain the pixel position of the divided edge in each row of pixels of the divided image; fitting the pixel position of the divided edge in each row of pixels using the robust quadratic polynomial fitting method to obtain a quadratic polynomial corresponding to the divided edge in the divided image; performing a significance test on the coefficient of the offset quadratic term in the quadratic polynomial, and if the significance test passes, determining that the divided edge is abnormal, and if the significance test fails, obtaining the deviation value of the divided edge based on the quadratic polynomial; A calculation unit, used for calculating a slope mean based on a plurality of quadratic polynomials that fail the significance check; A correction unit, used to correct the measurement reference value of each target division edge by using the slope mean; the target division edge is the division edge corresponding to the quadratic polynomial that fails the significance check; The determination unit is used to perform, for each target division edge, the following operations: using the deviation value of the target division edge and the corrected measurement reference value to calculate the true position of the target division edge, and using the true position and the scale standard to determine whether there is an abnormality in the target division edge.

8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to implement the steps of any one of the methods described in claims 1-6.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The method comprises a computer program, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Grating ruler calibration method and device and visual detection device

    CN109631757A

  • Indium steel leveling staff calibrating device

    CN203249631U