A method for determining a high-information-entropy bar-coded slit and a high-precision autocollimator based on the slit and its bar signal processing algorithm.

By using a high-information-entropy bar-coded slit design and signal processing algorithms, the problem of low positioning accuracy in traditional autocollimators has been solved, achieving higher measurement accuracy and stability, especially in effectively identifying the centroid of the light spot in complex environments.

CN121074049BActive Publication Date: 2026-01-30SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511621982.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-01-30
Estimated Expiration
2045-11-07

AI Technical Summary

Technical Problem

Traditional light-transmitting slit designs result in low positioning accuracy of autocollimators, scattered distribution of light spot image information, difficulty in distinguishing between the main peak and secondary peaks, and sensitivity to external vibrations, leading to insufficient information and affecting measurement accuracy and stability.

Method used

A high-information-entropy bar-coded slit determination method is adopted. The optimal light-transmitting slit pattern is selected through an information entropy evaluation model. Combined with a stripe signal processing algorithm, the information content and anti-interference ability of the light spot image are improved. The centroid offset of the light spot is measured by the cross-correlation method.

Benefits of technology

It improves the measurement accuracy and stability of the autocollimator, enabling accurate identification of the spot centroid in complex environments, reducing the influence of external vibrations, and enhancing measurement resolution and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121074049B_ABST
    Figure CN121074049B_ABST
Patent Text Reader

Abstract

This application relates to a high-information-entropy bar-coded slit determination method and a high-precision autocollimator based on the slit and its stripe signal processing algorithm. The determination method includes: obtaining multiple initial light-transmitting slit patterns according to a preset bar coding method; using a preset information entropy determination model to obtain the uncertainty, redundancy, and randomness of each initial light-transmitting slit pattern; obtaining the information entropy corresponding to each initial light-transmitting slit pattern based on the uncertainty, redundancy, and randomness; and using the initial light-transmitting slit pattern with the highest information entropy as the target light-transmitting slit pattern of the autocollimator. Thus, the image of the target light-transmitting slit output by the autocollimator can be processed using a cross-correlation template matching method and surface fitting to obtain more accurate sub-pixel-level image positioning accuracy, and then combined with the autocollimation measurement formula to obtain a high-precision angle deflection.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of optical measurement, in particular to a high-information-entropy bar code slit determination method and a high-precision autocollimator based on the slit and a fringe signal processing algorithm thereof. BACKGROUND

[0002] In the field of precision measurement, photoelectric autocollimator has important application as a high-precision angle measurement instrument. The autocollimator usually includes a light source, a light-transmitting slit, a light-splitting prism, an imaging lens, a photoelectric detection system and a data processing system. The structure and size of the light-transmitting slit 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-transmitting slit is designed as an eight-slit or four-slit structure with equal width, which modulates the light spot with strong regularity.

[0004] However, the applicant found in the implementation process that the traditional light-transmitting slit causes the autocollimator to at least have the problem of low positioning accuracy. SUMMARY

[0005] 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 positioning accuracy of the autocollimator in the prior art. The present application provides a high-information-entropy bar code slit determination method and a high-precision autocollimator based on the slit and a fringe signal processing algorithm thereof.

[0006] In a first aspect, the present application provides a high-information-entropy bar code slit determination method applied to an autocollimator. The method comprises:

[0007] obtaining a plurality of initial light-transmitting slit patterns according to a preset bar code mode;

[0008] acquiring the uncertainty degree, the redundancy degree and the randomness degree of each initial light-transmitting slit pattern by using a preset information entropy determination model;

[0009] obtaining the information entropy corresponding to each initial light-transmitting slit pattern based on the uncertainty degree, the redundancy degree and the randomness degree;

[0010] taking the initial light-transmitting slit pattern corresponding to the maximum information entropy as the target light-transmitting slit pattern.

[0011] In one embodiment, the initial light-transmitting slit pattern includes wide stripes and narrow stripes, and the information entropy determination model includes a Shannon entropy evaluation model.

[0012] The preset information entropy determination model is used to obtain the uncertainty degree of each initial light transmission slit pattern, the redundancy degree of each initial light transmission slit pattern, and the randomness degree of each initial light transmission slit pattern, including:

[0013] The occurrence frequency of the wide stripe and the occurrence frequency of the narrow stripe are determined.

[0014] The occurrence frequency of the wide stripe and the occurrence frequency of the narrow stripe are input into the Shannon entropy evaluation model to obtain the uncertainty degree of the initial light transmission slit pattern.

[0015] In one of the embodiments, the information entropy determination model includes a compression ratio determination model.

[0016] The preset information entropy determination model is used to obtain the uncertainty degree of each initial light transmission slit pattern, the redundancy degree of each initial light transmission slit pattern, and the randomness degree of each initial light transmission slit pattern, including:

[0017] The initial slit sequence corresponding to the initial light transmission slit pattern and the corresponding compressed slit sequence are determined.

[0018] The compressed slit sequence and the initial slit sequence are input into the compression ratio determination model to obtain the redundancy degree of the initial light transmission slit pattern.

[0019] In one of the embodiments, the initial light transmission slit pattern includes a wide stripe and a narrow stripe; and the information entropy determination model includes a run detection model.

[0020] The preset information entropy determination model is used to obtain the uncertainty degree of each initial light transmission slit pattern, the redundancy degree of each initial light transmission slit pattern, and the randomness degree of each initial light transmission slit pattern, including:

[0021] The number of runs corresponding to the wide stripe and the number of runs corresponding to the narrow stripe are determined.

[0022] The number of runs corresponding to the wide stripe and the number of runs corresponding to the narrow stripe are input into the information entropy determination model to obtain the randomness degree of the initial light transmission slit pattern.

[0023] In one of the embodiments, based on the uncertainty degree, the redundancy degree, and the randomness degree, the information entropy corresponding to each initial light transmission slit pattern is obtained, including:

[0024] The uncertainty degree, the redundancy degree, and the randomness degree are normalized uniformly.

[0025] A set of weight coefficients is obtained, and the set of weight coefficients includes weight coefficients corresponding to the uncertainty degree, the redundancy degree, and the randomness degree respectively.

[0026] The initial light transmission slit pattern corresponding information entropy is obtained by weighting the uncertain degree, the redundant degree and the random degree using the weight coefficient set.

[0027] In a second aspect, the application provides a bar code signal processing method based on a high information entropy bar code slit, applied to a collimator, the collimator comprising a light transmission slit determined based on the high information entropy bar code slit determination method, the bar code signal processing method based on the high information entropy bar code slit comprising:

[0028] determining a bar code light spot template image pre-constructed for the object to be measured, and obtaining a bar code light spot measurement image reflected by the object to be measured through the collimator; wherein the bar code light spot template image is obtained by strictly vertically reflecting the object to be measured and the measuring light, the reflected light returns along the original path, focuses on the center point of the photoelectric detection system after passing through the light splitting prism of the collimator, and an image in a non-deflection state is obtained; the bar code light spot measurement image is an image with an angle deflection;

[0029] obtaining the similarity degree between the bar code light spot template image and the bar code light spot measurement image;

[0030] obtaining the deflection data of the light spot centroid of the object to be measured according to the similarity degree;

[0031] determining the deflection angle of the object to be measured according to the deflection data of the light spot centroid.

[0032] In one embodiment, obtaining the deflection data of the light spot centroid of the object to be measured according to the similarity degree comprises:

[0033] determining the bar code slit light spot template image pre-constructed for the object to be measured and the target light spot image obtained;

[0034] detecting the similarity degree between the template image and the target image using a correlation detection method;

[0035] fitting and converting to obtain the deflection data of the light spot centroid of the object to be measured from the similarity degree.

[0036] In one embodiment, when the collimator is a two-dimensional collimator, or the light transmission slit has two groups of light transmission slit patterns perpendicular to each other, the deflection data of the light spot centroid comprises first deflection data and second deflection data in two perpendicular directions;

[0037] determining the deflection angle of the object to be measured according to the deflection data of the light spot centroid, comprising:

[0038] obtaining the deflection angle of the object to be measured in the first direction according to the first deflection data and the focal length of the lens of the collimator;

[0039] Based on the second offset data and the focal length of the autocollimator lens, the offset angle of the measured object in the second direction is obtained.

