Contour determination method and image processing apparatus

The method and apparatus enhance contour detection accuracy by recursively determining contour points through subblock analysis, addressing noise and background issues in image processing.

JP7887536B1Active Publication Date: 2026-07-09MATERIAL ANALYSIS TECH INC

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
MATERIAL ANALYSIS TECH INC
Filing Date
2025-07-02
Publication Date
2026-07-09

AI Technical Summary

Technical Problem

Contour detection in images is prone to false detection due to noise, edge blurring, illumination changes, and complex backgrounds, leading to unstable results.

Method used

A method and apparatus for determining contour lines that involves acquiring a target image, assigning initial contour points, extracting reference subblocks, determining template subblocks, recursively performing steps to find candidate subblocks, and calculating comparison results to identify contour points, ultimately forming a portion of the target contour line.

Benefits of technology

Provides stable and precise identification of contour lines by mitigating noise and background interference, enhancing detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007887536000001_ABST
    Figure 0007887536000001_ABST
Patent Text Reader

Abstract

The present invention provides a method for determining contour lines and an image processing device. [Solution] The method includes: extracting a reference subblock containing an initial contour point from a target image; determining a plurality of template subblocks based on the reference subblock; recursively executing a plurality of steps to determine a contour point corresponding to each step; determining a search region in the target image as the i-th step of the plurality of steps; determining a plurality of candidate subblocks in the search region; obtaining a plurality of comparison results between each candidate subblock and each template subblock; selecting a reference subblock from the plurality of candidate subblocks based on the plurality of comparison results; determining a contour point corresponding to the i-th step based on the reference subblock; and determining at least a portion of the target contour line based on the contour point corresponding to each step.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0004] , , , , , , , ,

[0003] ,

[0005] ,

[0001] The present invention relates to image processing technology, and particularly to a method for determining a contour line and an image processing apparatus.

Background Art

[0002] In the field of image processing, object contour detection is a technology for identifying object boundaries in an image, and is mainly used for object segmentation, feature extraction, and shape analysis. Common contour detection methods include edge detection operators (e.g., Sobel, Prewitt, Roberts, and Canny), gradient operations (e.g., Laplacian operator), and dynamic contour models (e.g., Snake and Level Set). In addition, deep learning technologies (e.g., U-Net and HED (Holistically-Nested Edge Detection)) can also achieve high-precision contour line extraction.

Summary of the Invention

Problems to be Solved by the Invention

[0003] However, contour detection still faces many problems. For example, noise in the image may cause false detection or edge blurring. In addition, illumination changes and shadows in the image affect the edge intensity, resulting in unstable contour detection results. Furthermore, complex backgrounds in the image may cause false determination of the contour line.

[0004] To solve these problems, those skilled in the art need to develop a mechanism for determining the contour line and improve the stability and accuracy of contour detection.

Means for Solving the Problems

[0005] Therefore, the present invention provides a contour line determination method and an image processing apparatus that can solve the above-mentioned technical problems.

[0006] Embodiments of the present invention provide a method for determining contour lines performed by an image processing apparatus. This method includes: acquiring a target image, determining that the target image includes a target contour line to which an initial contour point has been assigned; extracting a reference subblock containing the initial contour point from the target image; determining a plurality of template subblocks based on the reference subblock; recursively performing a plurality of steps to determine a contour point corresponding to each of the steps, the i-th step of the plurality of steps being to determine a search region in the target image; determining a plurality of candidate subblocks in the search region, where i is an index value; obtaining a plurality of comparison results between each of the candidate subblocks and each of the template subblocks; selecting a reference subblock from the plurality of candidate subblocks based on the plurality of comparison results; determining the contour point corresponding to the i-th step based on the reference subblock; and determining at least a portion of the target contour line based on the contour point corresponding to each of the steps.

