Image conversion method and device, computer storage medium and program product
By traversing the pixel points in the target binarized image during the image conversion process, determining and extracting the edge contour coordinates of the target pixel points on the edge contour of the graph, the problems of low accuracy and low efficiency of image conversion in the prior art are solved. Efficient and accurate image conversion is achieved.
Patent Information
- Application Number
- CN202411497465.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2044-10-24
AI Technical Summary
When converting images into GDS/OASIS layouts, the prior art has problems such as low conversion accuracy, poor stability and low conversion efficiency, which are difficult to apply to mature graphics optimization processes.
By obtaining the target binarized image, traverse the pixel points in the image based on the binarized assignment information of the pixel points, determine the target pixel points on the edge contour of the graphics, and extract its edge contour coordinates, and finally convert the image into the corresponding layout .
It realizes more efficient and accurate image conversion, improves overall image conversion efficiency, improves algorithm performance and accuracy, and is suitable for mature graphics optimization processes.
Smart Images

Figure CN119494890A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of semiconductor technology, and in particular, relates to an image conversion method, device, computer storage medium and program product. Background Art
[0002] In the OPC (Optical Proximity Correction) algorithm, the optimization algorithm based on graphics often has a higher degree of freedom and accuracy, and has a strong effect on improving the OPC effect. It is widely used in OPC models, graphics-based optimization, and ILT (Inverse Lithography Technology). In this process, the mutual conversion between GDS (Graphic Data System) / OASIS (Open Artwork System Interchange Standard) layout and image is a common basic step. A fast, accurate and complete image conversion solution plays a key role in the performance and accuracy of the algorithm. In the current prior art, when converting an image to a GDS / OASIS layout, it is usually through the positioning of pixels on the map, generating a square according to the pixel size for one pixel, and placing it on the GDS / OASIS layout according to the positional relationship, and finally merging the GDS / OASIS to eliminate the edges inside the graphic so that only the outer contour is retained.
[0003] However, the above-mentioned image to GDS / OASIS layout conversion process often has problems such as low conversion accuracy, poor stability and low conversion efficiency, which makes it difficult to be applied to mature graphics optimization processes. Based on this, the industry is still in urgent need of a new image conversion solution to achieve the purpose of fast, accurate and complete conversion between images and layouts. Summary of the invention
[0004] The embodiments of the present application provide an image conversion method, device, computer storage medium and program product, which can realize image conversion more efficiently and accurately, thereby effectively improving the overall image conversion efficiency and improving the algorithm performance and accuracy.
[0005] In a first aspect, an embodiment of the present application provides an image conversion method, the image conversion method comprising:
[0006] Obtain a target binary image, where the target binary image includes N closed figures, where N is a positive integer;
[0007] According to the binary value assignment information of the pixel points in the target binary image, by traversing the pixel points in the target binary image in sequence, each target pixel point located on the edge contour of the target closed figure is determined, and the target closed figure is any closed figure among the N closed figures whose edge contour coordinates have not been extracted;
[0008] Based on each target pixel point, edge contour coordinates corresponding to the target closed figure are extracted until edge contour coordinates of N closed figures are obtained;
[0009] Based on the edge contour coordinates of N closed figures, the target binary image is converted into the corresponding target layout.
[0010] In some possible implementations, according to the binary value assignment information of the pixel points in the target binary image, by sequentially traversing the pixel points in the target binary image, each target pixel point located on the edge contour of the target closed figure is determined, including:
[0011] According to the binary value assignment information of the pixel points in the target binary image, the first target pixel point located on the edge contour of the target closed figure is determined by traversing the pixel points in the target binary image in sequence;
[0012] Repeat the steps of determining the next target pixel point based on the local edge contour of the target closed figure under the target pixel point and the binary assignment information of at least part of the surrounding pixels corresponding to the target pixel point; and updating the target pixel point to the next target pixel point until each target pixel point located on the edge contour of the target closed figure is determined.
[0013] In some possible implementations, the binary assignment information of the pixel points in the target binary image includes the pixel points being assigned a first value or the pixel points being assigned a second value, the first assignment indicating that the pixel points are located in a graphic area, and the second assignment indicating that the pixel points are located in a non-graphic area; according to the binary assignment information of the pixel points in the target binary image, by sequentially traversing the pixel points in the target binary image, determining the first target pixel point located on the graphic edge contour of the target closed graphic, including:
[0014] The pixels in the target binary image are traversed in sequence, and the binary assignment information of the currently traversed pixel and the binary assignment information of the corresponding plurality of adjacent pixels are detected;
[0015] When the pixel point currently traversed is the first assigned value, and there are both pixel points with the first assigned value and pixel points with the second assigned value among multiple adjacent pixel points, the pixel point currently traversed is determined as the first target pixel point located on the edge contour of the target closed figure.
[0016] In some possible implementations, before updating the target pixel point to the next target pixel point, the image conversion method further includes:
[0017] Add the coordinate extraction validation mark corresponding to the target pixel point;
[0018] After each target pixel point located on the edge contour of the target closed figure is determined, the image conversion method further includes:
[0019] Continue to determine the first target pixel point located on the edge contour of the next target closed figure according to the binary assignment information of the pixel points in the target binary image by traversing the pixel points in the target binary image in sequence. The target pixel point is a target pixel point for which there is no corresponding coordinate extraction effective mark.
[0020] In some possible implementations, determining the next target pixel point based on the local edge contour of the target closed figure under the target pixel point and the binary assignment information of at least part of the surrounding pixels corresponding to the target pixel point includes:
[0021] Based on the binary value assignment information of multiple adjacent pixels of the target pixel, a local edge contour of the target closed figure under the target pixel is determined;
[0022] Based on the local edge contour of the target closed figure under the target pixel point and the binary assignment information of at least some of the surrounding pixels corresponding to the target pixel point, the next target pixel point is determined from at least some of the surrounding pixels corresponding to the target pixel point according to the preset contour search direction.
[0023] In some possible implementations, based on each target pixel point, extracting the edge contour coordinates corresponding to the target closed figure includes:
[0024] The local edge contour coordinates corresponding to each target pixel point are merged to obtain the edge contour coordinates corresponding to the target closed figure. The edge contour coordinates corresponding to the target closed figure are key vertex information of the target closed figure.
[0025] In some possible implementations, the local edge contour coordinates corresponding to each target pixel point are merged to obtain the edge contour coordinates corresponding to the target closed figure, and the edge contour coordinates corresponding to the target closed figure are key vertex information of the target closed figure, including:
[0026] When the next target pixel point is determined, the extracted edge contour coordinates of the target closed figure are merged with the local edge contour coordinates of the next target pixel point to obtain the updated extracted edge contour coordinates of the target closed figure, until each target pixel point located on the figure edge contour of the target closed figure is determined to obtain the edge contour coordinates corresponding to the target closed figure;
[0027] Wherein, when the target pixel point is the first target pixel point determined to be located on the edge contour of the target closed figure, the extracted edge contour coordinates of the target closed figure are the local edge contour coordinates of the target pixel point.
[0028] In some possible implementations, until each target pixel point located on the edge contour of the target closed figure is determined, the process includes:
[0029] Until the contour ending coordinates of the edge contour coordinates corresponding to the target closed figure coincide with the contour starting coordinates, it is determined that all target pixel points located on the figure edge contour of the target closed figure have been determined;
[0030] The contour starting coordinates are: the starting coordinates in the local edge contour coordinates of the first determined target pixel point located on the edge contour of the target closed figure.
[0031] In some possible implementations, before acquiring the target binary image, the image conversion method further includes:
[0032] Based on the original layout, determine the graphic edges of each graphic in the original layout;
[0033] Mapping the graphic edges of each graphic in the original layout to the pixel boundaries in the initial binary image;
[0034] The binary assignment information of the pixel points within the pixel boundary is set as a first assignment, and the binary assignment information of the pixel points outside the pixel boundary is set as a second assignment, to obtain an initial binary image, wherein the first assignment indicates that the pixel points are located in a graphic area, and the second assignment indicates that the pixel points are located in a non-graphic area;
[0035] The initial binary image is subjected to optical proximity effect correction processing to obtain a target binary image.
[0036] In some possible implementations, the initial binary value assignment information of each pixel in the initial binary image is the third value assignment; the binary value assignment information of the pixel within the pixel boundary is set to the first value assignment, and the binary value assignment information of the pixel outside the pixel boundary is set to the second value assignment, to obtain the initial binary image, including:
[0037] Modify the binary value assignment information of the pixel points inside the pixel boundary and adjacent to the pixel boundary from the third assignment to the first assignment, and modify the binary value assignment information of the pixel points outside the pixel boundary and adjacent to the pixel boundary from the third assignment to the second assignment;
[0038] traversing the pixel points whose binarization value assignment information is the third value assignment in the initial binarized image, and in the case that there is a pixel point with the first value assignment among multiple adjacent pixel points of the currently traversed pixel point, modifying the binarization value assignment information of the currently traversed pixel point from the third value assignment to the first value assignment;
[0039] When there is a pixel with the second value among multiple adjacent pixels of the currently traversed pixel, the binarization assignment information of the currently traversed pixel is modified from the third assignment to the second assignment until the traversal of the initial binary image is completed to obtain the initial binary image.
[0040] Based on the same inventive concept, in a second aspect, an embodiment of the present application provides an image conversion device, the image conversion device comprising:
[0041] A first acquisition module is used to acquire a target binary image, wherein the target binary image includes N closed figures, where N is a positive integer;
[0042] A first determination module is used to determine each target pixel point located on the edge contour of a target closed figure by traversing the pixel points in the target binary image in sequence according to the binary value assignment information of the pixel points in the target binary image, wherein the target closed figure is any closed figure among the N closed figures for which the edge contour coordinate extraction has not been completed;
[0043] A first extraction module is used to extract the edge contour coordinates corresponding to the target closed figure based on each target pixel point, until the edge contour coordinates of N closed figures are obtained;
[0044] The first conversion module is used to convert the target binary image into a corresponding target layout based on the edge contour coordinates of N closed figures.
[0045] In a third aspect, an embodiment of the present application provides an image conversion device, the image conversion device comprising:
[0046] a processor and a memory storing computer program instructions;
[0047] When the processor executes the computer program instructions, the image conversion method provided in any one of the above-mentioned embodiments of the present application is implemented.
[0048] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, an image conversion method as provided in any one of the above-mentioned embodiments of the present application is implemented.
[0049] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes an image conversion method provided in any one of the above-mentioned embodiments of the present application.
[0050] The embodiment of the present application provides an image conversion method, device, computer storage medium and program product, which obtains a target binary image containing N closed figures, and then determines each target pixel point located on the edge contour of the target closed figure by traversing the pixel points in the target binary image in sequence according to the binary assignment information of the pixel points in the target binary image; based on each target pixel point, extracts the edge contour coordinates corresponding to the target closed figure, until the pixel points in the target binary image are traversed, and the edge contour coordinates of the N closed figures are obtained. Finally, based on the edge contour coordinates of the N closed figures, the target binary image can be quickly and accurately converted into the corresponding target layout.
[0051] It can be known from the above description that an image conversion method, device, computer storage medium and program product of an embodiment of the present application, in the process of extracting coordinates for image conversion, combines the binary assignment information of pixel points in the target binary image, and determines each target pixel point on the edge contour of the closed figure in the target binary figure through traversal, so as to extract the edge contour coordinates of the corresponding closed figure. In this way, image conversion can be quickly and accurately realized according to the edge contour information, which is conducive to improving the stability of image conversion. In the process of image conversion, the embodiment of the present application only extracts the edge contour coordinates of the closed figure in the target binary image, making the image conversion process more stable and fast, thereby fully improving the overall image conversion efficiency and improving the algorithm performance and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0053] Figure 1 is a flowchart of an image conversion method provided by an embodiment of the present application;
[0054] Figure 2It is a scene flow diagram of an image conversion method provided by an embodiment of the present application;
[0055] Figure 3 is a structural schematic diagram of an image conversion device provided by an embodiment of the present application;
[0056] Figure 4 It is a structural schematic diagram of an image conversion device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0057] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0058] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0059] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0060] As described in the background technology section, currently when converting an image into a GDS / OASIS layout, it is usually done by locating the pixels on the image, generating a square for each pixel according to the pixel size, and placing it on the GDS / OASIS layout based on the positional relationship. Finally, a merge operation is performed on the GDS / OASIS to eliminate the edges inside the graphic so that only the outer contour is retained.
[0061] However, the above-mentioned methods of converting images to GDS / OASIS layouts are often implemented by integrating existing functions with scripts. These functions are usually not designed for graphics optimization, and the operations are rough and difficult to transform back and forth to remain unchanged. After the GDS / OASIS is converted to an image and then converted back to a GDS / OASIS layout, the edges often have many errors, which makes it difficult to apply to mature graphics optimization processes. At the same time, by traversing the pixel grid in the merge operation and checking the surrounding edges in turn, the merge results are iteratively merged. There will be a large number of useless redundant edge calculations for the internal pixels of the graphics that are not the edges of the graphics, and the graphics conversion task cannot be performed efficiently and stably. There are problems such as instability and slow speed in iterative graphics optimization.
[0062] In view of the above, in order to solve the problems of the prior art, the embodiments of the present application provide an image conversion method, device, computer storage medium and program product. It should be noted that the embodiments provided in the present application are not intended to limit the scope of the present application.
[0063] The following first introduces the image conversion method provided in the embodiment of the present application. Figure 1 FIG. 1 is a flow chart of an image conversion method provided by an embodiment of the present application. Figure 1 As shown, the image conversion method includes the following steps:
[0064] S110, obtaining a target binary image, wherein the target binary image includes N closed figures, where N is a positive integer;
[0065] S120, according to the binary value assignment information of the pixel points in the target binary image, by sequentially traversing the pixel points in the target binary image, determining each target pixel point located on the edge contour of the target closed figure, where the target closed figure is any closed figure among the N closed figures for which the edge contour coordinate extraction has not been completed;
[0066] S130, extracting edge contour coordinates corresponding to the target closed figure based on each target pixel point, until edge contour coordinates of N closed figures are obtained;
[0067] S140, based on the edge contour coordinates of the N closed figures, convert the target binary image into a corresponding target layout.
[0068] An image conversion method provided by an embodiment of the present application obtains a target binary image containing N closed figures, and then determines each target pixel point located on the edge contour of the target closed figure by traversing the pixel points in the target binary image in sequence according to the binary value assignment information of the pixel points in the target binary image; based on each target pixel point, the edge contour coordinates corresponding to the target closed figure are extracted until the pixel points in the target binary image are traversed and the edge contour coordinates of the N closed figures are obtained. Finally, based on the edge contour coordinates of the N closed figures, the target binary image can be quickly and accurately converted into the corresponding target layout.
[0069] It can be known from the above description that an image conversion method of an embodiment of the present application, in the process of extracting coordinates for image conversion, combines the binary assignment information of the pixel points in the target binary image, and determines each target pixel point on the edge contour of the closed figure in the target binary figure through traversal, so as to extract the edge contour coordinates of the corresponding closed figure. In this way, the image conversion can be quickly and accurately realized according to the edge contour information, which is conducive to improving the stability of the image conversion. The embodiment of the present application only extracts the edge contour coordinates of the closed figure in the target binary image during the image conversion process, making the image conversion process more stable and fast, thereby fully improving the overall image conversion efficiency and improving the algorithm performance and accuracy.
[0070] The specific implementation of the above steps 110 to 140 is described in detail below.
[0071] In S110, when implemented specifically, a target binary image is obtained, and the target binary image includes N closed graphics. In the semiconductor layout design process, the target binary image can usually be a graphic representation in the layout design, and the closed graphics in the target binary image can correspond to graphic representations of transistors, wires, contact holes, etc., which are not strictly limited here.
[0072] Optionally, in an embodiment of the present application, the target binary image includes a plurality of pixels, and the plurality of pixels are assigned corresponding binary values according to the distribution of a plurality of closed figures in the image. Exemplarily, the binary value assignment information corresponding to the pixel points located in the graphic area is set to 1, and the binary value assignment information corresponding to the pixel points located in the non-graphic area is set to 0.
[0073] In S120, in a specific implementation, according to the binary value assignment information of the pixel points in the target binary image, by sequentially traversing the pixel points in the target binary image, each target pixel point located on the edge contour of the target closed figure is determined, and the target closed figure is any closed figure among the N closed figures whose edge contour coordinates have not been extracted. It should be added that in the target binary image, the smallest closed figure is a pixel point.
[0074] When performing the above traversal, the pixel points in the target binary image may be traversed in sequence by adopting row priority, column priority, spiral traversal or random traversal or the like.
[0075] The binary value assignment information of the above pixel point may be, for example: the pixel point is assigned a first value, or the pixel point is assigned a second value. The first value assignment, for example, 1, indicates that the pixel point is in a graphic area; the second value assignment, for example, 0, indicates that the pixel point is in a non-graphic area.
[0076] Optionally, when determining each target pixel point located on the edge contour of a closed figure during the traversal process according to the binary assignment information of the pixel point in the target binary image, the currently traversed pixel point whose own binary assignment information is the first assignment and which has both the first assigned adjacent pixel point and the second assigned adjacent pixel point can be determined as the target pixel point. In the actual image processing scenario, the adjacent pixel points of the target pixel point usually include at least one pixel point directly contacting the target pixel point in the four directions of the top, bottom, left and right.
[0077] In this embodiment, by traversing the pixel points in the target binary image to determine the target pixel points on the edge contours of the graphics of different closed images, the image data can be effectively operated and analyzed, thereby providing the necessary data support for the subsequent conversion of the target binary image into a layout.
[0078] Optionally, in a feasible embodiment of the present application, in order to more quickly realize the search and confirmation of each target pixel point on the edge contour of the graphic, the above S120, according to the binary assignment information of the pixel points in the target binary image, by sequentially traversing the pixel points in the target binary image, to determine each target pixel point located on the edge contour of the graphic of the target closed graphic, may specifically include:
[0079] According to the binary value assignment information of the pixel points in the target binary image, the first target pixel point located on the edge contour of the target closed figure is determined by traversing the pixel points in the target binary image in sequence;
[0080] Repeat the steps of determining the next target pixel point based on the local edge contour of the target closed figure under the target pixel point and the binary assignment information of at least part of the surrounding pixels corresponding to the target pixel point; and updating the target pixel point to the next target pixel point until each target pixel point located on the edge contour of the target closed figure is determined.
[0081] In this embodiment, after determining the first target pixel point located on the edge contour of the target closed figure whose coordinates have not been extracted based on the binary assignment information of (at least part of) the pixel points in the target binary image, the next target pixel point is determined directly by searching among the surrounding pixel points of the target pixel point by determining the local edge contour corresponding to the target pixel point.
[0082] By analogy, the current target pixel point is updated to the next target pixel point determined, and the above-mentioned step of determining the next target pixel point based on the local edge contour of the target closed figure under the target pixel point and the binary assignment information of at least part of the surrounding pixels corresponding to the target pixel point is repeated for the new target pixel point until all the target pixel points located on the edge contour of the target closed figure are determined.
[0083] In this way, by determining the first target pixel point located on the edge contour of the target closed figure, and then quickly finding the next target pixel point from the surrounding pixels based on the local edge contour corresponding to the current target pixel point, it is possible to quickly and accurately find and confirm each target pixel point in the entire target closed figure, thereby fully improving the efficiency of extracting the edge contour of the closed figure in the target binary image.
[0084] It should be added that in actual image processing scenarios, the surrounding pixels of the above-mentioned target pixel point usually include at least one pixel point adjacent to it in eight directions: above, below, left, right, upper left, lower left, upper right, and lower right (considering the diagonal direction).
[0085] Furthermore, until the target pixel points located on the edge contour of the target closed figure are determined, it can be determined that all the target pixel points on the edge contour of the target closed figure have been found, for example, when the next target pixel point determined coincides with the first target pixel point located on the edge contour of the target closed figure. In this case, the pixel points outside the image edge contour of the target closed figure can be traversed continuously to switch to extracting the edge contour coordinates of the next target closed figure, and no strict limitation is made here.
[0086] Optionally, in a feasible embodiment of the present application, in order to reasonably determine the first target pixel point located on the graphic edge contour of the target closed figure, the binary assignment information of the pixel points in the target binary image may include that the pixel point is assigned a first value or that the pixel point is assigned a second value, the first assignment represents that the pixel point is located in the graphic area, and the second assignment represents that the pixel point is located in the non-graphic area; the above-mentioned determination of the first target pixel point located on the graphic edge contour of the target closed figure by sequentially traversing the pixel points in the target binary image according to the binary assignment information of the pixel points in the target binary image may include:
[0087] The pixels in the target binary image are traversed in sequence, and the binary assignment information of the currently traversed pixel and the binary assignment information of the corresponding plurality of adjacent pixels are detected;
[0088] When the pixel point currently traversed is the first assigned value, and there are both pixel points with the first assigned value and pixel points with the second assigned value among multiple adjacent pixel points, the pixel point currently traversed is determined as the first target pixel point located on the edge contour of the target closed figure.
[0089] In a specific implementation, the currently traversed pixel whose binary value assignment information is the first assignment and has both the first assigned neighboring pixel and the second assigned neighboring pixel is determined as the target pixel. The neighboring pixel of the target pixel generally includes at least one pixel directly contacting the target pixel in the four directions of the top, bottom, left and right.
[0090] For example, taking the first assignment as 1 and the second assignment as 0, the binary assignment information of the target pixel is 1, and the currently traversed pixel has four adjacent pixels in the four directions of up, down, left and right, and the binary assignment information corresponding to the four adjacent pixels in the four directions of up, down, left and right are 0, 0, 0, 1. In this case, it is explained that the boundary between the currently traversed pixel and the adjacent pixel on the right is the edge contour of the graphic, and the currently traversed pixel is determined as the above-mentioned target pixel.
[0091] It should be noted that the number of corresponding adjacent pixels will vary depending on the position of the currently traversed pixel in the target binary image. For example, a pixel located at the center of the target binary image has four adjacent pixels in the upper, lower, left, and right directions; a pixel located at the edge of the target binary image often has only two or three adjacent pixels.
[0092] Optionally, in a feasible embodiment of the present application, considering that in the traversal process, it is necessary to fully ensure that the target closed figure is any closed figure among the N closed figures for which edge contour coordinate extraction has not been completed, so as to effectively improve the efficiency of contour coordinate extraction and avoid redundant calculation and analysis of pixels, before the target pixel point is updated to the next target pixel point, the image conversion method may further include:
[0093] Add the coordinate extraction validation mark corresponding to the target pixel point;
[0094] After each target pixel point located on the edge contour of the target closed figure is determined, the image conversion method may further include:
[0095] Continue to determine the first target pixel point located on the edge contour of the next target closed figure according to the binary assignment information of the pixel points in the target binary image by traversing the pixel points in the target binary image in sequence. The target pixel point is a target pixel point for which there is no corresponding coordinate extraction effective mark.
[0096] The above coordinate extraction validation mark can be identified by, for example, a fixed format field, a digital number or a custom label, etc. The coordinate extraction validation marks of different target pixels can be consistent or have a one-to-one correspondence, and this application does not impose strict restrictions here.
[0097] In a specific implementation, after determining the target pixel point, the target pixel point is marked by adding a coordinate extraction validation mark corresponding to the target pixel point to indicate that the target pixel point has been effectively processed.
[0098] In this way, when traversing the pixels in the target binary image in the future, the current traversed pixel is detected to see whether there is a corresponding coordinate extraction effective mark. If it is detected that there is no coordinate extraction effective mark, the pixel can be specifically analyzed and processed; if it is detected that there is a coordinate extraction effective mark, the pixel is directly skipped and not processed. By adopting this method, it is possible to effectively avoid repeated processing of the pixels that have been searched and analyzed in the traversal stage, which helps to fully improve the efficiency of pixel search.
[0099] It should also be added that in order to speed up the traversal process of pixel points in the target binary image, after determining each target pixel point on the graphic edge contour of the target closed figure, the pixel points inside the target closed figure can be directly bypassed in the subsequent traversal process and no traversal processing is performed, thereby further improving the extraction speed of the graphic edge contour of the closed figure in the target binary image.
[0100] Optionally, in a feasible embodiment of the present application, more specifically, in order to more quickly and effectively determine the next target pixel point according to the target pixel point, the above-mentioned determination of the next target pixel point based on the local edge contour of the target closed figure under the target pixel point and the binary assignment information of at least part of the surrounding pixels corresponding to the target pixel point may include:
[0101] Based on the binary value assignment information of multiple adjacent pixels of the target pixel, a local edge contour of the target closed figure under the target pixel is determined;
[0102] Based on the local edge contour of the target closed figure under the target pixel point and the binary assignment information of at least some of the surrounding pixels corresponding to the target pixel point, the next target pixel point is determined from the multiple surrounding pixels corresponding to the target pixel point according to the preset contour search direction.
[0103] In this embodiment, firstly, the local edge contour corresponding to the target pixel is determined according to the binary assignment information of multiple adjacent pixels of the target pixel. For example, the binary assignment information of the target pixel is 1, and the currently traversed pixel has four adjacent pixels in the four directions of up, down, left and right, and the binary assignment information corresponding to the four adjacent pixels in the four directions of up, down, left and right are 0, 0, 0, 1 respectively. In this case, it is explained that the boundary between the currently traversed pixel and the adjacent pixel on the right is the local edge contour of the target closed figure under the target pixel.
[0104] After determining the local edge contour, the next target pixel is determined in at least part of the surrounding pixels corresponding to the target pixel according to the preset contour search direction (e.g., counterclockwise or clockwise). The preset contour search direction determines the search priority order for the surrounding pixels of the target pixel under the local edge contour, making the search for the next target pixel more orderly and stable. At the same time, the preset contour search direction can also make the next target pixel determined unique through the above search priority order, avoiding search confusion.
[0105] When searching and analyzing surrounding pixel points, in combination with the aforementioned embodiment, the pixel point whose own binary assignment information is first determined from the surrounding pixel points as the first assignment and which simultaneously has adjacent pixel points with the first assignment and adjacent pixel points with the second assignment can be determined as the next target pixel point.
[0106] In consideration of the continuity of the edge contour of the graphic, in order to more quickly determine the next target pixel point, the surrounding pixels in the screening range can be further screened and filtered. Specifically, at least part of the surrounding pixels corresponding to the target pixel point can specifically refer to: surrounding pixels that have intersections with the local edge contour.
[0107] In S130 , when specifically implemented, the edge contour coordinates corresponding to the target closed figure are extracted based on each target pixel point until the edge contour coordinates of N closed figures are obtained.
[0108] In this embodiment, after determining each target pixel point on the target closed figure, the local edge contour coordinates corresponding to the target pixel points are uniformly extracted and summarized to obtain the edge contour coordinates of the target closed figure. Alternatively, the local edge contour coordinates of the target pixel points determined sequentially in the above traversal process may be extracted one by one to finally obtain the edge contour coordinates corresponding to the complete target closed figure.
[0109] Similarly, after the edge contour coordinates corresponding to the target closed figure are extracted, the edge contour coordinates of the next target closed figure are extracted by continuing to traverse to find each target pixel point on the edge contour of the next target closed figure, until the traversal of the pixel points that need to be traversed in the target binary image is completed, and the edge contour coordinates of N closed figures are obtained.
[0110] Optionally, in a feasible embodiment of the present application, in order to more efficiently realize the conversion of the target binary image, the above-mentioned extraction of edge contour coordinates corresponding to the target closed figure based on each target pixel point may include:
[0111] The local edge contour coordinates corresponding to each target pixel point are merged to obtain the edge contour coordinates corresponding to the target closed figure. The edge contour coordinates corresponding to the target closed figure are key vertex information of the target closed figure.
[0112] In specific implementation, the local edge contour coordinates corresponding to each target pixel point can be merged, and only the key vertex information of the target closed figure is retained. The above key vertex information can be the endpoint coordinates of the corners of the closed figure. The merged edge contour coordinates can accurately represent the edge of the figure, which helps to enhance the detail expression of the image, so as to achieve a smoother and more natural transition effect during the conversion process.
[0113] Moreover, when the target binary image is subsequently converted into the target layout using the key vertex information of each closed figure, the execution efficiency of the algorithm can be effectively improved because the amount of data to be processed is more streamlined. This merging strategy can significantly improve the overall conversion efficiency when processing large-scale image data.
[0114] Optionally, in a feasible embodiment of the present application, in combination with the above-mentioned embodiment, the above-mentioned merging process can be integrated into the step-by-step search process of the target pixel point to more efficiently realize the extraction of the edge contour coordinates of the above-mentioned target closed figure. Specifically, the above-mentioned local edge contour coordinates corresponding to each target pixel point are merged to obtain the edge contour coordinates corresponding to the target closed figure. The edge contour coordinates corresponding to the target closed figure are the key vertex information of the target closed figure, which may include:
[0115] When the next target pixel point is determined, the extracted edge contour coordinates of the target closed figure are merged with the local edge contour coordinates of the next target pixel point to obtain the updated extracted edge contour coordinates of the target closed figure, until each target pixel point located on the figure edge contour of the target closed figure is determined to obtain the edge contour coordinates corresponding to the target closed figure;
[0116] Wherein, when the target pixel point is the first target pixel point determined to be located on the edge contour of the target closed figure, the extracted edge contour coordinates of the target closed figure are the local edge contour coordinates of the target pixel point.
[0117] In this embodiment, the local edge contour coordinates of the next target pixel point determined are continuously merged with the extracted edge contour coordinates of the target closed figure, thereby obtaining updated extracted edge contour coordinates.
[0118] Furthermore, when merging, the endpoints of the corners on the existing edge contour of the target closed figure, the contour start coordinates and the contour end coordinates of the existing edge contour can be mainly retained, thereby achieving effective merging and simplification of the edge contour coordinates.
[0119] Optionally, in a feasible embodiment of the present application, in order to more efficiently realize the accurate judgment that each target pixel point on the graphic edge contour of the target closed figure has been extracted, the above-mentioned process until each target pixel point located on the graphic edge contour of the target closed figure is determined may include:
[0120] Until the contour ending coordinates of the edge contour coordinates corresponding to the target closed figure coincide with the contour starting coordinates, it is determined that all target pixel points located on the figure edge contour of the target closed figure have been determined;
[0121] The contour starting coordinates are: the starting coordinates in the local edge contour coordinates of the first determined target pixel point located on the edge contour of the target closed figure.
[0122] Specifically, the judgment is made by comparing the contour ending coordinates and the contour starting coordinates in the extracted edge contour coordinates of the target closed figure. If the contour ending coordinates and the contour starting coordinates coincide, it means that all target pixel points on the edge contour of the target closed figure have been searched; otherwise, the search for the next target pixel point continues.
[0123] In this embodiment, it is not necessary to determine whether all target pixel points on the edge contour of the target closed figure have been searched by judging whether the next target pixel point determined is consistent with the first target pixel point determined. By using the contour start coordinates and contour end coordinates of the extracted edge contour of the target closed figure, the judgment can be made during the current target pixel point analysis process, thereby effectively saving implementation steps and improving algorithm efficiency.
[0124] In S140, when implemented specifically, the target binary image is converted into a corresponding target layout based on the edge contour coordinates of the N closed figures. The target layout may be in a GDS layout file format or an OASIS layout file format, which may be set according to actual image conversion requirements and is not strictly limited here.
[0125] Optionally, in a feasible embodiment of the present application, considering the actual layout design scenario, before acquiring the target binary image, the image conversion method may further include:
[0126] Based on the original layout, determine the graphic edges of each graphic in the original layout;
[0127] Mapping the graphic edges of each graphic in the original layout to the pixel boundaries in the initial binary image;
[0128] The binary assignment information of the pixel points within the pixel boundary is set as a first assignment, and the binary assignment information of the pixel points outside the pixel boundary is set as a second assignment, to obtain an initial binary image, wherein the first assignment indicates that the pixel points are located in a graphic area, and the second assignment indicates that the pixel points are located in a non-graphic area;
[0129] The initial binary image is subjected to optical proximity effect correction processing to obtain a target binary image.
[0130] In specific implementation, the above original layout can be in GDS layout file format or OASIS layout file format. The original layout describes the layout design of the chip or circuit in detail, which can be set according to the actual layout construction requirements and actual construction conditions, and is not strictly limited here. Among them, the layout file formats of the above original layout and the target layout can be consistent to ensure the stability of data during the conversion between the image and the layout.
[0131] In this embodiment, edge detection algorithms, deep learning methods, or scanning electron microscope (SEM) measurements and other feasible means can be used to identify and extract the edges of the graphics in the above-mentioned original layout. The edges of the graphics can be specifically expressed as vertex coordinates of each graphic in the layout, etc., which are not strictly limited here.
[0132] After determining the graphic edges of each graphic in the original layout, the graphic edges of each graphic in the original layout are mapped to pixel boundaries in the initial binary image according to certain size mapping rules, and the properties of the pixel boundaries can be similar to the graphic edge contours of the aforementioned closed graphics.
[0133] Next, in the case where the above-mentioned pixel boundary has been mapped in the initial binary image, the pixel points within the pixel boundary are all set to the first assignment value, such as 1, to indicate that the pixel points are located in the graphic area. And the pixel points outside the pixel boundary are all set to the second assignment value, such as 0, to indicate that the pixel points are located in the non-graphic area. In this way, the process of converting the original layout into the initial binary image is accurately and completely realized.
[0134] Also, considering that graphics-based optimization algorithms often have higher degrees of freedom and precision, after obtaining the initial binary image, the initial binary image can be subjected to OPC correction processing to ultimately obtain the above-mentioned target binary image, thereby being able to effectively optimize the specific layout design content.
[0135] Optionally, in a feasible embodiment of the present application, in order to more efficiently implement the pixel assignment processing inside and outside the pixel boundary, the initial binary assignment information of each pixel in the above initial binary image is the third assignment; the binary assignment information of the pixel points inside the pixel boundary is set to the first assignment, and the binary assignment information of the pixel points outside the pixel boundary is set to the second assignment, to obtain the initial binary image, which may include:
[0136] Modify the binary value assignment information of the pixel points inside the pixel boundary and adjacent to the pixel boundary from the third assignment to the first assignment, and modify the binary value assignment information of the pixel points outside the pixel boundary and adjacent to the pixel boundary from the third assignment to the second assignment;
[0137] traversing the pixel points whose binarization value assignment information is the third value assignment in the initial binarized image, and in the case that there is a pixel point with the first value assignment among multiple adjacent pixel points of the currently traversed pixel point, modifying the binarization value assignment information of the currently traversed pixel point from the third value assignment to the first value assignment;
[0138] When there is a pixel with the second value among multiple adjacent pixels of the currently traversed pixel, the binarization assignment information of the currently traversed pixel is modified from the third assignment to the second assignment until the traversal of the initial binary image is completed to obtain the initial binary image.
[0139] In this embodiment, the initial binary value assignment information of each pixel in the initial binary image defaults to the third assignment. When the original map is converted into the initial binary image, the pixel points on both sides of the inner and outer sides of the pixel boundary are marked respectively, and the inner pixel points adjacent to the pixel boundary are modified to the first assignment, and the outer pixel points adjacent to the pixel boundary are modified to the second assignment. When assigning values on both sides of the pixel boundary, the values can be assigned in sequence according to the agreed preset contour search direction to ensure the orderliness of the pixel point assignment processing.
[0140] In this way, after assigning values around the pixel boundary, the entire initial binary image can be traversed directly to complete the filling of the remaining pixels according to the assignment of the adjacent pixels of the third assigned pixel, thereby converting the above original map into the initial binary image.
[0141] The following is a specific example for explanation: the default value of the pixel in the initial binary image is marked as 2. After the pixel boundary is determined, the pixel next to the inner side of the pixel boundary is marked as 1, and the pixel next to the outer side of the pixel boundary is marked as 0.
[0142] In this case, by traversing the pixels in the entire initial binary image that are still marked as 2, and checking the values of the pixels adjacent to such pixels, we can determine whether the current pixel should be assigned a value of 0 or 1 based on the values of the adjacent pixels in the up, down, left, and right directions. In this way, the binary filling of the pixels in the initial binary image is finally completed.
[0143] In this embodiment, the first or second value is assigned to the adjacent pixel points on both sides of the pixel boundary, and then the entire graphic is traversed and finally the remaining pixel points are assigned and modified according to the adjacent pixel conditions, so that the conversion from the layout to the binary image can be completed more quickly and efficiently.
[0144] In order to facilitate understanding of the image conversion method provided by the above embodiment, the above method is described below using a specific scenario embodiment. Figure 2 A schematic diagram of a scenario implementation flow of an image conversion method provided in one embodiment of the present application.
[0145] The application scenario of this scenario embodiment can be: in the actual layout design optimization scenario, first obtain the original layout to be corrected, and perform binarization conversion on it to obtain the corresponding initial binary image, and then use the image-based optimization algorithm to perform OPC correction on the initial binary image to obtain the target binary image. Next, the target binary image needs to be quickly, accurately and completely converted into the target layout for subsequent layout operations.
[0146] This scenario embodiment will specifically describe the conversion process of the target binary image to the target layout in detail, and the scenario embodiment specifically includes the following steps:
[0147] Step 1: Sequentially traverse the pixel points in the target binary image until a target pixel point located on the edge contour of a closed figure is found, the target pixel point itself is the first assigned value, and it has both adjacent pixel points of the first assigned value and adjacent pixel points of the second assigned value.
[0148] Step 2: Extract the local edge contour of the target pixel point, and determine the local edge contour coordinates corresponding to the target pixel point according to the local edge contour.
[0149] Step 3: Combine Figure 2 As shown, along the local edge contour and the preset contour search direction, the next target pixel point is found from at least a part of the surrounding pixel points corresponding to the target pixel point, the local edge contour coordinates of the next target pixel point are extracted and merged with the extracted edge contour coordinates of the current closed figure, and the extracted pixel points are marked.
[0150] Step 4: Repeat step 3 until each target pixel point on the edge contour of the current closed figure is determined, and the edge contour coordinates of the current closed figure are extracted.
[0151] Step 5: Continue to traverse the pixel points in the target binary image, and skip the pixel points outside the edge contour of the figure, inside the edge contour of the figure, and the pixel points that have been extracted and have marks, until the target pixel point on the edge contour of the next closed figure that has not been extracted is found, and repeat steps 2 to 4.
[0152] Step 6: Repeat step 5 until the edge contour coordinates of each closed figure in the target binary image have been extracted, and the edge contour coordinates of each closed figure are obtained. It should be added that through the coordinate merging operation in step 3, the edge contour coordinates of the closed figure are actually the key vertex information of the simplified closed figure.
[0153] Step 7: According to the edge contour coordinates of each closed figure, the target binary image is converted into a target layout, and the target layout can be a GDS / OASIS layout.
[0154] This scenario embodiment directly extracts and transforms the edge coordinates of the binary image by extracting along the edge of the graphic, and realizes accurate, complete and high-speed conversion between the binary graphic and the layout file. This solution is designed for the graphics-based optimization process, which can accurately and completely realize the conversion between various situations, and can achieve the stability of the reciprocating transformation, laying the foundation for accurate iterative optimization based on the graph.
[0155] At the same time, in the coordinate extraction process of converting the binary image into a map in this scenario embodiment, the extraction calculation is performed along the edge of the graphic, eliminating unnecessary calculation and analysis of the center pixel points of the graphic in the traditional merge method, and also making the image conversion process more stable and faster, thereby fully improving the overall image conversion efficiency, as well as improving the algorithm performance and accuracy.
[0156] Based on the image conversion method provided in the above embodiment, out of the same inventive concept, the present application also provides an image conversion device corresponding to the above image conversion method. Figure 3 The image conversion device is introduced in detail.
[0157] Figure 3 A schematic diagram of the structure of an image conversion device provided in one embodiment of the present application is shown. Figure 3 The image conversion device 300 shown comprises:
[0158] A first acquisition module 310 is used to acquire a target binary image, where the target binary image includes N closed figures, where N is a positive integer;
[0159] The first determination module 320 is used to determine each target pixel point located on the edge contour of a target closed figure by traversing the pixel points in the target binary image in sequence according to the binary value assignment information of the pixel points in the target binary image, where the target closed figure is any closed figure among the N closed figures for which the edge contour coordinate extraction has not been completed;
[0160] The first extraction module 330 is used to extract the edge contour coordinates corresponding to the target closed figure based on each target pixel point, until the pixel points in the target binary image are traversed to obtain the edge contour coordinates of N closed figures;
[0161] The first conversion module 340 is used to convert the target binary image into a corresponding target layout based on the edge contour coordinates of the N closed figures.
[0162] An image conversion device provided by an embodiment of the present application obtains a target binary image containing N closed figures by setting corresponding functional modules, and then determines each target pixel point located on the edge contour of the target closed figure by traversing the pixel points in the target binary image in sequence according to the binary value assignment information of the pixel points in the target binary image; based on each target pixel point, the edge contour coordinates corresponding to the target closed figure are extracted until the pixel points in the target binary image are traversed and the edge contour coordinates of the N closed figures are obtained. Finally, based on the edge contour coordinates of the N closed figures, the target binary image can be quickly and accurately converted into the corresponding target layout.
[0163] It can be known from the above description that an image conversion device of an embodiment of the present application, in the process of extracting coordinates for image conversion, combines the binary assignment information of the pixel points in the target binary image, and determines each target pixel point on the edge contour of the closed figure in the target binary image through traversal, so as to extract the edge contour coordinates of the corresponding closed figure. In this way, the image conversion can be realized quickly and accurately according to the edge contour information, which is conducive to improving the stability of the image conversion. The embodiment of the present application only extracts the edge contour coordinates of the closed figure in the target binary image during the image conversion process, making the image conversion process more stable and fast, thereby fully improving the overall image conversion efficiency and improving the algorithm performance and accuracy.
[0164] Optionally, in a feasible embodiment of the present application, the first determining module 320 may include:
[0165] The first determination submodule can be used to determine the first target pixel point located on the edge contour of the target closed figure by traversing the pixel points in the target binary image in sequence according to the binary value assignment information of the pixel points in the target binary image;
[0166] The repeated execution submodule can be used to repeatedly execute the steps of determining the next target pixel point based on the local edge contour of the target closed figure under the target pixel point and the binary assignment information of at least part of the surrounding pixels corresponding to the target pixel point; updating the target pixel point to the next target pixel point until each target pixel point located on the edge contour of the target closed figure is determined.
[0167] Optionally, in a feasible embodiment of the present application, the binary assignment information of the pixel points in the target binary image may include the pixel points being assigned a first value or the pixel points being assigned a second value, the first assignment representing that the pixel points are located in a graphic area, and the second assignment representing that the pixel points are located in a non-graphic area; the first determination submodule may include:
[0168] The first detection unit may be used to sequentially traverse the pixel points in the target binary image, and detect the binary assignment information of the currently traversed pixel point and the binary assignment information of the corresponding plurality of adjacent pixel points;
[0169] The first determination unit can be used to determine the currently traversed pixel point as the first target pixel point located on the edge contour of the target closed figure when the currently traversed pixel point is assigned a first value and there are both first-valued pixel points and second-valued pixel points among multiple adjacent pixel points.
[0170] Optionally, in a feasible embodiment of the present application, before updating the target pixel point to the next target pixel point, the image conversion device may further include:
[0171] The identification adding module can be used to add the coordinate extraction effective identification corresponding to the target pixel point;
[0172] After determining each target pixel point located on the edge contour of the target closed figure, the image conversion device may further include:
[0173] The second determination module can be used to continue to determine the first target pixel point located on the edge contour of the next target closed figure based on the binary assignment information of the pixel points in the target binary image by traversing the pixel points in the target binary image in sequence. The target pixel point is a target pixel point for which there is no corresponding coordinate extraction effective mark.
[0174] Optionally, in a feasible embodiment of the present application, the above-mentioned determining the next target pixel point based on the local edge contour of the target closed figure under the target pixel point and the binary assignment information of at least part of the surrounding pixels corresponding to the target pixel point may include:
[0175] Based on the binary value assignment information of multiple adjacent pixels of the target pixel, a local edge contour of the target closed figure under the target pixel is determined;
[0176] Based on the local edge contour of the target closed figure under the target pixel point and the binary assignment information of at least some of the surrounding pixels corresponding to the target pixel point, the next target pixel point is determined from at least some of the surrounding pixels corresponding to the target pixel point according to the preset contour search direction.
[0177] Optionally, in a feasible embodiment of the present application, the first extraction module 330 may specifically include:
[0178] The local edge contour coordinates corresponding to each target pixel point are merged to obtain the edge contour coordinates corresponding to the target closed figure. The edge contour coordinates corresponding to the target closed figure are key vertex information of the target closed figure.
[0179] Optionally, in a feasible embodiment of the present application, the local edge contour coordinates corresponding to each target pixel point are merged to obtain the edge contour coordinates corresponding to the target closed figure, and the edge contour coordinates corresponding to the target closed figure are key vertex information of the target closed figure, which may include:
[0180] When the next target pixel point is determined, the extracted edge contour coordinates of the target closed figure are merged with the local edge contour coordinates of the next target pixel point to obtain the updated extracted edge contour coordinates of the target closed figure, until each target pixel point located on the figure edge contour of the target closed figure is determined to obtain the edge contour coordinates corresponding to the target closed figure;
[0181] Wherein, when the target pixel point is the first target pixel point determined to be located on the edge contour of the target closed figure, the extracted edge contour coordinates of the target closed figure are the local edge contour coordinates of the target pixel point.
[0182] Optionally, in a feasible embodiment of the present application, the above step of determining each target pixel point located on the edge contour of the target closed figure may include:
[0183] Until the contour ending coordinates of the edge contour coordinates corresponding to the target closed figure coincide with the contour starting coordinates, it is determined that all target pixel points located on the figure edge contour of the target closed figure have been determined;
[0184] The contour starting coordinates are: the starting coordinates in the local edge contour coordinates of the first determined target pixel point located on the edge contour of the target closed figure.
[0185] Optionally, in a feasible embodiment of the present application, before acquiring the target binary image, the image conversion device may further include:
[0186] The third determination module may be used to determine the graphic edges of each graphic in the original layout based on the original layout;
[0187] A first mapping module may be used to map the graphic edges of each graphic in the original layout to pixel boundaries in the initial binary image;
[0188] A first assignment module can be used to set the binary assignment information of the pixel points within the pixel boundary as a first assignment, and set the binary assignment information of the pixel points outside the pixel boundary as a second assignment, to obtain an initial binary image, the first assignment represents that the pixel points are located in the graphic area, and the second assignment represents that the pixel points are located in the non-graphic area;
[0189] The first correction module can be used to perform optical proximity effect correction processing on the initial binary image to obtain a target binary image.
[0190] Optionally, in a feasible embodiment of the present application, the initial binary value assignment information of each pixel in the initial binary image is the third value assignment; the first value assignment module may include:
[0191] The first assignment submodule may be used to modify the binary assignment information of the pixel points inside the pixel boundary and adjacent to the pixel boundary from the third assignment to the first assignment, and to modify the binary assignment information of the pixel points outside the pixel boundary and adjacent to the pixel boundary from the third assignment to the second assignment;
[0192] The second value assignment submodule can be used to traverse the pixel points whose binary value assignment information is the third value assignment in the initial binary image, and when there is a pixel point with the first value assignment among multiple adjacent pixel points of the currently traversed pixel point, modify the binary value assignment information of the currently traversed pixel point from the third value assignment to the first value assignment;
[0193] The third assignment submodule can be used to modify the binary assignment information of the currently traversed pixel point from the third assignment to the second assignment when there is a pixel point with the second assignment among multiple adjacent pixels of the currently traversed pixel point, until the traversal of the initial binary image is completed to obtain the initial binary image.
[0194] Based on the image conversion method provided in the above embodiment, out of the same inventive concept, the present application also provides an image conversion device corresponding to the above image conversion method. Figure 4 A detailed introduction to image conversion equipment is given.
[0195] See below Figure 4 , Figure 4 It is a structural schematic diagram of an image conversion device provided in one embodiment of the present application.
[0196] The image conversion device may include a processor 401 and a memory 402 storing computer program instructions.
[0197] Specifically, the processor 401 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0198] The memory 402 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 402 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 402 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 402 is a non-volatile solid-state memory.
[0199] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0200] The processor 401 implements any one of the image conversion methods in the above embodiments by reading and executing computer program instructions stored in the memory 402 .
[0201] In one example, the data image conversion device may further include a communication interface 403 and a bus 410. Figure 4 As shown, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 and communicate with each other.
[0202] The communication interface 403 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0203] Bus 410 includes hardware, software or both, and the parts of image conversion equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 410 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0204] The image conversion device executes the image conversion method in the embodiment of the present application, thereby realizing the image conversion method described in the embodiment of the present application.
[0205] In addition, in combination with the image conversion method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the image conversion methods in the above embodiment is implemented.
[0206] Based on the image conversion method in the above embodiment, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the image conversion method provided in any one of the above embodiments of the present application.
[0207] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0208] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0209] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0210] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0211] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. An image conversion method, characterized in that: The method comprises: Acquire a target binary image, wherein the target binary image includes N closed figures, where N is a positive integer; According to the binary value assignment information of the pixel points in the target binary image, by sequentially traversing the pixel points in the target binary image, each target pixel point located on the edge contour of a target closed figure is determined, and the target closed figure is any closed figure among the N closed figures whose edge contour coordinates have not been extracted; Based on the target pixel points, edge contour coordinates corresponding to the target closed figure are extracted until edge contour coordinates of the N closed figures are obtained; Based on the edge contour coordinates of the N closed figures, the target binary image is converted into a corresponding target layout.
2. The method according to claim 1, characterized in that The method of determining each target pixel point located on the edge contour of the target closed figure by sequentially traversing the pixel points in the target binary image according to the binary value assignment information of the pixel points in the target binary image comprises: According to the binary value assignment information of the pixel points in the target binary image, by sequentially traversing the pixel points in the target binary image, determining the first target pixel point located on the edge contour of the target closed figure; Repeat the steps of determining the next target pixel point based on the local edge contour of the target closed figure under the target pixel point and the binary assignment information of at least part of the surrounding pixels corresponding to the target pixel point; and updating the target pixel point to the next target pixel point, until the respective target pixel points located on the edge contour of the target closed figure are determined.
3. The method according to claim 2, characterized in that The binary value assignment information of the pixel points in the target binary image includes the pixel points being assigned a first value or the pixel points being assigned a second value, the first value assignment indicating that the pixel points are located in a graphic area, and the second value assignment indicating that the pixel points are located in a non-graphic area; the determining, according to the binary value assignment information of the pixel points in the target binary image, of the first target pixel point located on the graphic edge contour of the target closed graphic by sequentially traversing the pixel points in the target binary image, includes: traversing pixel points in the target binary image in sequence, detecting the binary value assignment information of the currently traversed pixel point and the binary value assignment information of the corresponding plurality of adjacent pixel points; When the currently traversed pixel point is assigned a first value, and there are both pixel points with the first value and pixel points with the second value among the multiple adjacent pixel points, the currently traversed pixel point is determined as the first target pixel point located on the edge contour of the target closed figure.
4. The method according to claim 3, characterized in that Before updating the target pixel point to the next target pixel point, the method further includes: Add a coordinate extraction validation mark corresponding to the target pixel point; After determining each target pixel point located on the edge contour of the target closed figure, the method further includes: Continue to determine the first target pixel point located on the edge contour of the next target closed figure according to the binarization assignment information of the pixel points in the target binary image by traversing the pixel points in the target binary image in sequence, wherein the target pixel point is a target pixel point for which there is no corresponding coordinate extraction effective identifier.
5. The method according to claim 2, characterized in that: The determining of the next target pixel point based on the local edge contour of the target closed figure under the target pixel point and the binary assignment information of at least part of the surrounding pixels corresponding to the target pixel point includes: Determine the local edge contour of the target closed figure under the target pixel based on the binary assignment information of multiple adjacent pixel points of the target pixel; Based on the local edge contour of the target closed figure under the target pixel point and the binary assignment information of at least some of the surrounding pixels corresponding to the target pixel point, the next target pixel point is determined from at least some of the surrounding pixels corresponding to the target pixel point according to a preset contour search direction.
6. The method according to claim 2, characterized in that The step of extracting edge contour coordinates corresponding to the target closed figure based on each target pixel point includes: The local edge contour coordinates corresponding to the target pixel points are merged to obtain the edge contour coordinates corresponding to the target closed figure, and the edge contour coordinates corresponding to the target closed figure are key vertex information of the target closed figure.
7. The method according to claim 6, characterized in that The local edge contour coordinates corresponding to each target pixel point are merged to obtain the edge contour coordinates corresponding to the target closed figure, and the edge contour coordinates corresponding to the target closed figure are key vertex information of the target closed figure, including: When the next target pixel point is determined, the extracted edge contour coordinates of the target closed figure are merged with the local edge contour coordinates of the next target pixel point to obtain updated extracted edge contour coordinates of the target closed figure, until each target pixel point located on the figure edge contour of the target closed figure is determined to obtain the edge contour coordinates corresponding to the target closed figure; Wherein, when the target pixel point is the first target pixel point determined to be located on the edge contour of the target closed figure, the extracted edge contour coordinates of the target closed figure are the local edge contour coordinates of the target pixel point.
8. The method according to claim 7, characterized in that The method of determining each target pixel point located on the edge contour of the target closed figure includes: Until the contour ending coordinates of the edge contour coordinates corresponding to the target closed figure coincide with the contour starting coordinates, it is determined that all the target pixel points located on the figure edge contour of the target closed figure have been determined; The contour starting coordinates are: the starting coordinates in the local edge contour coordinates of the first determined target pixel point located on the graphic edge contour of the target closed graphic.
9. The method according to any one of claims 1 to 8, characterized in that: Before acquiring the target binary image, the method further includes: Based on the original layout, determining the graphic edges of each graphic in the original layout; Mapping the graphic edges of each graphic in the original layout to pixel boundaries in the initial binary image; The binary assignment information of the pixel points within the pixel boundary is set as a first assignment, and the binary assignment information of the pixel points outside the pixel boundary is set as a second assignment, to obtain the initial binary image, wherein the first assignment indicates that the pixel points are located in a graphic area, and the second assignment indicates that the pixel points are located in a non-graphic area; The initial binary image is subjected to optical proximity effect correction processing to obtain the target binary image.
10. The method according to claim 9, characterized in that The initial binary value assignment information of each pixel in the initial binary image is the third assignment; the binary value assignment information of the pixel within the pixel boundary is set to the first assignment, and the binary value assignment information of the pixel outside the pixel boundary is set to the second assignment, to obtain the initial binary image, including: Modify the binary value assignment information of the pixel points inside the pixel boundary and adjacent to the pixel boundary from the third assignment to the first assignment, and modify the binary value assignment information of the pixel points outside the pixel boundary and adjacent to the pixel boundary from the third assignment to the second assignment; traversing the pixel points whose binarization value assignment information is the third value assignment in the initial binarized image, and in the case that there is a pixel point with the first value assignment among a plurality of adjacent pixel points of the currently traversed pixel point, modifying the binarization value assignment information of the currently traversed pixel point from the third value assignment to the first value assignment; When there is a pixel point with the second assignment among multiple adjacent pixel points of the currently traversed pixel point, the binarization assignment information of the currently traversed pixel point is modified from the third assignment to the second assignment until the traversal of the initial binary image is completed to obtain the initial binary image.
11. An image conversion device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the image conversion method according to any one of claims 1 to 10 is implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the image conversion method according to any one of claims 1 to 10 is implemented.
13. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the image conversion method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Image processing apparatus and image processing method
CN104424482A
Partial discharge type identification method, device, equipment and medium
CN116304798A
Method and device for extracting card image, equipment and storage medium
CN117788498A