[0040] Thirdly, this application provides a high-precision autocollimator based on a high-information-entropy bar-coded slit and its stripe signal processing algorithm, comprising:

[0041] The light-transmitting slit is determined based on the high-information-entropy bar-coded slit determination method described above;

[0042] light source;

[0043] Beam splitter;

[0044] Imaging lens;

[0045] Photoelectric detection system;

[0046] Data processing system;

[0047] In this process, the light source emits a beam of light, which reaches the light-transmitting slit. After being modulated by the slit, the beam of light is transmitted through a beam splitter and then passes through an imaging lens to become a parallel beam of light, which is then incident on the reflecting surface of the object being measured. The beam of light reflected from the reflecting surface of the object being measured is refracted again by a beam splitter and then captured by the photoelectric detection system.

[0048] The data processing system is used to visually present the acquired images and process them to obtain the angular deflection.

[0049] 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 above-described stripe signal processing method based on high information entropy bar-coded slits.

[0050] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0051] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0052] The high information entropy bar-coded slit determination method and the high-precision autocollimator based on the slit and its stripe signal processing algorithm provided in this application can first obtain multiple initial light-transmitting slit patterns according to a preset bar coding method. Then, the uncertainty, redundancy, and randomness of the light-transmitting slit patterns are comprehensively calculated by an information entropy evaluation model. Based on the information entropy obtained by comprehensively considering the uncertainty, redundancy, and randomness, the light-transmitting slit pattern with the highest information entropy can be selected as the target light-transmitting slit pattern. Thus, by using a light-transmitting slit designed with the above-mentioned target light-transmitting slit pattern, the information content and anti-interference ability of the light spot image can be effectively improved, thereby improving the measurement accuracy and stability of the autocollimator.

[0053] Furthermore, by utilizing the aforementioned determined barcode light-transmitting slit in an autocollimator, this application can determine the offset angle of the object being measured by the similarity between the barcode spot template image and the barcode spot measurement image. This solves the problem of periodic secondary peaks in the spot image caused by the equal-width light-transmitting slit, which easily leads to noise interference, thereby improving the accuracy of object offset measurement. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0055] Figure 1 A flowchart illustrating a high information entropy bar-coded slit determination method provided in this application embodiment;

[0056] Figure 2 A flowchart illustrating a step for obtaining uncertainty, provided as an embodiment of this application;

[0057] Figure 3 A flowchart illustrating a step for obtaining redundancy levels is provided for an embodiment of this application.

[0058] Figure 4 A flowchart illustrating a step for obtaining uncertainty, provided as an embodiment of this application;

[0059] Figure 5 A flowchart illustrating a stripe signal processing method based on a high information entropy bar-coded slit, provided for an embodiment of this application;

[0060] Figure 6 A schematic diagram of the structure of an autocollimator and its light-transmitting slit provided in an embodiment of this application;

[0061] Figure 7 A comparative diagram of cross-correlation results provided for an embodiment of this application;

[0062] Figure 8 A comparative schematic diagram of positioning error results provided for an embodiment of this application;

[0063] Figure 9 A schematic diagram of a two-dimensional autocollimator and its light-transmitting slit provided in this application embodiment;

[0064] Figure 10 A schematic diagram of another two-dimensional autocollimator and its light-transmitting slit provided in an embodiment of this application. Detailed Implementation

[0065] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0066] Optical autocollimators have important applications in precision measurement. An autocollimator typically consists of a light source, a light-transmitting slit, a beam splitter prism, an imaging lens, and a photoelectric detection system. The structure and size of the light-transmitting slit directly determine the shape of the target image, the sensitive range of the measurement angle, and the positioning accuracy of the CCD on the target image, thus affecting the instrument's angle measurement accuracy. Traditional light-transmitting slit designs are mostly eight-slit or four-slit structures of equal width, which modulate the light spot in a highly regular manner. However, the simple regular arrangement of the light-transmitting slits imposes limitations on the imaging system, resulting in the following shortcomings of the autocollimator:

[0067] First, a uniform width design for the light-transmitting slits leads to a dispersed distribution of light intensity information. Consequently, the main peak of the image obtained through correlation processing is not sharp enough, affecting measurement accuracy. Furthermore, the periodic arrangement causes multi-level diffraction, resulting in multiple secondary peaks that are particularly difficult to distinguish from noise and the target main peak signal, especially in complex environments.

[0068] Second, traditional autocollimators often use equal-width striped slits, and their periodic distribution makes them more sensitive to changes in external factors such as vibration. Any tiny deformation will have a consistent effect in multiple equal-width slits, causing the entire system to amplify the error.

[0069] Third, the slits in this highly regular arrangement with equal width and spacing carry a limited amount of information, making it difficult to further improve the accuracy of the center position calculated based on this information.

[0070] It is known that the traditional equal-width slit design leads to a dispersed distribution of light intensity information, making it difficult to obtain a sharp main peak signal during subsequent image processing, severely affecting measurement accuracy. This periodic arrangement also produces multi-level diffraction phenomena, making it difficult to effectively distinguish between secondary and main peak signals under complex environmental noise interference, further reducing measurement reliability. Furthermore, the used equal-width striped slit design is exceptionally sensitive to external interference factors such as mechanical vibration. Due to the inherent characteristics of the periodic structure, any minute deformation will have a superposition effect in multiple equal-width slits, significantly amplifying system errors. This structural defect greatly reduces the stability of the measurement system in complex environments such as industrial sites. More importantly, the traditional equal-width, equally spaced slit design carries insufficient information. This highly regular arrangement has low information entropy, limiting the accuracy when calculating the center position based on the light spot image. When using correlation methods for processing, problems such as weakened main peak signal and significant secondary peak interference are particularly prominent, severely restricting the improvement potential of the autocollimator's measurement resolution and accuracy. These problems are particularly evident in traditional multi-slit designs such as four-slit and eight-slit designs, and have become a technical bottleneck restricting the development of high-precision autocollimators.

[0071] Based on this, this application provides a high-information-entropy bar-coded slit determination method and a high-precision autocollimator based on the slit and its stripe signal processing algorithm. The difference between this application and traditional autocollimators is that this application, through the design of a high-precision light-transmitting slit, can measure the angular offset of an object. By using a template matching method based on cross-correlation and surface fitting, a more accurate sub-pixel spot centroid offset is obtained, thus yielding a high-precision angular deflection. Specifically, the uncertainty, redundancy, and randomness of the light-transmitting slit pattern can be comprehensively calculated using an information entropy evaluation model, selecting the pattern with the highest information entropy as the target pattern. This effectively improves the information content and anti-interference capability of the spot image, offering advantages in improving measurement accuracy and stability.

[0072] In one exemplary embodiment, Figure 1 A flowchart illustrating a high-information-entropy bar-coded slit determination method provided in this application embodiment is shown below. Figure 1 As shown, a method for determining a high-information-entropy bar-coded slit is provided. The method is illustrated using a terminal as an example. It is understood that this method can also be applied to a server, or to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, and tablets. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. In this embodiment, the method is applied to a light-transmitting slit in an autocollimator, and the method can include the following steps S101 to S104: Wherein:

[0073] S101. According to the preset barcode method, multiple initial light-transmitting slit patterns are obtained.

[0074] Among them, bar coding refers to generating coding rules with different combinations of stripe widths. Specifically, it can be implemented using pseudo-random sequence generation algorithms. For example, it can be based on ITF25 barcode coding. ITF25 barcode can encode each character into a specific combination of bars and spaces. Through the clever arrangement of wide and narrow units (which can correspond to binary 1 and 0 respectively), information can be efficiently stored in a limited space. Alternatively, a non-periodic combination of wide and narrow stripes can be generated using a linear feedback shift register.

[0075] The initial light-transmitting slit pattern can be an initially generated light-transmitting slit pattern or a candidate light-transmitting slit. For example, a light-transmitting slit pattern with high information entropy can be selected from multiple initial light-transmitting slit patterns to determine the structure of the light-transmitting slit.

[0076] For example, a preset bar coding algorithm can be used to generate multiple candidate initial light-transmitting slit patterns, including wide and narrow stripes.