[0007] Embodiments of the present invention provide an image processing apparatus including a memory circuit and a processor. The memory circuit stores program code. The processor is coupled to the memory circuit and accesses the program code to acquire a target image, determine that the target image includes a target contour line to which initial contour points are assigned, extract a reference subblock containing the initial contour points from the target image, determine a plurality of template subblocks based on the reference subblock, recursively execute a plurality of steps to determine a contour point corresponding to each of the steps, the i-th step of the plurality of steps being to determine a search region in the target image, determine a plurality of candidate subblocks in the search region, where i is an index value, acquire a plurality of comparison results between each of the candidate subblocks and each of the template subblocks, select a reference subblock from the plurality of candidate subblocks based on the plurality of comparison results, determine the contour point corresponding to the i-th step based on the reference subblock, and determine at least a portion of the target contour line based on the contour point corresponding to each of the steps. [Effects of the Invention]

[0008] Embodiments of the present invention provide a new, stable, and precise identification means that, after obtaining initial contour points assigned to the target contour line, determines at least a portion of the target contour line based on these points. [Brief explanation of the drawing]

[0009] [Figure 1] This is a schematic diagram of an image processing apparatus according to one embodiment of the present invention. [Figure 2] This is a flowchart of a contour line determination method according to one embodiment of the present invention. [Figure 3] This figure illustrates an application scenario according to one embodiment of the present invention. [Figure 4] This is a flowchart showing the recursive execution of multiple steps according to one embodiment of the present invention. [Figure 5]This figure illustrates an application scenario according to one embodiment of the present invention. [Figure 6] This is a flowchart for determining the comparison results according to one embodiment of the present invention. [Figure 7] This is a schematic diagram showing how contour lines are determined based on Figures 3 and 5. [Modes for carrying out the invention]

[0010] Referring to Figure 1, Figure 1 is a schematic diagram of an image processing apparatus according to one embodiment of the present invention. In different embodiments, the image processing apparatus 100 can be implemented as, for example, various smart devices and / or computer devices, but the present invention is not limited thereto.

[0011] In Figure 1, the image processing device 100 includes a memory circuit 102 and a processor 104.

[0012] The memory circuit 102 may be, for example, any form of fixed or movable random access memory (RAM), read-only memory (ROM), flash memory, hard disk, or other similar device, or a combination thereof, and can be used to record multiple program codes or templates.

[0013] The processor 104 is coupled to the memory circuit 102 and may be a general-purpose processor, a special-purpose processor, a conventional processor, a digital signal processor, a microprocessor, one or more microprocessors combining digital signal processor cores, a controller, a microcontroller, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), any other type of integrated circuit, a state machine, an ARM (advanced RISC machine) based processor, and similar products.

[0014] In embodiments of the present invention, the processor 104 can access modules and program code recorded in the memory circuit 102 to implement the contour line determination method provided by the present invention. The details thereof are described below.

[0015] Referring to Figure 2, Figure 2 is a flowchart of a contour line determination method according to one embodiment of the present invention. The method of this embodiment can be performed by the image processing apparatus 100 of Figure 1, and each step of Figure 2 will be described in detail below in combination with the components shown in Figure 1. Furthermore, in order to make the concepts of the embodiments of the present invention easier to understand, supplementary explanations will be given below using Figure 3. Figure 3 is a diagram showing an application scenario according to one embodiment of the present invention.

[0016] In step S210, the processor 104 acquires the target image 300. In embodiments of the present invention, the target image 300 refers to, for example, an image to be used for contour line identification, and the processor 104 can acquire, for example, an unprocessed image from various image sources as the target image 300.

[0017] In different embodiments, the target image 300 can be obtained from real-time shooting by a digital camera, a monitor, or a smartphone camera. For example, it can also be obtained from an image database such as medical images (MRI, X-ray), remote sensing images (satellite photos), or document scan images. Scanner input is also a common source used to acquire images such as documents, barcodes, or fingerprints. In some applications, synthetic images generated by a computer, such as in a simulation environment or artificial intelligence-generated images, can also be used as input, but the present invention is not limited thereto.

