Optical surface three-dimensional data and two-dimensional mask pattern conversion device and method, electronic equipment, storage medium

By using a device and method for converting 3D optical surface data to 2D mask images, the problems of poor design consistency and long verification cycle in optical texture preparation are solved. This achieves accurate digital conversion from 3D optical effects to 2D mask images, improving design efficiency and accuracy.

CN122175771APending Publication Date: 2026-06-09LENS TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LENS TECHNOLOGY CO LTD
Filing Date
2026-02-04
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In existing technologies, the preparation of optical textures or functional patterns relies on manual design and lacks a precise mathematical mapping from 3D optical imaging effects to 2D photomask patterns. This results in poor consistency and low predictability of design results, a lengthy and costly design verification cycle, and difficulty in reverse-engineering 2D photomask patterns.

Method used

A device and method for converting three-dimensional optical surface data to two-dimensional mask images are proposed. Through a data acquisition module, a grayscale conversion module, a layering module, a feature region determination module, and a segmentation map generation module, a precise mapping from three-dimensional data to two-dimensional mask images is achieved. This includes meshing processing, layered binarization, PSE algorithm feature extraction, and spatial polygon segmentation map generation.

Benefits of technology

It achieves precise digital conversion from 3D optical effects to 2D mask images, eliminating the need for manual trial and error and physical verification, significantly shortening the design cycle, reducing material waste, adapting to complex textures and customized needs, and promoting the digital and efficient upgrading of etching processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122175771A_ABST
    Figure CN122175771A_ABST
Patent Text Reader

Abstract

This invention relates to the field of glass etching technology, and discloses a device and method for converting three-dimensional data of an optical surface to a two-dimensional mask image, an electronic device, and a storage medium. The device includes a data acquisition module that acquires three-dimensional optical imaging data of a target optical surface, where multiple closed polygonal regions are preset; a grayscale conversion module that converts the data into a two-dimensional grayscale image; a layering module that generates independent kernel regions through layered binarization; a feature region determination module that obtains non-overlapping feature regions and geometric feature points through a progressive scaling algorithm; a segmentation map generation module that generates a spatial polygon segmentation map based on the feature points; and a mask image output module that processes the data to generate a two-dimensional mask image. This device establishes a precise mapping between 3D optical imaging effects and 2D mask images, replacing manual experience-based design, eliminating the physical verification step, shortening the design cycle, reducing material waste, adapting to customized needs, and promoting the digital and efficient upgrading of etching processes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of glass etching technology, specifically to a device and method for converting three-dimensional data of an optical surface to a two-dimensional mask image, an electronic device, and a storage medium. Background Technology

[0002] In the manufacturing of precision devices such as glass and semiconductors, the preparation of optical textures or functional patterns is highly dependent on the precise design of two-dimensional masks. Their quality directly determines the optical performance, structural accuracy, and functional reliability of the final product. Traditional two-dimensional mask design often adopts a "forward design" approach: first, a two-dimensional preset pattern is generated manually or by software; after optical proximity effect correction, a photomask is fabricated; and then a three-dimensional structure is formed on the substrate through processes such as exposure and etching.

[0003] In traditional etching processes, the design of the 2D mask pattern is a crucial preliminary step that determines the final 3D surface effect. Currently, the industry standard is to rely on engineers' experience in manually designing and iterating based on the desired visual effect (3D optical imaging effect). The standard procedure typically involves engineers creating an initial 2D mask pattern based on their experience, then fabricating a physical mask, and verifying the optical effect of the resulting sample against expectations through actual etching tests. If the effect is unsatisfactory, the 2D drawing must be revised, and the cycle of "mask fabrication-etching-verification" must be repeated until a satisfactory result is achieved.

[0004] The existing technical method has the following main drawbacks:

[0005] First, there is a lack of precise and quantifiable mathematical mapping between 3D optical imaging effects and 2D photomask patterns. The design process relies heavily on personal experience, resulting in poor consistency and predictability of design results, making it difficult to accurately reproduce complex or customized optical effects.

[0006] Secondly, the design verification cycle is lengthy and costly. Each design iteration must be completed through the fabrication of a physical photomask and actual etching experiments, which significantly prolongs the development cycle and results in a huge waste of materials and time.

[0007] Finally, this method lacks reverse engineering capabilities. When faced with an existing, high-quality etched sample, current technology struggles to efficiently and accurately reverse engineer its original 2D mask pattern, limiting the accumulation of process knowledge and rapid replication development.

[0008] Therefore, there is an urgent need for a technical solution that can establish a deterministic correlation between 3D optical effects and 2D photomask images, realize digital forward prediction and reverse generation, thereby significantly improving design efficiency and accuracy. Summary of the Invention

[0009] To address the problem of establishing a precise mathematical mapping relationship between 3D optical imaging effects and 2D photomask drawings, this invention provides a device and method for converting 3D optical surface data into 2D photomask images, an electronic device, and a storage medium. This enables the automatic reverse generation of 2D photomask drawings from a target 3D effect, replacing experience-based manual design and significantly shortening the design cycle.

[0010] In a first aspect, the present invention provides a device for converting three-dimensional data of an optical surface to a two-dimensional mask image, comprising: The data acquisition module is used to acquire three-dimensional optical imaging data of the target optical surface, wherein the target optical surface has multiple pre-defined closed polygonal regions; A grayscale conversion module is used to convert the three-dimensional optical imaging data into a two-dimensional grayscale image; The layering module is used to perform layering processing on the two-dimensional grayscale image to generate multiple independent kernel regions corresponding to the closed polygonal regions. The feature region determination module is used to obtain multiple non-overlapping feature regions based on multiple independent kernel regions through a progressive scaling algorithm, and to determine the geometric feature points of each feature region. The segmentation map generation module is used to generate a spatial polygon segmentation map based on the geometric feature points; The mask output module is used to process the spatial polygon segmentation map to generate a corresponding two-dimensional mask map.