[0077] Optionally, multiple slits can be arranged using a barcode encoding method. The light-transmitting area of ​​the slits can be set to two widths. For example, the width of the narrow slit is 'a', representing 0 in binary, and the width of the wide slit is '2a', representing 1 in binary. The width of the opaque part is 'd'. Different slit arrangement methods can correspond to different binary sequences; that is, multiple initial light-transmitting slit patterns can each correspond to different binary sequences.

[0078] S102. Using the preset information entropy to determine the model, obtain the uncertainty of each initial light-transmitting slit pattern, the redundancy of each initial light-transmitting slit pattern, and the randomness of each initial light-transmitting slit pattern.

[0079] Among them, the information entropy determination model can refer to a model used to evaluate the information entropy of the initial light-transmitting slit pattern. The information entropy determination model can contain multiple sub-models. The degree of uncertainty can be calculated by the Shannon entropy model to determine the distribution dispersion of the frequency of stripe occurrence. The degree of redundancy can be determined by comparing the length difference between the original sequence and the compressed sequence using a compression algorithm. The degree of randomness can be determined by the run detection model to statistically analyze the distribution characteristics of the number of consecutive occurrences of stripes.

[0080] For example, the uncertainty of each initial light-transmitting slit pattern, the redundancy of each initial light-transmitting slit pattern, and the randomness of each initial light-transmitting slit pattern can be obtained by determining the model through a pre-set information entropy.

[0081] S103. Based on the degree of uncertainty, redundancy, and randomness, obtain the information entropy corresponding to each initial light-transmitting slit pattern.

[0082] Among these, uncertainty can be used to characterize the uncertainty of the binary sequence of the initial light-transmitting slit pattern. Redundancy can be used to characterize the redundancy of the binary sequence of the initial light-transmitting slit pattern. Randomness can be used to characterize the randomness of the binary sequence of the initial light-transmitting slit pattern.

[0083] For example, the three indicators—uncertainty, redundancy, and randomness—can be normalized and then linearly combined according to preset weights, such as through weighted fusion, to obtain the fused information entropy value. This provides a selection criterion and basis for choosing the target light-transmitting slit pattern based on information entropy.

[0084] Weighted processing refers to assigning different weight coefficients to the three indicators. Specifically, the weight allocation ratio can be determined by the analytic hierarchy process, so that the evaluation system can adapt to the needs of different application scenarios.

[0085] S104. Use the initial light-transmitting slit pattern corresponding to the largest information entropy as the target light-transmitting slit pattern.

[0086] The target light-transmitting slit style refers to the slit style that is ultimately selected as the light-transmitting slit structure.

[0087] For example, the initial light-transmitting slit pattern with the largest information entropy value can be selected as the target light-transmitting slit pattern of the optimal solution. This target light-transmitting slit pattern can achieve an optimal balance in terms of information content, anti-interference ability, and feature discriminability.

[0088] In some specific implementations, a comprehensive evaluation system can be established. For example, Shannon entropy reflects the uniformity of symbol distribution and emphasizes the characteristics of the basic distribution; compression ratio captures the periodicity of the sequence; runs detection detects the correlation between adjacent symbols and is sensitive to local fluctuations. Determining appropriate weighting coefficients so that the system takes into account both the evaluation of randomness by entropy values ​​and the evaluation of the compressibility of data characteristics also requires supplementing with runs detection for local correlation.

[0089] As an example, in existing technologies, autocollimators commonly employ a design of equal-width slits. This periodically arranged slit structure easily leads to a dispersed distribution of light intensity information, resulting in insufficient sharpness of the main peak in the image during correlation processing, thus affecting measurement accuracy. The periodic arrangement also induces multi-level diffraction phenomena, generating secondary peak signals close to the main peak, making it difficult to accurately identify the effective signal under complex environmental noise interference. Traditional equal-width fringe designs are sensitive to external vibrations; minute deformations can cause superposition errors in multiple equal-width slits, resulting in insufficient anti-interference capability of the system. Furthermore, the limited information carried by equally spaced slits restricts the potential for improving the accuracy of the center position calculation.

[0090] Optionally, through the steps S101 to S104 described above, the problem of limited measurement accuracy caused by insufficient information entropy in traditional light-transmitting slits is effectively solved. The light spot image generated by the high-entropy slit pattern has a sharper main peak feature, maintaining stable signal recognition capability even in complex noise environments. The non-periodic arrangement design reduces the system's sensitivity to external vibrations, and the reduction of redundant information improves the effective data utilization rate. This embodiment allows the autocollimator to improve measurement accuracy by optimizing the coding while maintaining the original optical structure.

[0091] According to the preset bar coding method, multiple initial light-transmitting slit patterns can be obtained first. Then, the uncertainty, redundancy, and randomness of the light-transmitting slit patterns are comprehensively calculated by the information entropy evaluation model. Based on the information entropy obtained by comprehensively considering the uncertainty, redundancy, and randomness, the light-transmitting slit pattern with the highest information entropy can be selected as the target light-transmitting slit pattern. Thus, by using a light-transmitting slit designed with the above-mentioned target light-transmitting slit pattern, the information content and anti-interference ability of the light spot image can be effectively improved, thereby improving the measurement accuracy and stability of the autocollimator.

[0092] In one exemplary embodiment, Figure 2 A flowchart illustrating a step for obtaining uncertainty is provided in an embodiment of this application, as shown below. Figure 2 As shown, it is possible to Figure 1 Based on this, the steps of the high information entropy bar-coded slit determination method are illustrated by way of example. The initial light-transmitting slit patterns include wide stripes and narrow stripes; the information entropy determination model includes the Shannon entropy evaluation model; in step S102, the predetermined information entropy determination model is used to obtain the uncertainty of each initial light-transmitting slit pattern, the redundancy of each initial light-transmitting slit pattern, and the randomness of each initial light-transmitting slit pattern. Specifically, this may include steps S201 to S202:

[0093] S201. Determine the frequency of occurrence of wide stripes and narrow stripes;

[0094] S202. Input the occurrence frequencies of wide stripes and narrow stripes into the Shannon entropy evaluation model to obtain the uncertainty of the initial light-transmitting slit pattern.

[0095] In this context, wide stripes refer to the wider light-transmitting areas within the slits, which can be created using photolithography to form stripes of varying widths. The width of these stripes can be an integer multiple of the width of the narrow stripes. Narrow stripes refer to the narrower light-transmitting areas within the slits, which can be fabricated by adjusting the mask pattern parameters. The Shannon entropy evaluation model is a mathematical model based on the entropy calculation principle in information theory. Specifically, it uses a probability distribution function to quantify the frequency of stripe occurrence. The frequency of occurrence refers to the distribution ratio of wide or narrow stripes in the slit pattern, which can be calculated by statistically analyzing the proportion of different stripe types in the slit sequence.

[0096] For example, the design of the light-transmitting slit in an autocollimator can be achieved by alternating wide and narrow stripes to form a non-periodic structure. For instance, the width of the wide stripes can be twice that of the narrow stripes, and the two types of stripes can be arranged asymmetrically. When calculating uncertainty, the proportion of wide stripes appearing in the slit pattern relative to the total number of stripes can be statistically analyzed, along with the corresponding proportion of narrow stripes. These two proportions can be input into the Shannon entropy evaluation model, which calculates the entropy value representing the randomness of the pattern based on a probability distribution formula. This calculation method effectively reflects the dispersion of information distribution in the slit pattern, providing a quantitative basis for selecting the optimal slit pattern.

[0097] Alternatively, the Shannon entropy evaluation model is expressed as follows (1):

[0098] (1);

[0099] The initial light-transmitting slit pattern can be represented in the form of a binary sequence. ; ; The probability of a binary 0 occurring. The probability of a binary 1 appearing. The total length of the sequence. The length of the binary sequence. The length of binary 1.

[0100] This embodiment further proposes an initial light-transmitting slit pattern including wide and narrow stripes. The information entropy determination model includes the Shannon entropy evaluation model. The occurrence frequencies of wide and narrow stripes are input into the Shannon entropy evaluation model to obtain the uncertainty of the initial light-transmitting slit pattern. This embodiment introduces a mixed arrangement of wide and narrow stripes, making the stripe distribution of different slit patterns exhibit differentiated probability characteristics. The Shannon entropy evaluation model can accurately capture this difference. For example, when wide and narrow stripes alternate in a similar proportion, the calculated entropy value is significantly higher than that of the traditional equal-width structure, indicating that this pattern has a higher information carrying capacity.