[0018] In some embodiments, the target image 300 may be an image that has already undergone various preprocessing (e.g., grayscale conversion, noise removal, contrast adjustment, etc.), thereby reducing the impact of factors such as noise, lighting changes, or blurring on the accuracy of subsequent contour detection.

[0019] In the situation of FIG. 3, the target image 300 is, for example, a grayscale image obtained by grayscale conversion. In this case, each pixel of the target image 300 may be a grayscale pixel having a corresponding grayscale value, but the present invention is not limited thereto.

[0020] In an embodiment of the present invention, the target image 300 includes a target contour line 310, which is, for example, a boundary line between an object of interest (target object) and its background or other objects, but the present invention is not limited thereto.

[0021] In FIG. 3, the target image 300 is, for example, a side partial structure image of a fin field-effect transistor (FinFET). The side structure of the FinFET is, for example, an object of interest (i.e., the object for which contour line identification is to be performed). The contour line of this object can be understood as, for example, the target contour line 310 to be considered, but the present invention is not limited thereto.

[0022] In one embodiment, the target contour line 310 is assigned to the initial contour point P00.

[0023] In one embodiment, the initial contour point P00 may be artificially assigned. In this embodiment, the image processing apparatus 100 can provide, for example, a related selection tool that allows a user to manually select the initial contour point P00 on the target contour line 310 after displaying the target image 300 on a corresponding display device. In one embodiment, after visually checking the target contour line 310 in the target image 300, the user can select any point on the target contour line 310 as the initial contour point P00 by manual clicking, but the present invention is not limited thereto.

[0024] In step S220, the processor 104 extracts a reference sub-block B00 including the initial contour point P00 from the target image 300, and determines a plurality of template sub-blocks T01 to T11 based on the reference sub-block B00.

[0025] In one embodiment, the reference sub-block B00 is, for example, a rectangular region centered on the initial contour point P00 and having a predetermined width and a predetermined height, but the present invention is not limited thereto.

[0026] In one embodiment, the processor 104 can generate the template sub-blocks T01 to T11 by individually rotating the reference sub-block B00 based on a plurality of predetermined rotation angles.

[0027] In the situation of FIG. 3, the plurality of predetermined rotation angles are, for example, 11 angles preset by a designer, and the processor 104 can individually form the template sub-blocks T01 to T11 by individually rotating the reference sub-block B00 by the 11 angles.

[0028] For example, processor 104 can form template subblock T01 by rotating reference subblock B00 by 0 degrees. Also, for example, processor 104 can form template subblock T02 by rotating reference subblock B00 by 15 degrees. Furthermore, processor 104 can form template subblock T03 by rotating reference subblock B00 by 30 degrees.

[0029] Based on the principles described above, anyone with ordinary knowledge in this field can deduce the determination methods for the remaining template subblocks T04 to T11; therefore, they will not be explained in detail here.

[0030] In other embodiments, the designer may determine the number and / or angles of the plurality of predetermined rotation angles as needed, and is therefore not limited to the embodiment shown in Figure 3.

[0031] In step S230, the processor 104 recursively executes multiple steps and determines the contour points corresponding to each step.

[0032] In an embodiment of the present invention, the processor 104 can realize step S230 by, for example, executing the flow shown in Figure 4.

[0033] Referring to Figure 4, Figure 4 is a flowchart showing the recursive execution of multiple steps according to one embodiment of the present invention. Furthermore, to make the concepts in Figure 4 easier to understand, Figure 5 is used below for supplementary explanation. Figure 5 is a diagram showing an application scenario according to one embodiment of the present invention.

[0034] In embodiments of the present invention, the processor 104 can recursively execute one or more steps in Figure 4, starting from the first of the plurality of steps, until it determines that a certain termination condition has been met.

