Image processing method and image processing system
Patent Information
- Authority / Receiving Office
- KR · KR
- Patent Type
- Applications
- Current Assignee / Owner
- OPTS CO LTD
- Filing Date
- 2025-01-22
- Publication Date
- 2026-07-29
Smart Images

Figure PAT00001_ABST
Abstract
Description
Technology Field
[0001] The present invention relates to an image processing method and an image processing system. Background Technology
[0002] In image inspection, defect detection is a technology that automatically identifies defects by analyzing images to evaluate the quality of products, surfaces, materials, or systems. In this context, a defect refers to an unintended anomaly, damage, imperfection, or error, and is a factor that affects the appearance or function of a product. Defects can occur during the product manufacturing process and may manifest as cosmetic issues such as surface scratches, stains, and color unevenness, or as structural abnormalities such as cracks, breakage, and internal bubbles.
[0003] Image-based defect detection first defines a reference image of a normal state, and then acquires the image to be inspected using a high-resolution camera or infrared sensor. Subsequently, defect areas can be highlighted using various image processing techniques, such as noise removal and brightness and contrast adjustment. Features such as the location, size, and shape of defects are extracted from the processed images, and defects can be automatically classified and evaluated using machine learning or deep learning algorithms. This technology ensures the accuracy and efficiency of automated inspection systems and can improve quality assurance and productivity across various industries.
[0004] Meanwhile, defects may not be clearly visible in the image due to surrounding colors, patterns, or backgrounds. In other words, if image processing is not performed on the original image, such as enhancing contrast or emphasizing details in specific areas, problems may arise where defects are not detected or false positives occur.
[0005] Therefore, it is necessary to develop image processing methods that remove unnecessary information and optimize images to more clearly reveal defects in order to analyze images under inspection. The problem to be solved
[0006] The objective of the present invention is to provide an image processing method and an image processing system capable of separating a reference image and a source image into multiple channels and analyzing defects in a source image by utilizing frequency data of the separated channel images.
[0007] The problems of the present invention are not limited to those mentioned above, and other problems not mentioned will be clearly understood by those skilled in the art from the description below. means of solving the problem
[0008] An image processing method according to one embodiment of the present invention comprises the steps of: separating a reference image and a source image according to a plurality of image channels to generate a reference channel image and a source channel image; applying a transformation process to the reference channel image and the source channel image to obtain frequency data; histogram matching source frequency data of the source channel image based on the reference frequency data of the reference channel image; and analyzing a defect in the source image using the histogram-matched source frequency data.
[0009] Specifically, the reference image and source image are color images, and the reference channel image and source channel image may be images obtained by separating the reference image and source image into one of the R channel, G channel, or B channel according to the RGB channels.
[0010] Specifically, in the step of obtaining the frequency data, the frequency data is obtained by applying a transformation process after performing post-processing on the source channel image, and the post-processing performed on the source channel image may include at least one of brightness adjustment, blur, and sharpening.
[0011] Specifically, the step of matching the histogram may include: setting a restricted area based on a partial frequency band in the source frequency data; setting a radiated area based on a partial frequency band corresponding to the restricted area in the reference frequency data; performing frequency band restriction on the restricted area in the source frequency data; and performing frequency band pasting on the radiated area in which the frequency band of the reference frequency data is radiated to the restricted area.
[0012] Specifically, in the step of analyzing defects in the source image, the histogram-matched source frequency data is inversely transformed to produce a difference image with the reference channel image, and defects in the source image can be analyzed based on the difference image.
[0013] An image processing system according to one embodiment of the present invention comprises: an image generation unit that separates a reference image and a source image according to a plurality of image channels to generate a reference channel image and a source channel image; a frequency data acquisition unit that obtains frequency data by applying a transformation process to the reference channel image and the source channel image; a histogram matching unit that histogram-matches source frequency data of the source channel image based on the reference frequency data of the reference channel image; and a defect analysis unit that analyzes defects in the source image using the histogram-matched source frequency data.
[0014] Specifically, the reference image and source image are color images, and the reference channel image and source channel image may be images obtained by separating the reference image and source image into one of the R channel, G channel, or B channel according to the RGB channels.
[0015] Specifically, the frequency data acquisition unit acquires frequency data by applying a transformation process after performing post-processing on the source channel image, and the post-processing performed on the source channel image may include at least one of brightness adjustment, blur, and sharpening.
[0016] Specifically, the histogram matching unit may set a restricted area based on a partial frequency band in the source frequency data with adjusted pixel values, set a copy area based on a partial frequency band corresponding to the restricted area in the reference frequency data, perform frequency band restriction on the restricted area in the source frequency data, and perform frequency band pasting on the copy area in which the frequency band of the reference frequency data is copied to the restricted area.
[0017] Specifically, the defect analysis unit can inversely transform the histogram-matched source frequency data to calculate a difference image with the reference channel image, and analyze defects in the source image based on the difference image. Effects of the invention
[0018] An image processing method and image processing system according to one embodiment of the present invention can separate a reference image and a source image into a plurality of channels and analyze defects in the source image by utilizing frequency data of the separated channel images.
[0019] The effects of the present invention are not limited to those mentioned above, and other unmentioned effects will be clearly understood by those skilled in the art from the description in the claims. Brief explanation of the drawing
[0020] FIG. 1 is a drawing showing an image processing system according to one embodiment of the present invention. FIG. 2 is a drawing for explaining defects appearing on grayscale images and color images in an image processing system according to an embodiment of the present invention. FIG. 3 is a diagram illustrating the separation of a color image according to RGB channels in an image processing system according to an embodiment of the present invention. FIG. 4 is a diagram showing an example of a histogram for an image in an image processing system according to one embodiment of the present invention. FIG. 5 is a diagram showing histograms for each channel image of a color image separated according to RGB channels in an image processing system according to an embodiment of the present invention. FIG. 6 is a diagram illustrating the analysis of defects using histogram matching in a spatial domain in an image processing system according to an embodiment of the present invention. FIG. 7 is a diagram showing an example of frequency data for an image in an image processing system according to an embodiment of the present invention. FIG. 8 is a diagram illustrating the analysis of defects using histogram matching in the frequency domain in an image processing system according to an embodiment of the present invention. FIG. 9 is a flowchart of an image processing method according to one embodiment of the present invention. FIG. 10 is a diagram illustrating the step of matching histograms in an image processing method according to one embodiment of the present invention. FIG. 11 is a diagram showing a first reference image, a first source channel image, and first source channel images after post-processing. FIG. 12 is a diagram illustrating the analysis of defects in various ways by applying an image processing method according to an embodiment of the present invention to a first reference image, a first source channel image, and a first source channel image on which post-processing has been performed. FIG. 13 is a diagram showing a second reference image, a second source channel image, and second source channel images after post-processing. FIG. 14 is a diagram illustrating the analysis of defects in various ways by applying an image processing method according to an embodiment of the present invention to a second reference image, a second source channel image, and a second source channel image on which post-processing has been performed. Specific details for implementing the invention
[0021] The objects, specific advantages, and novel features of the present invention will become more apparent from the following detailed description and preferred embodiments in conjunction with the accompanying drawings. It should be noted that in assigning reference numerals to the components of each drawing in this specification, identical components are assigned the same number whenever possible, even if they are shown in different drawings. Furthermore, in describing the present invention, detailed descriptions of related prior art are omitted if it is determined that such detailed descriptions would unnecessarily obscure the essence of the invention.
[0022] Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the attached drawings.
[0024] FIG. 1 is a drawing showing an image processing system according to one embodiment of the present invention.
[0025] Referring to FIG. 1, an image processing system (100) according to one embodiment of the present invention includes an image generation unit (110), a frequency data acquisition unit (120), a histogram matching unit (130), and a defect analysis unit (140).
[0026] The image generation unit (110) can generate a reference channel image and a source channel image by separating the reference image and the source image according to a plurality of image channels.
[0027] For reference, it should be noted that in this specification, an image may be interpreted as including a video in which a plurality of images appear in succession. Additionally, a reference image may refer to a defect-free image, and a source image may refer to a defect-free image.
[0028] The reference image and the source image may be images taken of the same object. The reference image and the source image may be inputs that are analog images (or video signals) captured by a capturing device, such as a camera, converted into digital images (or video signals).
[0029] The frequency data acquisition unit (120) can acquire frequency data by applying conversion processing to the reference channel image and the source channel image.
[0030] The histogram matching unit (130) can histogram match the source frequency data of the source channel image based on the reference frequency data of the reference channel image.
[0031] The defect analysis unit (140) can analyze defects in the source image by utilizing histogram-matched source frequency data.
[0032] The defect analysis unit (140) can inversely transform the histogram-matched source frequency data to produce a difference image with the reference channel image and analyze defects in the source image based on the difference image.
[0033] The defect analysis unit (140) can calculate a difference image with the reference channel image by applying the inverse transformation of the transformation processing applied in the frequency data acquisition unit (120) to the source frequency data.
[0034] Before the difference image is generated, the reference image and the source image can be aligned. Specifically, each pixel of the reference image and the source image can be aligned to the same position.
[0035] The defect analysis unit (140) can calculate a difference image using a source image and a reference image generated by inverse transforming the histogram-matched source frequency data. The difference image may represent the difference in brightness values of pixels at the same location in the source image and the reference image. The brightness value of each pixel may be expressed as a gray level. The gray level may be calculated as an absolute value. The gray level of each pixel in the difference image may be calculated according to the following formula.
[0036] Diff(x,y)=|Ref(x,y)-Src(x,y)|
[0037] In the above equation, Diff(x,y) represents the difference image, Ref(x,y) represents the reference image, and Src(x,y) represents the source image.
[0038] The defect analysis unit (140) can analyze defects based on defects appearing in the image. Defect analysis involves detecting, extracting, or diagnosing abnormal patterns, damage, distortion, or other abnormal parts in an image, and can be used to detect defects or defective parts on the surface of a product in an automated manufacturing process, such as vision inspection.
[0039] The defect analysis unit (140) may determine that a pixel having a gray level that differs significantly from the average gray level is a defect, but the present invention is not limited thereto.
[0040] The defect analysis unit (140) can determine whether a product has defects based on deep learning, AI technology, etc., during the vision inspection execution stage. That is, during the vision inspection execution stage, it can store defect patterns based on various samples and identify defects based on defect patterns.
[0041] An image processing system (100) according to one embodiment of the present invention can be applied to various products such as semiconductors, LCDs, integrated circuits, PCBs, and barcodes, and can be used for various purposes, such as monitoring workers in addition to manufacturing products. However, the present invention is not limited thereto.
[0042] FIG. 2 is a drawing for explaining defects appearing on grayscale images and color images in an image processing system according to an embodiment of the present invention.
[0043] The reference image and the source image are color images, and the reference channel image and the source channel image may be images obtained by separating the reference image and the source image into any one of the R channel, G channel, or B channel according to the RGB channels.
[0044] Referring to FIG. 2, an image processing system (100) according to one embodiment of the present invention may use a color image rather than a grayscale image as a reference image and a source image to be analyzed for defects.
[0045] A grayscale image, or gray image, is a black-and-white image that represents only brightness values rather than color. Each pixel is represented by a single value between 0 and 255, where 0 represents pure black and 255 represents pure white. Since a grayscale image has only one channel, it can store a single brightness value for each pixel.
[0046] Therefore, grayscale images lack color information and represent only textures based on brightness or contrast within the image, and can be characterized by simple and computationally efficient image analysis.
[0047] Meanwhile, a color image is an image containing various color information, and each pixel can have multiple color values.
[0048] Color images can primarily be represented in color spaces such as RGB and HSV, and in a typical color image, each pixel in the RGB color space can be separated into three channels: R (red), G (green), and B (blue). Images in each channel represent different color information, and 256 levels can be generated per channel.
[0049] Therefore, since color images contain various information such as hue, saturation, and brightness, they represent visual information better and can capture greater detail and realism. In other words, defects that are undetectable or difficult to detect in grayscale images can be detected in color images.
[0050] Part g1 of the grayscale image and part c1 of the color image in Fig. 2 correspond to the part where a defect appears (defect) for the same object. In the case of the grayscale image, the defect is barely visible in part g1, but in the case of the color image, it can be seen that the defect is clearly visible in part c1 of the G channel image when separated into RGB channels.
[0051] FIG. 3 is a diagram illustrating the separation of a color image according to RGB channels in an image processing system according to an embodiment of the present invention.
[0052] Referring to Fig. 3, the color image can be separated into channel images according to RGB channels for more precise defect analysis.
[0053] RGB channel separation is a method that separates a color image into red (R), green (G), and blue (B) to process brightness information for each independently, with each channel independently representing the brightness information of its corresponding color.
[0054] Since each channel image provides separate information on specific color regions, it is possible to effectively detect specific defects that are more clearly revealed in specific color components.
[0055] For example, fine cracks or color inconsistencies on the surface may appear more pronounced in specific channels, allowing for a more precise identification of the location and type of defects.
[0056] FIG. 4 is a diagram showing an example of a histogram for an image in an image processing system according to one embodiment of the present invention.
[0057] Histogram matching is a technique in image processing that adjusts the pixel value distribution of a target image to match the histogram of a reference image, thereby making the brightness or color distribution between the two images similar.
[0058] Histogram matching can adjust the pixel values of a target image by calculating a transformation relationship for each pixel value and applying it to align the histogram of the target image with the histogram of a reference image.
[0059] Histogram matching is used to enhance visual similarity between images or to reflect specific characteristics of a reference image into a target image, and can be utilized in various application fields such as color correction, quality improvement, or style transfer.
[0060] Referring to Fig. 4, the histogram represents the frequency of each pixel value within the image, allowing for the analysis of how often a specific brightness or color appears. By utilizing the histogram, the image can be adjusted by emphasizing or suppressing a specific range of pixel values.
[0061] A cumulative histogram is a method of displaying frequencies below a certain pixel value by accumulating them, and it can be usefully utilized to make the overall brightness distribution of an image uniform or to increase similarity with a reference image.
[0062] FIG. 5 is a diagram showing histograms for each channel image of a color image separated according to RGB channels in an image processing system according to an embodiment of the present invention. FIG. 6 is a diagram illustrating the analysis of defects using histogram matching in a spatial domain in an image processing system according to an embodiment of the present invention.
[0063] Referring to Fig. 5, when a color image is separated according to RGB channels, it can be seen that the histograms of each RGB channel image exhibit different characteristics. Accordingly, by utilizing the histogram of the RGB channel image of the reference image (reference channel image) and the histogram of the RGB channel image of the source image (source channel image), defects can be analyzed through histogram matching in the spatial domain.
[0064] In the spatial domain, histogram matching is a method that applies a transformation directly to each pixel value of an image to adjust the pixel brightness or color of a target image to match the histogram of a reference image.
[0065] In the spatial domain, histogram matching changes each pixel value of the target image to match the distribution of pixel values in the reference image, and can be used to adjust the overall image's contrast or color distribution.
[0066] For example, it can make an image with unevenly distributed brightness uniform, or emphasize or suppress specific color components.
[0067] Histogram matching in the spatial domain directly modifies the visual characteristics of an image, allowing for intuitive verification of results; it can be primarily used for purposes such as image correction, quality improvement, and visual balancing.
[0068] Specifically, a histogram of a reference channel image and a histogram of a source channel image are calculated, a reference cumulative distribution function for the histogram of the reference channel image and a source cumulative distribution function for the histogram of the source channel image are calculated, a specified function is generated by comparing the reference cumulative distribution function and the source cumulative distribution function, and the gray level of the source channel image pixels can be converted based on the specified function.
[0069] For reference, the images shown in Fig. 6 correspond, from left to right, to the B channel image of the reference image, the G channel image of the source image, the G channel image of the histogram-matched source image, and the difference image.
[0070] Referring to Fig. 6, a histogram-matched G-channel image of the source image is generated by histogram-matching the B-channel image of the reference image and the G-channel image of the source image, and defects in the G-channel image of the source image can be analyzed by utilizing the difference image between the histogram-matched G-channel image of the source image and the B-channel image of the reference image. Although the gray levels of the B-channel image of the reference image, the G-channel image of the source image, the histogram-matched G-channel image of the source image, and the difference image are different, the shape and location of the object within the image are identical.
[0071] As such, when there are no defects in the B channel image of the reference image in relation to the original color image, and there are defects in the G channel image of the source image, defects appear in the difference image, and defects can be analyzed through the difference image.
[0072] FIG. 7 is a diagram showing an example of frequency data for an image in an image processing system according to an embodiment of the present invention.
[0073] For reference, the transformation processing applied to the reference channel image and the source channel image in the frequency data acquisition unit (120) in this specification may include various methods for converting images into frequency components (e.g., Fourier transform, Wavelet transform, Discrete Cosine Transform (DCT), etc.).
[0074] Histogram matching in the frequency domain is a method that applies histogram matching to frequency components after the image has been converted into frequency components. Since histogram matching in the frequency domain allows for the independent adjustment of the image's high and low frequency components, it is effective for modifying or enhancing detailed textures or patterns within an image.
[0075] In the following description, frequency data is obtained by applying discrete cosine transform processing to the reference channel image and source channel image in the frequency data acquisition unit (120) as an example, but is not limited thereto.
[0076] The discrete cosine transform used in this embodiment is a mathematical method used to decompose a signal or image into frequency components, and can efficiently compress or analyze an image by converting it into the frequency domain.
[0077] Referring to Fig. 7, the low-frequency component in the discrete cosine transform represents the basic structure and main contours of the image and can represent smooth changes and the overall shape of the image. The low-frequency component is a region where the brightness change of the image occurs slowly and can be used to distinguish color differences over large areas.
[0078] These low-frequency components contain key information about the image, making them essential for recognizing shapes or patterns and serving as a crucial tool for understanding the image. Low-frequency coefficients are located in the top left corner of the transformed image and exhibit the largest values at that position, which indicates that the coefficients describe the overall structure of the image.
[0079] In the Discrete Cosine Transform, high-frequency components represent image details, boundaries, and textures, and can indicate abrupt changes, corners, or small patterns. High-frequency components often contain image details or noise. Since high-frequency components may contain relatively less important information in the image and primarily represent detailed elements, their impact on the overall perception of the image may be minimal.
[0080] High-frequency coefficients are located at the bottom right of the transformed image and can contain detailed information and boundary information of the image.
[0081] Histogram matching in the frequency domain allows for more precise image adjustment by enabling adjustment only in specific frequency bands without changing the overall image structure.
[0082] For example, high-frequency components in the frequency domain can be adjusted to emphasize the detailed structure of the image, or low-frequency components can be adjusted to convert it into a smooth image. Detailed information regarding histogram matching in the frequency domain using the discrete cosine transform will be described later in Fig. 8.
[0083] FIG. 8 is a diagram illustrating the analysis of defects using histogram matching in the frequency domain in an image processing system according to an embodiment of the present invention.
[0084] The Discrete Cosine Transform is an orthogonal transformation technique that converts an image signal from the spatial domain to the frequency domain, allowing the image to be represented as the sum of sinusoidal signals of various magnitudes and frequencies.
[0085] After conversion, the energy is mainly concentrated in the low-frequency range, which is related to the characteristic that humans react sensitively to low-frequency components and insensitively to high-frequency components.
[0086] Therefore, partially modifying the low-frequency range can generate a deformed image that is perceived as different from the input image. On the other hand, even if parts of the high-frequency range are omitted, there is almost no noticeable difference in image quality. Furthermore, various forms of deformed images can be created by applying an inverse transform after limiting the low or high-frequency bands.
[0087] In an image processing system (100) according to one embodiment of the present invention, the histogram matching unit sets a restricted area based on a partial frequency band in source frequency data with adjusted pixel values, sets a copy area based on a partial frequency band corresponding to the restricted area in reference frequency data, performs frequency band restriction on the restricted area in source frequency data, and performs frequency band pasting in the copy area in which the frequency band of the reference frequency data is copied to the restricted area.
[0088] Frequency band limiting is a process that includes only components within a specific frequency range and removes other frequency components. Since low-frequency components represent the main shapes and structures while high-frequency components represent details or noise, removing high-frequency components through frequency band limiting can enhance the smooth contours of an image and reduce noise, thereby improving the visual quality of the image.
[0089] Frequency band copying and frequency band pasting are processes of copying specific frequency components from another image and adding them to an existing image. This embodiment can be utilized to enhance details or textures of an image, or to reinforce detailed information of an image, by overwriting specific frequency components of another image onto an existing image or pasting them into a frequency band-limited portion of the existing image.
[0090] For reference, the images shown in Fig. 8 correspond, from left to right, to reference frequency data (discrete cosine coefficients for the G channel image of the reference image), source frequency data (discrete cosine coefficients for the G channel image of the source image), and histogram-matched source frequency data.
[0091] Referring to Fig. 8, histogram-matched source frequency data can be generated by histogram-matching the reference frequency data and the source frequency data in the frequency domain.
[0092] Furthermore, the r1 portion of the reference frequency data, the r2 portion of the source frequency data, and the r3 portion of the histogram-matched source frequency data all correspond to the low-frequency range. Accordingly, histogram-matched source frequency data can be generated by applying a frequency band limit to r2 and copying r1 to the r2 portion. The source frequency data can be histogram-matched with the reference frequency data by having r1 in the r2 portion.
[0093] Therefore, by copying and pasting a portion of the reference frequency data for a frequency range other than the one where defects appear in the source frequency data, or for a frequency range other than the one where defects are expected, defects can be highlighted or defects can be made more clearly visible in the difference image.
[0094] In other words, if a user defines a frequency band and matches the histogram of that frequency band, specific frequency bands within an image can be selectively strengthened or weakened. Accordingly, the present invention is distinguished by attempting histogram matching in the frequency domain and demonstrating superior performance by applying it to defect detection.
[0095] Meanwhile, the frequency data acquisition unit acquires frequency data by applying a transformation process after performing post-processing on the source channel image, and the post-processing performed on the source channel image may include at least one of brightness adjustment, blur, and sharpening.
[0096] Blurring is a method that applies a blurring effect by softening image details, and sharpening is a method that makes an image sharper by emphasizing its boundaries and details; however, post-processing is not limited to brightness adjustment, blurring, and sharpening, but can also include various other methods such as cropping, which cuts out the rest of the image leaving only a specific area; flipping, which flips the image horizontally or vertically; and rotation, which rotates the image at a specific angle.
[0097] FIG. 9 is a flowchart of an image processing method according to one embodiment of the present invention.
[0098] Referring to FIG. 9, an image processing method according to one embodiment of the present invention includes the steps of: separating a reference image and a source image according to a plurality of image channels to generate a reference channel image and a source channel image (S110); applying a transformation process to the reference channel image and the source channel image to obtain frequency data (S120); histogram matching the source frequency data of the source channel image based on the reference frequency data of the reference channel image (S130); and analyzing a defect in the source image using the histogram-matched source frequency data (S140).
[0099] The reference image and the source image are color images, and the reference channel image and the source channel image may be images obtained by separating the reference image and the source image into any one of the R channel, G channel, or B channel according to the RGB channels.
[0100] In the step of obtaining frequency data (S120), frequency data is obtained by applying a transformation process after performing post-processing on the source channel image, and the post-processing performed on the source channel image may include at least one of brightness adjustment, blur, and sharpening.
[0101] Blurring is a method that applies a blurring effect by softening image details, and sharpening is a method that makes an image sharper by emphasizing its boundaries and details; however, post-processing is not limited to brightness adjustment, blurring, and sharpening, but can also include various other methods such as cropping, which cuts out the rest of the image leaving only a specific area; flipping, which flips the image horizontally or vertically; and rotation, which rotates the image at a specific angle.
[0102] In the step of analyzing defects in the source image (S140), the histogram-matched source frequency data is inversely transformed to produce a difference image with the reference channel image, and defects in the source image can be analyzed based on the difference image.
[0103] FIG. 10 is a diagram illustrating the step of matching histograms in an image processing method according to one embodiment of the present invention.
[0104] Referring to FIG. 10, in an image processing method according to an embodiment of the present invention, the step of matching a histogram (S130) may include: a step of setting a restricted area based on a partial frequency band in source frequency data (S131); a step of setting a copy area based on a partial frequency band corresponding to the restricted area in reference frequency data (S132); and a step of performing frequency band restriction on the restricted area in source frequency data, and performing frequency band pasting on the copy area in which the frequency band of the reference frequency data is copied to the restricted area (S133).
[0105] FIG. 11 is a diagram showing a first reference image, a first source channel image, and first source channel images after post-processing. FIG. 12 is a diagram for explaining how to analyze defects in various ways by applying an image processing method according to an embodiment of the present invention to a first reference image, a first source channel image, and first source channel images after post-processing.
[0106] Referring to FIGS. 11 and 12, defects in the first source image can be analyzed by histogram matching the first reference color image without defects and the first reference channel image (Reference B Channel) separated from the first reference image into B channels with the images on which post-processing was performed on the first source image with defects.
[0107] Referring to Fig. 11, it can be seen that the first reference image and the first reference channel image do not show defects, while the first source channel image after post-processing shows defects.
[0108] However, referring to Fig. 12, it can be seen that among the histogram matching results in the spatial domain and the histogram matching results in the frequency domain, defects are clearly visible in the histogram matching results in the frequency domain.
[0109] That is, in the histogram matching result in the spatial domain, it is confirmed that a defect appears in the difference image between the histogram matching image and the first reference channel image, while the shape of the first reference channel image or the first source channel image appears partially in parts other than the defect.
[0110] On the other hand, in the histogram matching results in the frequency domain, defects are clearly visible in the difference image between the histogram matching image and the first reference channel image, and it is confirmed that defects are detected more clearly as the shape of the first reference channel image or the first source channel image does not appear or appears weakly in parts other than the defects.
[0111] Therefore, unlike histogram matching in the spatial domain, histogram matching in the frequency domain allows the user to define frequency bands and match histograms within those bands, thereby having the effect of facilitating defect analysis by highlighting defects or downplaying non-defective areas.
[0113] FIG. 13 is a diagram showing a second reference image, a second source channel image, and second source channel images after post-processing. FIG. 14 is a diagram for explaining how to analyze defects in various ways by applying an image processing method according to an embodiment of the present invention to a second reference image, a second source channel image, and second source channel images after post-processing.
[0114] Referring to FIGS. 13 and 14, defects in the second source image can be analyzed by histogram matching the defect-free second reference image (Reference color image) and the second reference channel image (Reference R Channel) separated into R channels of the second reference image with histogram matching to images on which post-processing has been performed on the defect-free second source image.
[0115] Referring to Fig. 13, it can be seen that the second reference image and the second reference channel image do not show defects, while the second source channel image after post-processing shows defects.
[0116] However, referring to Fig. 14, it can be seen that among the histogram matching results in the spatial domain and the histogram matching results in the frequency domain, defects are clearly visible in the histogram matching results in the frequency domain.
[0117] That is, in the histogram matching result in the spatial domain, it is confirmed that a defect appears in the difference image between the histogram matching image and the second reference channel image, while the shape of the second reference channel image or the second source channel image appears partially in parts other than the defect.
[0118] On the other hand, in the histogram matching results in the frequency domain, defects are clearly visible in the difference image between the histogram matching image and the second reference channel image, and it is confirmed that defects are detected more clearly as the shape of the second reference channel image or the second source channel image does not appear or appears weakly in parts other than the defects.
[0119] Therefore, unlike histogram matching in the spatial domain, histogram matching in the frequency domain allows the user to define frequency bands and match histograms within those bands, thereby having the effect of facilitating defect analysis by highlighting defects or downplaying non-defective areas.
[0120] In summary, color images contain more information than grayscale images, so defects that are not easily visible in grayscale images can appear clearly in color images. In visual inspection, a method of comparing a defect-free reference image with the source image (the image to be inspected) input into the machine vision system is primarily used.
[0121] However, source images are prone to distortion for various reasons, which can lead to reduced accuracy of the results. To address this problem, the present invention applies frequency domain histogram matching to color images. Compared to spatial domain histogram matching, frequency domain histogram matching offers several advantages, such as the ability to define the band to be applied. If an algorithm for improving visual inspection accuracy utilizing frequency domain histogram matching (e.g., an image processing method according to an embodiment of the present invention) is applied to sites where machine vision is used, it could significantly enhance industrial competitiveness.
[0123] Although the present invention has been described above with reference to embodiments, this is merely illustrative and does not limit the invention. Those skilled in the art will understand that various combinations, modifications, and applications not exemplified in the embodiments are possible without departing from the essential technical content of the embodiments. Therefore, technical details regarding modifications and applications that can be easily derived from the embodiments of the present invention should be interpreted as being included in the present invention. Explanation of the symbols
[0124] 100: Image Processing System 110: Image generation unit 120: Frequency data acquisition unit 130: Histogram Matching Section 140: Defect Analysis Department
Claims
Claim 1 An image processing method comprising: a step of generating a reference channel image and a source channel image by separating a reference image and a source image according to a plurality of image channels; a step of obtaining frequency data by applying a transformation process to the reference channel image and the source channel image; a step of histogram matching source frequency data of the source channel image based on the reference frequency data of the reference channel image; and a step of analyzing a defect in the source image using the histogram-matched source frequency data. Claim 2 An image processing method according to claim 1, wherein the reference image and the source image are color images, and the reference channel image and the source channel image are images obtained by separating the reference image and the source image into one of the R channel, G channel, and B channel according to the RGB channels. Claim 3 An image processing method according to claim 1, wherein in the step of obtaining frequency data, frequency data is obtained by applying a transformation process after performing post-processing on the source channel image, and the post-processing performed on the source channel image includes at least one of brightness adjustment, blur, and sharpening. Claim 4 An image processing method according to claim 1, wherein the step of matching the histogram comprises: a step of setting a restricted area based on a partial frequency band in the source frequency data; a step of setting a copy area based on a partial frequency band corresponding to the restricted area in the reference frequency data; and a step of performing frequency band restriction on the restricted area in the source frequency data, and performing frequency band pasting on the copy area in which the frequency band of the reference frequency data is copied to the restricted area. Claim 5 An image processing method according to claim 1, wherein in the step of analyzing defects in the source image, the histogram-matched source frequency data is inversely transformed to calculate a difference image with the reference channel image, and defects in the source image are analyzed based on the difference image. Claim 6 An image processing system comprising: an image generation unit that separates a reference image and a source image according to a plurality of image channels to generate a reference channel image and a source channel image; a frequency data acquisition unit that obtains frequency data by applying a transformation process to the reference channel image and the source channel image; a histogram matching unit that histogram-matches source frequency data of the source channel image based on the reference frequency data of the reference channel image; and a defect analysis unit that analyzes defects in the source image using the histogram-matched source frequency data. Claim 7 An image processing system according to claim 6, wherein the reference image and source image are color images, and the reference channel image and source channel image are images obtained by separating the reference image and source image into one of the R channel, G channel, and B channel according to the RGB channels. Claim 8 In claim 6, the frequency data securing unit secures frequency data by applying a conversion process after performing post-processing on the source channel image, and the post-processing performed on the source channel image includes at least one of brightness adjustment, blur, and sharpening, in an image processing system. Claim 9 In claim 6, the histogram matching unit sets a restricted area based on a partial frequency band in the source frequency data with adjusted pixel values, sets a copy area based on a partial frequency band corresponding to the restricted area in the reference frequency data, performs frequency band restriction on the restricted area in the source frequency data, and performs frequency band pasting on the copy area in which the frequency band of the reference frequency data is copied to the restricted area. Claim 10 In claim 6, the defect analysis unit inversely transforms the histogram-matched source frequency data to calculate a difference image with the reference channel image, and analyzes defects in the source image based on the difference image, in an image processing system.