[0101] In this implementation, the above technical solution solves the problem of dispersed light intensity distribution caused by the periodic arrangement of traditional equal-width slits. The combination design of wide and narrow stripes increases the information diversity of the slit pattern. Combined with the Shannon entropy model to quantitatively evaluate the probability of stripe distribution, slit patterns with higher uncertainty can be screened out. This pattern can form a more concentrated light intensity distribution in subsequent spot imaging, for example, generating a sharper main peak signal in correlation processing, thereby improving the detection accuracy of the autocollimator at the centroid position of the spot.

[0102] In one exemplary embodiment, Figure 3 A flowchart illustrating a step for obtaining redundancy levels is provided in an embodiment of this application, as shown below. Figure 3 As shown, it is possible to Figure 1 Based on this, the steps of the high information entropy bar-coded slit determination method are illustrated by way of example. The information entropy determination model includes a compression ratio determination model. In step S102, the predetermined information entropy determination model is used to obtain the uncertainty of each initial light-transmitting slit pattern, the redundancy of each initial light-transmitting slit pattern, and the randomness of each initial light-transmitting slit pattern. Specifically, this may include steps S301 to S302:

[0103] S301. Determine the initial slit sequence and the corresponding compression slit sequence corresponding to the initial light-transmitting slit pattern.

[0104] S302. Input the compressed slit sequence and the initial slit sequence into the compression ratio determination model to obtain the redundancy of the initial light-transmitting slit pattern.

[0105] The initial slit sequence refers to the original sequence formed by arranging wide and narrow stripes according to a preset encoding rule. Specifically, it can be implemented by using binary encoding to represent wide stripes as 1 and narrow stripes as 0, and can be used to record uncompressed light-transmitting slit pattern information.

[0106] Among them, the compressed slit sequence refers to the simplified sequence obtained by encoding the initial slit sequence through a lossless compression algorithm. Specifically, it can be implemented using the DEFLATE algorithm (including the LZ77 algorithm or the Huffman coding algorithm) in the zlib standard library, which can be used to eliminate repetitive patterns in the initial sequence.

[0107] The compression ratio determination model refers to a mathematical model that evaluates the degree of data redundancy by calculating the ratio of the sequence length before and after compression. Specifically, it can be implemented by using the formula that the compression ratio equals the length of the compressed sequence divided by the length of the original sequence. The smaller the ratio, the higher the degree of redundancy. For example, the closer the ratio of the compressed sequence length to the original length is to 1, the lower the redundancy, and the less likely it is to be compressed; the closer it is to 0, the higher the redundancy and the more obvious the compression effect.

[0108] For example, when determining the redundancy of the initial light-transmitting slit pattern, the arrangement of wide and narrow stripes is first converted into an initial slit sequence. For instance, if the initial pattern is wide-narrow-wide-wide-narrow, the corresponding initial sequence can be represented as 10110. The initial sequence can be encoded using a preset compression algorithm to generate a compressed slit sequence. For example, using run-length encoding, the above sequence can be compressed to 1-1-0-2-1. The compression ratio determination model obtains the redundancy of the pattern by calculating the ratio of the compressed sequence length to the original length. The higher the redundancy, the more repetitive or predictable stripe patterns there are in the pattern, and the lower the information entropy. Therefore, in the subsequent information entropy calculation, the redundancy can be used as a key parameter in the weighted evaluation, ultimately selecting light-transmitting slit patterns with low redundancy and high information entropy.

[0109] Alternatively, the compression ratio determination model can be as shown in the following expression (2):

[0110] (2);

[0111] in, For the initial slit sequence, For compression slit sequences; Indicates length.

[0112] This embodiment further proposes an information entropy determination model, including a compression ratio determination model. The compressed slit sequence and the initial slit sequence are input into the compression ratio determination model to obtain the redundancy of the initial transparent slit pattern. Compared with existing technologies, traditional autocollimators using equally wide and spaced transparent slits exhibit highly repetitive initial slit sequences, such as periodically arranged wide-narrow-wide-narrow patterns, resulting in a compressed sequence length to original length ratio close to 1, indicating extremely high redundancy. This embodiment, through compression ratio analysis, can quantitatively evaluate the redundancy characteristics under different coding styles, thereby preferentially selecting low-redundancy styles with a compression ratio significantly less than 1. Such styles show a significant reduction in compressed sequence length, indicating the inclusion of more unpredictable random permutation features, which helps improve information entropy.

[0113] In this embodiment, the problem of insufficient information entropy caused by excessive redundancy in traditional light-transmitting slits can be effectively solved. By introducing a compression ratio model to quantify the degree of redundancy, slit patterns with non-repeatability and low predictability can be selected, thereby reducing secondary peak interference in the light spot image and enhancing the sharpness of the main peak signal. Furthermore, the low-redundancy pattern reduces the impact of external vibrations or deformations on the consistency of multiple stripes, improving the system's anti-interference capability and measurement accuracy.

[0114] In one exemplary embodiment, Figure 4 A flowchart illustrating a step for obtaining uncertainty is provided in an embodiment of this application, as shown below.Figure 4 As shown, it is possible to Figure 1 Based on this, the steps of the high information entropy bar-coded slit determination method are illustrated by way of example. The initial light-transmitting slit patterns include wide stripes and narrow stripes; the information entropy determination model includes a run-length detection model; in step S102, the predetermined information entropy determination model is used to obtain the uncertainty of each initial light-transmitting slit pattern, the redundancy of each initial light-transmitting slit pattern, and the randomness of each initial light-transmitting slit pattern. Specifically, this may include steps S401 to S402:

[0115] S401. Determine the number of runs corresponding to the wide stripes and the number of runs corresponding to the narrow stripes.

[0116] S402. Input the run number corresponding to the wide stripe and the run number corresponding to the narrow stripe into the information entropy determination model to obtain the randomness of the initial light-transmitting slit pattern.

[0117] The run count refers to the number of consecutive stripes of the same type appearing in a sequence, which can be achieved by counting whether the types of adjacent stripes change. For example, if a wide stripe appears three times consecutively before switching to a narrow stripe, the run count for the wide stripe is counted as 1. The run detection model is an algorithm used to analyze the run distribution characteristics in a stripe sequence, which can be implemented by statistically analyzing the variance of run lengths or calculating the uniformity of run distribution. This model reflects the randomness of the slit pattern by quantifying the frequency of stripe switching, thus avoiding the secondary peak interference problem caused by periodic arrangement.

[0118] For example, when calculating the degree of randomness, the stripe sequence of the initial translucent slit pattern can be traversed, and the total number of runs for wide and narrow stripes can be counted separately. For instance, for a sequence containing alternating wide and narrow stripes, a higher number of runs indicates frequent stripe switching and stronger randomness. The run counts of the two types of stripes are then input into a run detection model, and the initial degree of randomness is obtained by calculating the dispersion or uniformity index of the run distribution. To further eliminate the influence of differences in the length of different slit patterns, the initial degree of randomness can be normalized, for example, by using a maximum-minimum normalization method, so that the randomness index is uniformly mapped to the interval between 0 and 1, facilitating the subsequent comprehensive calculation of information entropy.

[0119] Optionally, for those containing The consecutive occurrence of 0 and The sequence of consecutive 1s, with a total length of [number] times. The expected value of the number of runs is expressed by the following expression (3):

[0120] (3);

[0121] The variance of the number of runs is expressed as follows (4):

[0122] (4);

[0123] standardization The value is as shown in the following expression (5):

[0124] (5)

[0125] In practical applications, the structure of runs detection and evaluation can be mapped to... The interval allows for comparison of combined sequences of different lengths on a uniform scale, as shown in the following expression (6):

[0126] (6);

[0127] This embodiment introduces a mixed arrangement of wide and narrow stripes to make the run number distribution exhibit a non-periodic characteristic. For example, the run number of wide stripes is randomly distributed between 1 and 4, while the run number of narrow stripes fluctuates between 2 and 5, thereby significantly improving the randomness index output by the run detection model.