[0035] In one embodiment, the processor 104 may determine that the termination condition is met when it has determined, for example, that the flow in Figure 4 has been executed recursively a specified number of times, and then proceed to execute step S240, but the present invention is not limited thereto. In other embodiments, the designer may set any necessary termination conditions as needed, and relevant examples will be described later.

[0036] In step S411, the processor 104 determines the search region SR in the target image 300 at the i-th stage.

[0037] In embodiments of the present invention, i can be used to represent an index value for the number of recursive iterations, which can be gradually increased from an initial value (e.g., 1 as shown in the situation in Figure 4), but the present invention is not limited thereto.

[0038] In the situation shown in Figure 5, i is, for example, 1. In this case, the processor 104 can determine the search region SR based on the initial contour point P00. Here, the initial contour point P00 is located on one side (for example, the bottom) of the search region SR. In this embodiment, the search region SR is, for example, a rectangular region having height DD1 and width DD1', and the initial contour point P00 is, for example, the midpoint of the bottom of the search region SR, but the present invention is not limited thereto.

[0039] In other embodiments, the initial contour point P00 may be located at any position on other sides of the search region SR, and the search region SR may have other shapes; therefore, the embodiment is not limited to that shown in Figure 5.

[0040] In Figure 5, since the target contour line 310 extends approximately vertically, the initial contour point P00 can be located on the bottom edge of the search area SR. In other embodiments, since the target contour line 310 extends approximately vertically, the initial contour point P00 can be located on the top edge of the search area SR, and the embodiment is not limited to Figure 5.

[0041] In other embodiments, if the target contour line under consideration extends approximately horizontally, the initial contour point P00 may also be located on the left / right side of the search area SR, but the present invention is not limited thereto.

[0042] In some embodiments, the edges on which the initial contour point P00 lies on the search area SR can be set based on the above-described principle after the user visually confirms the extension direction of the target contour line 310, but the present invention is not limited thereto.

[0043] In one embodiment, the height DD1 can be set by the user as needed. For example, if the user wants to determine each contour point on the target contour line 310 in a more noise-resistant manner, the user can set the height DD1 and / or width DD1' to larger values. On the other hand, if the user wants to determine the target contour line 310 in a more precise manner, the user can set the height DD1 and / or width DD1' to smaller values, but the present invention is not limited thereto.

[0044] Next, in step S412, the processor 104 determines multiple candidate subblocks C00 to C02 in the search region SR.

[0045] In one embodiment, the processor 104 can determine a specific image range in the search area SR and determine a first candidate subblock based on this image range. In one embodiment, the image range is, for example, a rectangular area having a predetermined width and a predetermined height. In this case, the size of the image range is the same as the size of the reference subblock B00, but the present invention is not limited thereto.

[0046] In Figure 5, the aforementioned image range can be located, for example, in the center of the search area SR, but the present invention is not limited thereto.

[0047] After determining the aforementioned image range, the processor 104 can designate an image region located within this image range in the target image 300 as the first candidate subblock.

[0048] In Figure 5, candidate subblock C00 is, for example, a first candidate subblock to be considered, but the present invention is not limited thereto.

[0049] After determining the first candidate subblock (for example, candidate subblock C00), the processor 104 moves the image range by a specified distance DD2 based on the specified direction DI2, and then determines the second candidate subblock from candidate subblocks C00 to C02 based on the image range after the movement.

[0050] From another perspective, the specified direction DI2 can also be understood as a direction perpendicular to the extension direction of the target contour line 310, but the present invention is not limited thereto.

[0051] In one embodiment, the specified distance DD2 can be set by the user as needed. For example, if the user wants to determine each contour point on the target contour line 310 more precisely, the user can set the specified distance DD2 to a smaller value. On the other hand, if the user wants to determine the target contour line 310 more efficiently, the user can set the specified distance DD2 to a larger value, but the present invention is not limited thereto.