[0011] This invention accurately acquires 3D information of a region containing a pre-defined closed polygon through a data acquisition module, laying the foundation for conversion. Through grayscale conversion, layer processing, PSE algorithm feature extraction, and spatial polygon segmentation map generation, it achieves precise mapping from 3D data to a 2D mask image. This completely eliminates the traditional model that relies on engineer experience for design and requires physical mask verification, saving manual trial and error and physical verification steps, significantly shortening the design cycle and reducing material waste. Simultaneously, it adapts to complex textures and customized needs, enabling rapid iterative optimization through algorithms without the need for separate design, driving the etching process towards digitalization and efficiency, and balancing accuracy and practicality.

[0012] In one optional implementation, the grayscale image conversion module includes: The meshing processing unit is used to perform meshing processing on the X-axis and Y-axis coordinates of the three-dimensional optical imaging data. The mesh size is set according to the accuracy requirements of the target two-dimensional mask image. The coordinate value extraction unit is used to extract the Z-axis coordinate value corresponding to each grid point, and the Z-axis coordinate value reflects the optical surface depth at the corresponding position; The grayscale image acquisition unit is used to normalize all Z-axis coordinate values ​​and map them to grayscale values ​​to form a two-dimensional grayscale image.

[0013] This invention's embodiments utilize a meshing processing unit to flexibly set the mesh size according to the target mask's accuracy, balancing efficiency and precision requirements. The coordinate extraction unit accurately captures the Z-axis coordinates reflecting the optical surface's depth, fully preserving the three-dimensional depth features. The grayscale image acquisition unit transforms depth differences into quantifiable grayscale differences through normalization, ensuring the generated two-dimensional grayscale image accurately maps the original optical surface's depth distribution. This module achieves an orderly transformation of three-dimensional spatial information into two-dimensional planar information, avoiding depth feature loss and providing standardized, distinguishable foundational data for subsequent steps such as layered binarization and kernel extraction, guaranteeing the accuracy of the entire conversion process.

[0014] In one optional implementation, the hierarchical module includes: The mask acquisition unit is used to set a continuously distributed set of thresholds and perform equidistant layered binarization processing on the two-dimensional grayscale image to obtain multiple binarized masks under different thresholds. The initial kernel filtering unit is used to filter out independent white regions with an area not less than a preset minimum area threshold as the initial kernel, starting from the binary mask corresponding to the lowest threshold. A new kernel filtering unit is added to filter the independent white regions that do not overlap with the selected initial kernel regions as new kernels in order of threshold from low to high, until all threshold layers have been processed. The kernel set forming unit is used to combine all the selected kernels with the corresponding binary mask to form a kernel set, wherein each kernel corresponds one-to-one with a closed polygonal region of the target optical surface.

[0015] The layering module provided in this invention accurately generates independent kernel regions corresponding to the target texture through systematic filtering and combination logic. The mask acquisition unit sets a continuous threshold set to achieve refined layering of the grayscale image; the initial kernel filtering unit filters invalid regions using area thresholds to ensure the validity of the initial kernel; the new kernel filtering unit filters non-overlapping regions in threshold order to ensure the independence and integrity of the kernels; the kernel set forming unit combines the kernels with the binary mask to provide complete data for subsequent expansion. This module effectively solves the problems of inaccurate kernel region positioning and overlapping interference in traditional processing. The generated kernels correspond one-to-one with the closed polygonal regions of the target optical surface, providing accurate and pure basic data for feature region determination and improving the accuracy and efficiency of subsequent conversions.

[0016] In one optional implementation, the feature region determination module includes: An initial expansion reference determination unit is used to use the kernel in the lowest threshold binarized mask as the initial expansion reference. An expansion unit is used to expand the kernels to an outer layer of binary mask in order of increasing threshold. If the regions of different kernels come into contact during the expansion process, the expansion stops at the contact boundary. Region partitioning units are used to obtain multiple independent partitioned regions based on the binary mask after all expansions are completed; The feature point determination unit is used to calculate the geometric centroid of each of the independently divided regions and use the coordinates of the geometric centroid as feature points.

[0017] The feature region determination module provided in this invention accurately acquires non-overlapping feature regions and geometric feature points through scientific expansion and filtering logic. The initial expansion benchmark determination unit uses the lowest threshold kernel as a basis to ensure the rationality of the expansion starting point; the expansion unit expands progressively according to the threshold sequence and stops when the boundary is touched, effectively avoiding feature region overlap; the region division unit forms independently divided regions, ensuring the integrity of the feature regions; the feature point determination unit uses the geometric centroid as the feature point to accurately characterize the region position. This module solves the problems of region overlap and inaccurate positioning in traditional feature extraction. The generated feature regions are highly compatible with the target optical surface features, and the feature point positioning is accurate, providing a reliable basis for the generation of spatial polygon segmentation maps and further ensuring the consistency between the 2D mask map and the 3D optical effect.

[0018] In one optional implementation, the segmentation map generation module includes: The feature point merging unit is used to perform spatial distribution verification on all feature points and merge adjacent feature points whose distance is less than the preset minimum spacing. A spatial triangulation construction unit is used to construct a spatial triangulation based on verified feature points. The construction of the spatial triangulation satisfies the minimum interior angle maximization constraint of triangulation. The spatial polygon segmentation map acquisition unit is used to generate a spatial polygon segmentation map covering the entire range of the two-dimensional grayscale image based on a spatial triangulation.

[0019] The segmentation map generation module provided in this embodiment of the invention generates a stable and adaptable spatial polygon segmentation map through feature point optimization and spatial partitioning. The feature point merging unit verifies and merges closely adjacent feature points to avoid segmentation chaos caused by feature point redundancy; the spatial triangulation construction unit constructs a triangulation network based on the minimum interior angle maximization constraint, ensuring the stability and rationality of spatial partitioning and avoiding unreasonable structures such as extremely thin triangles; the spatial polygon segmentation map acquisition unit generates a segmentation map with complete coverage, ensuring that all regions can be effectively segmented. This module achieves an orderly transformation from discrete feature points to regular spatial regions. The generated segmentation map can accurately map the spatial distribution relationship of feature points, providing a standardized and structured intermediate carrier for subsequent two-dimensional mask map generation, facilitating the accurate implementation of 3D-2D mapping.

