A two-dimensional code type reticle determination method and a two-dimensional high-precision autocollimator based on the reticle and an image positioning algorithm thereof
By using a QR code-type reticle determination method and image positioning algorithm, the problem of low measurement accuracy of traditional autocollimators is solved, achieving higher spot centroid positioning accuracy and noise resistance, and improving the measurement stability and accuracy of the autocollimator.
Patent Information
- Application Number
- CN202511621981.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-11-07
AI Technical Summary
Traditional light-transmitting plate design results in low measurement accuracy of autocollimators, especially in noisy environments where misjudgment and measurement instability are prone to occur, making it difficult to improve the accuracy of the center position.
A QR code-type reticle determination method is adopted. By randomly generating candidate light-transmitting plate patterns and combining simulation optimization to select the optimal solution, multi-order diffraction and high-frequency interference are suppressed, and the accuracy of spot centroid positioning and noise resistance are improved.
It effectively suppresses multi-order diffraction and high-frequency interference caused by periodic structures, improves the accuracy of spot centroid positioning and noise resistance, and enhances the stability and accuracy of measurement.
Smart Images

Figure CN121093639B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of optical measurement, in particular to a two-dimensional code reticle determination method and a two-dimensional high-precision autocollimator based on the reticle and image positioning algorithm thereof. BACKGROUND
[0002] In the field of precision measurement, photoelectric autocollimator has important application as a high-precision angle measuring instrument. The autocollimator usually includes a light source, a light transmission plate, a light splitting prism, an imaging lens, a photoelectric detection system, a data processing system and other components. The structure and size of the light transmission plate directly determine the shape of the target image, the sensitive range of the measured angle and the positioning accuracy of the CCD to the target image, and further affect the angle measurement accuracy of the instrument.
[0003] The traditional light transmission plate often adopts a round hole type or a chessboard grid type reticle design. However, the applicant found in the implementation process that the traditional light transmission plate causes the autocollimator to at least have the problem of low measurement accuracy of the object angle offset. SUMMARY
[0004] Therefore, the purpose of the present application is to at least solve one of the above technical defects, in particular the technical defect of low measurement accuracy in the prior art. The present application provides a two-dimensional code reticle determination method and a two-dimensional high-precision autocollimator based on the reticle and image positioning algorithm thereof.
[0005] In a first aspect, the present application provides a two-dimensional code reticle determination method applied to an autocollimator, which comprises:
[0006] determining the unit type corresponding to each pixel position of the light transmission plate pattern according to a plurality of preset candidate light transmission rates and a plurality of preset candidate random number generators; the unit type includes a pre-divided light transmission unit type and a non-light transmission unit type;
[0007] generating a candidate two-dimensional code light transmission plate pattern based on the unit type corresponding to each pixel position;
[0008] determining a target two-dimensional code light transmission plate pattern based on the light spot displacement error result of the autocollimator simulation measurement; wherein the autocollimator contains the light transmission plate corresponding to the candidate two-dimensional code light transmission plate pattern.
[0009] In one embodiment, determining the unit type corresponding to each pixel position of the light transmission plate pattern according to a plurality of preset candidate light transmission rates and a plurality of preset candidate random number generators comprises:
[0010] determining a plurality of candidate random seed data;
[0011] determining a plurality of candidate random number generators based on the plurality of candidate random seed data;
[0012] generating a random matrix corresponding to the candidate random seed data by a candidate random number generator;
[0013] determining a unit type corresponding to each pixel position of the light-transmitting plate pattern according to the random matrix and the candidate light transmittance.
[0014] In one embodiment, the random matrix represents a position random number of each pixel position;
[0015] determining a unit type corresponding to each pixel position of the light-transmitting plate pattern according to the random matrix and the candidate light transmittance, comprises:
[0016] if the position random number is less than the candidate light transmittance, determining the pixel position corresponding to the position random number as a light-transmitting unit type, and determining the pixel corresponding to the light-transmitting unit type as a white pixel;
[0017] if the position random number is greater than or equal to the candidate light transmittance, determining the pixel position corresponding to the position random number as a non-light-transmitting unit type, and determining the pixel corresponding to the non-light-transmitting unit type as a black pixel.
[0018] In one embodiment, after determining the target two-dimensional code light-transmitting plate pattern, further comprising:
[0019] determining the candidate light transmittance corresponding to the target two-dimensional code light-transmitting plate pattern as a target light transmittance;
[0020] determining the candidate random seed data of the candidate random number generator corresponding to the target two-dimensional code light-transmitting plate pattern as target random seed data.
[0021] In one embodiment, determining the target two-dimensional code light-transmitting plate pattern based on a light spot displacement error result of a simulation measurement of a collimator, comprises:
[0022] obtaining different two-dimensional code light-transmitting plates and corresponding light spot simulation images of a simulation measurement of the collimator;
[0023] According to different light spot simulation images, the light-transmitting plate is subjected to a slight displacement, and an error and a statistical quantity are simulated to obtain a light spot displacement error result;
[0024] determining the candidate two-dimensional code light-transmitting plate pattern corresponding to the minimum light spot displacement error result as the target two-dimensional code light-transmitting plate pattern.
[0025] In a second aspect, the application provides an image positioning method based on a two-dimensional code type reticle, applied to a collimator, the collimator comprising a light-transmitting plate determined based on the above-mentioned two-dimensional code type reticle determination method, the image positioning method based on the two-dimensional code type reticle comprising:
[0026] A two-dimensional code light spot template image pre-constructed for the object to be measured is determined, and a two-dimensional code light spot measurement image of the object to be measured obtained by a collimator is obtained; wherein the two-dimensional code light spot template image is obtained by strictly perpendicular to the measurement light of the object to be measured, reflected light returning along the original path, focusing on the center point of the photoelectric detection system after passing through the light splitting prism of the collimator, and obtaining an image in a non-deflection state; the two-dimensional code light spot measurement image is an image in which an angle deflection occurs;
[0027] The similarity between the two-dimensional code light spot template image and the two-dimensional code light spot measurement image is obtained;
[0028] According to the similarity, the offset data of the light spot centroid of the object to be measured is obtained;
[0029] According to the offset data of the light spot centroid, the offset angle of the object to be measured is determined.
[0030] In one embodiment, according to the similarity, the offset data of the light spot centroid of the object to be measured is obtained, including:
[0031] The pre-constructed two-dimensional code light spot template image for the object to be measured and the obtained target light spot image are determined;
[0032] The similarity between the template image and the target image is detected using a correlation detection method;
[0033] From the similarity, the offset data of the light spot centroid of the object to be measured is fitted and converted.
[0034] In a third aspect, the application provides a two-dimensional high-precision collimator based on a two-dimensional code reticle and an image positioning algorithm thereof, comprising:
[0035] A light transmission plate is determined based on the two-dimensional code reticle determination method described above;
[0036] A light source;
[0037] A light splitting prism;
[0038] An imaging lens;
[0039] A photoelectric detection system;
[0040] A data processing system;
[0041] The light source emits a light beam, which, after being modulated by the light transmission plate, is transmitted through the light splitting prism and then becomes a parallel light beam through the imaging lens, and is incident on the reflection surface of the object to be measured; the light beam reflected from the reflection surface of the object to be measured is refracted again through the light splitting prism and is collected into an image by the photoelectric detection system;
[0042] The data processing system is used to visually present the collected image and process the angle deflection amount;
[0043] The data processing system comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above-mentioned image positioning method based on the two-dimensional code reticle when executing the computer program.
[0044] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program implements the steps of the above-mentioned method when executed by a processor.
[0045] In a fifth aspect, the present application provides a computer program product comprising a computer program, and the computer program implements the steps of the above-mentioned method when executed by a processor.
[0046] From the above technical solutions, the embodiments of the present application have the following advantages:
[0047] The two-dimensional code reticle determination method and the two-dimensional high-precision autocollimator based on the reticle and the image positioning algorithm thereof provided by the present application can determine a random candidate two-dimensional code light transmission plate pattern by using a pre-set candidate random number generator and a candidate light transmission rate, and select an optimal candidate two-dimensional code light transmission plate pattern as a target two-dimensional code light transmission plate pattern in combination with a simulated displacement error result. In this way, the multi-order diffraction and high-frequency interference caused by the periodic structure in the traditional technology can be effectively suppressed, the light spot centroid positioning precision and the anti-noise capability are improved, and thus the object angle offset measurement precision of the autocollimator can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0049] Figure 1 A flowchart of a two-dimensional code reticle determination method provided by an embodiment of the present application;
[0050] Figure 2 A flowchart of a step of determining a plurality of candidate random number generators provided by an embodiment of the present application;
[0051] Figure 3 A flowchart of a step of determining a unit corresponding to each pixel position provided by an embodiment of the present application;
[0052] Figure 4 A flowchart of a step of determining a target two-dimensional code light transmission plate pattern provided by an embodiment of the present application;
[0053] Figure 5 A flowchart of an image positioning method based on a two-dimensional code reticle provided by an embodiment of the present application is shown in FIG. 1.
[0054] Figure 6 A structural diagram of a collimator provided by an embodiment of the present application is shown in FIG. 2.
[0055] Figure 7 A comparison diagram of cross-correlation result images provided by an embodiment of the present application is shown in FIG. 3.
[0056] Figure 8 A comparison diagram of positioning error results provided by an embodiment of the present application is shown in FIG. 4. DETAILED DESCRIPTION
[0057] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0058] Optoelectronic autocollimators have important applications in the field of precision measurement. An autocollimator usually includes a light source, a light transmission plate, a light splitting prism, an imaging lens, and an optoelectronic detection system. The structure and size of the light transmission plate directly determine the shape of the target image, the sensitive range of the measured angle, and the positioning accuracy of the CCD on the target image, and further affect the angle measurement accuracy of the instrument. The design of the traditional light transmission plate is mostly in the form of a circular hole, a chessboard grid, or other regular structures, which strongly modulate the light spot. However, the simple regular arrangement of the light transmission plate limits the imaging system, and the autocollimator has the following deficiencies:
[0059] First, the circular hole reticle is a point structure with central symmetry. A large number of regular circular holes produce multi-order diffraction effects, and there are obvious high-order peaks in the correlation result image. In a noisy environment, the intensity of the secondary peak is similar to that of the main peak, and it is easy to be mistaken for the true displacement. In the manufacturing process, due to the existence of deviation and burrs, the aperture function degenerates from an ideal circle to an irregular polygon, destroying the rotational symmetry and producing asymmetric side lobes.
[0060] Second, the chessboard grid reticle is composed of alternating positive and negative color blocks, which contains a large amount of high-frequency information. After cross-correlation, an array-like sharp sidelobe is generated. The main peak and the secondary peak have poor distinguishability, and the anti-noise ability is poor. The correlation peak is obvious in the horizontal and vertical directions, but the grid is discontinuous in the diagonal direction. When moving in the strictly aligned row and column direction, an ideal peak shape can be obtained, and when measuring the movement in any direction, it is not stable. High-frequency signals also have very high requirements for imaging quality. Once the imaging is out of focus, the high-frequency information will be quickly attenuated, and the main peak will also collapse.
[0061] Third, the traditional chessboard grid and circular hole reticle design carry limited information, which makes it difficult to further effectively improve the center position accuracy calculated based on these information.
[0062] Based on this, the application provides a two-dimensional code type reticle determination method and a two-dimensional high-precision autocollimator based on the reticle and its image positioning algorithm. By randomly generating candidate two-dimensional code light transmission plate patterns and combining simulation optimization to select the optimal solution, the periodic structure caused by multi-order diffraction and high-frequency interference is effectively suppressed, the light spot centroid positioning accuracy and anti-noise ability are improved, and the advantages of reducing misjudgment and enhancing measurement stability are achieved.
[0063] In an exemplary embodiment, Figure 1 A flowchart of a two-dimensional code type reticle determination method provided by the embodiment of the application is shown in Figure 1 As shown, a two-dimensional code type reticle determination method is provided. The method can be applied to a terminal for illustration, and it can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is realized through the interaction of the terminal and the server. The terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers. The server can be a standalone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. In the embodiment, the method is applied to the light transmission plate in the autocollimator, and the method can include the following S101-S103. Wherein:
[0064] S101, according to a plurality of preset candidate light transmission rates and a plurality of preset candidate random number generators, determine the unit type corresponding to each pixel position of the light transmission plate pattern; the unit type includes a pre-divided light transmission unit type and a non-light transmission unit type.
[0065] The candidate random number generator can be used to generate a uniformly distributed pseudo-random sequence, such as a linear congruential generator or a Mersenne Twister generator. The unit type can refer to a unit that is set to be transparent or not, for example, each unit is either completely transparent (white pixel) or completely opaque (black pixel). The unit type division can be achieved by setting a transmittance threshold, for example, when the random number is below the threshold, it is determined to be a transparent unit, and above the threshold, it is a non-transparent unit.
[0066] Optionally, the candidate transmittance n≤50% can be set, so that the diffraction effect distortion caused by the excessive aggregation of adjacent pixels can be avoided on the premise of ensuring the overall transmittance not to exceed n and realizing accurate duty control.
[0067] S102, generating a candidate two-dimensional code transmittance plate pattern based on the unit type corresponding to each pixel position.
[0068] The candidate two-dimensional code transmittance plate pattern can be a binary image randomly generated by the transmittance and the random number generator, and can be uniquely determined by the combination of the candidate transmittance of the transmittance plate and the candidate random seed data. Multiple candidate two-dimensional code transmittance plate patterns can be determined by the combination of multiple candidate transmittance and candidate random seed data.
[0069] Optionally, the finder pattern and the positioning pattern specified in the QR code standard can be used as the basic framework. As an example, a two-dimensional orthogonal matrix coding structure can be used, for example, the pixel unit is designed as a 125 μm×125 μm square structure, a 27×27 matrix arrangement mode is constructed, and the total effective area is 3.375 mm×3.375 mm. The candidate transmittance represents the proportion parameter of the transparent unit in the overall pattern, for example, a value in the range of 30%-70% can be selected for testing.
[0070] S103, determining a target two-dimensional code transmittance plate pattern based on the light spot displacement error result of the autocollimator simulation measurement; wherein the autocollimator contains the transmittance plate corresponding to the candidate two-dimensional code transmittance plate pattern.
[0071] The light spot displacement error result can refer to the deviation between the actual measured light spot center position and the theoretically expected position. The target two-dimensional code transmittance plate pattern can refer to the transmittance plate pattern finally selected as the transmittance plate structure. The target two-dimensional code transmittance plate pattern can be determined by the combination of the corresponding target transmittance and target random seed data.
[0072] Exemplarily, the light-transmitting plate can independently generate a random number for each pixel point, and determine the light-transmitting attribute of the point in combination with a preset light-transmitting rate parameter. For example, when the light-transmitting rate is set as 45%, the pixel with a random number less than 0.45 is set as a light-transmitting unit. After generating different random distribution candidate two-dimensional code light-transmitting plate patterns through multiple iterations, the light spot displacement process is simulated by using an optical simulation system, and the displacement error data corresponding to each pattern is recorded. Finally, the pattern with the minimum error can be selected as the target reticle pattern, so as to ensure the optimal displacement sensitivity and anti-interference ability in actual measurement.
[0073] In actual application, compared with the prior art, the traditional round hole type reticle is interfered by multi-order diffraction due to rotational symmetry. The present embodiment breaks the optical symmetry through the asymmetric two-dimensional code structure. The high-frequency information of the chessboard type reticle is easily affected by the imaging quality, and the present embodiment adopts controllable random distribution to avoid fixed frequency characteristics. In the traditional technology, the fixed pattern is easy to produce regular sidelobes. The present embodiment realizes pseudo-random distribution through the random number generation mechanism, and effectively suppresses the secondary peak interference in the correlation operation.
[0074] In the present embodiment, a reticle pattern with non-periodic characteristics can be generated, which avoids regular diffraction effects while maintaining sufficient light flux. In this way, the generated two-dimensional code light-transmitting plate pattern presents a single main peak feature in the cross-correlation operation, effectively improving the sensitivity and accuracy of displacement detection. Through simulation optimization of the light-transmitting rate parameter and the random distribution mode, the signal-to-noise ratio requirement in different measurement environments can be adapted, and the environmental adaptability of the autocollimator system is enhanced, thereby improving the object displacement measurement precision of the autocollimator.
[0075] In one exemplary embodiment, Figure 2 A step flowchart for determining the unit type of each pixel position provided by the present embodiment is shown in Figure 2 Based on Figure 1 , the steps of the two-dimensional code type reticle determination method can be exemplarily explained, wherein determining the unit type corresponding to each pixel position of the light-transmitting plate pattern according to a plurality of preset candidate light-transmitting rates and a plurality of preset candidate random number generators includes S201 to S204:
[0076] S201, determining a plurality of candidate random seed data.
[0077] S202, determining a plurality of candidate random number generators based on the plurality of candidate random seed data.
[0078] S203, generating a random matrix corresponding to the candidate random seed data through the candidate random number generator.
[0079] S204, determining the unit type corresponding to each pixel position of the light-transmitting plate pattern according to the random matrix and the candidate light-transmitting rate.
[0080] The candidate random seed data can be a sequence of numerical values used to initialize a random number generator, which can be implemented in the form of different integers or strings, for example, by randomly selecting from a predetermined numerical range or generating at fixed intervals. The candidate random number generator can be an algorithmic module that generates a pseudo-random sequence based on the seed data, which can be implemented using linear congruential method, Mersenne Twister algorithm, or hash function-based generation method. The role of the candidate random seed data is to ensure that different generators have a reproducible initialization state, and the candidate random number generator can provide a controllable source of randomness for each pixel position. As an example, to ensure reproducibility control and build a high-quality random number generator, the seed parameter m serves as the system initial value, ensuring the reproducibility and traceability of the pattern. By changing the value of m, a new set of uncorrelated binary permutations can be obtained for multiple experiments or parameter scans. The random matrix can be a two-dimensional array (matrix) whose elements are pseudo-random numbers uniformly distributed within a certain range (e.g., [0, 1) or [0, 255]) generated by a random number generator.
[0081] For example, in the process of generating candidate QR code light transmission plate patterns, a plurality of independent numerical values are pre-set as candidate random seed data. Each candidate random seed data is input into a random number generation algorithm to generate a corresponding candidate random number generator. For example, when the candidate random seed data contains the values 12345 and 67890, two independent random number generators can be generated, respectively. These random number generators can generate independent position random numbers for each pixel position in subsequent processing, ensuring the random distribution difference between different candidate QR code light transmission plate patterns. By controlling the number and distribution of candidate random seed data, the influence of different random patterns on the final QR code pattern can be systematically explored.
[0082] For each random number generator, a corresponding random matrix can be generated, and it can be converted into a binary matrix of 0 / 1 by the double() function. Further, based on the comparison results of the random matrix and the candidate light transmission rate, the unit types corresponding to each pixel position in the light transmission plate pattern can be determined.
[0083] This embodiment introduces a set of candidate random seed data, making the random number generation process reproducible and scalable, providing a richer set of candidate samples for optimizing QR code patterns.
[0084] In this embodiment, the technical problem of single style caused by insufficient randomness control in the traditional two-dimensional code generation process is effectively solved. By generating a batch of candidate generators with different random characteristics, the diversity of two-dimensional code style is significantly improved, providing a sufficient data basis for subsequent selection of the optimal style. At the same time, based on the controllable generation mechanism of the seed data, the repeatability and traceability of the style generation process are guaranteed, which is conducive to the iterative improvement of the optimization algorithm.
[0085] In one exemplary embodiment, Figure 3 A flowchart of a step of determining the unit type corresponding to each pixel position is provided for the embodiments of the present application, as shown in Figure 3 The steps of the two-dimensional code type dividing plate determination method can be exemplarily explained based on Figure 1 In the step S103, the random matrix represents the position random number of each pixel position; and the unit type corresponding to each pixel position is obtained according to the candidate light transmittance and the position random number, including S301 and S302.
[0086] S301, if the position random number is less than the candidate light transmittance, the pixel position corresponding to the position random number is determined as the light transmissive unit type, and the pixel corresponding to the light transmissive unit type is determined as the white pixel.
[0087] S302, if the position random number is greater than or equal to the candidate light transmittance, the pixel position corresponding to the position random number is determined as the non-light transmissive unit type, and the pixel corresponding to the non-light transmissive unit type is determined as the black pixel.
[0088] The candidate light transmittance can refer to the proportion of light transmissive units in the two-dimensional code light transmissive plate style, which can be set in the numerical range of 0 to 1, for example, 0.3 or 0.5, etc. This parameter is used to control the distribution density of light transmissive units in the overall pattern.
[0089] The position random number can be a random number generated for each pixel position, which can be realized by a pseudo-random number generation algorithm, such as linear congruential method or mersenne twist algorithm. This random number is used to break the regularity of light transmissive unit distribution and avoid generating a periodic structure. The position random number can be set to a value range of 0 to 1.
[0090] Exemplarily, in generating the candidate two-dimensional code light-transmissive plate pattern, each pixel position is processed independently. A random number uniformly distributed in the range of 0 to 1 is first generated by a random number generator, and then the random number is compared with the preset candidate light transmittance. When the random number is lower than the light transmittance threshold, the pixel is marked as a light-transmissive unit; otherwise, it is marked as a non-light-transmissive unit. By traversing all pixel positions and repeating the above judgment process, a candidate two-dimensional code light-transmissive plate pattern with non-periodic distribution is finally generated. This process can batch generate multiple candidate two-dimensional code light-transmissive plate patterns, and the optimal solution with the smallest spot displacement error is screened out through simulation measurement.
[0091] Exemplarily, the light-transmissive unit type can refer to a light-transmissive plate region that allows light to pass through, which can be implemented by setting a pixel point with a gray value of 255 to represent the optical characteristics of the light-transmissive region. The non-light-transmissive unit type can refer to a light-transmissive plate region that blocks the propagation of light, which can be implemented by setting a pixel point with a gray value of 0 to represent the optical characteristics of the non-light-transmissive region. The binary division of black and white pixels forms the light and dark contrast pattern of the two-dimensional code, which functions to construct an optical modulation signal with high contrast, facilitating accurate identification of the spot shape by the photoelectric detection system.
[0092] In the process of generating the candidate two-dimensional code light-transmissive plate pattern, each pixel position is assigned a white or black attribute according to the light transmittance threshold. When the light-transmissive unit is defined as a white pixel, the corresponding light-transmissive plate region allows the light source beam to pass through completely; when the non-light-transmissive unit is defined as a black pixel, the corresponding light-transmissive plate region completely blocks the propagation of the light beam. This binary processing makes the generated two-dimensional code pattern form clear light and dark boundaries in the imaging process, thereby producing a non-periodic spot distribution. In the photoelectric detection system, the strong contrast characteristics of black and white pixels can effectively suppress the interference of imaging noise on spot positioning.
[0093] Optionally, for each group (n, m), a 27*27 binary vector is quickly generated using a probability model and mapped to a two-dimensional matrix, thereby obtaining the corresponding candidate two-dimensional code light-transmissive plate pattern.
[0094] This embodiment controls the distribution of light-transmissive units through random numbers, effectively breaking the spatial periodicity, so that the generated light-transmissive plate pattern has a non-repetitive feature, thereby suppressing high-order diffraction effects and reducing sidelobe interference.
[0095] By the technical solution, the application can generate a two-dimensional code light transmission plate pattern with random distribution characteristics, significantly reduce the multi-peak aliasing problem caused by the periodic structure in the light spot displacement measurement process, and improve the main peak recognition degree. At the same time, through the cooperative control of the candidate light transmission rate and the random number, the light spot quality can be optimized under the premise of guaranteeing the light transmission rate requirement, the anti-interference ability of the autocollimator in the noise environment is enhanced, the displacement misjudgment caused by the secondary peak interference is avoided, the signal-to-noise ratio of the light spot image is enhanced through the strong contrast characteristics of the black and white pixels, the mutual correlation algorithm can accurately identify the main peak position, and therefore the solving accuracy of the autocollimator for the object displacement is improved.
[0096] In one exemplary embodiment, the method further comprises:
[0097] determining the candidate light transmission rate corresponding to the target two-dimensional code light transmission plate pattern as the target light transmission rate;
[0098] determining the candidate random seed data of the candidate random number generator corresponding to the target two-dimensional code light transmission plate pattern as the target random seed data.
[0099] Exemplarily, in the process of generating the candidate two-dimensional code light transmission plate pattern, the candidate light transmission rate determines the probability of each pixel position being judged as a light transmission unit, and the candidate random seed data ensures the determinacy of the random number generation process. By simulating the light spot displacement error under different candidate parameter combinations, the target two-dimensional code pattern with the minimum error is selected, and the corresponding light transmission rate and random seed are reserved as the final parameters. This process makes the generated two-dimensional code pattern have randomness to avoid periodic aliasing and ensure the recognition degree of the light spot main peak through parameter optimization.
[0100] In this embodiment, a two-dimensional code light transmission plate pattern with optimal light transmission distribution and repeatability can be generated, so as to improve the accuracy of light spot centroid positioning and reduce the misjudgment risk caused by multi-peak aliasing or noise interference in the measurement process.
[0101] In one exemplary embodiment, Figure 4 A flowchart of a step of determining a target two-dimensional code light transmission plate pattern provided by the embodiment of the application is shown in FIG. 4. Figure 4 As shown in FIG. 4, the steps of the two-dimensional code reticle determination method can be exemplarily explained on the basis of Figure 1 In the step S103, the target two-dimensional code light transmission plate pattern is determined based on the light spot displacement error results of the autocollimator simulation measurement, and specifically can include S401 to S403, wherein:
[0102] S401, acquiring different two-dimensional code light transmission plates and corresponding light spot simulation images of the autocollimator simulation measurement;
[0103] S402, according to different light spot simulation images, the light transmission plate is slightly displaced, the error and the statistical quantity are simulated, and the light spot displacement error result is obtained;
[0104] S403, the candidate two-dimensional code light transmission plate style corresponding to the minimum light spot displacement error result is determined as the target two-dimensional code light transmission plate style.
[0105] Exemplarily, in the process of generating the candidate two-dimensional code light transmission plate style, the candidate transmittance determines the probability of each pixel position being determined as a light transmission unit, and the candidate random seed data ensures the determinacy of the random number generation process. By simulating and measuring the light spot displacement error under different candidate parameter combinations, the target two-dimensional code style with the minimum error is screened out, and the corresponding transmittance and random seed are retained as the final parameters. This process makes the generated two-dimensional code style have randomness to avoid periodic aliasing, and ensures the recognition degree of the light spot main peak through parameter optimization.
[0106] In this embodiment, the application can generate a two-dimensional code light transmission plate style with optimal transmittance distribution and repeatability, thereby improving the accuracy of light spot centroid positioning and reducing the risk of misjudgment caused by multi-peak aliasing or noise interference in the measurement process.
[0107] In one specific embodiment, the two-dimensional code light transmission plate can be generated by controlling the transmittance and the random number seed. In this way, a plurality of two-dimensional code light transmission plates can be obtained through different transmittance and random number seed combinations. Taking a 27*27 size two-dimensional code as an example, the transmittance is set to 0.5, the random number seed is set to 2025, an N*N [0, 1) random matrix is generated through the rand(N) function, the double() function is used to convert it into a 0 / 1 binary matrix, the algorithm matrix = double(rand(N) > transmittance) is used, and the width a of the pixel unit is set. In this way, a two-dimensional code light transmission plate with a transmittance of 50% and a size of 27a*27a can be generated.
[0108] In one exemplary embodiment, Figure 5 A flowchart of an image positioning method based on a two-dimensional code type reticle provided by the embodiment of the application is shown in FIG. 1. Figure 5As shown, an image positioning method based on a two-dimensional code type reticle is provided. The method is applied to a terminal for example, and it can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction of the terminal and the server. The terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers. The server can be a standalone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0109] In this embodiment, the image positioning method based on the two-dimensional code type reticle can be applied to a collimator as shown. Figure 6 As shown, the collimator includes an LED light source 1, a focusing lens 7, a light transmission plate 2, a light splitting prism 3, an imaging lens 4, and a linear array CCD 6. The collimator is used to measure the angular offset of the measured object 5. The light transmission plate 2 can be determined based on the two-dimensional code type reticle determination method described above.
[0110] As shown, the image positioning method based on the two-dimensional code type reticle can include the following S501 to S504: Figure 5
[0111] S501, determine the two-dimensional code light spot template image pre-constructed for the object to be measured, and obtain the two-dimensional code light spot measurement image of the measured object obtained by the collimator; wherein the two-dimensional code light spot template image is obtained by strictly perpendicular to the measurement light of the object to be measured, the reflected light returns along the original path, and after passing through the light splitting prism of the collimator, it is focused on the center point of the photoelectric detection system, obtaining an image in the non-deflection state; the two-dimensional code light spot measurement image is an image with angular deflection.
[0112] S502, obtain the similarity between the two-dimensional code light spot template image and the two-dimensional code light spot measurement image.
[0113] S503, according to the similarity, obtain the offset data of the light spot centroid of the object to be measured.
[0114] S504, according to the offset data of the light spot centroid, determine the offset angle of the measured object.
[0115] The two-dimensional code light spot template image refers to a reference image collected and constructed by the autocollimator when the object to be measured is not offset, and can be generated by multiple imaging and averaging or static calibration, and is used for subsequent matching and comparison with the measurement image. The two-dimensional code light spot measurement image refers to an image obtained by measuring the object to be measured by the autocollimator of the light transmission plate containing the two-dimensional code. The degree of similarity refers to the matching degree of the two images in spatial distribution, which can be realized by cross-correlation operation or gray distribution difference calculation, and is used to reflect the light spot position change amount. The offset data of the light spot centroid refers to the displacement amount of the light spot center in the image coordinate system, which can be extracted by the centroid algorithm or curve fitting, and is used to quantify the spatial offset of the object to be measured.
[0116] Optionally, the two-dimensional code light spot template image can be constructed in advance, wherein:
[0117] The bar code light spot template image and the two-dimensional code light spot measurement image are light spot images obtained by the CCD under different angle states of the same object, and are aimed at the angle state of the measurement object. For example, in an ideal case, the object surface is strictly perpendicular to the measurement light, and the reflected light will return along the original path, focus on the CCD center point after passing through the beam splitter, that is, the "zero position", which corresponds to the no deflection state. The two-dimensional code light spot template image can be constructed at the "zero position"; when the object surface normal is no longer strictly parallel to the measurement light, that is, the object has an angle deflection, another two-dimensional code light spot image can be obtained on the CCD, which is called the two-dimensional code light spot measurement image. Therefore, the above two images are obtained by the autocollimator, and the former is determined by the initial stable state of the object, and the latter is determined by the state of the object when the angle changes.
[0118] Exemplarily, in the measurement process, a two-dimensional code light spot template image with non-periodic characteristics can be generated based on a high-precision two-dimensional code light transmission plate pattern. The light intensity distribution of the two-dimensional code light spot template image has the characteristics of prominent main peak and suppressed secondary peak. When the measured object is offset, the two-dimensional code light spot measurement image formed by the reflected light beam will be displaced relative to the template image. By calculating the cross-correlation function of the two images, the sub-pixel level offset corresponding to the wave peak position can be extracted. Further, the pixel offset can be converted into the actual angle offset by combining the focal length parameter of the autocollimator optical system. For example, in a two-dimensional measurement scene, the offset data in two directions can be obtained by two sets of orthogonal two-dimensional code light transmission plate patterns, and multi-dimensional angle calculation is realized.
[0119] Thus, compared with the prior art, the traditional method adopts the light-transmitting plate with equal width, which causes the light spot image to have periodic secondary peaks, and is prone to noise interference in cross-correlation calculation. In the embodiment, the pattern of the light-transmitting plate is optimized, so that the main peak sharpness of the light spot image is improved and the secondary peak energy is reduced. In a complex environment, the design can effectively distinguish the main peak from the noise signal, avoiding the problem of false matching. In addition, the non-periodic light spot distribution reduces the sensitivity of the system to external vibration, reducing error transmission.
[0120] In the embodiment, the above steps can solve the problem of difficulty in identifying the main peak caused by the periodic arrangement of the light-transmitting plate in the traditional autocollimator, and improve the accuracy of the light spot centroid solution. By enhancing the feature discrimination of the light spot image, the peak positioning of the cross-correlation operation is more accurate, thereby improving the resolution of the angle offset measurement. At the same time, the method reduces the sensitivity to environmental noise and enhances the robustness of the measurement system.
[0121] In some specific embodiments, the two-dimensional code type reticle determination method as described above can be used to determine the high information entropy encoding shape light-transmitting plate structure. The specific form of the high information entropy sequence can be as shown on the right side of Figure 6 .
[0122] In practical applications, first, each optical element is installed. A reference object with a surface normal strictly parallel to the optical axis of the collimating lens can be selected as the basis for several calibrations of the system. After fixing the LED light source on the optical platform, the collimating lens is installed, and the position and inclination angle are adjusted to make the light beam passing through the collimating lens have good parallelism; the two-dimensional code light-transmitting plate reticle is fixed as an aperture stop; the light splitting prism, imaging lens, and linear array CCD are installed at appropriate positions to ensure that the surface of the linear array CCD is strictly perpendicular to the optical axis of the imaging lens, and the position and focal length are adjusted to make the light modulated by the two-dimensional code light-transmitting plate can be accurately captured by the photoelectric detection device CCD, forming a clear light spot pattern.
[0123] Turn on the LED light source, observe the light spot pattern received by the CCD, adjust the brightness and uniformity of the light source, and ensure that the CCD is in the normal linear working area and the received light spot brightness is uniform and does not reach the saturation state.
[0124] Thus, the two-dimensional code light spot measurement image can be obtained based on the CCD.
[0125] In an exemplary embodiment, according to the similarity, the offset data of the light spot centroid of the object to be measured is obtained, including:
[0126] The two-dimensional code light spot template image pre-built for the object to be measured and the target light spot image obtained are determined.
[0127] The similarity between the template image and the target image is detected using a correlation detection method.
[0128] The shift data of the light spot centroid of the object to be measured is obtained by the fitting conversion.
[0129] The correlation detection method can include a normalized cross-correlation algorithm, for example, by calculating the similarity of the gray value space distribution of the template image and the target image, a cross-correlation matrix is generated; the peak position in the cross-correlation matrix can correspond to the preliminary shift of the light spot centroid.
[0130] Exemplarily, the cross-correlation matrix can be subjected to sub-pixel level interpolation processing, for example, a quadratic surface fitting algorithm is used to fit the surface of the preset range neighborhood pixels of the peak value region, and the coordinates of the extreme points of the fitting surface are solved to obtain the light spot centroid shift data with sub-pixel level precision, and the positioning error can be controlled within a very small number of pixels.
[0131] In an exemplary embodiment, a two-dimensional code light spot template image is determined for an object to be measured, comprising:
[0132] An initial light spot image of the object to be measured in a non-deflection state obtained by a collimator is acquired;
[0133] The initial light spot image is subjected to pixel subdivision to obtain sub-pixels of the initial light spot image;
[0134] According to the initial gray data of the sub-pixels in the continuous multiple frames of initial light spot images, target gray data of the sub-pixels is determined;
[0135] According to the target gray data of the sub-pixels, a target light spot image is obtained;
[0136] According to the centroid position of the target light spot image, a two-dimensional code light spot template image is constructed.
[0137] The initial light spot image can be an unmoved light spot image obtained by initially collecting the object to be measured by the collimator, for example, multiple initial light spot images can be obtained by continuous collection. The light spot centroid data can be the centroid position of the light spot, for example, the pixel gray value sequence of the multiple initial light spot images can be statistically analyzed to propose abnormal gray values deviating from the mean value ± 3σ, and the remaining gray value sequence is reserved to calculate the light spot centroid data.
[0138] Wherein, the pixel subdivision refers to dividing each pixel in the image sensor into smaller areas, for example, a single pixel can be decomposed into multiple sub-regions by interpolation algorithm or spatial resampling technology to improve the spatial resolution. Sub-pixel refers to the sub-region formed after pixel subdivision, which can be 1 / 2 or 1 / 4 of the original pixel size, and can be realized by bilinear interpolation or cubic convolution interpolation, which is used to capture the distribution details of the light spot inside the pixel. The initial gray data refers to the gray value sequence of the same sub-pixel position in a plurality of continuous image frames, for example, time series data can be obtained by collecting 10-20 frames of images, which is used to eliminate transient noise interference. The target gray data refers to the stable gray value obtained by statistical processing of the initial gray data, which can be realized by using sliding average method or median filter algorithm to suppress the influence of random noise on the calculation of the center of mass. The target spot image refers to the light spot distribution map reconstructed by the target gray data of the sub-pixel, for example, by mapping the gray value of each sub-pixel to the corresponding spatial position to form a high-resolution image, which is used to accurately represent the light spot energy distribution.
[0139] Wherein, the center of mass position refers to the light spot energy center coordinates calculated by gray weighted, for example, the first moment algorithm is used to weight and sum the coordinates and gray values of all sub-pixels in the target spot image, so as to realize the sub-pixel level positioning accuracy.
[0140] Exemplarily, in the process of template construction, an initial light spot image with non-periodic characteristics can be generated based on the high-precision two-dimensional code type light transmission plate pattern light transmission plate, and the center of mass position of the light spot can be determined by center of mass calculation, and the center of mass is determined as the measurement origin. The high-precision two-dimensional code type light transmission plate light spot can be generated based on the center of mass and mapped to [0, 1], so it can be used as an ideal two-dimensional code light spot template image, which can be used for subsequent image matching. The light intensity distribution of the two-dimensional code light spot template image has the characteristics of prominent main peak and suppressed secondary peak.
[0141] By calculating the light spot center of mass and constructing the two-dimensional code light spot template image with the light spot center of mass as the measurement origin, the reconstruction of the two-dimensional code light spot template image is realized, which can enhance the sharpness of the main peak signal, reduce the influence of noise on the calculation of the center of mass, and thus improve the stability and accuracy of the offset angle measurement. In complex environment, the light spot center of mass data can still be reliably extracted, which provides a basis for subsequent high-precision offset calculation.
[0142] Exemplarily, the initial light spot image can be converted into a sub-pixel grid through pixel subdivision, each sub-pixel corresponding to a smaller spatial unit. The gray values of the same sub-pixel in consecutive multiple frames of images can be extracted and processed as target gray data, for example, a sliding window average is adopted for 30 frames of images to eliminate the gray fluctuation caused by environmental vibration or circuit noise. In the target light spot image reconstructed based on the target gray data, the gray value of each sub-pixel reflects the stable light intensity distribution, thereby avoiding the centroid shift caused by random noise in a single frame of image. The centroid position is determined by calculating the weighted average of all sub-pixel coordinates and their gray values.
[0143] Optionally, statistical analysis is performed on the sequence of pixel gray values in the one thousand frames of images, abnormal gray values deviating from the mean value ± 3σ are removed, and the final remaining gray value sequence is retained. Sub-pixel interpolation algorithm is used on the remaining valid gray values for further subdivision at the level of the used CCD pixels, to obtain a higher resolution image, which provides a basis for fine centroid positioning. The centroid obtained based on the high-resolution image can be calculated, and the centroid is determined as the measurement origin.
[0144] The present embodiment improves the spatial resolution through pixel subdivision, and combines time domain filtering of multiple frames of data to suppress noise, so that the reconstructed light spot energy distribution is closer to the real situation, and especially in a low-contrast or high-noise environment, the main peak signal and the interference signal can be effectively distinguished.
[0145] In the present embodiment, through sub-pixel level light spot reconstruction and fusion of multiple frames of data, the sharpness of the main peak signal is enhanced, and the influence of noise on centroid calculation is reduced, thereby improving the stability and accuracy of the offset angle measurement. In a complex environment, the light spot centroid data can still be reliably extracted, providing a basis for subsequent high-precision offset calculation.
[0146] In one exemplary embodiment, the similarity between the two-dimensional code light spot template image and the two-dimensional code light spot measurement image is obtained, including:
[0147] determining the cross-correlation image between the two-dimensional code light spot template image and the two-dimensional code light spot measurement image;
[0148] from the cross-correlation image, obtaining cross-correlation data corresponding to the wave peak position and cross-correlation data corresponding to a predetermined number of adjacent points on the left and right sides of the wave peak position;
[0149] based on the cross-correlation data corresponding to the wave peak position and the cross-correlation data corresponding to the predetermined number of adjacent points, obtaining the similarity;
[0150] according to the similarity, obtaining fitting curve data, and determining the highest point data of the fitting curve data;
[0151] according to the highest point data of the fitting curve data, obtaining the offset data.
[0152] The cross-correlation image refers to a two-dimensional data distribution map generated by calculating the correlation of two images in the spatial domain, and can be specifically implemented by using a discrete Fourier transform or a fast convolution algorithm, and is used to reflect the matching degree of the two images at different offsets. The peak position refers to a coordinate point with the maximum cross-correlation value in the cross-correlation image, and can be specifically implemented by using a pixel gray value or a gradient search algorithm. The position corresponds to the best matching offset between the two-dimensional code light spot template and the measurement image. The cross-correlation data corresponding to the adjacent points refers to the cross-correlation values of the pixel points within a certain range on the left and right sides of the peak, and can be specifically selected as the data of 25 pixel points on the left and right sides of the peak, and can be used to construct a local cross-correlation distribution model.
[0153] Exemplarily, when calculating the similarity degree, a cross-correlation image containing peak information can be generated by a cross-correlation operation, and the cross-correlation values of the peak position and its adjacent points can be extracted, and the local cross-correlation curve can be constructed by using the data.
[0154] Exemplarily, by analyzing the distribution characteristics of the peak and its adjacent points, for example, by using a parabolic fitting or a Gaussian surface fitting method, the real position of the peak can be accurately determined, so that the influence of the discrete sampling error on the calculation of the similarity degree is eliminated. This process can effectively distinguish the true main peak from the secondary peak caused by noise, and avoid misjudgment caused by secondary peak interference.
[0155] Optionally, within the maximum correlation peak, a certain number (such as 25 points) of high-resolution coordinates and correlation values corresponding to the left and right of the maximum correlation point are taken for local parabolic fitting. The expression can be wherein, is the displacement of the light spot centroid, is the effective focal length of the imaging lens, and the actual deflection angle of the measured object is calculated.
[0156] In this embodiment, by introducing the cross-correlation data of the adjacent points of the peak, and combining the local region distribution model, the main peak position can be more accurately identified, the sensitivity of the measurement result to the environmental noise is reduced, so that the calculation accuracy of the light spot centroid displacement data is improved, the anti-interference ability of the autocollimator in a complex environment is enhanced, the measurement error caused by the weakening of the main peak is solved, the interference of the secondary peak on the similarity determination is reduced, and the measurement accuracy of the object deflection angle is improved.
[0157] In some specific embodiments, in the simulation process of the autocollimator, after obtaining the two-dimensional code light spot template image, the reference object 5 in the formula Figure 6 is rotated by a small angle in the plane, and the light spot formed on the CCD surface will have a linear displacement.
[0158] After the existing pixel size is subdivided, a high-resolution two-dimensional code light spot measurement image, a pixel and a gray value corresponding matrix are obtained. Cross-correlation operation is performed between the moved two-dimensional code light spot measurement image and the ideal two-dimensional code light spot template image, a cross-correlation image and a maximum correlation point are obtained, and the cross-correlation result images of the traditional circular hole type light transmission plate and the two-dimensional code type light transmission plate of the application are as shown in Figure 7 The chessboard type reticle is composed of alternating positive and negative color blocks and contains a large amount of high-frequency information. After cross-correlation, an array shape, sharp sidelobes, poor main peak and secondary peak differentiation, and poor anti-noise capability are generated. The correlation peak value is obvious in the horizontal and vertical directions, but the grid pattern is discontinuous in the diagonal direction. When moving in the direction of strict alignment of rows and columns, an ideal peak shape can be obtained, but when measuring movement in any direction, it is not stable. High-frequency signals also have very high requirements for imaging quality. Once the imaging is out of focus, the high-frequency information will be quickly attenuated and the main peak will also collapse. The non-uniform arrangement structure of the two-dimensional code type light transmission plate provided by the application sets the pixel unit to modulate the phase and amplitude of the light at different positions; the two-dimensional code type reticle suppresses the intensity of the secondary peak in the cross-correlation result by destroying the symmetry and can effectively reduce the interference of stray information. Finally, the dual optimization of main peak enhancement and secondary peak suppression is realized, and the physical mechanism covers spatial filtering and symmetry breaking, and finally the signal-to-noise ratio and signal selectivity are significantly improved. Compared with the circular hole type and the chessboard type reticle, the intensity ratio of the main peak and the secondary peak in the result obtained by cross-correlation calculation of the two-dimensional code type reticle is improved by several times, and it has wider application potential in high-resolution imaging, spectral analysis and communication systems. In this way, the sidelobe noise can be effectively suppressed and the signal selectivity is improved.
[0159] In an exemplary embodiment, according to the similarity, the offset data of the light spot centroid of the object to be measured is obtained, including:
[0160] According to the similarity, the fitting curve data is obtained, and the highest point data of the fitting curve data is determined;
[0161] According to the highest point data of the fitting curve data, the offset data is obtained.
[0162] Exemplarily, by analyzing the distribution characteristics of the wave peak and its adjacent points, for example, by using parabolic fitting or Gaussian surface fitting method, the real position of the wave peak can be accurately determined, so as to eliminate the influence of discrete sampling error on the similarity calculation. This process can effectively distinguish the real main peak from the secondary peak caused by noise and avoid misjudgment caused by secondary peak interference.
[0163] Optionally, within the maximum correlation peak, a certain number (such as 25 points) of high-resolution coordinates and correlation values corresponding to the left and right of the maximum correlation point are taken to do local parabolic fitting. The expression can be wherein, is the light spot centroid displacement, For the effective focal length of the imaging lens, the angle of actual deflection of the measured object is calculated.
[0164] In some specific implementations, the high-resolution coordinates corresponding to the highest point of the fitted local parabola are calculated; and the coordinates are converted into actual spot centroid offset amounts according to the actual subdivision pixel size, as shown in Figure 8 Figure 8 A comparative diagram of positioning error results provided by the embodiments of the application is shown in FIG. 6. The design of the two-dimensional code reticle can improve the spot positioning accuracy and thus the angle measurement accuracy. In practical applications, the positioning accuracy of the traditional chessboard reticle is difficult to reach the 0.01 um level, and compared with the traditional round hole type, the spot accuracy can be improved by about 2-5 times after positioning by the two-dimensional code reticle and using the algorithm. The mean and variance of each curve are calculated, and the optimal results are compared.
[0165] It should be understood that, although each step in the flowchart involved in each embodiment as described above is shown in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0166] In one exemplary embodiment, a two-dimensional high-precision autocollimator based on a two-dimensional code reticle and an image positioning algorithm thereof is provided, comprising:
[0167] A light-transmitting plate is determined based on the two-dimensional code reticle determination method described above;
[0168] A light source;
[0169] A light splitting prism;
[0170] An imaging lens;
[0171] A photoelectric detection system;
[0172] A data processing system;
[0173] The light source emits a light beam, and after the light beam reaches the light transmission plate, the modulated light beam is transmitted through the light splitting prism and then through the imaging lens to become a parallel light beam, and is incident on the reflection surface of the measured object. The light beam reflected from the reflection surface of the measured object is refracted again through the light splitting prism and is collected into an image by the photoelectric detection system. The data processing system is used to visually present the collected image and process the angle deflection amount, which is visually presented on the electronic device through the data processing system.
[0174] The data processing system can include a memory and a processor. The memory stores a computer program. The processor executes the computer program to implement the steps of the image positioning method based on the two-dimensional code reticle.
[0175] It can be understood that the above-mentioned method of the embodiment has the same inventive concept, and the implementation scheme for solving the problem provided by the autocollimator is similar to the implementation scheme described in the above-mentioned method. Therefore, the specific limitations in the embodiment can be referred to the limitations of the above-mentioned method described above. The embodiment and the two-dimensional code reticle determination method and the image positioning method based on the two-dimensional code reticle described above can be mutually corresponding and referenced, and will not be described here.
[0176] In one exemplary embodiment, the application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by one or more processors, the one or more processors execute the steps of the image positioning method based on the two-dimensional code reticle as described in any of the above embodiments.
[0177] In one exemplary embodiment, the application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the image positioning method based on the two-dimensional code reticle as described in any of the above embodiments are implemented.
[0178] Finally, it should be noted that in this document, relational terms such as first and second and the like can only be used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations exist in any such actual relationship or order. Moreover, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a series of elements not only includes those elements, but also includes other elements not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without more limitations, an element defined by the statement "including a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0179] The various embodiments described in this specification are intended to be combinable unless otherwise indicated herein. The various embodiments described in this specification are described in the progressions noted, with each embodiment emphasizing different aspects over others, and the various embodiments can be combined as desired, with reference to each other as appropriate.
[0180] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to those skilled in the art, and all such modifications are believed to be within the scope of the application as defined by the appended claims. The application is not intended to be limited to the embodiments shown here, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for determining a QR code-type reticle, characterized in that, Applied to an autocollimator, the method includes: Based on multiple preset candidate transmittances and multiple preset candidate random number generators, the unit type corresponding to each pixel position of the light-transmitting panel pattern is determined; the unit type includes pre-divided light-transmitting unit types and opaque unit types. Based on the unit type corresponding to each pixel position, a candidate QR code light-transmitting panel style is generated. Based on the light spot displacement error results measured by the autocollimator simulation, the target QR code light-transmitting plate pattern is determined; wherein, the autocollimator includes the light-transmitting plate corresponding to the candidate QR code light-transmitting plate pattern; The step of determining the unit type corresponding to each pixel position of the light-transmitting panel pattern based on multiple preset candidate transmittances and multiple preset candidate random number generators includes: Identify multiple candidate random seed data; Based on the multiple candidate random seed data, multiple candidate random number generators are determined; The candidate random number generator generates a random matrix corresponding to the candidate random seed data. Based on the random matrix and the candidate transmittance, determine the unit type corresponding to each pixel position of the light-transmitting panel pattern; The random matrix represents the positional random number of each pixel location; The step of determining the unit type corresponding to each pixel position of the light-transmitting panel pattern based on the random matrix and the candidate transmittance includes: If the random number at the position is less than the candidate transmittance, then the pixel position corresponding to the random number at the position is determined as the transmittance unit type, and the pixel corresponding to the transmittance unit type is determined as a white pixel; If the random number at the position is greater than or equal to the candidate transmittance, then the pixel position corresponding to the random number at the position is determined as an opaque unit type, and the pixel corresponding to the opaque unit type is determined as a black pixel. The spot displacement error results based on the autocollimator simulation measurement are used to determine the target QR code light-transmitting plate style, including: Acquire different QR code light-transmitting plates and corresponding light spot simulation images from the collimator simulation measurement; Based on different simulated light spot images, the light-transmitting plate is slightly displaced, and the simulation yields the error and statistics, thus obtaining the light spot displacement error result. The candidate QR code light-transmitting plate pattern corresponding to the smallest light spot displacement error is determined as the target QR code light-transmitting plate pattern.
2. The method according to claim 1, characterized in that, After determining the style of the target QR code light-transmitting panel, the process also includes: The candidate transmittance corresponding to the target QR code light-transmitting panel pattern is determined as the target transmittance; The candidate random seed data of the candidate random number generator corresponding to the target QR code light-transmitting plate pattern is determined as the target random seed data.
3. An image localization method based on a QR code-type reticle, characterized in that, The image localization method is applied to an autocollimator, wherein the autocollimator includes a light-transmitting plate, the light-transmitting plate being determined based on the QR code-type reticle determination method according to any one of claims 1-2, and the image localization method based on the QR code-type reticle includes: A pre-constructed QR code light spot template image for the object under test is determined, and a QR code light spot measurement image of the object under test is obtained through the autocollimator. The QR code light spot template image is obtained by ensuring the object under test is strictly perpendicular to the measurement light ray, the reflected light returns along its original path, and after passing through the beam splitter of the autocollimator, it is focused onto the center point of the photoelectric detection system, resulting in an image without deflection. The QR code light spot measurement image is an image with angular deflection. The similarity between the QR code spot template image and the QR code spot measurement image is obtained; Based on the degree of similarity, the offset data of the centroid of the light spot of the object under test is obtained; The offset angle of the object under test is determined based on the offset data of the centroid of the light spot.
4. The method according to claim 3, characterized in that, Based on the degree of similarity, the offset data of the centroid of the light spot of the object under test is obtained, including: Determine the pre-built QR code light spot template image for the object to be tested and the acquired target light spot image; The similarity between the template image and the target image is detected using a correlation detection method. The offset data of the centroid of the light spot of the object under test is obtained by fitting and transforming based on the similarity.
5. A two-dimensional high-precision autocollimator based on a QR code-type reticle and its image positioning algorithm, characterized in that, include: The light-transmitting plate is determined based on the QR code-type reticle determination method according to any one of claims 1-2; light source; Beam splitter; Imaging lens; Photoelectric detection system; Data processing system; The light source emits a light beam, which reaches the light-transmitting plate. After being modulated by the light-transmitting plate, the light beam is transmitted through a beam splitter prism and then passes through an imaging lens to become a parallel light beam, which is then incident on the reflective surface of the object being measured. The light beam reflected from the reflective surface of the object being measured is refracted again by the beam splitter and then captured by the photoelectric detection system. The data processing system is used to visually present the acquired images and process them to obtain the angle deflection. The data processing system includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the method of claim 3 or 4.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method of claim 3 or 4.
7. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 2, 3, or 4.
Citation Information
Patent Citations
Data processing method, photoetching processing system and readable storage medium
CN118052902A