[0052] In Figure 5, the processor 104 can, for example, move the image range corresponding to candidate subblock C00 along the specified direction DI2 by a specified distance DD2, and then designate the image region located within this image range in the target image 300 as the second candidate subblock (for example, candidate subblock C01).

[0053] Similarly, the processor 104 may, for example, move the image range corresponding to candidate subblock C00 by a specified distance DD2 along another specified direction DI2', and then designate the image region located within this image range in the target image 300 as the third candidate subblock (for example, candidate subblock C02).

[0054] In other embodiments, the processor 104 can also determine even more candidate subblocks based on the principles described above, and is not limited to the three candidate subblocks C00 to C02 shown in Figure 5.

[0055] In step S413, the processor 104 obtains multiple comparison results between each candidate subblock C00~C02 and each template subblock T01~T11.

[0056] In one embodiment, the processor 104 can determine the comparison result between the j-th candidate subblock from candidate subblocks C00 to C02 (where j is an index value) and the k-th template subblock from template subblocks T01 to T11 (where k is an index value), based on the flow shown in Figure 6. In embodiments of the present invention, 1 ≤ j ≤ J and 1 ≤ k ≤ K, where J and K are the number of candidate subblocks and template subblocks, respectively.

[0057] For example, in the situations shown in Figures 3 and 5, the quantity of candidate subblocks C00 to C02 is assumed to be 3, so 1 ≤ j ≤ 3. Also, the quantity of template subblocks T01 to T11 is assumed to be 11, so 1 ≤ k ≤ 11, but the present invention is not limited to this.

[0058] Referring to Figure 6, Figure 6 is a flowchart for determining the comparison results according to one embodiment of the present invention.

[0059] In step S611, the processor 104 determines the first energy function of the j-th candidate subblock.

[0060] In embodiments of the present invention, the processor 104 can determine the first energy function of the j-th candidate subblock based on any known mathematical function, which can be used to evaluate the features, structure, or quality of the j-th candidate subblock, but the present invention is not limited thereto.

[0061] In other embodiments, literature such as "Snakes: Active contour models" (Kass, M., Witkin, A., & Terzopoulos, D. (1988)), "Active contours without edges" (Chan, TF, & Vese, LA (2001)), "Interactive graph cuts for optimal boundary & region segmentation of objects in ND images" (Boykov, Y., & Jolly, MP (2001)), and "Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of images" (Geman, S., & Geman, D. (1984)) each contains formulas for the corresponding energy functions, and the processor 104 can use these energy function formulas to determine the first energy function of the j-th candidate subblock, for example, at the request of the designer, but the present invention is not limited thereto.

[0062] In one embodiment, the processor 104 can determine the first energy function of the j-th candidate subblock based, for example, on the following equation:

[0063]

number

[0064] In one embodiment, JPEG0007887536000003.jpg1643 can be expressed by the following formula:

[0065]

number

[0066] In one embodiment, JPEG0007887536000005.jpg1736 can be expressed by the following formula:

[0067]

number

[0068] In embodiments of the present invention, the physical meaning of each variable in the above formula is as shown in Table 1 below.

[0069] [Table 1]

[0070] In step S612, the processor 104 determines the second energy function of the k-th template subblock.

[0071] In embodiments of the present invention, the processor 104 can determine the second energy function of the k-th template subblock based on a method corresponding to the determination of the first energy function of the j-th candidate subblock, but the details of this method will not be described here.

[0072] In step S613, the processor 104 determines the difference in energy functions between the j-th candidate subblock and the k-th template subblock (hereinafter referred to as D(j,k)) based on the first energy function corresponding to the j-th candidate subblock (hereinafter referred to as E1_j) and the second energy function corresponding to the k-th template subblock (hereinafter referred to as E2_k).

[0073] In one embodiment, the processor 104 may directly use the difference between E1_j and E2_k (e.g., E1_j ~ E2_k, E2_k ~ E1_j, or |E1_j ~ E2_k|) as D(j,k), but the present invention is not limited thereto.