[0128] In this embodiment, the above technical solution effectively breaks the periodicity of the light-transmitting slit pattern and reduces the intensity similarity between the secondary peak signal and the primary peak signal in the spot image. When using the correlation method for centroid calculation, the slit pattern with enhanced randomness makes the peak of the cross-correlation curve sharper, thereby improving the stability of spot position detection under vibration environment and suppressing the influence of interference signals generated by multi-level diffraction on measurement accuracy.

[0129] In an exemplary embodiment, the run counts corresponding to the wide stripes and the run counts corresponding to the narrow stripes are input into the information entropy determination model to obtain the randomness of the initial light-transmitting slit pattern, including:

[0130] The run number corresponding to the wide stripe and the run number corresponding to the narrow stripe are input into the information entropy determination model to obtain the initial randomness of the initial light-transmitting slit pattern;

[0131] The initial randomness is normalized to obtain the initial randomness of the light-transmitting slit pattern.

[0132] The initial degree of randomness refers to the original randomness assessment value calculated based on the number of runs, which can be achieved by substituting the number of runs for the wide and narrow stripes into a preset mathematical formula or model. For example, the closer the number of runs is to a uniform distribution, the higher the initial degree of randomness.

[0133] Normalization refers to the process of adjusting the initial randomness to a preset numerical range, which can be achieved using linear scaling or probability distribution transformation methods. For example, dividing the initial randomness by the theoretical maximum randomness value yields a standardized result between 0 and 1.

[0134] For example, by normalization, the initial randomness of different initial light-transmitting slit patterns is mapped to a uniform dimension range, such as converting the values ​​into a proportional value between 0 and 1, thereby eliminating the evaluation bias caused by the difference in the number of stripes between different patterns, making the comparison of randomness and subsequent information entropy calculation more objective.

[0135] In this embodiment, by normalizing the initial randomness, a standardized index is converted, which more accurately reflects the differences in randomness between different patterns. This eliminates the bias in randomness assessment caused by differences in the size or number of light-transmitting slit patterns, improves the accuracy of information entropy calculation, and allows for the selection of target light-transmitting slit patterns with stronger anti-interference capabilities and sharper light spot peaks. Ultimately, this improves the measurement accuracy and stability of the autocollimator in complex environments.

[0136] In an exemplary embodiment, the information entropy corresponding to each initial light-transmitting slit pattern is obtained based on the degree of uncertainty, redundancy, and randomness, including:

[0137] The degree of uncertainty, redundancy, and randomness are uniformly normalized.

[0138] Obtain the set of weight coefficients, which includes the weight coefficients corresponding to the degree of uncertainty, redundancy, and randomness, respectively.

[0139] By using a set of weighted coefficients, the uncertainty, redundancy, and randomness are weighted to obtain the information entropy corresponding to the initial light-transmitting slit pattern.

[0140] The weighting coefficient set refers to the parameter combination that assigns importance to different evaluation indicators. Specifically, the weight ratio of each indicator can be determined using empirical values ​​or optimization algorithms. For example, the weight of uncertainty can be set to 0.5, redundancy to 0.3, and randomness to 0.2. The purpose of this weighting coefficient set is to quantify the influence of different factors on the information content of the light-transmitting slit pattern, thereby highlighting key indicators in the comprehensive evaluation. Weighting processing refers to the calculation process of multiplying each indicator by its corresponding weight and then summing the results. This can be implemented using a linear weighting model, for example, multiplying uncertainty by the first weight, redundancy by the second weight, and randomness by the third weight, and then summing the results. This processing method can comprehensively reflect the overall information entropy level of the light-transmitting slit pattern, avoiding bias caused by single-indicator evaluation.

[0141] For example, the three indicators can be weighted and summed using a pre-defined set of weighting coefficients to obtain the comprehensive information entropy value for each style. For instance, when a style has a high degree of uncertainty and randomness but a low degree of redundancy, it may obtain a high information entropy after weighted calculation. Ultimately, the style with the highest information entropy can be selected as the target light-transmitting slit style to ensure that it has optimal information expression capability and anti-interference characteristics.

[0142] Alternatively, the weighting process can be performed using the following expression (7):

[0143] (7);

[0144] in, , , These can be weighted coefficients for Shannon entropy (uncertainty level), compression ratio (redundancy level), and run score (randomness level), respectively. As an example, the allocation coefficients are 0.35, 0.35, and 0.3.

[0145] This embodiment introduces a set of weighted coefficients to decompose information entropy into three quantifiable sub-indicators and establishes a weighted evaluation model, so that the selection process of light-transmitting slit patterns can take into account information richness, data compactness and randomness, and overcome the suboptimal selection problem caused by a single evaluation dimension.

[0146] In this embodiment, the information entropy level of the light-transmitting slit pattern can be effectively improved, resulting in a sharper main peak signal in subsequent spot image processing and reducing the impact of secondary peak interference on centroid localization. Simultaneously, the weighted processing mechanism can adjust the weights of each indicator according to actual application needs. For example, in a vibrating environment, the weight ratio of randomness can be increased, thereby enhancing the robustness of the light-transmitting slit pattern to external interference.

[0147] In one exemplary embodiment, Figure 5 A flowchart illustrating a stripe signal processing method based on a high-information-entropy bar-coded slit, as provided in this application embodiment, is shown below. Figure 5 As shown, a stripe signal processing method based on high information entropy bar-coded slits is provided. The method is illustrated using a terminal as an example. It is understood that this method can also be applied to servers, and to systems including both terminals and servers, and implemented through interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, and tablets. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0148] In this embodiment, the stripe signal processing method based on high information entropy bar-coded slits can be applied to, for example... Figure 6 The autocollimator shown includes an LED light source 1, a focusing lens 7, a light-transmitting slit reticle 2, a beam splitter prism 3, an imaging lens 4, and a linear CCD 6. The autocollimator is used to measure the angular offset of the object 5 being measured. The light-transmitting slit 2 can be determined based on the aforementioned high-information-entropy bar-coded slit determination method.

[0149] like Figure 5 As shown, the stripe signal processing method based on high information entropy bar-coded slits may include the following steps S501 to S504:

[0150] S501. Determine the pre-constructed barcode spot template image for the object to be tested, and acquire the barcode spot measurement image reflected back from the object to be tested by the autocollimator; wherein, the barcode spot template image is obtained by the object to be tested being strictly perpendicular to the measurement light, the reflected light returning along the original path, and after passing through the beam splitter of the autocollimator, focusing on the center point of the photoelectric detection system to obtain an image in a state without deflection; the barcode spot measurement image is an image that has undergone angular deflection.

[0151] S502. Obtain the similarity between the barcode spot template image and the barcode spot measurement image.

[0152] S503. Based on the degree of similarity, obtain the offset data of the centroid of the light spot of the object under test.

[0153] S504. Determine the offset angle of the object being measured based on the offset data of the centroid of the light spot.

[0154] The barcode spot template image refers to a reference image acquired and constructed using an autocollimator when the object under test has not shifted. It can be generated by averaging multiple images or through static calibration, and is used for subsequent matching and comparison with the measurement image. The barcode spot measurement image refers to the image obtained by measuring the object under test using an autocollimator with a light-transmitting slit defined by the barcode. Similarity refers to the degree of matching between two images in spatial distribution, which can be achieved through cross-correlation calculations or grayscale distribution difference calculations, reflecting the amount of change in spot position. The spot centroid offset data refers to the displacement of the spot center in the image coordinate system, which can be extracted using a centroid algorithm or curve fitting, used to quantify the spatial offset of the object under test.

[0155] Optionally, the barcode light spot template image can be pre-constructed, wherein:

[0156] Both the barcode spot template image and the barcode spot measurement image acquire the same object's spot patterns on the CCD at different angles, targeting the angular state of the measured object. For example, ideally, the object's surface is strictly perpendicular to the measuring light ray, and the reflected light will return along its original path, focusing on the CCD's center point (the "zero point") after passing through a beam splitter, corresponding to a state without deflection. A barcode spot template image can be constructed at the "zero point." When the object's surface normal is no longer strictly parallel to the measuring light ray, meaning the object has undergone angular deflection, another barcode spot image can be acquired on the CCD, called the barcode spot measurement image. Therefore, both are obtained through an autocollimator. The former, where the CCD constructs the spot template in the autocollimator, is determined by the object's initial stable state; the latter, where the measured object undergoes angular deflection, is the spot pattern read by the CCD after the object's angle changes, determined by the object's state during the angular change.

