Method and device for obtaining an interference original aperture and a shear quantity for any aperture
By generating a spatial modulation quality map and automatically extracting the centroid of the aperture mask using the K-means clustering algorithm, the problems of assumptions about circular apertures and low automation in existing technologies are solved, and high-precision optical detection of apertures of arbitrary shapes is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN TECH UNIV
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies for obtaining transverse shearing interference of arbitrary aperture shapes suffer from problems such as reliance on the assumption of a circular aperture, low automation, and weak anti-interference ability, making it difficult to meet the needs of high-precision optical detection.
By acquiring multiple phase-shifted interferograms of the transverse shearing interferometer system, a spatial modulation quality map is generated. The K-means clustering algorithm is used to automatically divide the interference region, non-interference region, and background region. The spatial reorganization is performed in combination with the shearing direction, and the centroid coordinates of the aperture mask are calculated to determine the shearing amount.
It achieves fully automatic and high-precision extraction of apertures of arbitrary shapes, is suitable for high-precision surface shape detection of complex aperture optical elements, has high robustness and synchronous output of aperture and shearing amount, and is adaptable to interferograms with dense fringes, blurred edges or noise interference.
Smart Images

Figure CN122289280A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical measurement technology, specifically to a method and apparatus for obtaining the original interference aperture and shearing amount of arbitrary aperture. Background Technology
[0002] Transverse shearing interferometry is a key optical wavefront detection method. Its core principle is to replicate the wavefront to be measured and apply a small transverse displacement (i.e., shearing), causing interference fringes to form in the overlapping region between the original and sheared wavefronts. These fringes reflect wavefront gradient information and can be used for high-precision reconstruction of the surface shape of the optical element under test or the phase distribution of the transmitted wavefront. However, achieving high-precision wavefront reconstruction requires accurately obtaining the original aperture shape and shearing amount.
[0003] Currently, the mainstream methods for extracting shear from interferograms mainly include Radon transform, manual interpretation and circular movement, edge detection fitting, and minimum rectangle fitting. Radon transform identifies straight stripes through projection analysis, but it has poor adaptability to curved stripes and often requires manual intervention. Manual interpretation and circular movement relies on manual operation, which is inefficient and easily affected by subjective factors, making it difficult to automate measurement. Edge detection fitting methods (such as those based on Sobel, Prewitt, and Canny operators) are easily affected by stripe crosstalk when the texture is complex or the edge gradient is not obvious, leading to misjudgment of the contour. Although the minimum rectangle fitting method is computationally simple, it implicitly assumes that the aperture is convex and symmetric, making it difficult to apply to arbitrary apertures that are non-circular, asymmetrical, or have complex contours (such as rings or polygons).
[0004] Furthermore, existing methods are mostly based on single-frame interferometric intensity image processing, failing to fully utilize the phase and modulation information provided by phase-shifting interferometry. This results in insufficient robustness in real-world interferograms with low contrast, high noise, or blurred edges. Therefore, existing technologies generally suffer from problems such as reliance on circular aperture priors, limited applicability, low automation, and weak anti-interference capabilities, making it difficult to meet the needs of complex aperture wavefront recovery in modern high-precision optical inspection. Summary of the Invention
[0005] This invention provides a method and apparatus for obtaining the original aperture and shear amount of interference under arbitrary aperture conditions, aiming to overcome the shortcomings of the prior art, such as reliance on the assumption of a circular aperture, inability to be applied to the extraction of apertures of arbitrary shapes, low degree of automation, and weak anti-interference ability.
[0006] In a first aspect, embodiments of the present invention provide a method for obtaining the original interference aperture and shear amount of arbitrary aperture, including:
[0007] Multiple phase-shifted interferograms were acquired in the x and y directions by the transverse shearing interferometer system, and a spatial modulation quality map was obtained by fusing the multiple phase-shifted interferograms.
[0008] Using the grayscale value of each pixel in the spatial modulation quality image as a feature, the K-means clustering algorithm is used to label each pixel in the spatial modulation quality image as an interference region, a non-interference region, and a background region, respectively.
[0009] Based on the known shearing direction, the interference region and the non-interference region are spatially reorganized to generate an original aperture mask and a sheared aperture mask; the centroid coordinates of the original aperture mask and the sheared aperture mask are calculated, and the shearing amount is determined according to the distance between the two centroids.
[0010] Preferably, the step of using the grayscale values of each pixel in the spatial modulation quality image as features, and employing the K-means clustering algorithm to label each pixel in the spatial modulation quality image as an interference region, a non-interference region, and a background region, includes:
[0011] The gray value of each pixel in the spatial modulation quality image is used as a one-dimensional feature vector to construct a feature vector set, and the K-means clustering algorithm is used to divide the feature vector set into three clusters.
[0012] Initialize three cluster centers, and iterate by alternately performing cluster allocation and cluster center update operations until the convergence condition is met;
[0013] Based on the gray values of each cluster center after convergence, semantic mapping rules are established, and each pixel in the spatial modulation quality map is marked as an interference region, a non-interference region, and a background region, respectively.
[0014] Preferably, the convergence condition is that the change in the objective function between two consecutive iterations is less than a preset threshold, or the number of iterations reaches a preset maximum value; the objective function is:
[0015] ,
[0016] in, This is the set of gray values of the cluster centers of the three clusters. Let k be the corresponding cluster set, where k is the cluster index, k=1,2,3. Let P be the grayscale value of the p-th pixel in the spatial modulation quality image, where p is the pixel index (p = 1, 2, 3, ..., P), P = M ⊆ N, where M × N is the size of the spatial modulation quality image. Let k be the set of pixels contained in the k-th cluster. Let be the gray value of the cluster center of the k-th cluster. for and Euclidean distance.
[0017] Preferably, the cluster allocation operation uses the following formula:
[0018] ,
[0019] in, For pixels The cluster label to which it belongs. for and The squared distance;
[0020] The cluster center update operation uses the following formula:
[0021] ,
[0022] in, For clusters The number of pixels in the image.
[0023] Preferably, the semantic mapping rule is:
[0024] .
[0025] Among them, the gray values of the cluster centers of the three clusters after convergence satisfy... .
[0026] Preferably, the step of spatially reorganizing the interference region and the non-interference region based on a known shearing direction to generate an original aperture mask and a sheared aperture mask includes:
[0027] When the shearing direction is the x-direction, the non-interference region is divided into a left non-interference sub-region and a right non-interference sub-region; the interference region and the left non-interference sub-region are merged to form the original aperture mask, and the interference region and the right non-interference sub-region are merged to form the sheared aperture mask;
[0028] When the shearing direction is the y-direction, the non-interference region is divided into an upper non-interference sub-region and a lower non-interference sub-region; the interference region and the upper non-interference sub-region are merged as the original aperture mask, and the interference region and the lower non-interference sub-region are merged as the sheared aperture mask.
[0029] Secondly, embodiments of the present invention provide a device for obtaining the original interference aperture and shear amount of arbitrary aperture, comprising:
[0030] The acquisition module is used to acquire multiple phase-shifted interferograms obtained by the transverse shearing interferometer system in the x and y directions, and to calculate the spatial modulation quality map based on the fusion of the multiple phase-shifted interferograms.
[0031] The clustering module is used to use the gray values of each pixel in the spatial modulation quality image as features, and to use the K-means clustering algorithm to label each pixel in the spatial modulation quality image as an interference region, a non-interference region, and a background region, respectively.
[0032] The calculation module is used to spatially reorganize the interference region and the non-interference region based on the known shearing direction to generate an original aperture mask and a sheared aperture mask; calculate the centroid coordinates of the original aperture mask and the sheared aperture mask, and determine the shearing amount based on the distance between the two centroids.
[0033] Preferably, the clustering module is specifically used for:
[0034] The gray value of each pixel in the spatial modulation quality image is used as a one-dimensional feature vector to construct a feature vector set, and the K-means clustering algorithm is used to divide the feature vector set into three clusters.
[0035] Initialize three cluster centers, and iterate by alternately performing cluster allocation and cluster center update operations until the convergence condition is met;
[0036] Based on the gray values of each cluster center after convergence, semantic mapping rules are established, and each pixel in the spatial modulation quality map is marked as an interference region, a non-interference region, and a background region, respectively.
[0037] Thirdly, embodiments of the present invention provide an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method for obtaining the original aperture and shear amount of interference of arbitrary aperture as described above.
[0038] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the method for obtaining the original aperture and shear amount of interference of arbitrary aperture as described above.
[0039] This invention provides a method and apparatus for obtaining the original aperture and shearing amount of interference with arbitrary apertures. It acquires multiple frames of phase-shifted interferograms from a transverse shearing interferometer system along a known shearing direction, and fuses them to generate a spatial modulation quality map. Based on the pixel grayscale features of this quality map, a K-means unsupervised clustering algorithm is used to automatically divide the region into interference, non-interference, and background regions. Then, combining the physical characteristics of the shearing direction, the interference and non-interference regions are spatially reorganized to generate an original aperture mask and a sheared aperture mask, respectively. Finally, the shearing amount is accurately obtained by calculating the centroid distance between the two masks. This method requires no prior knowledge of aperture shape, is fully automated, and is applicable to arbitrary apertures such as rectangles, ellipses, and rings. It also maintains high robustness and accuracy in interferograms with dense fringes, blurred edges, or noise. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A schematic flowchart illustrating a method for obtaining the original aperture and shear amount of interference with arbitrary aperture according to an embodiment of the present invention;
[0042] Figure 2A The four-step phase-shifting interferogram acquired by the transverse shearing interferometer system provided in this embodiment of the invention during shearing in the x-direction;
[0043] Figure 2B The four-step phase-shifting interferogram acquired by the transverse shearing interferometer system provided in this embodiment of the invention during shearing in the y-direction;
[0044] Figure 3A Based on Figure 2A The spatial modulation quality map obtained by the four-step phase-shift interferogram fusion calculation is shown below;
[0045] Figure 3B Based on Figure 2B The spatial modulation quality map obtained by the four-step phase-shift interferogram fusion calculation is shown below;
[0046] Figure 4A To Figure 3A A visualization of the interference region (left) and non-interference region (right) after K-means clustering;
[0047] Figure 4B To Figure 3B A visualization of the interference region (left) and non-interference region (right) after K-means clustering;
[0048] Figure 5A In the case of shearing in the x-direction, for Figure 4A The diagram shows the original aperture mask (red frame) and the aperture mask (green frame) generated after spatial reconstruction.
[0049] Figure 5B In the case of shearing in the y-direction, for Figure 4B The diagram shows the original aperture mask (red frame) and the aperture mask (green frame) generated after spatial reconstruction.
[0050] Figure 6 This is a structural block diagram of an interference original aperture and shear quantity acquisition device with arbitrary aperture provided in an embodiment of the present invention. Detailed Implementation
[0051] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0052] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0053] Figure 1 This is a flowchart illustrating a method for obtaining the original aperture and shear amount of interference with arbitrary apertures according to an embodiment of the present invention. (Refer to...) Figure 1 As shown, the method mainly includes the following steps:
[0054] Step 100: Acquire multiple phase-shifted interferograms in the x and y directions of the transverse shearing interferometer system, and calculate the spatial modulation quality map based on the fusion of the multiple phase-shifted interferograms.
[0055] In this step, four-step phase-shifting interferograms are acquired in the known shearing directions x and y using a transverse shearing interferometry system. These can be represented as follows: and To eliminate the effects of uneven background and modulation light, each interferogram is normalized:
[0056]
[0057]
[0058] in, Indicates normalized processing The direction of the first Interference diagram, Indicates normalized processing The direction of the first Interference diagram; express The direction of the first Interference diagram, express The direction of the first Interference diagram; express The direction of the first Maximum intensity value of pixels in the amplitude interferogram express The direction of the first Minimum intensity value of pixels in an amplitude interferogram express The direction of the first Maximum intensity value of pixels in the amplitude interferogram express The direction of the first Minimum intensity value of a pixel in an amplitude interferogram.
[0059] The normalization process of the four-step phase-shifting interferogram extracts the minimum and maximum gray values of a single interferogram, which normalizes the gray values of the interferogram to the same range, effectively eliminating interference from uneven background light and modulation light.
[0060] Preferably, a spatial modulation quality map algorithm is used to process the normalized data. Four-step phase-shift interferogram and The spatial modulation quality map is calculated by fusing four-step phase-shift interferograms in the directional direction. This process can fuse information from multiple maps, suppress fringes, and enhance the effective region. Specifically, the algorithm for the spatial modulation quality map is as follows:
[0061]
[0062]
[0063] in, express Spatial modulation quality diagram of direction. express Spatial modulation quality diagram of direction.
[0064] For example, a rectangular aperture surface is measured. A transverse shear interferometry system acquires four-step phase-shifting interferograms in both the x and y directions. The interferogram sequence in the x direction is denoted as... The interferogram sequence in the y-direction is . Specific reference Figure 2A and Figure 2B As shown, Figure 2A This is a four-step phase-shifting interferogram acquired during shearing in the x-direction of a transverse shearing interferometer system. Figure 2B This is a four-step phase-shifting interferogram acquired when the transverse shearing interferometer system is sheared in the y-direction.
[0065] To eliminate the influence of uneven background and modulation light, each interferogram in the x and y directions is normalized according to the above formula. After normalization, the normalized interferograms are then normalized again according to the formula. Four-step phase-shift interferogram and The four-step phase-shift interferograms are fused to calculate the corresponding spatial modulation quality map. See details below. Figure 3A and 3B As shown, Figure 3A Based on Figure 2A The spatial modulation quality map obtained by the four-step phase-shift interferogram fusion calculation is shown below. Figure 3B Based on Figure 2B The spatial modulation quality map is obtained by the fusion calculation of the four-step phase-shift interferograms shown.
[0066] This spatial modulation quality map integrates phase information from multiple interferograms, effectively suppressing interference fringes and enhancing the grayscale contrast between the subsequently segmented interference region, non-interference region, and background region.
[0067] Step 200: Using the gray values of each pixel in the spatial modulation quality image as features, the K-means clustering algorithm is used to label each pixel in the spatial modulation quality image as an interference region, a non-interference region, and a background region, respectively.
[0068] In this step, after the spatial modulation quality map is constructed, an unsupervised clustering algorithm is used to automatically divide the image region. Then, based on the characteristics of shearing interference, the region is reorganized and semantically mapped, so that each pixel in the spatial modulation quality map is marked as an interference region, a non-interference region, and a background region. This clustering step lays a reliable foundation for subsequent spatial reorganization and parameter extraction based on the physical model.
[0069] In one specific embodiment, the automatic division of the spatial modulation quality map region can be achieved through the following steps:
[0070] Step 210: Use the gray value of each pixel in the spatial modulation quality image as a one-dimensional feature vector to construct a feature vector set, and use the K-means clustering algorithm to divide the feature vector set into three clusters;
[0071] Assume that the dimensions of the spatial modulation quality diagram are all ,total Each pixel has a grayscale value. As a one-dimensional feature, construct a set of feature vectors:
[0072]
[0073] The K-means clustering algorithm is used to cluster the feature vector set Divided into There are 3 clusters, each corresponding to a semantic region in the spatial modulation quality map. The feature vector of the K-means clustering algorithm is the pixel gray value of the spatial modulation quality map. It uses one-dimensional features to achieve unsupervised clustering without the need for manually setting thresholds or pre-labeling.
[0074] Step 220: Initialize three cluster centers, and iterate by alternately executing cluster allocation and cluster center update operations until the convergence condition is met;
[0075] The goal of this K-means clustering algorithm is to minimize the intra-cluster squared error. Therefore, three cluster centers are initialized first, and after fixing the corresponding cluster centers, each pixel in the spatial modulation quality map is... Assign the cluster to the nearest cluster, and then recalculate the center of each cluster based on the current cluster assignment. Iterate by alternating between cluster assignment and cluster center update operations until the convergence condition is met.
[0076] Preferably, the convergence condition is that the change in the objective function between two consecutive iterations is less than a preset threshold, or the number of iterations reaches a preset maximum value; the objective function is:
[0077] ,
[0078] in, This is the set of gray values of the cluster centers of the three clusters. Let k be the corresponding cluster set, where k is the cluster index, k=1,2,3. Let P be the grayscale value of the p-th pixel in the spatial modulation quality image, where p is the pixel index (p = 1, 2, 3, ..., P), P = M ⊆ N, where M × N is the size of the spatial modulation quality image. Let k be the set of pixels contained in the k-th cluster. Let be the gray value of the cluster center of the k-th cluster. for and Euclidean distance.
[0079] The preset threshold of the above convergence condition can be set by those skilled in the art according to the actual transverse shear interference detection scenario, and the maximum number of iterations can be set by those skilled in the art according to the clustering accuracy requirements.
[0080] Furthermore, the cluster allocation operation uses the following formula:
[0081] ,
[0082] in, For pixels The cluster label to which it belongs. for and The squared distance;
[0083] Furthermore, the cluster center update operation uses the following formula:
[0084] ,
[0085] in, For clusters The number of pixels in the image.
[0086] Once the K-means clustering algorithm converges, each pixel in the spatial modulation quality map is ultimately divided into three clusters based on its grayscale value. .
[0087] Step 230: Establish semantic mapping rules based on the gray values of each cluster center after convergence, and mark each pixel in the spatial modulation quality map as the interference region, non-interference region and background region respectively.
[0088] After the K-means clustering algorithm converges, the gray values of the cluster centers of the three clusters satisfy the following condition: Based on the physical characteristics of transverse shearing interferograms: the area of light intensity overlap caused by shearing misalignment in the interference region has the highest average gray value in the spatial modulation quality map, corresponding to... The cluster it belongs to; the non-interference region is the area where the light intensity does not overlap after shearing, with a central gray level, corresponding to The cluster in which it is located; while the background region has no effective light signal and the lowest gray level, corresponding to The cluster it belongs to.
[0089] Based on this, semantic mapping rules are established according to the gray values of the three cluster centers after convergence:
[0090] .
[0091] Among them, the gray values of the cluster centers of the three clusters after convergence satisfy... .
[0092] Through the above steps, each pixel in the spatial modulation quality map can be marked as the interference region, non-interference region, and background region, respectively.
[0093] For example, refer to Figure 4A and Figure 4B As shown, Figure 4A To Figure 3A A visualization of the interference region (left) and non-interference region (right) identified after K-means clustering. Figure 4B To Figure 3B A visualization of the interference region (left) and non-interference region (right) after K-means clustering.
[0094] Step 300: Based on the known shearing direction, spatially reorganize the interference region and the non-interference region to generate the original aperture mask and the sheared aperture mask; calculate the centroid coordinates of the original aperture mask and the sheared aperture mask, and determine the shearing amount based on the distance between the two centroids.
[0095] In this step, based on the known shearing directions, namely the x and y directions, the non-interference region is further subdivided according to its spatial distribution. This spatial subdivision of the non-interference region is based on the physical imaging mechanism of transverse shearing interference, combined with the shearing characteristics in the x and y directions, to complete the region division without any prior assumptions about geometric shape.
[0096] When the shearing direction is the x-direction, the non-interference region is divided into a left non-interference sub-region and a right non-interference sub-region. Then, spatial reorganization is performed: the interference region and the left non-interference sub-region are merged to form the original aperture mask, and the interference region and the right non-interference sub-region are merged to form the sheared aperture mask.
[0097] When the shearing direction is the y-direction, the non-interference region is divided into an upper non-interference sub-region and a lower non-interference sub-region. Then, spatial reorganization is performed, merging the interference region and the upper non-interference sub-region to form the original aperture mask, and merging the interference region and the lower non-interference sub-region to form the sheared aperture mask.
[0098] For example, refer to Figure 5A and Figure 5B As shown, Figure 5A For shearing in the x-direction Figure 4A The diagram shows the original aperture mask (red frame) and the aperture mask (green frame) generated after spatial reconstruction. Figure 5B In the case of shearing in the y-direction Figure 4B The diagram shows the original aperture mask (red frame) generated after spatial reconstruction and the aperture mask after shearing (green frame).
[0099] Furthermore, based on the original aperture mask and the sheared aperture mask generated after spatial reconstruction, the centroid coordinates of the original aperture mask and the sheared aperture mask are calculated, and the shearing amount is determined according to the distance between the two centroids. Here, the centroid coordinates are the pixel grayscale centroids of the mask region, and the shearing amount is the Euclidean distance between the centroids of the original aperture mask and the sheared aperture mask, which is the spatial offset between the original wavefront and the sheared wavefront.
[0100] This method abandons the traditional manual interpretation and geometric fitting calculation methods. It achieves fully automatic and high-precision calculation of shearing amount through aperture mask centroid distance measurement. It does not assume geometric aperture shape and is applicable to transverse shear interference detection of apertures of arbitrary shapes such as circles, rectangles, rings, and ellipses, realizing integrated output of aperture mask and shearing amount.
[0101] Specifically, first calculate the original aperture mask separately. and sheared aperture mask centroid coordinates and :
[0102]
[0103] In the above formula, the original aperture mask This is a binary image (typically 0 and 1), where regions with a pixel value of 1 represent the effective light-passing area of the original aperture. (Cropped aperture mask) Similarly, in a binary image, the area with a pixel value of 1 represents the effective light-transmitting area after horizontal cropping. : This indicates that the geometric centroid of a binary mask is calculated, which is the arithmetic mean of the coordinates of all foreground pixels in that region.
[0104] Then shear amount for:
[0105]
[0106] Integrated output raw aperture mask Sheared aperture mask Shear quantity This provides accurate input for subsequent arbitrary aperture wavefront reconstruction algorithms.
[0107] For example, the shear amount in the x-direction can be calculated according to the above formula. and shear in the y direction It integrates the original aperture mask and the sheared aperture mask into the output.
[0108] In this step, the shearing amount is calculated based on a precisely extracted arbitrary-shaped aperture mask, rather than the traditional circular / rectangular fitting contour, adapting to scenarios with arbitrary aperture shapes and without geometric assumptions. It is extracted and output simultaneously with the original aperture mask and the sheared aperture mask, eliminating the need for a separate calculation process and improving measurement efficiency. The pixel centroid calculation based on the interferogram can capture minute wavefront displacements, solving the calculation error problem of traditional methods under weak edges and noise interference. At the same time, the shearing amount is calculated independently in the two orthogonal directions of x and y, which can be adapted to transverse shearing interferometric systems in different directions and meet the needs of multi-dimensional wavefront detection.
[0109] This invention can automatically and with high precision extract the original contour and shearing parameters of apertures of arbitrary shape (rectangular in this embodiment) from transverse shearing interferograms, without relying on geometric assumptions such as circular fitting. It has strong versatility and high robustness, and can effectively support high-precision surface shape detection of complex aperture optical elements.
[0110] In summary, compared with the prior art, the present invention has the following significant advantages:
[0111] (1) No prior knowledge of aperture shape is required: It breaks through the dependence of traditional methods on circular or symmetrical apertures and is applicable to any complex aperture (such as annular, polygonal, irregular contours, etc.).
[0112] (2) Fully automated processing: From interferogram input to shear quantity output, no manual intervention is required, which greatly improves detection efficiency;
[0113] (3) High robustness and accuracy: Spatial modulation quality map is constructed using phase-shifting interferometric information to effectively suppress fringe interference; Combined with unsupervised clustering and physical shearing constraints, parameters can still be stably extracted even in interferograms with blurred edges, strong noise or dense fringes;
[0114] (4) Synchronously output the original aperture and shear amount: to provide complete and consistent geometric prior information for subsequent high-precision wavefront reconstruction;
[0115] (5) Easy to implement in engineering: The algorithm has a clear flow and moderate computational complexity, and can be integrated into a real-time optical detection system.
[0116] It should be noted that, for the sake of simplicity, the embodiments of the above methods are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the present invention.
[0117] Reference Figure 6As shown, based on the same inventive concept, embodiments of the present invention provide a device for obtaining the original interference aperture and shear amount of arbitrary aperture, the device may include:
[0118] The acquisition module S10 is used to acquire multiple phase-shifted interferograms obtained by the transverse shearing interferometer system in the x and y directions, and to calculate the spatial modulation quality map based on the fusion of the multiple phase-shifted interferograms.
[0119] The clustering module S20 is used to use the gray values of each pixel in the spatial modulation quality map as features, and the K-means clustering algorithm is used to label each pixel in the spatial modulation quality map as an interference region, a non-interference region, and a background region, respectively.
[0120] The calculation module S30 is used to spatially reorganize the interference region and the non-interference region based on the known shearing direction to generate the original aperture mask and the sheared aperture mask; calculate the centroid coordinates of the original aperture mask and the sheared aperture mask, and determine the shearing amount based on the distance between the two centroids.
[0121] It should be noted that the above-mentioned acquisition module S10, clustering module S20 and calculation module S30 correspond to steps 100 to 300 in the above method embodiments. The three units and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above method embodiments.
[0122] Preferably, in one embodiment of the present invention, the clustering module S20 is specifically used for:
[0123] The gray value of each pixel in the spatial modulation quality image is used as a one-dimensional feature vector to construct a feature vector set, and the K-means clustering algorithm is used to divide the feature vector set into three clusters.
[0124] Initialize three cluster centers, and iterate by alternately performing cluster allocation and cluster center update operations until the convergence condition is met;
[0125] Based on the gray values of each cluster center after convergence, semantic mapping rules are established, and each pixel in the spatial modulation quality map is marked as an interference region, a non-interference region, and a background region, respectively.
[0126] Preferably, in one embodiment of the present invention, the convergence condition is that the change in the objective function between two adjacent iterations is less than a preset threshold, or the number of iterations reaches a preset maximum value; the objective function is:
[0127] ,
[0128] in, This is the set of gray values of the cluster centers of the three clusters. Let k be the corresponding cluster set, where k is the cluster index, k=1,2,3. Let P be the grayscale value of the p-th pixel in the spatial modulation quality image, where p is the pixel index (p = 1, 2, 3, ..., P), P = M ⊆ N, where M × N is the size of the spatial modulation quality image. Let k be the set of pixels contained in the k-th cluster. Let be the gray value of the cluster center of the k-th cluster. for and Euclidean distance.
[0129] Preferably, in one embodiment of the present invention, the cluster allocation operation adopts the following formula:
[0130] ,
[0131] in, For pixels The cluster label to which it belongs. for and The squared distance;
[0132] The cluster center update operation uses the following formula:
[0133] ,
[0134] in, For clusters The number of pixels in the image.
[0135] Preferably, in one embodiment of the present invention, the semantic mapping rule is:
[0136] .
[0137] Among them, the gray values of the cluster centers of the three clusters after convergence satisfy... .
[0138] Preferably, in one embodiment of the present invention, the calculation module S30 is specifically used for:
[0139] When the shearing direction is the x-direction, the non-interference region is divided into a left non-interference sub-region and a right non-interference sub-region; the interference region and the left non-interference sub-region are merged to form the original aperture mask, and the interference region and the right non-interference sub-region are merged to form the sheared aperture mask;
[0140] When the shearing direction is the y-direction, the non-interference region is divided into an upper non-interference sub-region and a lower non-interference sub-region; the interference region and the upper non-interference sub-region are merged as the original aperture mask, and the interference region and the lower non-interference sub-region are merged as the sheared aperture mask.
[0141] It should be noted that the device for obtaining the original aperture and shear amount of interference with arbitrary aperture provided in the embodiments of the present invention and the method for obtaining the original aperture and shear amount of interference with arbitrary aperture described in the foregoing embodiments belong to the same technical concept. The specific implementation process can be referred to the description of the method steps in the foregoing embodiments, and will not be repeated here.
[0142] It should be understood that the units included in the above-described device for obtaining the original aperture and shear amount of interference with arbitrary aperture are only a logical division based on the functions implemented by the device. In practical applications, the above units can be superimposed or separated. Furthermore, the functions implemented by the device for obtaining the original aperture and shear amount of interference with arbitrary aperture provided in this embodiment correspond one-to-one with the method for obtaining the original aperture and shear amount of interference with arbitrary aperture provided in the above embodiment. The more detailed processing flow implemented by this device has been described in detail in the above method embodiments and will not be described in detail here.
[0143] Based on the same inventive concept, embodiments of the present invention also provide an electronic device, which mainly includes a processor and a memory, wherein a computer program is stored in the memory. When the processor executes the computer program, it implements the steps described in any embodiment of the method for obtaining the original aperture and shear amount of interference with arbitrary aperture. Alternatively, when the processor executes the computer program, it implements the functions of each unit in any embodiment of the device for obtaining the original aperture and shear amount of interference with arbitrary aperture.
[0144] This invention also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the steps described in any of the embodiments of the method for obtaining the original aperture and shear amount of interference with arbitrary aperture. Alternatively, when executed by a processor, the computer program implements the functions of each unit in the embodiments of the device for obtaining the original aperture and shear amount of interference with arbitrary aperture.
[0145] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0146] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0147] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for obtaining the original aperture and shear amount of interference with arbitrary aperture, characterized in that, include: Multiple phase-shifted interferograms were acquired in the x and y directions by the transverse shearing interferometer system, and a spatial modulation quality map was obtained by fusing the multiple phase-shifted interferograms. Using the grayscale value of each pixel in the spatial modulation quality image as a feature, the K-means clustering algorithm is used to label each pixel in the spatial modulation quality image as an interference region, a non-interference region, and a background region, respectively. Based on the known shearing direction, the interference region and the non-interference region are spatially reorganized to generate the original aperture mask and the sheared aperture mask; Calculate the centroid coordinates of the original aperture mask and the sheared aperture mask, and determine the shearing amount based on the distance between the two centroids.
2. The method according to claim 1, characterized in that, The step of using the grayscale values of each pixel in the spatial modulation quality image as features, and employing the K-means clustering algorithm to label each pixel in the spatial modulation quality image as an interference region, a non-interference region, and a background region, includes: The gray value of each pixel in the spatial modulation quality image is used as a one-dimensional feature vector to construct a feature vector set, and the K-means clustering algorithm is used to divide the feature vector set into three clusters. Initialize three cluster centers, and iterate by alternately performing cluster allocation and cluster center update operations until the convergence condition is met; Based on the gray values of each cluster center after convergence, semantic mapping rules are established, and each pixel in the spatial modulation quality map is marked as an interference region, a non-interference region, and a background region, respectively.
3. The method according to claim 2, characterized in that, The convergence condition is that the change in the objective function between two consecutive iterations is less than a preset threshold, or the number of iterations reaches a preset maximum value; the objective function is: , in, This is the set of gray values of the cluster centers of the three clusters. Let k be the corresponding cluster set, where k is the cluster index, k=1,2,3. Let P be the grayscale value of the p-th pixel in the spatial modulation quality image, where p is the pixel index (p = 1, 2, 3, ..., P), P = M ⊆ N, where M × N is the size of the spatial modulation quality image. Let k be the set of pixels contained in the k-th cluster. Let be the gray value of the cluster center of the k-th cluster. for and Euclidean distance.
4. The method according to claim 2, characterized in that, The cluster allocation operation uses the following formula: , in, For pixels The cluster label to which it belongs. for and The squared distance; The cluster center update operation uses the following formula: , in, For clusters The number of pixels in the image.
5. The method according to claim 2, characterized in that, The semantic mapping rule is as follows: 。 Among them, the gray values of the cluster centers of the three clusters after convergence satisfy... .
6. The method according to claim 1, characterized in that, The step of spatially reorganizing the interference region and the non-interference region based on the known shearing direction to generate an original aperture mask and a sheared aperture mask includes: When the shearing direction is the x-direction, the non-interference region is divided into a left non-interference sub-region and a right non-interference sub-region; the interference region and the left non-interference sub-region are merged to form the original aperture mask, and the interference region and the right non-interference sub-region are merged to form the sheared aperture mask; When the shearing direction is the y-direction, the non-interference region is divided into an upper non-interference sub-region and a lower non-interference sub-region; the interference region and the upper non-interference sub-region are merged as the original aperture mask, and the interference region and the lower non-interference sub-region are merged as the sheared aperture mask.
7. A device for obtaining the original aperture and shear amount of interference with arbitrary aperture, characterized in that, include: The acquisition module is used to acquire multiple phase-shifted interferograms obtained by the transverse shearing interferometer system in the x and y directions, and to calculate the spatial modulation quality map based on the fusion of the multiple phase-shifted interferograms. The clustering module is used to use the gray values of each pixel in the spatial modulation quality image as features, and to use the K-means clustering algorithm to label each pixel in the spatial modulation quality image as an interference region, a non-interference region, and a background region, respectively. The calculation module is used to spatially reorganize the interference region and the non-interference region based on the known shearing direction to generate the original aperture mask and the sheared aperture mask; Calculate the centroid coordinates of the original aperture mask and the sheared aperture mask, and determine the shearing amount based on the distance between the two centroids.
8. The apparatus according to claim 7, characterized in that, The clustering module is specifically used for: The gray value of each pixel in the spatial modulation quality image is used as a one-dimensional feature vector to construct a feature vector set, and the K-means clustering algorithm is used to divide the feature vector set into three clusters. Initialize three cluster centers, and iterate by alternately performing cluster allocation and cluster center update operations until the convergence condition is met; Based on the gray values of each cluster center after convergence, semantic mapping rules are established, and each pixel in the spatial modulation quality map is marked as an interference region, a non-interference region, and a background region, respectively.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, When the processor executes the computer program, it implements the method for obtaining the interference original aperture and shear amount of any aperture as described in any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for obtaining the interference original aperture and shear amount of any aperture as described in any one of claims 1 to 6.