[0074] In step S614, the processor 104 determines the sum of the difference matrices between the j-th candidate subblock and the k-th template subblock (hereinafter referred to as MS(j,k)).

[0075] In one embodiment, the processor 104 can determine the pixel-by-pixel grayscale difference between the j-th candidate subblock and the k-th template subblock, sum the pixel-by-pixel grayscale differences between the j-th candidate subblock and the k-th template subblock to obtain the sum of the difference matrices between the j-th candidate subblock and the k-th template subblock, MS(j, k).

[0076] In one embodiment, the sum of the difference matrices described above can be expressed, for example, as follows:

[0077]

number

[0078] In step S615, the processor 104 can determine the comparison result between the j-th candidate subblock and the k-th template subblock based on the difference of the energy functions and the sum of the difference matrices.

[0079] In one embodiment, the comparison result between the j-th candidate subblock and the k-th template subblock is, for example, a weighted value, which can be expressed as follows:

[0080] [Number 5] S(j,k) = w1*D(j,k) + w2*MS(j,k)

[0081] Here, w1 and w2 are weights (which can be determined by the designer as needed).

[0082] Based on this, the processor 104 can determine the comparison result between any one of the candidate subblocks C00 to C02 and any one of the template subblocks T01 to T11.

[0083] Referring again to Figure 4, after step S413, in step S414, the processor 104 selects a reference subblock RB from among the candidate subblocks C00 to C02 based on the multiple comparison results, and can determine the contour point corresponding to the i-th step based on the reference subblock RB.

[0084] In one embodiment, the reference subblock RB is, for example, one of the candidate subblocks C00 to C02 corresponding to the lowest weighted value. In other embodiments, the processor 104 may select the reference subblock RB from among the candidate subblocks C00 to C02 (for example, one of the candidate subblocks C00 to C02 corresponding to the second lowest weighted value) based on other principles set by the designer, but the present invention is not limited thereto.

[0085] For the sake of clarity, we will assume below that candidate subblock C00 in Figure 5 is the reference subblock RB selected by processor 104.

[0086] In one embodiment, after determining the reference subblock RB, the processor 104 may select any point from it and set it as the contour point corresponding to the i-th step (where i is currently 1). In one embodiment, the processor 104 may, for example, set the center point of the reference subblock RB as the contour point P01 corresponding to the i-th step.

[0087] In other words, in the situation shown in Figure 5, the processor 104 can, for example, select the center point of candidate subblock C00 and set it as contour point P01 corresponding to the i-th step.

[0088] After that, processor 104 can accumulate i (for example, i is 2) and return to step S411.

[0089] In one embodiment, when i is greater than 1, the processor 104 can determine the search region corresponding to the i-th stage based on the contour point corresponding to the i-1th stage. Here, the contour point corresponding to the i-1th stage lies on one edge of the search region of the i-th stage.

[0090] To illustrate with an example, in the second stage, the processor 104 can determine the search region corresponding to the second stage based on the contour point P01 corresponding to the first stage while executing step S411. Here, the contour point corresponding to the first stage is located on one side of the search region of the second stage. For related details, please refer to the content described in step S411 of the embodiment described above, and therefore will not be repeated here.

[0091] In the first embodiment, after performing step S411, the processor 104 can further determine whether the search area of ​​the i-th step exceeds the image range of the target image 300. Taking the situation in Figure 5 as an example, the processor 104 can determine whether the search area SR exceeds the height of the target image 300. If so, the processor 104 can determine that the search area SR exceeds the image range of the target image 300; otherwise, the processor 104 can determine that the search area SR does not exceed the image range of the target image 300, but the present invention is not limited thereto.

[0092] In this embodiment, if it is determined that the search area exceeds the image range of the target image 300, the processor 104 can determine accordingly that the termination condition has already been met. In this case, the processor 104 can directly execute step S240 in Figure 2.