[0020] In one optional implementation, the spatial triangulation construction unit is specifically used to perform Delaunay triangulation on the verified feature point set to ensure that the circumcircle of any triangle does not contain other feature points. The spatial polygon segmentation map acquisition unit includes: The perpendicular bisector sub-unit is used to draw the perpendicular bisectors of each side of each triangle formed by the subdivision. The output sub-unit of the spatial polygon segmentation map is used to connect the intersections of all perpendicular bisectors to form a closed polygon around each feature point. All closed polygons together constitute the Voronoi diagram, which is the spatial polygon segmentation map.

[0021] The refined design of the segmentation map generation module in this embodiment of the invention further improves the quality and adaptability of the spatial polygon segmentation map. The spatial triangulation construction unit adopts Delaunay triangulation, and through the constraint that "no other feature points are contained within the circumcircle of any triangle," it completely avoids extremely thin triangles, ensuring the stability and uniformity of the triangulation network. The perpendicular bisector sub-unit and the spatial polygon segmentation map output sub-unit work together to generate a Voronoi diagram based on the triangulation network. Each closed polygon surrounds a single feature point, accurately reflecting the spatial range of the feature region. This design ensures that the polygonal structure of the segmentation map highly matches the 3D texture features of the target optical surface, with clear segmentation boundaries and reasonable region division. This provides a high-precision spatial structure foundation for subsequent scaling and generation of a 2D mask map, ensuring that the final mask map accurately replicates the target's 3D optical effect.

[0022] In one optional implementation, the mask image output module includes: The scaling ratio setting unit is used to set the scaling ratio according to the application scenario of the target two-dimensional mask image; The target size conversion unit is used to scale the spatial polygon segmentation map at equal intervals according to the set scaling ratio and convert it to the target size. The 2D mask output unit is used to convert scaled graphic data into a preset industry standard format and output a 2D mask.

[0023] The mask output module of this invention ensures that the generated 2D mask meets the needs of practical applications through flexible adaptation and standardization. The scaling ratio setting unit can flexibly adjust the scaling ratio according to different application scenarios (such as glass etching of different sizes), improving the versatility of the device; the target size conversion unit scales proportionally and at equal intervals, ensuring that the polygonal structure is not deformed and ensuring accurate matching between the mask and the target size; the 2D mask output unit converts to an industry standard format, which can be directly applied to photolithography processes without additional format conversion, improving deployment efficiency. This module solves the problems of poor size adaptability and format incompatibility of traditional mask images, achieving a seamless connection from spatial polygon segmentation images to practical 2D mask images, further shortening the design cycle and reducing application costs.

[0024] Secondly, embodiments of the present invention provide a method for converting three-dimensional data of an optical surface to a two-dimensional mask image, the method comprising: Acquire three-dimensional optical imaging data of a target optical surface, wherein the target optical surface has multiple pre-defined closed polygonal regions; The three-dimensional optical imaging data is converted into a two-dimensional grayscale image; The two-dimensional grayscale image is layered to generate multiple independent kernel regions corresponding to the closed polygonal regions; Based on multiple independent kernel regions, multiple non-overlapping feature regions are obtained through a progressive scaling algorithm, and the geometric feature points of each feature region are determined. A spatial polygon segmentation map is generated based on the geometric feature points; The spatial polygon segmentation map is processed to generate a corresponding two-dimensional mask map.

[0025] The method provided in this invention achieves efficient and accurate conversion from 3D optical data to 2D mask images through standardized steps. From acquiring 3D data containing a preset closed polygon region, to converting it into a grayscale image, generating independent kernels layer by layer, extracting feature points using the PSE algorithm, generating a spatial polygon segmentation map, and finally outputting the 2D mask image, each step is progressive and logically rigorous. This method establishes a precise mathematical mapping between 3D optical imaging effects and 2D mask images, replacing experience-based manual design, eliminating the need for physical verification, significantly shortening the design cycle, and reducing material waste. Furthermore, the method is adaptable to complex textures and customized needs, and can be rapidly iterated and optimized through algorithms, driving the etching process towards digitalization and efficiency. It is applicable to glass etching scenarios in multiple fields such as architectural decoration and electronic displays.

[0026] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the conversion method of optical surface three-dimensional data and two-dimensional mask image described in the second aspect above.

[0027] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the method for converting three-dimensional optical surface data to a two-dimensional mask image as described in the second aspect above. Attached Figure Description

[0028] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0029] Figure 1 This is a structural block diagram illustrating the conversion between three-dimensional optical surface data and two-dimensional mask images according to an embodiment of the present invention. Figure 2 This is a structural block diagram illustrating the conversion between three-dimensional optical surface data and a two-dimensional mask image according to another embodiment of the present invention; Figure 3 This is a schematic diagram of 3D optical imaging data according to an embodiment of the present invention; Figure 4 A grayscale image is formed by vertical projection according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the gridded XY axes and the corresponding Z-axis values ​​according to an embodiment of the present invention; Figure 6 This is a schematic diagram illustrating the effect of isometric layered binarization processing according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the process of forming a kernel by isometric layered binarization processing according to an embodiment of the present invention; Figure 8 This is a schematic diagram of a kernel obtained by partitioning and binarization according to an embodiment of the present invention; Figure 9 This is a schematic diagram of region information obtained based on the PSE algorithm and kernel according to an embodiment of the present invention; Figure 10 This is a schematic diagram of the centroid of each region obtained by screening the area of ​​the region according to an embodiment of the present invention. Figure 11This is a schematic diagram of the formation of the Delaunay triangulation according to an embodiment of the present invention; Figure 12 According to the Delaunay triangulation conditions of the present invention, the left side meets the conditions, while the right side does not. Figure 13 This is a schematic diagram of forming a Voronoi diagram according to an embodiment of the present invention; Figure 14 This is a schematic diagram of a Voronoi diagram formed by perpendicular bisectors according to an embodiment of the present invention; Figure 15 This is an example diagram of a 2D photomask drawing obtained by isometric scaling according to an embodiment of the present invention; Figure 16 This is a flowchart illustrating a method for converting three-dimensional optical surface data into a two-dimensional mask image according to an embodiment of the present invention. Figure 17 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0031] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0032] This invention provides an embodiment of a device for converting three-dimensional optical surface data to two-dimensional mask images, such as... Figure 1 As shown, it includes the following functional modules: The data acquisition module 10 is used to acquire three-dimensional optical imaging data of the target optical surface, which has multiple pre-defined closed polygonal regions. Specifically, the three-dimensional optical imaging data acquired by this module is a set of point sequences containing (x, y, z) coordinates [(x1, y1, z1), (x2, y2, z2), ..., (xn, yn, zn)]. This set of 3D points covers three-dimensional spatial coordinate information and is the basis for processing and conversion by all subsequent modules. Its source can be existing, mature 3D optical imaging data or 3D optical imaging data simulated during the design process of 3D optical products. Existing, mature 3D optical imaging data is obtained by measuring optical surfaces such as glass with pre-defined closed polygonal regions etched using a high-precision optical surface measuring instrument. In glass etching processes, complex textures are often composed of multiple independent closed graphics (such as decorative textures on electronic display panels and pattern designs on architectural glass). Pre-defined multiple closed polygonal regions meet the requirements of pattern diversity and regularity in industrial production, while also facilitating batch processing and rapid iterative optimization by algorithms, adapting to customized design needs.

