Distance measuring method based on photoelectric sensor

By designing specific scale patterns on the ruler belt and combining photoelectric sensors and data processing algorithms, the existing high-precision measurement technology has been solved and the problem of insufficient environmental adaptability is achieved, and the high-precision and low-cost distance measurement effect is achieved.

CN119901211APending Publication Date: 2025-04-29CHANGZHOU XINTU SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510035318.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The existing high-precision measurement technology has problems such as high cost, insufficient environmental adaptability or complex structure, and it is difficult to popularize in specific application scenarios.

Method used

Using the distance measurement method based on photoelectric sensors, a specific scale pattern is designed on the ruler and combined with a data processing algorithm, high-precision displacement measurement and distance calculation are realized.

Benefits of technology

Achieve higher ranging accuracy at lower costs, which is suitable for high-precision measurement needs in various fields, taking into account the simplicity of the system, cost controllability and adaptability to complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119901211A_ABST
    Figure CN119901211A_ABST
Patent Text Reader

Abstract

The invention relates to a distance measuring method based on a photoelectric sensor, which comprises the following steps of: inserting a plurality of fine scale marks between two adjacent wide scale marks on a ruler tape, ensuring that the distance between any two adjacent scale marks is equal, and ensuring that the width of the wide scale marks is at least 1.5 times of that of the fine scale marks, so that when the photoelectric sensor scans, the distance between the two adjacent wide scale marks is uniform; and each scale line can be distinguished and identified more easily, so that the detection accuracy and the anti-interference capability of the pulse wave crest are enhanced. The wide scale marks can provide rough positioning in large-range movement, the fine scale marks are used for fine compensation when high precision is needed, the measurement efficiency and precision are both considered, and error accumulation easily occurring in long-distance measurement in a traditional method is avoided. According to the scheme, accurate and efficient distance measurement can be realized in various application scenes as long as the resolution meets the requirement without depending on a specific sensor model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of measurement technology, and in particular to a distance measurement method based on a photoelectric sensor, specifically a technical solution for realizing high-precision displacement measurement and distance calculation by utilizing a photoelectric sensor and a specific scale pattern. Background Art

[0002] With the continuous advancement of science and technology, high-precision measurement technologies and instruments (such as laser rangefinders, three-dimensional laser scanning technology, and quantum measurement technology) are developing rapidly and continuously improving measurement accuracy and efficiency. These technologies have not only made significant progress in miniaturization and portability, but also combined with intelligent means to achieve automated measurement and data analysis, providing strong support for scientific research experiments and engineering applications. However, some high-precision measurement methods still have problems such as high cost, insufficient environmental adaptability, or complex structure, making them difficult to popularize in specific application scenarios.

[0003] Therefore, how to ensure the measurement accuracy while taking into account the simplicity, cost controllability and adaptability to complex environments of the system has become an important issue in the development of distance measurement technology. The present invention proposes a distance measurement method based on a photoelectric sensor. By designing a specific scale pattern on the tape and cooperating with a data processing algorithm, a higher distance measurement accuracy can be achieved at a lower cost, which is suitable for promotion and use in high-precision measurement needs in various fields. Summary of the invention

[0004] The present invention relates to a distance measurement method based on a photoelectric sensor, comprising the following steps: S1. Design scale pattern: arrange several wide scale lines and fine scale lines on the surface of the tape, and distribute multiple fine scale lines between two adjacent wide scale lines. The distance between any adjacent wide scale lines and fine scale lines and the distance between any adjacent two fine scale lines are equal, and the width of the wide scale line is at least 1.5 times the width of the fine scale line; S2. Obtain scan data: use a photoelectric sensor to scan the tape to obtain a frame of scan data, in which the wide scale lines and fine scale lines form pulse peaks in the scan data; S3. Extract scale line center: traverse and identify the scan data, filter After the noise is removed, the edge of the pulse peak is located, and the center coordinates of each wide scale line and fine scale line are obtained by weighted calculation; S4, positioning based on the scale topology structure: according to the spacing between the wide scale lines and the fine scale lines and their arrangement rules, the identified wide scale lines and fine scale lines are matched to determine the scanning position corresponding to the tape in the current scanning data; S5, statistics of wide scale movement cycle and comparison with zeroing scale: by counting the number of movement cycles of the wide scale lines and the relative displacement of the scale lines between the current frame and the zeroing frame, the total displacement of the photoelectric sensor relative to the zeroing position is calculated, and the total displacement is converted into a ranging value.