[0093] On the other hand, if it is determined that the search area does not exceed the image range of the target image 300, the processor 104 determines accordingly that the termination condition is not met, and then executes step S412 to determine a candidate subblock within the search area.

[0094] In the second embodiment, if the processor 104 determines during the process of executing step S412 that it cannot find any candidate subblocks, the processor 104 may determine that the termination condition has already been met and, accordingly, execute step S240 in Figure 2.

[0095] On the other hand, if the processor 104 can still determine one or more candidate subblocks during the process of executing step S412, the processor 104 may determine that the termination condition has not been met and proceed to execute step S413, but the present invention is not limited thereto.

[0096] In step S240, the processor 104 determines at least a portion of the target contour line 310 based on the contour points corresponding to each step.

[0097] Referring to Figure 7, Figure 7 is a schematic diagram of how contour lines are determined based on Figures 3 and 5.

[0098] In this embodiment, the processor 104 can recursively execute multiple steps, determine the contour points corresponding to each step, and then connect the contour points of each step as partial contour lines 710 of the target contour line 310.

[0099] Alternatively, the processor 104 may directly display contour points corresponding to each stage on the target image 300 to form the contour line 710.

[0100] In another embodiment, the processor 104 may further determine intermediate contour points between contour points at each stage using a linear interpolation method, and then connect all contour points as partial contour lines 710 of the target contour line 310, but the present invention is not limited thereto.

[0101] As described above, embodiments of the present invention provide a new, stable, and precise identification means that, after obtaining initial contour points assigned to the target contour line, determines at least a portion of the target contour line based on these points.

[0102] Although the present invention has been disclosed by the embodiments described above, these are not intended to limit the invention, and any person with ordinary skill in the art may make some changes and modifications without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention is defined by the appended claims. [Industrial applicability]

[0103] The contour line determination method of the embodiment of the present invention can be applied to an image processing apparatus and related image processing methods. [Explanation of symbols]

[0104] 100 Image Processing Devices 102 Memory circuit 104 Processors Steps S210, S220, S230, S240, S411~S414, S611~S615 300 target images 310 Target contour line P00 Initial contour point B00 Reference Subblock T01~T11 Template Subblocks DD1 Height DD1' width C00~C02 Candidate Subblocks DI2, DI2' Specified direction DD2 Specified distance P01 Contour point 710 Outline RB reference subblock SR Search Area

Claims

1. A method for determining contour lines performed by an image processing device, The target image is acquired, and the target image includes the target contour line to which the initial contour points are assigned. Extracting a reference subblock containing the initial contour points from the target image, and generating multiple template subblocks based on the reference subblock, The process involves recursively executing multiple steps to determine the contour point corresponding to each of the aforementioned steps, The i-th step of the plurality of steps is Determining the search area in the aforementioned target image, In the aforementioned search area, multiple candidate subblocks are determined, and it is confirmed that i is an index value. Obtain multiple comparison results between each candidate subblock and each template subblock, Based on the above multiple comparison results, a reference subblock is selected from the above multiple candidate subblocks, and the contour point corresponding to the i-th step is determined based on the reference subblock. Based on the contour points corresponding to each of the steps, determine at least a portion of the target contour line, A method for determining contour lines that include this feature.

2. The method according to claim 1, wherein when i is 1, the search region is determined based on the initial contour point, and the initial contour point is located on one side of the search region.

3. The method according to claim 1, wherein when i is greater than 1, the search region is determined based on the contour point corresponding to the (i-1)th step, and the contour point corresponding to the (i-1)th step is located on one side of the search region.

4. The method according to claim 1, wherein the initial contour points are artificially assigned.

5. The plurality of template subblocks are generated based on the aforementioned reference subblock. The method according to claim 1, comprising generating the plurality of template subblocks by individually rotating the reference subblocks based on a plurality of predetermined rotation angles.