[0033] The grayscale conversion module 20 is used to convert three-dimensional optical imaging data into two-dimensional grayscale images. By converting three-dimensional optical imaging data into two-dimensional grayscale images, this module effectively transforms complex three-dimensional data into simple two-dimensional data, reducing the complexity of data processing, while preserving the key feature information of the target optical surface, laying a good foundation for subsequent layered processing and feature extraction.

[0034] The layering module 30 is used to perform layering processing on the two-dimensional grayscale image, generating multiple independent kernel regions corresponding to the closed polygonal regions. In one example, through equidistant layering binarization processing, the independent kernel regions corresponding to the preset closed polygonal regions of the target optical surface can be accurately extracted, achieving precise separation and positioning of target features, and providing accurate basic data for the subsequent determination of feature regions. The threshold for equidistant layering can be flexibly adjusted according to actual conditions, making the module highly adaptable and able to meet the data processing needs of different types and characteristics of optical surfaces, thus improving the versatility of the device.

[0035] The feature region determination module 40 is used to obtain multiple non-overlapping feature regions based on multiple independent kernel regions through a progressive scaling algorithm, and to determine the geometric feature points of each feature region.

[0036] Specifically, based on multiple independent kernel regions obtained through layered processing, each kernel is first labeled with a unique serial number. Then, according to a preset threshold from low to high, the kernels are progressively expanded using the binarized masks of each layer as bounding boxes. If the expansion boundaries of two kernels intersect, the expansion in that direction is stopped to avoid region overlap. Afterward, invalid regions with too small an area are filtered out, and finally multiple non-overlapping feature regions are obtained. The geometric centroid of each region is calculated as a geometric feature point.

[0037] By using a progressive expansion logic, we ensure that feature regions do not interfere with each other and have clear boundaries, effectively solving the problems of region overlap and chaotic segmentation in traditional feature extraction. Filtering out invalid regions improves the effectiveness of feature regions. Using the centroid as a feature point can accurately represent the spatial location of the region, providing a reliable basis for the subsequent generation of spatial polygon segmentation maps.

[0038] The segmentation map generation module 50 is used to generate a spatial polygon segmentation map based on the geometric feature points.

[0039] In one example, the specific processing flow is as follows: First, Delaunay triangulation is performed on all geometric centroids. This triangulation method divides the point set into triangles, and the circumcircle of any triangle does not contain other centroids, effectively avoiding the occurrence of extremely thin triangles and improving the stability of the spatial structure. Next, for each triangle formed by the Delaunay triangulation, the perpendicular bisectors of each side are drawn. These perpendicular bisectors intersect at the circumcenter of the triangle. Connecting all the perpendicular bisectors together ultimately forms a polygonal structure that divides the entire spatial region, namely the Voronoi diagram (Thieson polygon). This Voronoi diagram is the required spatial polygon segmentation diagram.

[0040] The mask output module 60 is used to process the spatial polygon segmentation map and generate the corresponding two-dimensional mask map.

[0041] In one example, by using equidistant scaling and proportional conversion, the spatial polygon segmentation map is accurately converted into a 2D mask map that meets the requirements of the etching process. This achieves a precise mapping from 3D optical imaging effects to 2D mask maps, replacing the traditional manual design method that relies on engineers' experience. The generated 2D mask map can be directly applied to the etching process without additional adjustments and verification, greatly shortening the design cycle, reducing material waste, and meeting customized and personalized design needs, thereby improving the efficiency and quality of the etching process.

[0042] Compared to traditional methods that rely on engineers' experience for design and require physical photomask verification, the optical surface 3D data to 2D mask conversion device provided in this invention constructs a precise conversion system for 3D optical imaging data and 2D mask images, offering significant advantages. The data acquisition module accurately collects 3D information containing preset closed polygon regions, laying the foundation for conversion. Through key steps such as grayscale conversion, layer processing, and PSE algorithm, independent kernel regions and geometric feature points are efficiently extracted. Then, through Delaunay triangulation and Voronoi diagram generation, the stability and rationality of the segmentation image are ensured. The device completely eliminates the traditional model that relies on engineers' experience for design and requires physical photomask verification, enabling automatic reverse engineering of 2D mask images from 3D effects. This eliminates manual trial and error and physical verification, significantly shortening the design cycle and reducing material waste. Simultaneously, it adapts to complex textures and customized needs, and can be rapidly iterated and optimized through algorithms, driving the etching process towards digitalization and efficiency, balancing accuracy and practicality.

