1 A FRAMEWORK FOR CONDITION TUNING AND IMAGE PROCESSING FOR METROLOGY APPLICATIONS TECHNICAL FIELD 5 [0001] The embodiments provided herein relate to image processing for after-development- inspection (ADI) metrology applications. BACKGROUND [0002] Charged particle beam metrology systems may be used in process control for some 10 semiconductor manufacturing processes. For example, a critical dimension scanning electron microscope (CD SEM) may be used as a dedicated system for measuring the dimensions of fine patterns formed on a semiconductor wafer. High accuracy and high precision are necessary to determine whether a particular CD SEM may be appropriate for controlling a specific process. High resolution SEM tools have been established as the standard for direct critical dimension measurements 15 in many advanced semiconductor manufacturing processes. [0003] However, the bombardment of energetic particles as used in an SEM tool on sensitive materials on a wafer surface, such as photoresists used in lithographic patterning, can have a negative effect on measurements. For example, bombardment of electrons on electron sensitive materials may damage the target topography and introduce measurement uncertainty. 20 [0004] In general, it is crucial that an SEM is in a proper condition before starting any measurements on it. In other words, it is important to check if the SEM image is metrology-ready while lowering the wafer damage risk as much as possible before subjecting it to the metrology process. SUMMARY 25 [0005] Embodiments of the present disclosure provide systems and methods for processing images for metrology using charged particle beam tools. [0006] Some embodiments provide a method for processing images for metrology using a charged particle beam tool, the method comprising: obtaining, from the charged particle beam tool, an image of a portion of a sample; processing the image using a first image processing module to generate a 30 processed image; determining image quality characteristics of the processed image; determining whether the image quality characteristics of the processed image satisfy predetermined imaging criteria; and in response to the image quality characteristics of the processed image not satisfying the predetermined imaging criteria: updating a tuning condition of the charged-particle beam tool; acquiring an image of the portion of the sample using the charged-particle beam tool that has the 35 updated tuning condition; and processing the acquired image using the first image processing module to enable the processed acquired image to satisfy the predetermined imaging criteria. 2 [0007] Some embodiments provide a system for processing images for metrology using a charged particle beam tool comprising: a memory storing a set of instructions; and at least one processor configured to execute the set of instructions to cause the system to perform: obtaining, from the charged particle beam tool, an image of a portion of a sample; processing the 5 image using a first image processing module to generate a processed image; determining image quality characteristics of the processed image; determining whether the image quality characteristics of the processed image satisfy predetermined imaging criteria; and in response to the image quality characteristics of the processed image not satisfying the predetermined imaging criteria: updating a tuning condition of the charged-particle beam tool; acquiring an image of the 10 portion of the sample using the charged-particle beam tool that has the updated tuning condition; and processing the acquired image using the first image processing module to enable the processed acquired image to satisfy the predetermined imaging criteria. [0008] Some embodiments provide a non-transitory computer readable medium that stores a set of instructions that is executable by at least one processor of a computing device to cause the computing 15 device to perform a method for processing images for metrology using a charged particle beam tool, the method comprising: obtaining, from the charged particle beam tool, an image of a portion of a sample; processing the image using a first image processing module to generate a processed image; determining image quality characteristics of the processed image; determining whether the image quality characteristics of the processed image satisfy predetermined imaging criteria; and in response 20 to the image quality characteristics of the processed image not satisfying the predetermined imaging criteria: updating a tuning condition of the charged-particle beam tool; acquiring an image of the portion of the sample using the charged-particle beam tool that has the updated tuning condition; and processing the acquired image using the first image processing module to enable the processed acquired image to satisfy the predetermined imaging criteria. 25 [0009] Other advantages of the embodiments of the present disclosure will become apparent from the following description taken in conjunction with the accompanying drawings wherein are set forth, by way of illustration and example, certain embodiments of the present invention. BRIEF DESCRIPTION OF FIGURES 30 [0010] FIGs. 1A-1D are diagrams illustrating a cross sectional view of a wafer, consistent with embodiments of the present disclosure. [0011] FIGs. 2A and 2B are diagrams illustrating exemplary patterns for measurement, consistent with embodiments of the present disclosure. [0012] FIGs. 2C and 2D are diagrams illustrating exemplary relationships of behavior of electron 35 sensitive materials, consistent with embodiments of the present disclosure. [0013] FIG. 3 is a schematic diagram illustrating an exemplary electron beam inspection (EBI) system, consistent with embodiments of the present disclosure. 3 [0014] FIGs. 4A and 4B are diagrams illustrating exemplary electron beam tools that can be part of the exemplary electron beam inspection system of FIG. 3, consistent with embodiments of the present disclosure. [0015] FIGs. 5A-5D are diagrams illustrating various views of a wafer, consistent with embodiments 5 of the present disclosure. [0016] FIG. 6 is a block diagram of an exemplary system for SEM image condition tuning and processing for metrology, consistent with embodiments of the present disclosure. [0017] FIG. 7 is a block diagram of an image processing module included in the system of FIG. 3 , consistent with embodiments of the present disclosure. 10 [0018] FIG. 8 is a block diagram of a detailed implementation of the image processing module illustrated in FIG. 6 and FIG. 7 , consistent with embodiments of the present disclosure. [0019] FIG. 9 is an illustration of exemplary SEM images after being processed by the image processing module shown in FIG. 6 and FIG. 7 , consistent with embodiments of the present disclosure. 15 [0020] FIG. 10 is a process flowchart representing an exemplary method for SEM image condition tuning and processing for metrology, consistent with embodiments of the present disclosure. [0021] FIGs. 11A and 11B are exemplary tables showing image quality metric comparison and measurement metric comparison respectively. 20 DETAILED DESCRIPTION [0022] Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise represented. The implementations set forth in the following description of exemplary 25 embodiments do not represent all implementations. Instead, they are merely examples of apparatuses and methods consistent with aspects related to the disclosed embodiments as recited in the appended claims. For example, alth...