[0005] The technical effect of the distance measurement method based on the photoelectric sensor of the present invention is: by inserting a number of fine scale lines between two adjacent wide scale lines on the tape, and ensuring that the spacing between any adjacent scale lines is equal and the width of the wide scale line is at least 1.5 times the width of the fine scale line, the photoelectric sensor can more easily distinguish and identify each scale line when scanning, thereby enhancing the detection accuracy and anti-interference ability of the pulse peak. The wide scale lines can provide rough positioning in a large range of movement, and the fine scale lines are used for fine compensation when high precision is required, taking into account the efficiency and accuracy of the measurement, and avoiding the error accumulation that is prone to occur in long-distance measurement by traditional methods. This solution does not need to rely on a specific sensor model. As long as the resolution meets the requirements, accurate and efficient distance measurement can be achieved in a variety of application scenarios.

[0006] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0007] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0009] Figure 1 It is a flow chart of an embodiment of a distance measurement method based on a photoelectric sensor of the present invention, showing the main steps from scale pattern design, obtaining scanning data to calculating the displacement of the photoelectric sensor; Figure 2 Schematic diagram of the design of the scale pattern of an embodiment of the present invention, wherein the white part is the scale line and the black part is the tape background; Figure 3 It is a schematic diagram of the effect of unfolding the scanning data of the photoelectric sensor in a two-dimensional plane, showing the distribution of pulse peaks formed by wide scale lines and fine scale lines in the scanning data; Figure 4 A schematic diagram of matching and marking scanned data according to the scale line topology, through the combination of wide scale lines and several fine scale lines, the noise peaks are removed and the tape position is determined; Figure 5This is a schematic diagram of calculating the total displacement of the photoelectric sensor based on the wide-scale movement period and fine-scale displacement compensation, showing the principle of obtaining the distance measurement value based on the comparison between the zero-return frame and the current frame. DETAILED DESCRIPTION

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

[0011] like Figure 1 As shown, the embodiment of the present invention includes the following steps: S1. Design a specific scale pattern with alternating wide and thin scale lines to facilitate algorithm recognition.

[0012] A plurality of wide scale lines and fine scale lines are arranged on the surface of the tape, and a plurality of fine scale lines are inserted between two adjacent wide scale lines. Each scale line is white, the tape background color is black, and the spacing between the wide scale lines and the fine scale lines and the spacing between any adjacent fine scale lines are equal; the width of the wide scale line is at least 1.5 times the width of the fine scale line, so as to facilitate the distinction in the scanned data.

[0013] In a preferred case, the width of the white scale lines can be designed to be between 0.3mm and 1mm, and the black transition area between the white scale lines can be designed to be between 0.2mm and 1mm; it is also necessary to ensure that the spacing between the two wide scale lines does not exceed the effective scanning range of the photoelectric sensor, and based on engineering practice and experimental test results, the wide scale line spacing and the number of fine scale lines are selected to meet the requirements of both ranging accuracy and moving speed. Figure 2 A schematic diagram of this specific scale pattern is shown, in which the white strips are scale lines and the black area is the scale tape background.

[0014] S2. Scan the scale pattern through the photoelectric sensor to obtain a frame of scanning data.

[0015] During the scanning process, photoelectric sensors with higher resolution, such as photoelectric sensors with a line density of up to 20 lines / mm (about 5μm pixel resolution), can be used to obtain clear scale image data. Each time the photoelectric sensor scans, a frame of scan data is formed, in which each white scale line corresponds to a set of sampled data with a higher brightness value, and a pulse peak with a slightly flat top is formed in the brightness waveform. The data value gradient of the peak edge is large and the edge is stable; the black background area corresponds to a trough with a lower brightness value or close to zero value. Figure 3The figure shows the effect of unfolding the scanning data of the photoelectric sensor in a two-dimensional plane, and it can be seen that several pulse peaks are distributed in an orderly manner.