[0043] In an alternative embodiment, such as Figure 2 As shown, the grayscale image conversion module 20 described above includes: The meshing unit 21 is used to mesh the X-axis and Y-axis coordinates of the 3D optical imaging data. The mesh size is set according to the accuracy requirements of the target 2D mask image. The loaded 3D optical imaging data is a sequence of (x,y,z) coordinate points [(x1,y1,z1),(x2,y2,z2),(x3,y3,z3),...,(xn,yn,zn)], represented as a set of 3D points, and the effect presented is as follows. Figure 3 As shown.

[0044] The coordinate value extraction unit 22 is used to extract the Z-axis coordinate value corresponding to each grid point. The Z-axis coordinate value reflects the optical surface depth at the corresponding position. Specifically, the Z-axis coordinate value directly corresponds to the depth information of each grid position on the optical surface, completely preserving the three-dimensional features of the target surface such as undulations and texture layers, ensuring that key depth information is not lost in subsequent conversions.

[0045] The grayscale image acquisition unit 23 is used to normalize all Z-axis coordinate values ​​and map them to grayscale values ​​to form a two-dimensional grayscale image.

[0046] Specifically, in this embodiment of the invention, the X-axis and Y-axis data are meshed based on 3D optical imaging data, and vertical projection is performed downwards according to the Z-axis to form a structure as shown below. Figure 4 The grayscale image shown is obtained by meshing the X and Y axes as follows: Figure 5 The gridded coordinate points are shown, and the corresponding Z values ​​of the ZY axis grid points are taken. The logic of the maximum and minimum value normalization of the Z values ​​is shown in formula (1).

[0047] (1) In an optional embodiment, the layered module 30 described above, such as Figure 2 As shown, it includes: The mask acquisition unit 31 is used to set a continuously distributed set of thresholds and perform equidistant layered binarization processing on the two-dimensional grayscale image to obtain multiple binarized masks under different thresholds. This unit achieves fine-grained layering of the grayscale image by setting a continuous set of thresholds.

[0048] The initial kernel filtering unit 32 is used to filter out independent white regions with an area not less than a preset minimum area threshold from the binary mask corresponding to the lowest threshold as the initial kernel. The initial kernel filtering unit filters invalid regions by using the area threshold to ensure the validity of the initial kernel.

[0049] A new kernel filtering unit 33 is added to filter the independent white regions that do not overlap with the selected initial kernel regions as new kernels in order of increasing threshold values, until all threshold layers have been processed.

[0050] The kernel set forming unit 34 is used to combine all the selected kernels with the corresponding binary masks to form a kernel set, with each kernel corresponding one-to-one with a closed polygonal region of the target optical surface. A new kernel filtering unit filters non-overlapping regions in threshold order to ensure the independence and integrity of the kernels; the kernel set forming unit combines the kernels with the binary masks to provide complete data for subsequent expansion.

[0051] The layered module provided in this embodiment of the invention accurately generates independent kernel regions corresponding to the target texture through systematic filtering and combination logic. This effectively solves the problems of inaccurate kernel region positioning and overlapping interference in traditional processing. The generated kernels correspond one-to-one with the closed polygonal regions of the target optical surface, providing accurate and pure basic data for feature region determination and improving the accuracy and efficiency of subsequent conversions.

[0052] In one example, for the above nz xy Perform equidistant layer binarization to obtain, as follows Figure 6 The layered binarization effect shown (where white represents 1 and black represents 0) is specifically processed according to Formula 2. (2) Here, 1(.) indicates that if x is true, output 1; otherwise, output 0. The threshold set is thresholds={0.00,0.05,0.10,0.15,...,0.90,0.95,1.00}, and the specific values ​​can be adjusted according to the actual situation. Then, based on the threshold th, it processes layer by layer from small to large, selecting independent parts (that do not overlap with the white areas of other already selected Ks) from the white areas in the diagram as new k. All the selected Ks are combined to form a complete kernel. The kernel formation process is as follows. Figure 7 As shown, the kernel formation effect is as follows Figure 8 As shown.

[0054] Furthermore, the kernel and all the masks obtained from the hierarchical binarization process are combined to form kernels (a set of kernels), with the form kernels=[kernel,mask0.00,mask0.05,mask0.10,...,mask1.00].

[0055] In an optional embodiment, the feature region determination module 40, such as Figure 2 As shown, it includes: The initial expansion reference determination unit 41 is used to use the kernel in the lowest threshold binarized mask as the initial expansion reference to ensure the rationality of the expansion starting point.

[0056] The expansion unit 42 is used to expand the kernel to the outermost binary mask in order of increasing threshold. If the regions of different kernels come into contact during the expansion process, the expansion stops at the contact boundary, effectively avoiding feature region overlap.

[0057] Region segmentation unit 43 is used to obtain multiple independent segmented regions based on the binary mask after all expansion is completed, ensuring the integrity of the feature regions.

[0058] The feature point determination unit 44 is used to calculate the geometric centroid of each independently divided region and use the coordinates of the geometric centroid as feature points to accurately represent the region location. This module solves the problems of region overlap and inaccurate positioning in traditional feature extraction.

[0059] The feature region determination module provided in this embodiment of the invention solves the problems of region overlap and inaccurate positioning in traditional feature extraction. The generated feature region is highly compatible with the target optical surface features, and the feature point positioning is accurate, providing a reliable basis for the generation of spatial polygon segmentation map and further ensuring the consistency between the two-dimensional mask map and the 3D optical effect.

[0060] In one example, the Progressive Scale Expansion (PSE) algorithm is used. This algorithm employs a kernel-based progressive scaling logic, specifically: it scales the kernel by increasing the size of each k-k kernel. i Each kernel is assigned a number (1, 2, 3, ...). Then, the next layer mask (here, mask0.00, mask0.05, mask0.10, ...) is selected as the bounding box to expand each kernel until the last mask (here, mask1.00) boundary is reached. If two kernel boundaries intersect, the expansion of the intersecting boundary is stopped to prevent intersections. The result is as follows: Figure 9 The different regions are shown. Then, by filtering the regions whose area > a specified threshold (i.e., removing regions with too small an area), and calculating the centroid of each region that meets the requirements, the final result is as follows: Figure 10 The centroid shown is used as a feature point.