[0157] For example, during the measurement process, a barcode spot template image with non-periodic characteristics can be generated based on a high-information-entropy light-transmitting slit pattern. The light intensity distribution of this barcode spot template image features a prominent main peak and suppressed secondary peaks. When the object being measured shifts, the barcode spot measurement image formed by the reflected beam will shift relative to the template image. By calculating the cross-correlation function of the two images, the sub-pixel-level offset corresponding to the peak position can be extracted. Furthermore, the pixel offset can be converted into an actual angular offset by combining the focal length parameters of the autocollimator optical system. For instance, in a two-dimensional measurement scenario, offset data in two directions can be obtained using two sets of orthogonal light-transmitting slit patterns, achieving multi-dimensional angle calculation.

[0158] Thus, compared to existing technologies, traditional methods using equal-width slits result in periodic secondary peaks in the light spot image, making it susceptible to noise interference during cross-correlation calculations. This embodiment, however, optimizes the information entropy characteristics of the slits, improving the sharpness of the main peak and reducing the energy of the secondary peaks in the light spot image. In complex environments, this design can effectively distinguish the main peak from noise signals, avoiding mismatch problems. Furthermore, the non-periodic light spot distribution reduces the system's sensitivity to external vibrations, minimizing error propagation.

[0159] In this embodiment, the above steps solve the problem of difficult main peak identification caused by the periodic arrangement of the light-transmitting slits in traditional autocollimators, thus improving the accuracy of spot centroid calculation. By enhancing the feature discrimination of the spot image, the peak positioning in the cross-correlation operation is more accurate, thereby improving the resolution of the angle offset measurement. Simultaneously, this method reduces sensitivity to environmental noise and enhances the robustness of the measurement system.

[0160] In some specific implementations, the high information entropy bar-coded slit structure can be determined using the high information entropy bar-coded slit determination method described above. The specific form of the high information entropy sequence can be as follows: Figure 6 As shown on the right.

[0161] In practical applications, the optical components are installed first. A reference object with a surface normal strictly parallel to the optical axis of the collimating lens can be selected as the calibration benchmark for several system calibrations. After fixing the LED light source on the optical platform, the collimating lens is installed, and its position and tilt angle are adjusted to ensure good parallelism of the beam after passing through the collimating lens. The bar-coded slit reticle is fixed as an aperture stop. The beam splitter, imaging lens, and linear CCD are installed in appropriate positions, ensuring that the surface of the linear CCD is strictly perpendicular to the optical axis of the imaging lens. The position and focal length are adjusted so that the light modulated by the bar-coded slit can be accurately captured by the CCD of the photoelectric detection device to form a clear light spot pattern.

[0162] Turn on the LED light source and observe the light spot pattern received by the CCD. Adjust the brightness and uniformity of the light source to ensure that the CCD is in the normal linear working range and that the received light spot brightness is uniform and has not reached saturation.

[0163] In this way, barcode spot measurement images can be obtained based on CCD.

[0164] In an exemplary embodiment, the offset data of the centroid of the light spot of the object under test is obtained based on the degree of similarity, including:

[0165] Determine the pre-built bar-coded slit spot template image for the object under test and the acquired target spot image;

[0166] The similarity between the template image and the target image is detected using a correlation detection method.

[0167] 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.

[0168] Among them, the correlation detection method can include a normalized cross-correlation algorithm, for example, by calculating the similarity of the gray value spatial distribution between 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 initial offset of the spot centroid.

[0169] For example, the cross-correlation matrix can be interpolated at the subpixel level. For instance, a quadratic surface fitting algorithm can be used to fit the surface of the neighboring pixels of the peak region within a preset range. By solving for the coordinates of the extreme points of the fitted surface, subpixel-level precision spot centroid offset data can be obtained, which can control the positioning error within a very small pixel.

[0170] In one exemplary embodiment, determining a pre-constructed barcode spot template image for the object to be tested includes:

[0171] Acquire the initial spot image of the object under test in a non-deflected state obtained by the autocollimator;

[0172] The initial light spot image is subdivided into pixels to obtain the sub-pixels of the initial light spot image;

[0173] The target grayscale data of the subpixels is determined based on the initial grayscale data of the subpixels in the initial spot images of multiple consecutive frames.

[0174] Based on the sub-pixel target grayscale data, the target spot image is obtained;

[0175] Based on the centroid position of the target spot image, construct a barcode spot template image.

[0176] The initial spot image refers to the still spot image obtained by initially acquiring the measured object using an autocollimator. For example, multiple initial spot images can be obtained through continuous acquisition. The spot centroid data refers to the centroid position of the spot. For example, the pixel grayscale value sequence of multiple initial spot images can be statistically analyzed to identify abnormal grayscale values ​​that deviate from the mean ±3σ, and the final remaining grayscale value sequence can be retained to calculate the spot centroid data.

[0177] Pixel subdivision refers to dividing each pixel in an image sensor into smaller regions. For example, interpolation algorithms or spatial resampling techniques can be used to decompose a single pixel into multiple sub-regions, thereby improving spatial resolution. Sub-pixels refer to the sub-regions formed after pixel subdivision. Their size can be 1 / 2 or 1 / 4 of the original pixel size, specifically achieved through bilinear interpolation or cubic convolution interpolation, used to capture the distribution details of the light spot within the pixel. Initial grayscale data refers to the sequence of grayscale values ​​at the same sub-pixel location in multiple consecutive frames of images. For example, time-series data can be obtained by acquiring 10-20 frames of images to eliminate transient noise interference. Target grayscale data refers to the stable grayscale values ​​obtained after statistical processing of the initial grayscale data. This can be achieved using a moving average method or median filtering algorithm to suppress the influence of random noise on centroid calculation. The target light spot image refers to the light spot distribution map reconstructed from the target grayscale data of sub-pixels. For example, a high-resolution image is formed by mapping the grayscale value of each sub-pixel to its corresponding spatial location, used to accurately characterize the energy distribution of the light spot.

[0178] The centroid position refers to the coordinates of the energy center of the light spot obtained by gray-level weighted calculation. For example, the first-order moment algorithm is used to perform a weighted summation of the coordinates and gray values ​​of all sub-pixels in the target light spot image to achieve sub-pixel-level positioning accuracy.

[0179] For example, during template construction, an initial light spot image with non-periodic characteristics can be generated based on a high-information-entropy light-transmitting slit pattern. The centroid position of the light spot can be determined through centroid calculation, and this centroid is used as the measurement origin. A high-information-entropy slit histogram-shaped light spot can be generated based on the centroid and mapped to [0,1]. This can serve as an ideal barcode light spot template image, which can be used for subsequent image matching. The light intensity distribution of the barcode light spot template image has a prominent main peak and suppressed secondary peaks.

[0180] By calculating the centroid of the light spot and constructing a barcode light spot pattern image using the centroid as the measurement origin, the reconstruction of the barcode light spot pattern image can be achieved. This enhances the sharpness of the main peak signal and reduces the impact of noise on the centroid calculation, thereby improving the stability and accuracy of the offset angle measurement. The centroid data can still be reliably extracted in complex environments, providing a foundation for subsequent high-precision offset calculations.

[0181] For example, the initial spot image can be converted into a subpixel grid through pixel subdivision, with each subpixel corresponding to a smaller spatial unit. The grayscale values ​​of the same subpixel in consecutive frames can be extracted and processed into target grayscale data, for example, by applying a sliding window average to 30 frames to eliminate grayscale fluctuations caused by environmental vibrations or circuit noise. In the target spot image reconstructed based on the target grayscale data, the grayscale value of each subpixel reflects a stable light intensity distribution, thereby avoiding centroid shift caused by random noise in a single frame. The centroid position is determined by calculating the weighted average of all subpixel coordinates and their grayscale values.