6. In the search area, determining the plurality of candidate subblocks is The image range is determined within the search area, and a first candidate subblock is determined based on the image range. Based on the specified direction, the image range is moved by a specified distance, and based on the image range after the movement, the second candidate subblock among the plurality of candidate subblocks is determined. The method according to claim 1, including the method described in claim 1.

7. The method according to claim 6, wherein the specified direction is perpendicular to the extension direction of the target contour line.

8. Obtaining the multiple comparison results between each candidate subblock and each template subblock is, The first energy function of the j-th candidate subblock among the aforementioned plurality of candidate subblocks is determined, and it is confirmed that j is an index value. The second energy function of the k-th template subblock among the aforementioned plurality of template subblocks is determined, and it is confirmed that k is an index value. Based on the first energy function corresponding to the j-th candidate subblock and the second energy function corresponding to the k-th template subblock, the difference in energy functions between the j-th candidate subblock and the k-th template subblock is determined. Determine the sum of the difference matrices between the j-th candidate subblock and the k-th template subblock, Based on the difference in the energy functions and the sum of the difference matrices, the comparison result between the j-th candidate subblock and the k-th template subblock is determined. The method according to claim 1, including the method described in claim 1.

9. The target image is a grayscale image, and the sum of the difference matrices between the j-th candidate subblock and the k-th template subblock is determined. The method according to claim 8, further comprising determining the pixel-by-pixel grayscale difference between the j-th candidate subblock and the k-th template subblock, summing the pixel-by-pixel grayscale differences between the j-th candidate subblock and the k-th template subblock to obtain the sum of the difference matrix between the j-th candidate subblock and the k-th template subblock.

10. The comparison result between the j-th candidate subblock and the k-th template subblock is a weighted value, and the weighted value is expressed as follows: S(j,k)=w1*D(j,k)+w2*MS(j,k) The method according to claim 8, wherein D(j,k) is the difference in the energy function between the j-th candidate subblock and the k-th template subblock, MS(j,k) is the sum of the difference matrices between the j-th candidate subblock and the k-th template subblock, and w1 and w2 are weights.

11. The method according to claim 1, wherein each of the comparison results is represented as a corresponding weighted value, and the reference subblock is one of the plurality of candidate subblocks that corresponds to the lowest weighted value.

12. Based on the aforementioned reference subblock, the contour point corresponding to the i-th step is determined. The method according to claim 1, comprising setting the center point of the reference subblock to the contour point corresponding to the i-th step.

13. The method according to claim 1, comprising determining at least a portion of the target contour line based on the contour points corresponding to each of the steps, and then connecting the contour points of each of the steps as a partial contour line of the target contour line.

14. After determining the search area, the method further: To determine whether the search area exceeds the image range of the target image, If it is determined that the search area exceeds the image range of the target image, it is decided to determine at least a portion of the target contour line based on the contour points corresponding to each step accordingly. If it is determined that the search area does not exceed the image range of the target image, the plurality of candidate subblocks are determined accordingly within the search area. The method according to claim 1, including the method described in claim 1.

15. A memory circuit that stores program code, The memory circuit is connected to the program code, The target image is acquired, and the target image includes the target contour line to which the initial contour points are assigned. Extracting a reference subblock containing the initial contour points from the target image, and generating multiple template subblocks based on the reference subblock, The process involves recursively executing multiple steps to determine the contour point corresponding to each of the aforementioned steps, A processor that performs the following, and the i-th step of the plurality of steps is Determining the search area in the aforementioned target image, In the aforementioned search area, multiple candidate subblocks are determined, and it is confirmed that i is an index value. Obtain multiple comparison results between each candidate subblock and each template subblock, Based on the above multiple comparison results, a reference subblock is selected from the above multiple candidate subblocks, and the contour point corresponding to the i-th step is determined based on the reference subblock. Based on the contour points corresponding to each of the steps, determine at least a portion of the target contour line, Image processing device including