[0061] In an optional embodiment, the segmentation map generation module 50 generates a stable and adaptable spatial polygon segmentation map through feature point optimization and spatial partitioning, specifically including: The feature point merging unit 51 is used to perform spatial distribution verification on all feature points and merge adjacent feature points whose distance is less than the preset minimum spacing, thereby effectively avoiding the division chaos caused by feature point redundancy.

[0062] The spatial triangulation construction unit 52 is used to construct a spatial triangulation based on the verified feature points. The construction of the spatial triangulation satisfies the minimum interior angle maximization constraint of triangulation. Specifically, the spatial triangulation construction unit is used to perform Delaunay triangulation on the verified feature point set to ensure that the circumcircle of any triangle does not contain other feature points. This unit ensures the stability and rationality of spatial partitioning by constructing the triangulation based on the minimum interior angle maximization constraint, avoiding unreasonable structures such as extremely thin triangles.

[0063] In an optional embodiment, the spatial polygon segmentation map acquisition unit 52, as shown in the example... Figure 2 As shown, it includes: a perpendicular bisector subunit 521, used to draw the perpendicular bisectors of each side of each triangle formed by the subdivision; and a spatial polygon segmentation output subunit 522, used to connect the intersections of all perpendicular bisectors to form a closed polygon around each feature point. All closed polygons together constitute a Voronoi diagram, which is the spatial polygon segmentation diagram.

[0064] This invention utilizes a combination of perpendicular bisector sub-units and spatial polygon segmentation map output sub-units to generate a Voronoi diagram based on a triangulation. Each closed polygon surrounds a single feature point, accurately reflecting the spatial extent of the feature region. This design ensures that the polygonal structure of the segmentation map highly matches the 3D texture features of the target optical surface, resulting in clear segmentation boundaries and reasonable region division. This provides a high-precision spatial structure foundation for subsequent scaling and generation of a two-dimensional mask map.

[0065] The spatial polygon segmentation map acquisition unit 53 is used to generate a spatial polygon segmentation map covering the entire range of the two-dimensional grayscale image based on the spatial triangulation, ensuring that all regions can be effectively segmented.

[0066] The entire segmentation map generation module realizes the orderly transformation from discrete feature points to regular spatial regions. The generated segmentation map can accurately map the spatial distribution relationship of feature points, providing a standardized and structured intermediate carrier for the subsequent generation of two-dimensional mask maps, and helping to accurately implement 3D-2D mapping.

[0067] In one example, the centroid is triangulated using Delaunay triangulation to form a shape like... Figure 11 The triangulation results shown are from Delaunay triangulation, a spatial partitioning method that divides a set of points into triangles or tetrahedrons. Its core characteristic is that the circumcircle of any triangle does not contain any other set of points, thus avoiding the formation of extremely thin triangles and improving the stability of the spatial structure. For example... Figure 12 The diagram shows the conditions for Delaunay triangulation. The left side of the diagram meets the requirements, while the right side does not. That is, the circumcircle of the triangle formed on the right side contains other points.

[0068] Furthermore, for each triangle formed by the Delaunay triangulation, the perpendicular bisectors of each side are drawn and compared to the circumcenter. Connecting all these perpendicular bisectors forms a polygonal structure that divides the entire spatial region, thus forming the Voronoi diagram, as shown below. Figure 13 The results are shown. Figure 14 The diagram illustrates the process of forming a Voronoi diagram, which involves drawing perpendicular bisectors along the common sides of adjacent triangles sharing a vertex to form a polygon around the common vertex.

[0069] In an optional embodiment, the mask image output module 60, as... Figure 2 As shown, it includes: The scaling ratio setting unit 61 is used to set the scaling ratio according to the application scenario of the target two-dimensional mask image, thereby improving the versatility of the device.

[0070] The target size conversion unit 62 is used to scale the spatial polygon segmentation image at equal intervals according to the set scaling ratio and convert it to the target size, so as to ensure that the polygon structure is not deformed and to ensure that the mask image and the target size are accurately matched.

[0071] The two-dimensional mask output unit 63 is used to convert the scaled graphic data into a preset industrial standard format and output a two-dimensional mask, which can be directly applied to the photolithography process without additional format conversion, thus improving the efficiency of implementation.

[0072] The mask output module provided in this embodiment of the invention solves the problems of poor size adaptability and format incompatibility of traditional mask images, and realizes the seamless connection from spatial polygon segmentation image to practical two-dimensional mask image, further shortening the design cycle and reducing application cost.

[0073] like Figure 16 The diagram shows a flowchart of a method for converting three-dimensional optical surface data into a two-dimensional mask image according to an embodiment of the present invention. It should be noted that the steps shown in the flowchart can be executed in a computer system, such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that presented here. The process includes the following steps: Step S101: Obtain three-dimensional optical imaging data of the target optical surface, wherein the target optical surface has multiple pre-defined closed polygonal regions.

[0074] Specifically, the three-dimensional optical imaging data of the target optical surface in this embodiment of the invention can be obtained by measuring an optical surface such as glass with a preset closed polygonal region etched by a high-precision optical surface measuring instrument. The obtained three-dimensional optical imaging data is a set of point sequences containing (x,y,z) coordinates [(x1,y1,z1),(x2,y2,z2),...,(xn,yn,zn)]. This set of 3D points covers three-dimensional spatial coordinate information, or it can be data generated by simulation during the design of 3D optical products, which is the basis for processing and conversion of all subsequent modules.

[0075] Step S102: Convert the three-dimensional optical imaging data into a two-dimensional grayscale image.

[0076] This invention converts three-dimensional optical imaging data into two-dimensional grayscale images, effectively transforming complex three-dimensional data into simple two-dimensional data. This reduces the complexity of data processing while preserving key feature information of the target optical surface, laying a solid foundation for subsequent layered processing and feature extraction. For details, please refer to the descriptions of each subunit of the grayscale image conversion module 20; further elaboration is omitted here.

[0077] Step S103: Perform layer processing on the two-dimensional grayscale image to generate multiple independent kernel regions corresponding to the closed polygonal regions.