[0182] Optionally, statistical analysis is performed on the pixel grayscale value sequence of one thousand frames of images to remove abnormal grayscale values ​​that deviate from the mean ±3σ, retaining the final remaining grayscale value sequence. A sub-pixel interpolation algorithm is then used on the remaining valid grayscale values ​​to further subdivide them at the CCD pixel level, obtaining a higher resolution image and providing a basis for fine centroid localization. The centroid obtained from the sub-pixel centroid calculation based on the high-resolution image can be determined as the measurement origin.

[0183] This embodiment improves spatial resolution through pixel subdivision and suppresses noise by combining temporal filtering of multi-frame data, making the reconstructed spot energy distribution closer to the real situation. Especially in low-contrast or high-noise environments, it can effectively distinguish between the main peak signal and the interference signal.

[0184] In this embodiment, subpixel-level spot reconstruction and multi-frame data fusion enhance the sharpness of the main peak signal and reduce the impact of noise on centroid calculation, thereby improving the stability and accuracy of offset angle measurement. Even in complex environments, spot centroid data can be reliably extracted, providing a foundation for subsequent high-precision offset calculation.

[0185] In an exemplary embodiment, the offset data of the centroid of the light spot of the object under test is obtained based on the degree of similarity, including:

[0186] Determine the cross-correlation image between the barcode spot template image and the barcode spot measurement image;

[0187] From the cross-correlation image, obtain the cross-correlation data corresponding to the peak position and the cross-correlation data corresponding to a preset number of adjacent points on the left and right sides of the peak position;

[0188] The similarity is obtained based on the cross-correlation data corresponding to the peak position and the cross-correlation data corresponding to a preset number of adjacent points;

[0189] Based on the degree of similarity, the fitted curve data is obtained, and the highest point of the fitted curve data is determined.

[0190] The offset data is obtained based on the highest point data of the fitted curve.

[0191] The cross-correlation image refers to a two-dimensional data distribution map generated by calculating the correlation between two images in the spatial domain. It can be implemented using Discrete Fourier Transform or Fast Convolution algorithms and reflects the degree of matching between the two images at different offsets. The peak position refers to the coordinate point in the cross-correlation image with the maximum cross-correlation value. This can be achieved by traversing pixel grayscale values ​​or using a gradient search algorithm. This position corresponds to the optimal matching offset between the barcode spot template and the measurement image. The cross-correlation data corresponding to adjacent points refers to the cross-correlation values ​​of pixels within a certain range to the left and right of the peak position. Specifically, data from 25 pixels to the left and right of the peak can be selected to construct a cross-correlation distribution model for a local region.

[0192] For example, when calculating the degree of similarity, a cross-correlation image containing peak information can be generated by cross-correlation operation, and the cross-correlation values ​​of the peak position and its neighboring points can be extracted. These data can then be used to construct a local cross-correlation curve.

[0193] For example, by analyzing the distribution characteristics of the peak and its neighboring points, such as by using parabolic fitting or Gaussian surface fitting methods, the true location of the peak can be accurately determined, thereby eliminating the influence of discrete sampling errors on the similarity calculation. This process can effectively distinguish between the true main peak and secondary peaks caused by noise, avoiding misjudgments caused by interference from secondary peaks.

[0194] Optionally, within the maximum correlation peak, a local parabolic fit is performed by taking a certain number (e.g., 25 points) of high-resolution coordinates and correlation values ​​on both sides of the maximum correlation point. This can be done according to the expression. ,in, For the displacement of the center of mass of the light spot, Given the effective focal length of the imaging lens, the actual deflection angle of the object being measured is calculated.

[0195] In some specific implementations, the high-resolution coordinates corresponding to the highest point of the fitted local parabola are calculated; based on the actual subdivided pixel size, the coordinates are converted into the actual centroid offset of the light spot. A comparison of the positioning error results of traditional equal-width slits and high-information-entropy bar-coded slits is shown in the image. Figure 8 The mean and variance of each curve were calculated, and the optimal results were compared. The comparison revealed that, compared to traditional equal-width slits, the average positioning accuracy of the light spot in the barcode slit of this application can be improved by at least 20%.

[0196] In this embodiment, by introducing cross-correlation data of points near the peak and combining it with a local regional distribution model, the position of the main peak can be identified more accurately, reducing the sensitivity of environmental noise to the measurement results. This improves the calculation accuracy of the spot centroid offset data, enhances the anti-interference capability of the autocollimator in complex environments, solves the measurement error problem caused by the weakening of the main peak, and reduces the interference of secondary peaks on similarity determination, thereby improving the measurement accuracy of the object offset angle.

[0197] In some specific implementations, after obtaining the barcode spot template image during the simulation process using an autocollimator, the barcode spot template image can be... Figure 6 If the reference object 5 is rotated by a small angle in the plane, the light spot formed on the CCD surface will undergo linear displacement.

[0198] After subdividing the existing pixel size, a high-resolution barcode spot measurement image, pixel, and grayscale value correspondence matrix are obtained. Cross-correlation is performed between the moved barcode spot measurement image and the ideal barcode spot template image to obtain the cross-correlation image and determine the maximum correlation point. Cross-correlation results of traditional equal-width slits and the high-information-entropy barcode slit of this application are shown in the following figures. Figure 7 As shown, the intensity ratio of the primary peak to the secondary peak of the high information entropy bar-coded slit is increased by 20%-40% compared with that of the traditional equal-width slit.

[0199] In an exemplary embodiment, the offset data of the centroid of the light spot of the object under test is obtained based on the degree of similarity, including:

[0200] In an exemplary embodiment, when the autocollimator is a two-dimensional autocollimator, or when the light-transmitting slit has two sets of mutually perpendicular light-transmitting slit patterns, the offset data of the light spot centroid includes first offset data and second offset data in two vertical directions.

[0201] Based on the offset data of the light spot centroid, determine the offset angle of the measured object, including:

[0202] Based on the first offset data and the focal length of the lens of the autocollimator, the offset angle of the measured object in the first direction is obtained.

[0203] Based on the second offset data and the focal length of the autocollimator lens, the offset angle of the measured object in the second direction is obtained.

[0204] In a specific implementation, in the two-dimensional case, such as Figure 9 As shown, a beam splitter prism group and a dual-line CCD array can be used for time-division measurement.

[0205] For reference Figure 6 In the corresponding embodiment, the first LED light source 11, the second LED light source 12, the first focusing objective lens 21, the second focusing objective lens 22, the first light-transmitting slit 31 with high information entropy, the second light-transmitting slit 32, the first linear CCD array 41, the second linear CCD array 42, the first beam splitter 51, the second beam splitter 52, the third beam splitter 53, the imaging lens 6, and the object under test 7 are mounted on a stable optical platform to ensure the stability of the mechanical structure and the optical system.

[0206] Optionally, when installing reference object 7, its surface should be strictly perpendicular to the optical axis of the collimating lens, serving as the measurement reference. Using a high-precision calibration plate, adjust the mounting angles of the two linear CCD arrays to ensure their sensitive axes are strictly orthogonal in space. Activate the light source to provide collimation to the collimating lens, forming a collimated beam. This beam then passes through a reticle and is received on the dual-line CCD array, forming a clear and stable light spot. Adjust the brightness and uniformity of the light source to ensure a uniform distribution of light intensity received by the CCDs in both directions, avoiding saturation due to excessive brightness and ensuring the CCDs operate within their linear response range. Adjust the integration times of the CCDs in the horizontal and vertical directions separately to ensure the signal intensity is within the linear range, thus determining the optimal exposure time.

[0207] Time-division measurement activates the optical paths ending in 2 corresponding to the X-slit in the horizontal direction, while simultaneously closing the optical paths ending in 1 in the Y-direction. A CCD is used to receive the X-direction spot image and record pixel data and a grayscale matrix. Alternatively, the X-direction optical path is closed, the Y-direction optical path is activated, and a CCD is used to receive the Y-direction spot image, recording pixel data and a grayscale matrix.

[0208] As described in step S501 above, determine the barcode spot template image, rotate the reference object 7 by a small angle in its plane, record the linear displacement of the spots on the two CCDs under this rotation, and obtain the barcode spot measurement image; as described in steps S502-S504 above, obtain the centroid offset of the two different spots in the two vertical directions.