[0016] S3, traverse the scanned data, identify the scale waveform therein, and extract the center coordinates of each scale line.

[0017] The scanned data is locally smoothed to suppress burrs and noise interference. Then, for each pulse peak, the highest and lowest points of its left and right edges are detected, and the numerical characteristics of the peak shape are combined for weighted calculation to obtain the center coordinates of the scale line. The same is true for several fine scale lines evenly inserted between two wide scale lines. After this step, all wide and fine scale lines in a frame of scanned data can identify the corresponding center coordinates.

[0018] S4. Mark the position of the scale tape in the current frame of scan data according to the scale line topology.

[0019] like Figure 4 As shown in the figure, by judging which peaks belong to wide scale lines and which belong to fine scale lines, and combining the expected spacing and quantity relationship between them, the specific position of the scale tape in this frame can be determined. Sometimes, under fast movement or noise interference, individual scale lines may be missed or over-detected; at this time, the fixed topological relationship between "wide scale lines-several fine scale lines" can be used for fault-tolerant elimination to exclude peaks that are obviously inconsistent with the rules and avoid displacement accumulation errors caused by misjudgment.

[0020] S5. The displacement of the photoelectric sensor relative to the zero position is calculated by using the moving cycle statistics of the wide scale line and the zero scale comparison method, and converted into a distance measurement value.

[0021] Usually we first determine the zero frame As a reference, record the initial alignment position of the photoelectric sensor and the tape. When the photoelectric sensor moves from the zero position, each frame of scanning data will output the center coordinate changes of several scale lines. In order to avoid cumulative errors, the present invention directly counts the number of wide scale lines moving in and out to obtain the number of wide scale cycles spanned. , and the physical distance between two wide scale lines is recorded as , then the main displacement part can be expressed as ; Further, compare the current frame With zero frame The relative displacement of the center coordinates of all tick marks in , more detailed compensation can be obtained. Here, Usually in pixels or scanning coordinates, it is necessary to convert the actual physical size of each pixel of the photoelectric sensor into a physical displacement value. The calculation formula is in, It is equivalent to the overall reading of the scale, indicating the distance corresponding to the wide scale cycle that has been crossed, and is the relative displacement compensation between the current frame and the zeroing frame. When directly converting to the required physical distance measurement value, the pixel or scan coordinate can be converted to the actual length (mm or micron, etc.) and then compared with the distance spanned by the scale. The distance between the sensor and the zero position is obtained by superimposing the distance between the sensor and the zero position. This method can be used to quickly calculate the span using a wide scale line when moving quickly over a large range, and to perform subdivision compensation using a fine scale line or pixel coordinates when moving slowly or statically, thus taking into account both detection efficiency and measurement accuracy.

[0022] like Figure 5 As shown, this method can use wide scale lines for rough calculations when moving rapidly over a large range, reducing the amount of data processing; when the photoelectric sensor is relatively stationary or moving at a low speed, the weighted average of the displacements of all scale lines is used to accurately calculate the displacement value, taking into account both detection efficiency and accuracy requirements.

[0023] In applications, the measurement operation is often: first align the photoelectric sensor and the tape to the zero position and lock it as the zero frame, then quickly pull out a certain distance (only roughly count the crossing period of the wide scale line), and then slow down the movement speed or keep it still when precise measurement is required, and make precise calculations based on the changes in the center coordinates of the fine scale lines. This solution can fully utilize the advantages of the high resolution of the photoelectric sensor to stably control the distance measurement accuracy at the order of 10μm. At the same time, the measurement data can be shared in real time through the network, reducing the detection cost and improving the statistical efficiency. The zero position can be manually aligned and set by the operator, or the reserved alignment mark can be calibrated by the automatic detection module.