[0078] In one example, the target optical surface is etched with three pre-defined closed polygonal regions (circle, square, and regular pentagon, respectively). Its 3D optical imaging data, after vertical projection and normalization, forms a structure as shown below. Figure 4 The two-dimensional grayscale image shown has a grayscale value range of 0-255 (corresponding to a normalized Z-axis depth value of 0.00-1.00; the higher the grayscale value, the greater the surface depth).

[0079] A continuous equidistant threshold set `thresholds={0.00,0.05,0.10,...,0.95,1.00}` is defined. Based on this set, a layered binarization process is performed on the 2D grayscale image. The processing rule is: if the normalized Z-value corresponding to the pixel's grayscale value is greater than or equal to the current threshold, then the pixel is marked as white (value 1); otherwise, it is marked as black (value 0). This results in 21 binarized masks (mask0.00 to mask1.00) corresponding to different thresholds. In mask0.00, the white area covers the entire range of the three closed polygon regions (because the threshold is the lowest, all depth regions are recognized). In mask0.50, the white area only covers the core depth regions of the three textures. In mask1.00, the white area only represents the deepest point of the three textures (the pixel with the highest grayscale value).

[0080] Starting with the lowest threshold mask0.00, a preset minimum area threshold (e.g., 50 pixels) is set to filter out independent white regions with an area not less than this threshold. At this point, three non-overlapping independent white regions can be identified, corresponding to the complete outlines of a circle, square, and regular pentagon texture, respectively. These three regions are used as the initial kernels (k1, k2, k3). Subsequent masks are processed sequentially according to the threshold from low to high: 1. When processing mask0.05, the independent regions in the white area that do not overlap with k1, k2, and k3 were filtered out. No regions that met the criteria were found, and no new kernels were added. 2. When processing masks from mask0.10 to mask0.40, the white area of ​​each mask is the shrinkage range of the initial kernel (the depth decreases and the white area shrinks), and no new independent areas are added; 3. When processing mask0.55, in addition to the white area corresponding to the initial kernel, an independent white area with an area of ​​60 pixels was found on the edge of the square texture (because the depth of this area is moderate, it is only identified under this threshold and does not overlap with the initial kernel), and it is used as the new kernel k4. 4. Continue processing subsequent threshold masks until mask1.00 is reached. If no more independent white areas matching the criteria are found, stop the filtering process.

[0081] Furthermore, the selected initial kernels (k1, k2, k3) and the newly added kernel (k4) are combined with all 21 binary masks (mask0.00 to mask1.00) to form a kernel set kernels=[k1,k2,k3,k4,mask0.00,mask0.05,...,mask1.00]. Among them, k1, k2, and k3 correspond one-to-one with the circular, square, and regular pentagonal main textures of the target optical surface, respectively, and k4 corresponds to the auxiliary texture of the square texture edge, achieving precise matching with the preset closed polygon region.

[0082] Step S104: Based on multiple independent kernel regions, multiple non-overlapping feature regions are obtained through a progressive scaling algorithm, and the geometric feature points of each feature region are determined.

[0083] Specifically, this embodiment of the invention uses a Progressive Size Expansion (PSE) algorithm to obtain multiple non-overlapping feature regions and determines the geometric feature points (centroids) of each feature region. The specific implementation process is as follows: First, each independent kernel in the kernel is assigned a unique number. Then, based on each independent kernel, a mask obtained through hierarchical binarization is progressively selected as the bounding box to progressively expand the size of each kernel until the last mask boundary is reached. If the expanded boundaries of two kernels intersect, the expansion of the intersecting boundary is stopped to avoid overlapping feature regions, ultimately resulting in multiple non-overlapping partitioned regions. Subsequently, these partitioned regions are filtered to remove excessively small regions with areas less than a specified threshold. Finally, the centroid of each remaining partitioned region that meets the requirements is calculated; this centroid is the geometric feature point of the corresponding feature region.

[0084] By filtering out excessively small regions, invalid features are avoided from interfering with subsequent processing. At the same time, the determined centroids, as geometric feature points, can accurately represent the location information of the corresponding feature regions, providing accurate feature basis for the generation of spatial polygon segmentation maps.

[0085] Step S105: In this embodiment of the invention, a spatial polygon segmentation map is generated based on geometric feature points.

[0086] Specifically, the centroid is used as a geometric feature point to perform Delaunay triangulation to form a structure like... Figure 11 The triangulation results shown are from Delaunay triangulation, a spatial partitioning method that divides a set of points into triangles or tetrahedrons. Its core characteristic is that the circumcircle of any triangle does not contain any other set of points, thus avoiding the formation of extremely thin triangles and improving the stability of the spatial structure. For example... Figure 12The diagram shows the conditions for Delaunay triangulation. The left side of the diagram meets the requirements, while the right side does not. That is, the circumcircle of the triangle formed on the right side contains other points.

[0087] For each triangle formed by the Delaunay triangulation, draw the perpendicular bisectors of each side and compare them with the circumcenter. Connect all these perpendicular bisectors to form a polygonal structure that divides the entire spatial region, thus forming the Voronoi diagram, as shown below. Figure 13 The results are shown. Figure 14 The diagram illustrates the process of forming a Voronoi diagram, which involves drawing perpendicular bisectors along the common sides of adjacent triangles sharing a vertex to form a polygon around the common vertex.

[0088] Step S106: Process the spatial polygon segmentation image to generate the corresponding two-dimensional mask image.

[0089] Specifically, the generated Voronoi diagram is equidistantly reduced and proportionally converted to the size of a 2D photomask drawing, ultimately obtaining the required 2D photomask drawing data, forming a structure like... Figure 15 The effect shown, in which the target 2D mask image is scaled according to the application scenario, solves the problems of poor size adaptability and format incompatibility of traditional mask images, realizes the seamless connection from spatial polygon segmentation image to practical 2D mask image, further shortens the design cycle and reduces application cost.