[0209] According to the formula , , where f is the effective focal length of the imaging lens, and the actual two-dimensional deflection angle of the object being measured is calculated.

[0210] In another specific implementation, such as Figure 10 As shown, a two-dimensional bar-coded light-transmitting slit is provided, in which the LED light source 1 used by the autocollimator, the focusing objective lens 7, the high information entropy eight-slit two-dimensional reticle 2, the area array CCD 6, the beam splitter prism 3, the imaging lens 4, and the object under test 5 are mounted on a stable optical platform to ensure the stability of the mechanical structure and the optical system.

[0211] Following steps S501 to S504 above, the centroid offsets of the two different spot directions are obtained. According to the formula... , , where f is the effective focal length of the imaging lens, and the actual two-dimensional deflection angle of the object being measured is calculated.

[0212] In this embodiment, in a two-dimensional measurement scenario, offset data in two directions can be obtained through two sets of orthogonal light-transmitting slit patterns, enabling multi-dimensional angle calculation. Compared with existing technologies, traditional methods using equal-width light-transmitting slits result in periodic secondary peaks in the light spot image, making it susceptible to noise interference during cross-correlation calculations. This embodiment optimizes the information entropy characteristics of the light-transmitting slits, thereby improving the sharpness of the main peak and reducing the energy of the secondary peaks in the light spot image. In complex environments, this design can effectively distinguish between the main peak and noise signals, avoiding mismatch problems. Furthermore, the non-periodic light spot distribution reduces the system's sensitivity to external vibrations, minimizing error propagation.

[0213] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0214] In one exemplary embodiment, such as Figure 6 , Figure 9 , Figure 10 As shown, this application provides a high-precision autocollimator based on a high-information-entropy bar-coded slit and its stripe signal processing algorithm, comprising:

[0215] The light-transmitting slit is determined based on the high-information-entropy bar-coded slit determination method described above;

[0216] light source;

[0217] Beam splitter;

[0218] Imaging lens;

[0219] Photoelectric detection system;

[0220] Data processing system;

[0221] In this system, a light beam emitted from the light source reaches the light-transmitting slit. After being modulated by the slit, the beam is transmitted through a beam splitter prism and then becomes a parallel beam through an imaging lens before being incident on the reflective surface of the object being measured. The beam reflected from the reflective surface of the object being measured is refracted again by the beam splitter prism and then captured by the photoelectric detection system. The data processing system is used to visually present the captured image and process it to obtain the angular deflection amount, which is then visually presented on the electronic device.

[0222] The data processing system may include 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 described above.

[0223] It is understood that the above-described method in this embodiment has the same inventive concept, and the solution provided by the autocollimator is similar to the solution described in the above method. Therefore, the specific limitations in this embodiment can be found in the limitations of the above method described above. This embodiment can be referred to in correspondence with the high information entropy bar-coded slit determination method and the stripe signal processing method based on high information entropy bar-coded slit described above, and will not be repeated here.

[0224] In one exemplary embodiment, this application also provides a computer-readable storage medium storing a computer program that, when executed by one or more processors, causes the one or more processors to perform the steps of any of the stripe signal processing methods based on high information entropy bar-coded slits in the above embodiments.

[0225] In one exemplary embodiment, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the stripe signal processing methods based on high information entropy bar-coded slits in the above embodiments.

[0226] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0227] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.

[0228] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for determining a high information entropy bar code slit, characterized in that, The method is applied to a collimator, and comprises the following steps: According to a preset bar code mode, a plurality of initial light-transmitting slit patterns are obtained; An initial light-transmitting slit pattern is obtained according to the preset information entropy determination model, and the initial light-transmitting slit pattern is used as a target light-transmitting slit pattern. The initial light-transmitting slit pattern comprises wide stripes and narrow stripes; and the information entropy determination model comprises a Shannon entropy evaluation model. The method comprises the following steps:

2. The method of claim 1, wherein, The frequency of the wide stripes and the frequency of the narrow stripes are determined; The frequency of the wide stripes and the frequency of the narrow stripes are input into the Shannon entropy evaluation model, and the uncertainty degree of the initial light-transmitting slit pattern is obtained. The information entropy determination model comprises a compression ratio determination model. The method comprises the following steps:

3. The method of claim 1, wherein, The initial slit sequence corresponding to the initial light-transmitting slit pattern and the compressed slit sequence corresponding to the initial light-transmitting slit pattern are determined; The compressed slit sequence and the initial slit sequence are input into the compression ratio determination model, and the redundancy degree of the initial light-transmitting slit pattern is obtained. The initial light-transmitting slit pattern comprises wide stripes and narrow stripes; and the information entropy determination model comprises a run detection model. The method comprises the following steps:

4. The method of claim 1, wherein, The number of runs corresponding to the wide stripes and the number of runs corresponding to the narrow stripes are determined; The number of runs corresponding to the wide stripes and the number of runs corresponding to the narrow stripes are input into the information entropy determination model, and the randomness degree of the initial light-transmitting slit pattern is obtained. The method comprises the following steps: The uncertainty degree, the redundancy degree and the randomness degree are normalized; 5. The method according to any one of claims 1 to 4, characterized in that, A weight coefficient set is obtained, and the weight coefficient set comprises weight coefficients corresponding to the uncertainty degree, the redundancy degree and the randomness degree, respectively; The uncertainty degree, the redundancy degree and the randomness degree are weighted by using the weight coefficient set, and the information entropy corresponding to the initial light-transmitting slit pattern is obtained. ​ ​ 6. A fringe pattern processing method based on high information entropy bar code slit, characterized in that, The application is applied to a collimator, the collimator comprises a light transmission slit, the light transmission slit is determined based on the high information entropy bar code slit determination method in any one of claims 1-5, and the bar code slit signal processing method based on the high information entropy bar code slit comprises: A bar code light spot template image of a to-be-measured object is determined, and a bar code light spot measurement image reflected by the to-be-measured object through the collimator is obtained; wherein the bar code light spot template image is obtained by strictly vertically reflecting the to-be-measured object and measurement light, the reflected light returns along the original path, focuses on the center point of the photoelectric detection system after passing through the light splitting prism of the collimator, and an image in a non-deflection state is obtained; the bar code light spot measurement image is an image in which an angle deflection occurs; Similarity between the bar code light spot template image and the bar code light spot measurement image is obtained; Deflection data of a light spot centroid of the to-be-measured object is obtained according to the similarity; A deflection angle of the to-be-measured object is determined according to the deflection data of the light spot centroid.

7. The method of claim 6, wherein, The deflection data of the light spot centroid of the to-be-measured object is obtained according to the similarity, comprising: A bar code slit light spot template image of the to-be-measured object is determined, and a target light spot image is obtained; A correlation detection method is used to detect the similarity between the template image and the target image; The deflection data of the light spot centroid of the to-be-measured object is obtained by fitting and converting the similarity.

8. The method of claim 6, wherein, When the collimator is a two-dimensional collimator or the light transmission slit has two groups of light transmission slit patterns perpendicular to each other, the deflection data of the light spot centroid comprises first deflection data and second deflection data in two perpendicular directions; The deflection angle of the to-be-measured object is determined according to the deflection data of the light spot centroid, comprising: A deflection angle of the to-be-measured object in a first direction is obtained according to the first deflection data and a focal length of a lens of the collimator; A deflection angle of the to-be-measured object in a second direction is obtained according to the second deflection data and the focal length of the lens of the collimator.

9. A high-precision autocollimator based on high-information-entropy bar code slit and its stripe signal processing algorithm, characterized in that, Comprising: A light transmission slit; A light source; A light splitting prism; An imaging lens; A photoelectric detection system; A data processing system; The light source emits a light beam, the modulated light beam after passing through the light transmission slit is transmitted through the light splitting prism and then becomes a parallel light beam through the imaging lens, and the parallel light beam is incident on a reflection surface of the to-be-measured object; The light beam reflected from the reflection surface of the to-be-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 for directly presenting the collected image and processing to obtain an angle deflection amount, the data processing system comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method in any one of claims 6-8 when executing the computer program.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1-5 or 6-8.

Citation Information

Patent Citations

  • Two-axis angle determination method in linear array APS sun sensor

    CN103411580A

  • Auto-collimator

    CN114111644A