[0024] Compared with the traditional mechanical or single optical fence distance measurement scheme, this scheme utilizes a combination of wide and fine scales and a high-resolution photoelectric sensor, which significantly improves the speed, accuracy and reliability of long-range distance measurement, and is particularly suitable for production scenarios that require automated and intelligent measurement. The above specific implementation methods are only used to illustrate the technical principles and advantages of the present invention, and should not be understood as limiting the scope of protection of the present invention; any simple deformation or replacement of the above structure and process within the scope of the concept of the present invention should be deemed to fall within the scope of protection of the present invention.

[0025] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0026] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0027] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.

[0028] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.

Claims

1. A distance measurement method based on a photoelectric sensor, characterized in that: The following steps are involved: S1. Design the scale pattern: Arrange a number of wide scale lines and fine scale lines on the surface of the tape, with a number of fine scale lines distributed between two adjacent wide scale lines, the distance between any adjacent wide scale lines and fine scale lines and the distance between any adjacent two fine scale lines are equal, and the width of the wide scale line is at least 1.5 times the width of the fine scale line; S2, obtaining scanning data: using a photoelectric sensor to scan the tape to obtain a frame of scanning data, wherein the wide scale lines and the fine scale lines form pulse peaks in the scanning data; S3, extracting the scale line center: traversing and identifying the scanned data, filtering the noise, locating the edge of the pulse peak, and weighted calculation to obtain the center coordinates of each wide scale line and thin scale line; S4, positioning based on scale topology: matching the identified wide scale lines and fine scale lines according to the spacing between the wide scale lines and the fine scale lines and their arrangement rules, and determining the scanning position corresponding to the tape in the current scanning data; S5. Wide scale movement cycle statistics and zero scale comparison: By counting the movement cycles of the wide scale lines and the relative displacement of the scale lines between the current frame and the zero frame, the total displacement of the photoelectric sensor relative to the zero position is calculated, and the total displacement is converted into a distance measurement value.

2. The distance measurement method based on a photoelectric sensor according to claim 1, characterized in that: The widths of the wide scale lines and the thin scale lines are in the range of 0.3 mm to 1 mm, and the adjacent distances between the wide scale lines and the thin scale lines and the adjacent distances between the thin scale lines are both in the range of 0.2 mm to 1 mm.

3. The distance measurement method based on a photoelectric sensor according to claim 1 or 2, characterized in that: The line density of the photoelectric sensor is greater than or equal to 20 lines / mm, and the imaging pixel resolution corresponding to the scan data reaches the order of 5 μm, thereby ensuring that the scale lines have high contrast and edge clarity in the scan data.

4. The distance measurement method based on a photoelectric sensor according to claim 3, characterized in that: In step S3, the pulse peaks of the scan data are locally smoothed to suppress noise and burrs; then the peak and valley values ​​of the left and right edges of each pulse peak are detected respectively, and the center coordinates of the scale lines are calculated based on the weighted numerical characteristics of the peaks.

5. The distance measurement method based on a photoelectric sensor according to claim 4, characterized in that: In step S4, by identifying the number, width and relative arrangement order of wide scale lines and thin scale lines, the erroneous identification of pulse peaks caused by noise or defects is eliminated; when some scale lines are missing in the scanning data, fault-tolerant matching is performed through the topological structure to ensure accurate determination of the tape position.

6. The distance measurement method based on a photoelectric sensor according to claim 5, characterized in that: In step S5, when the moving speed of the photoelectric sensor exceeds a preset threshold, a quick estimation is performed based only on the movement in or out of the wide scale line; when the photoelectric sensor is moving slowly or stopped, a weighted calculation is performed using all the center coordinates of the wide scale lines and the fine scale lines to obtain a higher precision displacement value.

7. The distance measurement method based on a photoelectric sensor according to claim 6, characterized in that: The zero position is a reference position preset before distance measurement, and the photoelectric sensor starts to move from the reference position and acquires the scanning data; the zero position is determined by manual or automatic calibration.