[0090] Figure 17 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0091] The following is a detailed reference. Figure 17 This diagram illustrates a suitable structural design for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 1701, which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 1702 or a program loaded from memory 1708 into random access memory (RAM) 1703. RAM 1703 also stores various programs and data required for the operation of the electronic device. The processor 1701, ROM 1702, and RAM 1703 are interconnected via bus 1704. Input / output (I / O) interface 1705 is also connected to bus 17017.

[0092] Typically, the following devices can be connected to I / O interface 1705: input devices 1706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 1707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 1708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1709. Communication device 1709 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 17 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0093] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 1709, or installed from a memory 1708, or installed from a ROM 1702. When the computer program is executed by the processor 1701, it performs the functions defined in the method for converting three-dimensional optical surface data to two-dimensional mask images according to embodiments of the present invention.

[0094] Figure 17 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0095] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the method for converting three-dimensional optical surface data to a two-dimensional mask image shown in the above embodiments is implemented.

[0096] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0097] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A device for converting three-dimensional optical surface data to a two-dimensional mask image, characterized in that, include: The data acquisition module is used to acquire three-dimensional optical imaging data of the target optical surface, wherein the target optical surface has multiple pre-defined closed polygonal regions; A grayscale conversion module is used to convert the three-dimensional optical imaging data into a two-dimensional grayscale image; The layering module is used to perform layering processing on the two-dimensional grayscale image to generate multiple independent kernel regions corresponding to the closed polygonal regions. The feature region determination module is used to obtain multiple non-overlapping feature regions based on multiple independent kernel regions through a progressive scaling algorithm, and to determine the geometric feature points of each feature region. The segmentation map generation module is used to generate a spatial polygon segmentation map based on the geometric feature points; The mask output module is used to process the spatial polygon segmentation map to generate a corresponding two-dimensional mask map.

2. The apparatus according to claim 1, characterized in that, The grayscale conversion module includes: The meshing processing unit is used to perform meshing processing on the X-axis and Y-axis coordinates of the three-dimensional optical imaging data. The mesh size is set according to the accuracy requirements of the target two-dimensional mask image. The coordinate value extraction unit is used to extract the Z-axis coordinate value corresponding to each grid point, and the Z-axis coordinate value reflects the optical surface depth at the corresponding position; The grayscale image acquisition unit is used to normalize all Z-axis coordinate values ​​and map them to grayscale values ​​to form a two-dimensional grayscale image.

3. The apparatus according to claim 2, characterized in that, The hierarchical module includes: The mask acquisition unit is used to set a continuously distributed set of thresholds and perform equidistant layered binarization processing on the two-dimensional grayscale image to obtain multiple binarized masks under different thresholds. The initial kernel filtering unit is used to filter out independent white regions with an area not less than a preset minimum area threshold as the initial kernel, starting from the binary mask corresponding to the lowest threshold. A new kernel filtering unit is added to filter the independent white regions that do not overlap with the selected initial kernel regions as new kernels in order of threshold from low to high, until all threshold layers have been processed. The kernel set forming unit is used to combine all the selected kernels with the corresponding binary mask to form a kernel set, wherein each kernel corresponds one-to-one with a closed polygonal region of the target optical surface.

4. The apparatus according to claim 3, characterized in that, The feature region determination module includes: An initial expansion reference determination unit is used to use the kernel in the lowest threshold binarized mask as the initial expansion reference. An expansion unit is used to expand the kernels to an outer layer of binary mask in order of increasing threshold. If the regions of different kernels come into contact during the expansion process, the expansion stops at the contact boundary. Region partitioning units are used to obtain multiple independent partitioned regions based on the binary mask after all expansions are completed; The feature point determination unit is used to calculate the geometric centroid of each of the independently divided regions and use the coordinates of the geometric centroid as feature points.

5. The apparatus according to claim 1, characterized in that, The segmentation map generation module includes: The feature point merging unit is used to perform spatial distribution verification on all feature points and merge adjacent feature points whose distance is less than the preset minimum spacing. A spatial triangulation construction unit is used to construct a spatial triangulation based on verified feature points. The construction of the spatial triangulation satisfies the minimum interior angle maximization constraint of triangulation. The spatial polygon segmentation map acquisition unit is used to generate a spatial polygon segmentation map covering the entire range of the two-dimensional grayscale image based on a spatial triangulation.

6. The apparatus according to claim 5, characterized in that, The spatial triangulation construction unit is specifically used to perform Delaunay triangulation on the verified feature point set to ensure that the circumcircle of any triangle does not contain other feature points. The spatial polygon segmentation map acquisition unit includes: The perpendicular bisector sub-unit is used to draw the perpendicular bisectors of each side of each triangle formed by the subdivision. The output sub-unit of the spatial polygon segmentation map is used to connect the intersections of all perpendicular bisectors to form a closed polygon around each feature point. All closed polygons together constitute the Voronoi diagram, which is the spatial polygon segmentation map.

7. The apparatus according to claim 1, characterized in that, The mask output module includes: The scaling ratio setting unit is used to set the scaling ratio according to the application scenario of the target two-dimensional mask image; The target size conversion unit is used to scale the spatial polygon segmentation map at equal intervals according to the set scaling ratio and convert it to the target size. The 2D mask output unit is used to convert scaled graphic data into a preset industry standard format and output a 2D mask.

8. A method for converting three-dimensional optical surface data to a two-dimensional mask image, characterized in that, The method includes: Acquire three-dimensional optical imaging data of a target optical surface, wherein the target optical surface has multiple pre-defined closed polygonal regions; The three-dimensional optical imaging data is converted into a two-dimensional grayscale image; The two-dimensional grayscale image is layered to generate multiple independent kernel regions corresponding to the closed polygonal regions; Based on multiple independent kernel regions, multiple non-overlapping feature regions are obtained through a progressive scaling algorithm, and the geometric feature points of each feature region are determined. A spatial polygon segmentation map is generated based on the geometric feature points; The spatial polygon segmentation map is processed to generate a corresponding two-dimensional mask map.

9. An electronic device, characterized in that, include: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes these computer instructions to perform the method for converting three-dimensional optical surface data to a two-dimensional mask image as described in claim 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to execute the method for converting three-dimensional optical surface data to a two-dimensional mask image as described in claim 8.