Electronic device for improving local contrast of image and operation method therefor

The electronic device enhances local contrast in images by applying CLAHE with bilinear and outerpolation techniques, addressing the trade-off between contrast and artifacts, enabling efficient real-time processing and improved image quality.

WO2026142071A1PCT designated stage Publication Date: 2026-07-02SAMSUNG ELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SAMSUNG ELECTRONICS CO LTD
Filing Date
2025-12-09
Publication Date
2026-07-02

AI Technical Summary

Technical Problem

The CLAHE algorithm for enhancing local contrast in images faces a trade-off between improving contrast and reducing halo artifacts, with existing methods struggling with high computational load and performance degradation, particularly in real-time processing.

Method used

An electronic device and method that divides an image into multiple tiles, applies CLAHE, and uses bilinear interpolation and outerpolation based on normalized histogram cumulative distribution functions to transform pixel values, reducing halo artifacts while maintaining high contrast, thus enabling real-time processing.

Benefits of technology

The method effectively reduces halo artifacts and enhances local contrast in images, allowing real-time processing even on low-computational devices, ensuring consistent performance and improved image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2025021153_02072026_PF_FP_ABST
    Figure KR2025021153_02072026_PF_FP_ABST
Patent Text Reader

Abstract

Provided are an electronic device for improving local contrast of an image, and an operation method therefor. The electronic device may: partition the entire area of an original image into a plurality of first tiles; acquire a first image by applying a contrast limited adaptive histogram equalization (CLAHE) algorithm to the plurality of first tiles; partition the entire area of the original image into a plurality of second tiles by using straight lines connecting center points of sides of each of the plurality of first tiles; interpolate pixel values of pixels included in second tiles commonly overlapping four adjacent first tiles by using pixel conversion values by means of a histogram cumulative distribution function of each of the four adjacent first tiles; acquire a second image by converting pixel values of pixels located outside the second tiles among pixels in any one of the four adjacent first tiles by using pixel conversion values by means of the histogram cumulative distribution function of each of the four adjacent first tiles; and acquire a final image by combining the first image and the second image.
Need to check novelty before this filing date? Find Prior Art

Description

Electronic device for improving local contrast of an image and method of operation thereof

[0001] The present disclosure relates to an electronic device for enhancing local contrast of an image and a method of operating the same. Specifically, the present disclosure discloses an electronic device and a method of operating the same that apply a Contrast Limited Adaptive Histogram Equalization (CLAHE) algorithm to divide an image into a plurality of tiles, enhance contrast for each of the plurality of tiles, and reduce halo artifacts caused by image brightness or distortion occurring at the boundaries of the plurality of tiles.

[0002] Techniques for enhancing local contrast in images play a crucial role in the field of image processing and are utilized in various applications, particularly in medical imaging, satellite imagery, and digital photo correction. Generally, the Contrast Limited Adaptive Histogram Equalization (CLAHE) algorithm is used to increase local contrast in images. The CLAHE algorithm operates by dividing an image into multiple tiles, performing histogram equalization on pixel values ​​within each tile, and applying a clip limit threshold to prevent excessive increases in pixel contrast.

[0003] However, when applying the CLAHE algorithm to increase local contrast by setting the tile size small or adjusting the clip limit significantly, there is a problem where halo artifacts occur. Halo artifacts refer to a phenomenon where the brightness or color of an image is distorted along the boundaries between multiple tiles, and image quality can be degraded due to these artifacts. In the CLAHE algorithm, there is a trade-off relationship between improving local contrast and reducing halo artifacts. For example, increasing the clip limit to enhance local contrast results in halo artifacts, while setting the clip limit low to improve image quality by reducing halo artifacts leads to lower local contrast performance.

[0004] In conventional technology, a method was proposed to adaptively adjust clip limits by analyzing tile histograms to reduce halo artifacts while maintaining a high level of local contrast performance. However, this approach has the problem of being difficult for real-time processing due to the high computational load required to analyze tile histograms. Additionally, there is a limitation in that local contrast performance degrades for some tiles where the clip limit is set low.

[0005] One aspect of the present disclosure provides a method for an electronic device to enhance the local contrast of an image. The method of operation of the electronic device of the present disclosure may include the step of obtaining a first image by dividing the entire area of ​​an original image into a plurality of first tiles and applying a Contrast Limited Adaptive Histogram Equalization (CLAHE) algorithm to the divided plurality of first tiles. The method of operation of the electronic device may include the step of dividing the entire area of ​​the original image into a plurality of second tiles using a straight line connecting the midpoints of the sides of each of the plurality of first tiles. The method of operation of the electronic device may include the step of obtaining a second image by performing bilinear interpolation to transform the pixel value of a pixel included within a second tile that is commonly superimposed on any one of four first tiles adjacent to a plurality of second tiles, using a pixel transformation value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles, and by performing outerpolation to transform the pixel value of a pixel located outside the second tile among pixels within any one of the four adjacent first tiles, using a pixel transformation value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles. The method of operation of the electronic device may include the step of obtaining a final image by applying weights to each of the first image and the second image, and combining the first image and the second image to which the weights have been applied.

[0006] One aspect of the present disclosure provides an electronic device for enhancing local contrast of an image. The electronic device may include at least one processor comprising processing circuitry and a memory for storing one or more instructions. By executing the one or more instructions individually or collectively by the at least one processor, the electronic device may obtain a first image by dividing the entire area of ​​the original image into a plurality of first tiles and applying a Contrast Limited Adaptive Histogram Equalization (CLAHE) algorithm to the divided plurality of first tiles. By executing the one or more instructions individually or collectively by the at least one processor, the electronic device may divide the entire area of ​​the original image into a plurality of second tiles using a straight line connecting the midpoints of the sides of each of the plurality of first tiles.By executing the above one or more instructions individually or collectively by the at least one processor, the electronic device can obtain a second image by performing bilinear interpolation to transform the pixel value of a pixel included in a second tile that is commonly superimposed on four adjacent first tiles among a plurality of second tiles, using a pixel transformation value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles, and by performing outerpolation to transform the pixel value of a pixel located outside the second tile among pixels within any one of the four adjacent first tiles, using a pixel transformation value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles. By executing the above one or more instructions individually or collectively by the at least one processor, the electronic device can obtain a final image by applying weights to each of the first image and the second image, and combining the first image and the second image to which the weights have been applied.

[0007] One aspect of the present disclosure provides a computer program product comprising a computer-readable storage medium. The storage medium comprises the operation of dividing an entire area of ​​an original image into a plurality of first tiles and obtaining a first image by applying a Contrast Limited Adaptive Histogram Equalization (CLAHE) algorithm to the plurality of divided first tiles; and the operation of dividing an entire area of ​​an original image into a plurality of second tiles using a straight line connecting the midpoints of the sides of each of the plurality of first tiles. The electronic device may include instructions readable by the electronic device to perform the operation of acquiring a second image by performing bilinear interpolation using pixel transformation values ​​based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles to transform the pixel values ​​of pixels included in a second tile that are commonly overlapped with four adjacent first tiles among a plurality of second tiles, and by performing outerpolation using pixel transformation values ​​based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles to transform the pixel values ​​of pixels located outside the second tile among pixels within any one of the four adjacent first tiles; and the operation of acquiring a final image by applying weights to each of the first image and the second image and combining the first image and the second image to which weights have been applied.

[0008] The present disclosure can be easily understood from the combination of the following detailed description and the accompanying drawings, where reference numerals denote structural elements.

[0009] FIG. 1 is a diagram illustrating the operation of an electronic device according to one embodiment of the present disclosure to obtain a first image and a second image by applying a Contrast Limited Adaptive Histogram Equalization (CLAHE) algorithm to an original image, and to obtain a final image with enhanced local contrast by synthesizing the first image and the second image.

[0010] FIG. 2 is a flowchart illustrating a method in which an electronic device according to one embodiment of the present disclosure improves the local contrast of an image using the CLAHE algorithm.

[0011] FIG. 3 is a block diagram illustrating the components of an electronic device according to one embodiment of the present disclosure.

[0012] FIG. 4 is a flowchart illustrating a method in which an electronic device according to one embodiment of the present disclosure applies the CLAHE algorithm to improve the local contrast of an image.

[0013] FIG. 5 is a diagram illustrating the operation of an electronic device according to one embodiment of the present disclosure to interpolate pixel values ​​by performing bilinear interpolation on pixels included in a region commonly overlapped by a plurality of tiles.

[0014] FIG. 6 is a flowchart illustrating a method for an electronic device according to one embodiment of the present disclosure to transform a pixel value within one of four tiles based on the normalized histogram cumulative distribution function of each of four adjacent tiles among a plurality of tiles.

[0015] FIG. 7 is a diagram illustrating the operation of an electronic device according to one embodiment of the present disclosure to transform a pixel value within one of four tiles based on a normalized histogram cumulative distribution function of each of four adjacent tiles among a plurality of tiles.

[0016] FIG. 8 is a diagram illustrating the operation of an electronic device according to one embodiment of the present disclosure to transform a pixel value within one tile based on a pixel transformation value by a normalized histogram cumulative distribution function of each of four adjacent tiles among a plurality of tiles and the distance between the pixel and the boundary line of the tile or the extension line of the boundary line.

[0017] FIG. 9 is a diagram illustrating the operation of an electronic device according to one embodiment of the present disclosure determining four adjacent tiles to convert the pixel value of one of a plurality of tiles.

[0018] FIG. 10 is a flowchart illustrating a method for generating a final image by combining a first image and a second image, respectively obtained by applying a weight to each of the CLAHE algorithms, using an electronic device according to one embodiment of the present disclosure.

[0019] FIG. 11 is a diagram illustrating the operation of an electronic device according to one embodiment of the present disclosure to generate a final image by applying weights to a first image and a second image obtained by applying the CLAHE algorithm and combining them.

[0020] FIG. 12 is a diagram illustrating the operation of an electronic device according to one embodiment of the present disclosure acquiring an additional image and generating a final image using the average sum image of the second image and the additional image and the first image.

[0021] FIG. 13a is a diagram illustrating the operation of an electronic device according to one embodiment of the present disclosure to obtain an additional image by converting the pixel values ​​of pixels included in two of four adjacent first tiles through outerpolation, and to generate a final image using the additional image.

[0022] FIG. 13b is a diagram illustrating the operation of an electronic device according to one embodiment of the present disclosure to obtain an additional image by converting the pixel values ​​of pixels included in three of four adjacent first tiles through outerpolation, and to generate a final image using the additional image.

[0023] FIG. 13c is a diagram illustrating the operation of an electronic device according to one embodiment of the present disclosure to obtain an additional image by converting the pixel values ​​of pixels included in four first tiles among four adjacent first tiles through outerpolation, and to generate a final image using the additional image.

[0024] The terms used in the embodiments of this specification have been selected to be as widely used and general as possible, taking into account the functions of the present disclosure; however, these may vary depending on the intent of those skilled in the art, case law, the emergence of new technologies, etc. Additionally, in specific cases, terms have been arbitrarily selected by the applicant, and in such cases, their meanings will be described in detail in the description section of the relevant embodiments. Therefore, terms used in this specification should be defined not merely by their names, but based on their meanings and the overall content of the present disclosure.

[0025] Singular expressions may include plural expressions unless the context clearly indicates otherwise. Terms used herein, including technical or scientific terms, may have the same meaning as generally understood by those skilled in the art as described in this specification.

[0026] Throughout this disclosure, when a part is described as "comprising" a certain component, this means that, unless specifically stated otherwise, it does not exclude other components but may include additional components. Furthermore, terms such as "...part," "...module," etc., as used in this specification refer to a unit that processes at least one function or operation, and this may be implemented in hardware or software, or as a combination of hardware and software.

[0027] As used in this disclosure, the expression “configured to” may be replaced, depending on the context, with, for example, “suitable for,” “having the capacity to,” “designed to,” “adapted to,” “made to,” or “capable of.” The term “configured to” may not necessarily mean only “specifically designed to” in hardware. Instead, in some situations, the expression “system configured to” may mean that the system is “capable of” in conjunction with other devices or components. For example, the phrase “processor configured to perform A, B, and C” may mean a dedicated processor for performing the said operations (e.g., an embedded processor), or a generic-purpose processor (e.g., a CPU or an application processor) capable of performing said operations by executing one or more software programs stored in memory.

[0028] In addition, when a component is described in the present disclosure as being "connected" or "connected" to another component, it should be understood that the component may be directly connected to or directly connected to the other component, but unless otherwise specifically stated, it may also be connected or connected through another component in between.

[0029] All functions or operations described in this disclosure may be processed individually by a single processor and / or collectively by a plurality of processors. A single processor or a combination of a plurality of processors may include circuitry that performs processing, such as an Application Processor (AP), Communication Processor (CP), Graphical Processing Unit (GPU), Neural Processing Unit (NPU), Microprocessor Unit (MPU), System on Chip (SoC), Integrated Chip (IC), etc.

[0030] It should be understood that the blocks and combinations of flowcharts in the flowcharts illustrated in the present disclosure may be performed by one or more computer programs comprising computer-executable instructions. The one or more computer programs may be stored all in a single memory or may be divided and stored in multiple different memories.

[0031] In the present disclosure, 'CLAHE (Contrast Limited Adaptive Histogram Equalization)' is an algorithm that enhances the local contrast of an image. The CLAHE algorithm can enhance the local contrast of an image by dividing the image into a plurality of blocks called tiles and performing histogram equalization for each of the plurality of tiles. In one embodiment of the present disclosure, the CLAHE algorithm can apply a clip limit value when the histogram of a specific pixel value is excessively high during the histogram equalization process to evenly distribute the excess histogram.

[0032] In the present disclosure, 'tile' refers to an individual image region obtained by dividing an input original image into blocks to enhance local contrast of the image. For example, a tile may be a rectangular grid. However, it is not limited thereto, and a tile may be a square grid.

[0033] In the present disclosure, 'halo artifact' refers to a phenomenon in which the brightness or color of an image is distorted at the boundary between multiple tiles as a result of enhancing the local contrast of an image through the CLAHE algorithm. The quality of the image may be degraded due to the halo artifact. In one embodiment of the present disclosure, the CLAHE algorithm may include an interpolation algorithm that interpolates pixel values ​​to reduce the halo artifact at the boundary between multiple tiles.

[0034] Embodiments of the present disclosure are described below with reference to the attached drawings so that those skilled in the art can easily implement them. However, the present disclosure may be embodied in various different forms and is not limited to the embodiments described herein.

[0035] Embodiments of the present disclosure will be described in detail below with reference to the drawings.

[0036] FIG. 1 shows that an electronic device (100, see FIG. 3) according to one embodiment of the present disclosure applies a Contrast Limited Adaptive Histogram Equalization (CLAHE) algorithm to an original image to obtain a first image (i1) and a second image (i2), and synthesizes the first image (i1) and the second image (i2) to obtain a final image (i) with enhanced local contrast. f This is a diagram to explain the operation of obtaining ).

[0037] Referring to FIG. 1, the electronic device (100) can obtain a first image (i1) by applying the CLAHE algorithm to the original image.

[0038] After acquiring the first image (i1), the electronic device (100) can divide the entire area of ​​the original image into a plurality of second tiles (t2).

[0039] The electronic device (100) can obtain a second image (i2) by transforming the pixel values ​​of pixels included in any one of the four first tiles using a normalized histogram cumulative distribution function of each of the four adjacent first tiles among the plurality of first tiles (t1). In one embodiment of the present disclosure, the electronic device (100) can obtain a second image (i2) by performing bilinear interpolation on pixels included in a second tile that overlaps commonly with four adjacent first tiles among the plurality of second tiles (t2), and transforming pixels located in the outer region of the second tile that overlaps commonly with four adjacent first tiles through outerpolation of pixel values ​​obtained through scaling and mapping using the normalized histogram cumulative distribution function of each of the four first tiles.

[0040] The electronic device (100) applies weights to the first image (i1) and the second image (i2), respectively, and by linearly combining the first image (i1) and the second image (i2) to which the weights are applied, a final image (i f You can obtain ).

[0041] FIG. 2 is a flowchart illustrating a method in which an electronic device (100, see FIG. 3) according to one embodiment of the present disclosure improves local contrast of an image using a CLAHE algorithm. Hereinafter, the function and / or operation of the electronic device (100) will be described in detail with reference to FIG. 2 and FIG. 1.

[0042] In step S210, the electronic device (100) divides the entire area of ​​the original image into a plurality of first tiles and applies the CLAHE algorithm to the divided plurality of first tiles to obtain a first image. Referring together with FIG. 1, the electronic device (100) can divide the entire area of ​​the original image into a plurality of first tiles (t1) in block units. In one embodiment of the present disclosure, the plurality of first tiles (t1) may be a rectangular grid. However, it is not limited thereto, and the plurality of first tiles (t1) may be a square grid. In one embodiment of the present disclosure, the electronic device (100) performs histogram equalization on each of a plurality of first tiles (t1) and can convert the pixel values ​​of the pixels based on the second tile (t2) area by scaling and mapping the pixel values ​​using a normalized histogram cumulative distribution function obtained through histogram equalization. As the pixel values ​​are converted, the electronic device (100) can obtain a first image (i1) with enhanced contrast for each tile.

[0043] In step S220, the electronic device (100) divides the entire area of ​​the original image into multiple second tiles using a straight line connecting the midpoints of the sides of each of the multiple first tiles. Referring together to FIG. 1, the electronic device (100) can obtain multiple second tiles (t2) by dividing the entire area of ​​the original image using a straight line connecting the midpoints of the sides of each of the multiple first tiles (t1) included in the first image (i1). However, it is not limited thereto, and the electronic device (100) may also obtain multiple second tiles (t2) by calculating the centroid of each of the multiple first tiles (t1) and dividing the entire area of ​​the original image with a straight line connecting points indicating the location of the centroid of each of the multiple first tiles (t1). The multiple second tiles (t2) may be arranged so as to be offset from the multiple first tiles (t1) by half the size of the sides of the multiple first tiles (t1). The boundary line between multiple second tiles (t2) can be orthogonal to the boundary line between multiple first tiles (t1).

[0044] In step S230, the electronic device (100) converts the pixel value of a pixel included in a second tile that is commonly superimposed on four adjacent first tiles among a plurality of first tiles by performing bilinear interpolation using a pixel conversion value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles, and converts the pixel value of a pixel located outside the second tile among pixels within any one of the four adjacent first tiles by performing outerpolation using a pixel conversion value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles, thereby obtaining a second image.

[0045] In one embodiment of the present disclosure, the electronic device (100) may store a normalized histogram cumulative distribution function for each of the plurality of first tiles obtained in step S210 in memory (120, see FIG. 3). For example, the electronic device (100) may store the normalized histogram cumulative distribution function for each of the plurality of first tiles in the form of a look-up table. In this case, the electronic device (100) may access memory and obtain the normalized histogram cumulative distribution function for each of the plurality of first tiles from the look-up table before performing the operation according to step S230.

[0046] Referring together to the first region (A1) of the embodiment illustrated in FIG. 1, the first region (A1) consists of four adjacent first tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4 It may include ). In one embodiment of the present disclosure, the first region (A1) may have a rectangular shape. Four first tiles (t) within the first region (A1). 1-1 , t 1-2 , t 1-3 , t 1-4 ) is the 1-1 tile(t 1-1 Based on ), the 1-1 tile (t 1-1 ) and the 1st-2nd tile (t) closest in the X-axis direction 1-2 ), Tile 1-1 (t 1-1 ) and the 1st-3rd tiles closest in the Y-axis direction (t 1-3 ) and the 1-1 tile(t 1-1 Adjacent to ) in a diagonal direction, and the 1st-2nd tile (t 1-2 ) and tiles 1-3(t 1-3 ) and the 1st-4th tiles (t) respectively adjacent to each 1-4 It may include ). The electronic device (100) includes four first tiles (t) contained within a first area (A1). 1-1 , t 1-2 , t 1-3 , t1-4 The pixel value of a pixel included in any one of the first tiles among the four first tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4 ) It can be transformed based on pixel transformation values ​​by each normalized histogram cumulative distribution function and the ratio based on the distance between the pixel and the second region (A2). The second region (A2) is four adjacent first tiles (t) included within the first region (A1) among a plurality of second tiles (t2). 1-1 , t 1-2 , t 1-3 , t 1-4 It may be an area defined by a second tile (t2) that overlaps commonly with ). For pixels included in the second area (A2), the electronic device (100) has four first tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4 Pixel values ​​can be transformed by performing bilinear interpolation using pixel transformation values ​​based on each normalized histogram cumulative distribution function.

[0047] The electronic device (100) consists of four adjacent first tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4 ) Tile 1-1 (t 1-1 The pixel value of the first pixel (P) located in the second area (A2) among the pixels included in ) is the first-1 tile (t 1-1 ), 1st-2nd tile(t 1-2 ), Tiles 1-3(t 1-3 ), and tiles 1-4 (t 1-4) It can be transformed based on four pixel transformation values ​​obtained by scaling and mapping using each normalized histogram cumulative distribution function and ratios (α1, β1, γ1, δ1) based on the distance between the first pixel (P) and the second region (A2) and the boundary line or the extension of the boundary line. In one embodiment of the present disclosure, the 'ratio based on distance (α1, β1, γ1, δ1)' may represent the ratio based on the distance between the first pixel (P) and the second region (A2) on a virtual straight line connecting the boundary line or the extension of the boundary line of the first pixel (P) and the second region (A2) in a vertical direction according to the X-axis direction and the Y-axis direction. For example, α1 and β1 are ratios based on the distance between the boundary line or extension of the boundary line of the first pixel (P) and the second region (A2) on a virtual straight line connecting the first pixel (P) and the second region (A2) along the X-axis direction, and γ1 and δ1 may be ratios based on the distance between the boundary line or extension of the boundary line of the first pixel (P) and the second region (A2) on a virtual straight line connecting the first pixel (P) and the second region (A2) along the Y-axis direction. The electronic device (100) [connects] the first pixel (P) to the first-1 tile (t 1-1 Multiply the first pixel value obtained by scaling and mapping by inputting it into the normalized histogram cumulative distribution function of ) by the ratio (β1) according to the X-axis direction and the ratio (δ1) according to the Y-axis direction, and the first pixel (P) is the first-2 tile (t 1-2 Multiply the second pixel value obtained by scaling and mapping it by inputting it into the normalized histogram cumulative distribution function of ) by the ratio (α1) according to the X-axis direction and the ratio (δ1) according to the Y-axis direction, and the first pixel (P) is the first-third tile (t 1-3 The third pixel value obtained by inputting into the normalized histogram cumulative distribution function of ) for scaling and mapping is multiplied by the ratio (β1) according to the X-axis direction and the ratio (γ1) according to the Y-axis direction, and the first pixel (P) is the first-fourth tile (t 1-4A pixel transformation value based on the double linear interpolation of the first pixel (P) can be obtained by inputting the fourth pixel value obtained by scaling and mapping into the normalized histogram cumulative distribution function of ) and adding all the pixel values ​​obtained by multiplying the fourth pixel value obtained by the ratio (α1) according to the X-axis direction and the ratio (γ1) according to the Y-axis direction.

[0048] The electronic device (100) consists of four adjacent first tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4 ) Tile 1-1 (t 1-1 The pixel value of the second pixel (Q) located outside the second region (A2) among the pixels included in ) is the first-1 tile (t 1-1 ), 1st-2nd tile(t 1-2 ), Tiles 1-3(t 1-3 ), and tiles 1-4 (t 1-4 ) Four pixel transformation values ​​obtained by scaling and mapping using each normalized histogram cumulative distribution function can be obtained, and the pixel value of the second pixel (Q) can be transformed by performing outerpolation using the obtained four pixel transformation values. In the present disclosure, 'outerpolation' refers to an asymmetric interpolation method that transforms the pixel value of a pixel to be interpolated within any one of four adjacent tiles based on pixel transformation values ​​according to the normalized histogram cumulative distribution function of the adjacent tiles and the ratio according to the distance between the pixel to be interpolated and the four adjacent tiles. 'Outerpolation' may also be referred to as 'extrapolation'. In one embodiment of the present disclosure, the electronic device (100) performs extrapolation to transform the pixel value of the second pixel (Q) into four adjacent first tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4) It can be transformed based on pixel transformation values ​​by each normalized histogram cumulative distribution function and ratios (α2, β2, γ2, δ2) based on the distance between the second pixel (Q) and the boundary line or extension of the boundary line of the second region (A2). In one embodiment of the present disclosure, the ratios based on distance (α2, β2, γ2, δ2) may represent the ratio based on the distance between the first pixel (P) and the second region (A2) on a virtual straight line connecting the boundary line or extension of the boundary line of the second pixel (Q) and the second region (A2) in a vertical direction according to the X-axis direction and the Y-axis direction. For example, α2 and β2 are ratios based on the distance between the boundary line or extension of the boundary line of the second pixel (Q) and the second region (A2) on a virtual straight line connecting the second pixel (Q) and the second region (A2) along the X-axis direction, and γ2 and δ2 may be ratios based on the distance between the boundary line or extension of the boundary line of the second pixel (Q) and the second region (A2) on a virtual straight line connecting the second pixel (Q) and the second region (A2) along the Y-axis direction. The electronic device (100) [connects] the second pixel (Q) to the first-1 tile (t 1-1 The first pixel value obtained by inputting into the normalized histogram cumulative distribution function of ) for scaling and mapping is multiplied by the ratio (β2) according to the X-axis direction and the ratio (δ2) according to the Y-axis direction, and the second pixel (Q) is the first-2 tile (t 1-2 Multiply the second pixel value obtained by scaling and mapping by inputting it into the normalized histogram cumulative distribution function of ) by the ratio (α2) according to the X-axis direction and the ratio (δ2) according to the Y-axis direction, and the second pixel (Q) is used for the first-third tile (t 1-3 The third pixel value obtained by inputting into the normalized histogram cumulative distribution function of ) for scaling and mapping is multiplied by the ratio (β2) according to the X-axis direction and the ratio (γ2) according to the Y-axis direction, and the second pixel (Q) is the first-fourth tile (t 1-4The pixel transformation value of the second pixel (Q) can be obtained by inputting the fourth pixel value obtained by scaling and mapping into the normalized histogram cumulative distribution function of ) and adding all the pixel values ​​obtained by multiplying the ratio (α2) according to the X-axis direction and the ratio (γ2) according to the Y-axis direction.

[0049] The electronic device (100) uses the aforementioned method to have a first- and second tile (t) in a first area (A1). 1-2 ), Tiles 1-3(t 1-3 ), and tiles 1-4 (t 1-4 Pixel value conversion can be performed on ). The electronic device (100) can obtain a second image (i2) by converting pixel values ​​over the entire area of ​​the image as well as the first area (A1).

[0050] Referring again to FIG. 2, in step S240, the electronic device (100) obtains a final image by applying weights to each of the first image and the second image and combining the first image and the second image. In one embodiment of the present disclosure, the electronic device (100) may apply a first weight parameter to the first image and a second weight parameter to the second image. In this case, the first weight parameter may be a value greater than or equal to the second weight parameter. For example, the first weight parameter may be 0.7 and the second weight parameter may be 0.3. However, this is merely an example, and the present disclosure is not limited to the above example.

[0051] Referring together to the embodiment illustrated in FIG. 1, the electronic device (100) applies a first weighting parameter to a first image (i1) and a second weighting parameter to a second image (i2), and then linearly combines the first image (i1) and the second image (i2) to obtain a final image (i f Can generate ).

[0052] To enhance local contrast by applying the CLAHE algorithm, methods such as setting the tile size to be small or increasing the clip limit can be used. However, this presents the problem of halo artifacts. Halo artifacts refer to a phenomenon where the brightness or color of an image is distorted along the boundaries between multiple tiles, and they can degrade image quality. In the CLAHE algorithm, there is a trade-off between improving local contrast and reducing halo artifacts. For example, increasing the clip limit to enhance local contrast results in halo artifacts, while setting the clip limit low to improve image quality by reducing halo artifacts leads to lower local contrast performance.

[0053] In conventional technology, a method was proposed to adaptively adjust clip limits by analyzing tile histograms to reduce halo artifacts while maintaining a high level of local contrast performance. However, this approach has the problem of being difficult for real-time processing due to the high computational load required to analyze tile histograms. Additionally, there is a limitation in that local contrast performance degrades for some tiles where the clip limit is set low.

[0054] The present disclosure aims to provide an electronic device and a method of operation thereof that can reduce halo artifacts at tile boundaries while significantly shortening processing speed compared to existing methods by not adding computational load resulting from the process of acquiring a tile histogram and then acquiring a cumulative histogram during the process of enhancing the local contrast of an image by applying the CLAHE algorithm.

[0055] An electronic device (100) according to an embodiment illustrated in FIGS. 1 and 2 obtains a first image (i1) by dividing an original image into a plurality of first tiles (t1) and applying a CLAHE algorithm, divides the original image into a plurality of second tiles (t2) arranged in a direction perpendicular to the plurality of first tiles (t1), obtains a second image (i2) by converting the pixel values ​​of pixels within any one of the four first tiles (t1) using a normalized histogram cumulative distribution function corresponding to each of the four adjacent first tiles (t1), and obtains a second image (i2) by applying weights to the first image (i1) and the second image (i2) and synthesizing them, thereby obtaining a final image (i) with improved local contrast compared to the original image. f ) can be generated. An electronic device (100) according to one embodiment of the present disclosure obtains a second image (i2) by performing bilinear interpolation on pixels included in a plurality of second tiles (t2) and transforming pixels included in a plurality of first tiles (t1) through outerpolation using pixel values ​​transformed by utilizing the normalized histogram cumulative distribution function of each of the four adjacent first tiles, so that the positions of the boundary lines where halo artifacts occur in the first image (i1) and the second image (i2) may be misaligned. The electronic device (100) linearly combines the first image (i1) and the second image (i2) to obtain a final image (i f ) is obtained, and halo artifacts at misaligned boundaries can be reduced by smoothing through synthesis. Accordingly, the electronic device (100) improves local contrast relative to the original image while reducing halo artifacts to obtain a final image (i) f You can obtain ).

[0056] In addition, unlike conventional technology, the electronic device (100) according to one embodiment of the present disclosure does not require complex statistical analysis of a plurality of tiles two or more times, so the amount of computation can be significantly reduced. Accordingly, the electronic device (100) according to one embodiment of the present disclosure can perform local contrast enhancement image processing in real time and can be effectively applied even in environments where computational resources are limited (e.g., low-spec devices or mobile devices with low computational power). In addition, the method for enhancing the local contrast of an image according to one embodiment of the present disclosure can minimize performance degradation due to misinterpretation compared to conventional technologies and provide more robust results, thereby enabling consistent performance to be maintained under various image conditions. Consequently, the present disclosure can provide a method for enhancing the local contrast of an image and an electronic device (100) that overcome the limitations of conventional technology, increase computational efficiency, improve image quality, and provide high reliability.

[0057] FIG. 3 is a block diagram illustrating the components of an electronic device (100) according to one embodiment of the present disclosure.

[0058] The electronic device (100) of the present disclosure may be a mobile device such as, for example, a smartphone, a tablet PC, a laptop computer, a digital camera, an e-book terminal, a digital broadcasting terminal, a PDA (Personal Digital Assistants), a PMP (Portable Multimedia Player), a navigation device, or an MP3 player. However, it is not limited thereto, and the electronic device (100) according to one embodiment of the present disclosure may be a home appliance such as a TV, an air conditioner, a robot vacuum cleaner, or a clothing care device. In one embodiment of the present disclosure, the electronic device (100) may be implemented as a wearable device such as a smart watch, a glasses-type augmented reality device (e.g., AR (Augmented Reality) glasses), a head-mounted device (HMD), or a body-attached device (e.g., a skin pad).

[0059] Referring to FIG. 3, the electronic device (100) may include a processor (110) and a memory (120). The processor (110) and the memory (120) may be electrically and / or physically connected to each other. FIG. 3 illustrates only essential components for explaining the function and / or operation of the electronic device (100), and the components included in the electronic device (100) are not limited to those illustrated in FIG. 3. In one embodiment of the present disclosure, when the electronic device (100) is implemented as a mobile device such as a smartphone, the electronic device (100) may further include a battery that supplies power to the processor (110) and the memory (120). In one embodiment of the present disclosure, the electronic device (100) may further include a display unit that displays an image.

[0060] The processor (110) can execute one or more instructions of a program stored in memory (120). The processor (110) may be composed of hardware components that perform arithmetic, logic, and input / output operations and image processing. Although the processor (110) is depicted as a single element in FIG. 3, it is not limited thereto. In one embodiment of the present disclosure, the processor (110) may be composed of one or more elements.

[0061] The processor (110) may include various processing circuits and / or multiple processors. For example, the term 'processor' as used in the present disclosure, including in the claims, may include at least one processor and various processing circuits. In the at least one processor, one or more processors may be configured to perform the various functions described herein in a distributed manner, individually and / or collectively. As used in the present disclosure, 'processor', 'at least one processor', and 'one or more processors' may be configured to perform various functions. However, these terms cover, without limitation, situations where one processor performs some of the functions and other processor(s) perform other parts of the functions, and situations where a single processor can perform all functions. Additionally, the at least one processor may include a combination of processors performing various functions of the disclosed functions in a distributed manner. The at least one processor may execute program instructions to achieve or perform various functions.

[0062] The processor (110) may be implemented as a general-purpose processor such as a CPU (Central Processing Unit), AP (Application Processor), DSP (Digital Signal Processor), a graphics-dedicated processor such as a GPU (Graphic Processing Unit) or VPU (Vision Processing Unit), or an artificial intelligence-dedicated processor such as an NPU (Neural Processing Unit). The processor (110) may be controlled to process input data according to predefined operation rules or an artificial intelligence model. Alternatively, if the processor (110) is an artificial intelligence-dedicated processor, the artificial intelligence-dedicated processor may be designed with a hardware structure specialized for processing a specific artificial intelligence model.

[0063] The memory (120) may be composed of at least one type of storage medium, such as a flash memory type, a hard disk type, a multimedia card micro type, a card type memory (e.g., SD or XD memory), RAM (Random Access Memory), SRAM (Static Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), PROM (Programmable Read-Only Memory), or an optical disk.

[0064] The memory (120) may store instructions related to functions and / or operations in which the electronic device (100) applies the Contrast Limited Adaptive Histogram Equalization (CLAHE) algorithm to enhance the local contrast of an image. In one embodiment of the present disclosure, the memory (120) may store at least one of instructions, an algorithm, a data structure, program code, and an application program that can be read by the processor (110). The instructions, algorithm, data structure, and program code stored in the memory (120) may be implemented in a programming or scripting language such as, for example, C, C++, Java, assembler, etc.

[0065] Functions and / or operations by the processor (110) can be implemented by executing instructions, algorithms, program codes, or application programs stored in memory (120). Hereinafter, the functions and / or operations performed by the processor (110) by executing instructions or program codes stored in memory (120) will be described in detail.

[0066] A processor (110) can obtain a first image by applying a CLAHE algorithm that divides the entire area of ​​the original image into a plurality of first tiles and reflects the histogram information obtained from the divided plurality of first tiles into a plurality of second tiles. In one embodiment of the present disclosure, the plurality of first tiles may be a rectangular grid. However, it is not limited thereto, and the plurality of first tiles may be a square grid. In one embodiment of the present disclosure, the processor (110) can transform the pixel values ​​of the pixels by performing histogram equalization on each of the plurality of first tiles and scaling and mapping the pixel values ​​using a normalized histogram cumulative distribution function obtained through histogram equalization. As the pixel values ​​are transformed, the processor (110) can obtain a first image with enhanced contrast for each tile. A specific method for the processor (110) to acquire the first image by applying the CLAHE algorithm will be explained in detail with reference to FIG. 4.

[0067] The processor (110) can store a normalized histogram cumulative distribution function for each of the plurality of first tiles in the storage space of the memory (120). For example, the processor (110) can store the normalized histogram cumulative distribution function for each of the plurality of first tiles in the form of a look-up table.

[0068] The processor (110) may divide the entire area of ​​the original image into multiple second tiles using a straight line connecting the midpoints of the sides of each of the multiple first tiles. However, it is not limited thereto, and in one embodiment of the present disclosure, the processor (110) may obtain multiple second tiles by calculating the centroid of each of the multiple first tiles and dividing the entire area of ​​the original image by a straight line connecting points indicating the location of the centroid of each of the multiple first tiles. The multiple second tiles may be arranged so as to be offset from the multiple first tiles by half the size of the sides of the multiple first tiles. The sides of each of the multiple second tiles may be orthogonal to the sides of each of the multiple first tiles.

[0069] A processor (110) can transform the pixel value of a pixel within any one first tile by scaling and mapping the pixel value using the normalized histogram cumulative distribution function of each of the four adjacent first tiles among the plurality of first tiles. In one embodiment of the present disclosure, the processor (110) can access memory (120) to obtain the normalized histogram cumulative distribution function of each of the plurality of first tiles that has been stored. Here, the 'four adjacent first tiles' may include a first-1 tile containing the pixel to be transformed, a first-2 tile closest to the first-1 tile along the first direction, a first-3 tile closest to the first-1 tile along the second direction, and a first-4 tile closest to both the first-2 tile and the first-3 tile, and diagonally adjacent to the first-1 tile. Specific embodiments for determining the four adjacent tiles will be described in detail with reference to FIG. 9.

[0070] A processor (110) can obtain a second image by performing bilinear interpolation to transform the pixel values ​​of pixels included in a second tile that is commonly superimposed on four adjacent first tiles, using pixel transformation values ​​based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles, and by performing outerpolation to transform the pixel values ​​of pixels located outside the second tile among pixels within any one of the four adjacent first tiles, using pixel transformation values ​​based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles.

[0071] The processor (110) can perform double linear interpolation to transform the pixel value of a pixel located within a second tile that overlaps commonly with the four adjacent first tiles among the pixels within four adjacent first tiles. Specifically, the processor (110) can transform the pixel value of a first pixel located within a second area defined by a second tile that overlaps commonly with the four adjacent first tiles among a plurality of second tiles within a first area including four adjacent first tiles, based on pixel transformation values ​​by a normalized histogram cumulative distribution function of each of the four adjacent first tiles of the first pixel and a ratio based on the distance between the first pixel and the boundary line or extension of the boundary line of the second area. Here, the 'ratio based on distance' may be a ratio based on the distance between the first pixel and the boundary line or extension of the boundary line of the second area on a virtual straight line connecting the first pixel and the boundary line or extension of the boundary line of the second area in a vertical direction according to the X-axis direction and the Y-axis direction.

[0072] The processor (110) can perform outerpolation to transform the pixel value of a pixel located outside the second region defined by the second tile among the pixels within four adjacent first tiles. Specifically, the processor (110) can transform the pixel value of a second pixel located outside the second region defined by the second tile among the pixels included in any one of the four adjacent first tiles based on pixel transformation values ​​by the normalized histogram cumulative distribution function of each of the four adjacent first tiles and a ratio based on the distance between the second pixel and the boundary line or extension of the boundary line of the second region. Here, the 'ratio based on distance' may be a ratio based on the distance between the second pixel and the boundary line or extension of the boundary line of the second region on a virtual straight line connecting the second pixel and the boundary line or extension of the boundary line of the second region in a vertical direction according to the X-axis and Y-axis directions.

[0073] A specific method for the processor (110) to obtain a second image by converting the pixel values ​​of pixels within four adjacent first tiles will be described in detail with reference to FIGS. 6 to 8.

[0074] A processor (110) can obtain a final image by applying weights to each of the first image and the second image, and by combining the first image and the second image to which the weights have been applied. In one embodiment of the present disclosure, the processor (110) may apply a first weight parameter to the first image and a second weight parameter to the second image. In this case, the first weight parameter may be a value greater than or equal to the second weight parameter. For example, the first weight parameter may be 0.7 and the second weight parameter may be 0.3. However, this is merely an example, and the present disclosure is not limited to the above example. The processor (110) can generate a final image by linearly combining the first image to which the first weight parameter has been applied and the second image to which the second weight parameter has been applied.

[0075] FIG. 4 is a flowchart illustrating a method in which an electronic device (100) according to one embodiment of the present disclosure applies a CLAHE algorithm to improve the local contrast of an image.

[0076] In step S410, the electronic device (100) divides the input original image into a plurality of tiles having a certain size. In one embodiment of the present disclosure, the plurality of tiles may be composed of a rectangular grid having the same size. However, it is not limited thereto, and the plurality of tiles may be a square grid. Each of the plurality of tiles is not affected by other tiles, and the CLAHE algorithm is applied independently and individually to each of the tiles, thereby allowing the local contrast in the entire image to be adjusted.

[0077] In step S420, the electronic device (100) generates a histogram representing the distribution of pixel values ​​of each of the plurality of tiles. The processor (110, see FIG. 3) of the electronic device (100) can apply equalization to the histogram to adjust the pixel values ​​so that they are evenly distributed.

[0078] In step S430, the electronic device (100) calculates an excess calculation for the histogram and calculates a histogram excess value that exceeds a threshold value. In one embodiment of the present disclosure, the processor (110) may remove a histogram excess value (total excess) that exceeds a clip limit value to prevent a problem in which contrast increases rapidly in a section of the histogram where pixel values ​​are excessively concentrated. The processor (110) may correct the histogram by distributing the removed histogram excess value to other pixels.

[0079] In step S440, the electronic device (100) calculates a Cumulative Distribution Function (CDF) using a corrected histogram by distributing histogram excess values ​​to other pixels.

[0080] In step S450, the electronic device (100) normalizes the cumulative distribution function (CDF).

[0081] In step S460, the electronic device (100) obtains a local contrast enhanced image by scaling and mapping pixel values ​​using a normalized histogram cumulative distribution function. In one embodiment of the present disclosure, the processor (130) of the electronic device (100) may obtain a first tile with converted pixel values ​​by scaling and mapping the pixel values ​​of the pixels included in the first tile. The processor (110) may also perform step S460 on the second tile, the third tile, and the fourth tile to convert pixel values, and combine the tiles obtained as a result of conversion to obtain a result image. The image obtained as a result of performing step S460 may have enhanced local contrast compared to the original image.

[0082] The CLAHE algorithm performs histogram equalization, clip limit setting, excess distribution, calculation of a normalized histogram cumulative distribution function, and scaling and mapping of pixel values ​​individually and independently for each of the multiple tiles, so that discontinuous changes or distortions occur at the boundaries of the multiple tiles, and thus halo artifacts may occur. In one embodiment of the present disclosure, the electronic device (100) can reduce halo artifacts by performing bilinear interpolation. Bilinear interpolation will be described in detail with reference to FIG. 5.

[0083] FIG. 5 shows an electronic device (100) according to one embodiment of the present disclosure having a plurality of tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4This is a diagram illustrating the operation of interpolating pixel values ​​by performing bilinear interpolation on pixels (P) included in the commonly overlapping area by ).

[0084] In the present disclosure, 'bilinear interpolation' refers to an image processing that interpolates the pixel value of a pixel (P) to be interpolated using a pixel value transformed by a normalized histogram cumulative distribution function of four adjacent tiles. In one embodiment of the present disclosure, bilinear interpolation can transform the pixel value through a formula that calculates an internal division point based on the distance in the X-axis direction and the distance in the Y-axis direction between the center of each of the pixel (P) to be interpolated and four adjacent tiles in a two-dimensional space.

[0085] Referring to FIG. 5, the image (i') with enhanced local contrast applied to the CLAHE algorithm consists of four first tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4 It is divided into ), and the interpolation target pixel (P) is four first tiles (t) among a plurality of second tiles. 1-1 , t 1-2 , t 1-3 , t 1-4 It can be located within the second tile (t2) that overlaps commonly with ). The four adjacent first tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4 ) Tile 1-1 (t 1-1 The center coordinate value of ) is (0, 0), the 1st-2nd tile (t 1-2 The center coordinate value of ) is (1, 0), the 1st-3rd tile(t 1-3 The center coordinate value of ) is (0, 1), the 1st-4th tile (t 1-4If the center coordinate value of ) is defined as (1, 1) and the coordinate value of the interpolation target pixel (P) is defined as (x, y), the pixel value of the interpolation target pixel (P) can be transformed through the following formula via bilinear interpolation.

[0086]

[0087] In the above Equation 1, CDF00(P) is the pixel value of the interpolation target pixel (P) in the 1-1 tile (t 1-1 Represents the pixel value transformed by applying the normalized histogram cumulative distribution function of ), and CDF10(P) represents the pixel value of the interpolation target pixel (P) to the 1st-2nd tile (t 1-2 Represents the pixel value transformed by applying the normalized histogram cumulative distribution function of ), and CDF01(P) represents the pixel value of the interpolation target pixel (P) to the 1st-3rd tile (t 1-3 Represents the pixel value transformed by applying the normalized histogram cumulative distribution function of ), and CDF11(P) represents the pixel value of the interpolation target pixel (P) to the 1st-4th tile (t 1-4 Represents the transformed pixel values ​​by applying the normalized histogram cumulative distribution function of ).

[0088] The electronic device (100) performs bilinear interpolation as shown in FIG. 5 to form a plurality of tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4 Halo artifacts can be reduced by smoothing discontinuous changes or distortions at the boundary of ).

[0089] FIG. 6 is a flowchart illustrating a method in which an electronic device (100) according to one embodiment of the present disclosure transforms a pixel value within one of four tiles based on a normalized histogram cumulative distribution function of each of four adjacent tiles among a plurality of tiles.

[0090] Steps S610 and S620 illustrated in FIG. 6 are steps that embody the operation according to step S230 illustrated in FIG. 2. Although steps S610 and S620 are illustrated as being performed sequentially in FIG. 6, the present disclosure is not limited to the manner illustrated in FIG. 6. In one embodiment of the present disclosure, the electronic device (100) may perform steps S610 and S620 not sequentially, but in any order, or simultaneously. For example, the electronic device (100) may perform the operation of step S620 before the operation of step S610. After the operation according to step S610 or S620 of FIG. 6 is performed, the operation of step S240 of FIG. 2 may be performed.

[0091] In step S610, the electronic device (100) transforms the pixel value of a first pixel located within a second region defined by a second tile that overlaps commonly with the four adjacent first tiles within a first region comprising four adjacent first tiles, based on pixel transformation values ​​by a normalized histogram cumulative distribution function of each of the four adjacent first tiles and the distance ratio between the first pixel and the boundary line or extension of the boundary line of the second region. In step S610, the 'distance ratio' may be a ratio based on the distance between the first pixel and the boundary line or extension of the boundary line of the second region on a virtual straight line connecting the first pixel and the boundary line or extension of the boundary line of the second region in a vertical direction according to the X-axis direction and the Y-axis direction.

[0092] Step S610 in which the electronic device (100) transforms the pixel value of a second pixel located outside the second region among the pixels within the first region based on pixel transformation values ​​by a normalized histogram cumulative distribution function of each of the four adjacent first tiles and the distance ratio between the second pixel and the boundary line or extension of the boundary line of the second region. In Step S620, the 'distance ratio' may be a ratio based on the distance between the second pixel and the boundary line or extension of the boundary line of the second region on an imaginary straight line connecting the second pixel and the boundary line or extension of the boundary line of the second region in a vertical direction according to the X-axis direction and the Y-axis direction.

[0093] Hereinafter, steps S610 and S620 of FIG. 6 will be explained in detail with reference to FIG. 7 and FIG. 8.

[0094] FIG. 7 shows an electronic device (100) according to one embodiment of the present disclosure having four adjacent tiles (t) among a plurality of tiles. 1-1 , t 1-2 , t 1-3 , t 1-4 ) Based on each normalized histogram cumulative distribution function, 4 tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4 This is a diagram illustrating the operation of converting pixel values ​​within any one of the tiles.

[0095] Referring to FIG. 7, the electronic device (100) comprises four first tiles (t) included within a first area (A1). 1-1 , t 1-2 , t 1-3 , t 1-4 ) Tile 1-1 (t 1-1 The pixel values ​​of the pixels included in ) are the 4 first tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4) It can be transformed based on the pixel transformation value obtained by scaling and mapping through each normalized histogram cumulative distribution function and the ratio according to the distance between the pixel and the boundary line or the extension of the boundary line of the second region (A2). The processor (110, see FIG. 3) of the electronic device (100) can transform the first-1 tile (t 1-1 The entire area of ​​) is divided into four areas (701, 702, 703, 704), and pixel values ​​can be transformed by applying different methods to the pixels included in the four areas (701, 702, 703, 704). In one embodiment of the present disclosure, among the four areas (701, 702, 703, 704), the first-fourth area (704) is the first-1 tile (t 1-1 It represents the area overlapping with the second area (A2) among the entire area of ​​), and the remaining areas (701, 702, 703) are the first-1 tile (t 1-1 It represents the regions outside the second region (A2) among the entire region of ). Here, the second region (A2) is the four adjacent first tiles (t) among the plurality of second tiles obtained by dividing the entire region of the image through imaginary lines connecting the midpoints of the sides of each of the plurality of first tiles. 1-1 , t 1-2 , t 1-3 , t 1-4 It is an area defined by a second tile that overlaps commonly in ).

[0096] In one embodiment of the present disclosure, the processor (110) of the electronic device (100) is a first-1 tile (t 1-1 For pixels within the first-1 region (701), first-2 region (702), and first-3 region (703) of the entire area of ​​), pixel values ​​can be transformed by performing outerpolation, and for pixels within the first-4 region (704), pixel values ​​can be transformed by performing bilinear interpolation. The first-1 tile (t 1-1A specific embodiment of converting the pixel values ​​of the pixels included in ) through extrapolation or bilinear interpolation will be described in detail with reference to FIG. 8.

[0097] FIG. 8 shows an electronic device (100) according to one embodiment of the present disclosure having four adjacent tiles (t) among a plurality of tiles. 1-1 , t 1-2 , t 1-3 , t 1-4 This is a diagram illustrating the operation of transforming a pixel value within a single tile based on a pixel transformation value by each normalized histogram cumulative distribution function and the distance between the pixel and the boundary line of the tile or the extension line of the boundary line.

[0098] Referring to FIG. 8, the processor (110, see FIG. 3) of the electronic device (100) is the first-1 tile (t 1-1 For pixels (P) located in the first-fourth region (804) that overlap with the second region (A2) defined by the second tile within the entire area of ​​), the pixel values ​​can be transformed by performing bilinear interpolation. Since the specific method for transforming the pixel values ​​of the interpolation target pixels (P) within the first-fourth region (804) is the same as the method described in the embodiment shown in FIG. 5 and Equation 1, a redundant description is omitted.

[0099] The processor (110) is the first-1 tile (t 1-1 For pixels within the 1-1 region (801), 1-2 region (802), and 1-3 region (803) corresponding to the outside of the 2nd region (A2) of the entire area of ​​), the four adjacent 1 tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4Pixel values ​​can be transformed through outerpolation of pixel transformation values ​​calculated by each normalized histogram cumulative distribution function. The processor (110) can transform, for example, the pixel value of a pixel to be interpolated (Q) within the first-1 region (801) based on the following formula. In the first step, the processor (110) transforms the pixel value of the pixel to be interpolated (Q) into the first-1 tile (t 1-1 ) and the 1st-2nd tile(t 1-2 Pixel transformation value by the normalized histogram cumulative distribution function of ) and a virtual straight line (l) connecting the boundary line or extension of the boundary line of the second region (A2) and the interpolation target pixel (Q) along the X-axis direction x It can be converted based on the distance ratio on ). For example, the processor (110) can convert the pixel value of the interpolation target pixel (Q) through the following Equation 2.

[0100]

[0101] Equation 2 above represents the pixel value of the interpolation target pixel (Q) relative to the X-axis direction, in the 1-1 tile (t 1-1 ) and the 1st-2nd tile(t 1-2 This is a formula that transforms through extrapolation based on the pixel transformation value determined by the normalized histogram cumulative distribution function of ). In Formula 2, CDF00(Q) is the pixel value of the interpolation target pixel (Q) in the 1-1 tile (t 1-1 Represents the transformed pixel value by applying the normalized histogram cumulative distribution function of ), and CDF10(Q) represents the pixel value of the interpolation target pixel (Q) to the 1st-2nd tile (t 1-2 Represents the pixel value transformed by applying the normalized histogram cumulative distribution function of ). -x is an imaginary straight line (l x ) represents the distance between the interpolation target pixel (Q) and the first boundary line or the extension of the boundary line of the second region (A2), and 1-x is a virtual straight line (l xIt represents the distance between the interpolation target pixel (Q) and the second boundary line or the extension of the boundary line of the second region (A2) on the ). Equation 2 is the same as the method for calculating the external division point, except that it converts the pixel value.

[0102] In the second step, the processor (110) interpolates the pixel value of the pixel (Q) to be interpolated to the first-third tile (t 1-3 ) and tiles 1-4 (t 1-4 Pixel transformation value by the normalized histogram cumulative distribution function of ) and a virtual straight line (l) connecting the boundary line or extension of the boundary line of the second region (A2) and the interpolation target pixel (Q) along the X-axis direction x It can be converted based on the distance ratio on ). For example, the processor (110) can convert the pixel value of the interpolation target pixel (Q) through the following Equation 3.

[0103]

[0104] Equation 3 above represents the pixel value of the interpolation target pixel (Q) relative to the X-axis direction, specifically the 1st-3rd tile (t 1-3 ) and tiles 1-4 (t 1-4 This is a formula that transforms through extrapolation based on the pixel transformation value determined by the normalized histogram cumulative distribution function of ). In Formula 3, CDF01(Q) is the pixel value of the interpolation target pixel (Q) in the 1st-3rd tile (t 1-3 Represents the pixel value transformed by applying the normalized histogram cumulative distribution function of ), and CDF11(Q) represents the pixel value of the interpolation target pixel (Q) to the 1st-4th tile (t 1-4 Represents the transformed pixel values ​​by applying the normalized histogram cumulative distribution function of ).

[0105] Afterwards, the processor (110) can calculate extrapolation by Equation 2 and Equation 3 for the Y-axis direction as well, and finally calculate the converted pixel value (Q' (x, y)) of the interpolation target pixel (Q) through the following Equation 4.

[0106]

[0107] In the above Equation 4, -y is a virtual straight line (l) connecting the boundary line or the extension of the boundary line of the interpolation target pixel (Q) and the second region (A2) along the Y-axis direction. y It represents the distance between the interpolation target pixel (Q) on the ) and the third boundary line or the extension of the boundary line of the second region (A2), and 1-y is a virtual straight line (l y It represents the distance between the interpolation target pixel (Q) and the fourth boundary line or the extension of the boundary line of the second region (A2) on the )

[0108] The processor (110) is the first-second tile (t 1-2 ), Tiles 1-3(t 1-3 ), and tiles 1-4 (t 1-4 Among the pixels within the second region (A2), pixel values ​​can be converted through bilinear interpolation according to FIG. 5 and Equation 1 for pixels within the second region (A2), and through interpolation by extrapolation according to FIG. 8 and Equations 2 to 4 for pixels located outside the second region (A2).

[0109] The processor (110) is adjacent to four first tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4 For pixels within the second region (A2) among the pixels included in ), the four commonly adjacent first tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4 ) Symmetrically interpolated using pixel transformation values ​​based on each normalized histogram cumulative distribution function, and for pixels located outside the second region (A2), 4 first tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4Asymmetric interpolation can be performed through the extrapolation of pixel transformation values ​​by each normalized histogram cumulative distribution function. When performing asymmetric interpolation, the three tiles adjacent to the tile containing the interpolation target pixel (P, Q) may be determined differently depending on which direction they are adjacent. A specific embodiment in which the processor (110) determines four adjacent first tiles among a plurality of first tiles will be described in detail with reference to FIG. 9.

[0110] FIG. 9 is a diagram illustrating the operation of an electronic device (100) according to one embodiment of the present disclosure determining four adjacent tiles to convert the pixel value of one of a plurality of tiles.

[0111] Referring to FIG. 9, the electronic device (100) divides an image (i) into a plurality of first tiles and can convert the pixel values ​​of pixels within any one of the plurality of first tiles using pixel conversion values ​​based on the normalized histogram cumulative distribution function of each of the four first tiles, including the adjacent three first tiles and the tile itself. In one embodiment of the present disclosure, the processor (110, see FIG. 3) of the electronic device (100) selects four adjacent first tiles within a square grid and can convert the pixel values ​​of pixels within any one of the four first tiles using pixel conversion values ​​based on the normalized histogram cumulative distribution function of each of the selected four first tiles.

[0112] For example, the tile to which the pixel to be interpolated belongs is tile 1-10 (t 1-10 In the case where ), the processor (110) aligns the first-10 tiles (t) in the first direction (e.g., to the right) along the X-axis direction. 1-10 The 1st-11th tile (t) closest to ) 1-11 ), along the Y-axis direction, the 1st-10th tile (t) in the 1st direction (e.g., downward). 1-10 The 1st-18th tile (t) closest to )1-18 ), and tiles 1-10 (t 1-10 Adjacent to ) diagonally, and tile 1-11 (t 1-11 ) and tiles 1-18 (t 1-18 Tile 1-19 adjacent to ) (t 1-19 Select three adjacent tiles including ), and the 1st to 10th tiles (t) containing the interpolation target pixel. 1-10 Pixel values ​​can be transformed using the normalized histogram cumulative distribution function of each of the four first tiles that further include ). Through this process, a fifth image can be obtained. For example, the processor (110) can obtain the first-10 tiles (t 1-10 Tiles 1-10 along the X-axis direction in the second direction (e.g., left) based on ) tiles (t 1-10 The 1st-9th tile (t) closest to ) 1-9 ), along the Y-axis direction, the 1st-10th tiles (t) in the 2nd direction (e.g., upward) 1-10 The 1st-2nd tile (t) closest to ) 1-2 ), and tiles 1-10 (t 1-10 Adjacent to ) diagonally, and the 1st-2nd tile (t 1-2 ) and tiles 1-9 (t 1-9 ) and adjacent 1-1 tile(t 1-1 Select three adjacent tiles including ), and tiles 1-10 (t 1-10 Pixel values ​​can be transformed using the normalized histogram cumulative distribution function of each of the four first tiles that further include ). Through this process, a second image can be obtained. Likewise, the processor (110) can obtain the first-10 tiles (t 1-10 As a tile adjacent to ), the 1st-2nd tile (t 1-2 ), Tiles 1-3(t 1-3 ), and tiles 1-11 (t 1-11 ) can be selected, and a third image can be obtained through this process. Finally, the processor (110) selects the 1st-10th tile (t 1-10As a tile adjacent to ), the 1st-9th tile (t 1-9 ), Tile 1-17(t 1-17 ), and tiles 1-18 (t 1-18 You can also select ). Through this process, you can obtain the fourth image.

[0113] Tile 1-10 (t 1-10 Depending on how the 4 adjacent 1st tiles are selected based on ), the 1st-10th tiles (t 1-10 The pixel values ​​of the pixels within ) can be interpolated and transformed by another normalized histogram cumulative distribution function.

[0114] FIG. 10 is a flowchart illustrating a method for generating a final image by combining a first image and a second image obtained by applying a weight to each of them, wherein the electronic device (100) according to one embodiment of the present disclosure applies a CLAHE algorithm.

[0115] Steps S1010 and S1020 illustrated in FIG. 10 are steps that embody the operation according to step S240 illustrated in FIG. 2. The operation according to step S1010 illustrated in FIG. 10 can be performed after the operation according to step S230 illustrated in FIG. 2 has been performed.

[0116] In step S1010, the electronic device (100) applies a first weighting parameter to the first image and applies a second weighting parameter to the second image.

[0117] FIG. 11 illustrates an operation in which an electronic device (100) according to an embodiment of the present disclosure applies a weight to each of a first image (i1) and a second image (i2) obtained by applying a CLAHE algorithm and combines them to generate a final image. Referring to step S1010 of FIG. 10 in conjunction with the embodiment illustrated in FIG. 11, a processor (110, see FIG. 3) of the electronic device (100) may apply a first weight parameter (α) to the first image (i1) and a second weight parameter (β) to the second image (i2). In an embodiment of the present disclosure, the second weight parameter (β) may be 1-α. In this case, the first weight parameter (α) may be a larger value than the second weight parameter (β). For example, the value of α in the first weight parameter (α) may be 0.7, and the second weight parameter (β) may be 1-α, i.e., 0.3. The processor (130) creates a final image (i) based on the following mathematical formula f You can obtain ).

[0118]

[0119] Equation 5 above represents a method for reducing halo artifacts while using minimal computation. In one embodiment of the present disclosure, the processor (130) may acquire at least one additional image in addition to the second image (i2) and acquire a final image through the average sum of the second image (i2) and at least one additional image. This will be explained in detail with reference to FIGS. 12 and FIGS. 13.

[0120] Referring again to FIG. 10, in step S1020, the electronic device (100) linearly combines a first image with a first weight parameter and a second image with a second weight parameter to generate a final image.

[0121] Referring to the embodiment illustrated in FIG. 11, the first image (i1) is an image obtained by symmetrically interpolating the pixel values ​​of pixels within a second tile (a tile shown as a dotted line in FIG. 11) that overlaps with a plurality of first tiles through bilinear interpolation; thus, halo artifacts at the boundary lines between the plurality of first tiles are reduced within the second tile. However, if there is a large difference in brightness between the plurality of first tiles in the first image (i1), halo artifacts may occur at the boundary lines even with bilinear interpolation. The second image (i2) is an image obtained by asymmetrically interpolating one of the four adjacent first tiles through outerpolation using pixel transformation values ​​based on the normalized histogram cumulative distribution function of each of the four first tiles; thus, the boundary lines where halo artifacts occur are different from those of the first image (i1). That is, the boundary line where the halo artifact occurs in the first image (i1) and the boundary line where the halo artifact occurs in the second image (i2) are positioned offset from each other.

[0122] The electronic device (100) according to the embodiment illustrated in FIGS. 10 and 11 can smooth halo artifacts at misaligned boundary lines by linearly combining a first image (i1) and a second image (i2), thereby providing a technical effect of improving image quality. Additionally, the electronic device (100) according to one embodiment of the present disclosure may give greater weight to the first image (i1) symmetrically interpolated using a pixel transformation value based on a normalized histogram cumulative distribution function of four first tiles adjacent to the pixel, thereby improving local contrast relative to the original image while limiting the final image from being excessively distorted relative to the original image.

[0123] FIG. 12 is a diagram illustrating the operation of an electronic device (100) according to one embodiment of the present disclosure acquiring an additional image and generating a final image using the average sum image of the second image and the additional image and the first image.

[0124] Steps S1210 and S1220 illustrated in FIG. 12 are steps that embody the operation according to step S230 illustrated in FIG. 2. The operation according to step S1210 can be performed after the operation according to step S220 illustrated in FIG. 2 has been performed.

[0125] In step S1210, the electronic device (100) obtains a second image by performing an outerpolation on the pixel values ​​of a pixel included in the first-1 tile among four adjacent first tiles, using pixel transformation values ​​obtained from the normalized histogram cumulative distribution function of each of the adjacent first-2 tile, first-3 tile, and first-4 tile. The four adjacent first tiles among the plurality of first tiles may include, for example, the first-1 tile, the first-2 tile, the first-3 tile, and the first-4 tile.

[0126] FIG. 13a shows four adjacent first tiles (t) of an electronic device (100) according to one embodiment of the present disclosure. 1-1 , t 1-2 , t 1-3 , t 1-4 ) 2 of the 1st tiles (t 1-1 , t 1-2 This is a diagram illustrating an operation to obtain a second image (i2) and an additional image by transforming the pixel values ​​of pixels included in ) through outerpolation, and to generate a final image using the first image (i1), the second image (i2), and the additional image. Referring to the embodiment illustrated in FIG. 13a together with step S1210 of FIG. 12, among a plurality of first tiles, four adjacent first tiles (t 1-1 , t 1-2 , t 1-3 , t1-4 ) is a first-1 tile (t) containing pixels for acquiring a second image (i2). 1-1 ), Tile 1-1 (t 1-1 ) and the 1st-2nd tile (t) closest in the X-axis direction 1-2 ), Tile 1-1 (t 1-1 ) and the 1st-3rd tiles closest in the Y-axis direction (t 1-3 ) and the 1-1 tile(t 1-1 Adjacent to ) in a diagonal direction, and the 1st-2nd tile (t 1-2 ) and tiles 1-3(t 1-3 ) and the 1st-4th tiles (t) respectively adjacent to each 1-4 It may include ). The processor (130, see FIG. 3) of the electronic device (100) is the first-1 tile (t 1-1 The pixel value of the pixel included in ) is the 1-1 tile (t 1-1 ), 1st-2nd tile(t 1-2 ), Tiles 1-3(t 1-3 ), and tiles 1-4 (t 1-4 A second image (i2) can be obtained by performing extrapolation using pixel transformation values ​​based on each normalized histogram cumulative distribution function. Since the specific method by which the processor (130) obtains the second image (i2) through extrapolation is the same as the method described in FIGS. 1 to 11, a redundant description is omitted.

[0127] Referring again to FIG. 12, in step S1220, the electronic device (100) obtains at least one additional image by performing extrapolation using pixel transformation values ​​based on the normalized histogram cumulative distribution function of each of the four adjacent tiles to transform the pixel values ​​of the pixels included in at least one of the first-2 tile, the first-3 tile, and the first-4 tile. Referring together to the embodiment illustrated in FIG. 13a, the processor (130) of the electronic device (100) obtains the first-2 tile (t 1-2 The pixel value of the pixel included in ) is the 1-1 tile (t1-1 ), 1st-2nd tile(t 1-2 ), Tiles 1-3(t 1-3 ), and tiles 1-4 (t 1-4 By performing extrapolation using pixel transformation values ​​based on each normalized histogram cumulative distribution function and transforming them, an additional image, a third image (i3), can be obtained. A specific method for the processor (130) to obtain the third image (i3) is as follows: the pixels to be transformed are the first-2 tiles (t 1-2 Except for the fact that it is included within ), the method of generating the second image (i2) is the same, so redundant explanation is omitted. In FIG. 13a, the first-second tile (t 1-2 Although it is illustrated that a third image (i3) is obtained by converting the pixel values ​​of pixels included in ), embodiments of the present disclosure are not limited to those illustrated in the drawings. In one embodiment of the present disclosure, the processor (130) [t] adjacent four first tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4 ) Tile 1-1 (t 1-1 The remaining tiles excluding ), for example, the 1st-2nd tile (t 1-2 ), Tiles 1-3(t 1-3 ), and tiles 1-4 (t 1-4 A third image (i3) can also be obtained by converting the pixel value of a pixel included within any one of the tiles.

[0128] Referring again to FIG. 12, steps S1230 and S1240 are steps that embody the operation by step S240 shown in FIG. 2.

[0129] In step S1230, the electronic device (100) obtains an average sum image by combining a second image and at least one additional image and dividing the combined image by the number of the second image and at least one additional image.

[0130] In step S1240, the electronic device (100) applies weights to the first image and the average sum image, respectively, and obtains a final image by linearly combining the weighted first image and the average sum image.

[0131] In one embodiment of the present disclosure, the processor (130) can obtain a final image by calculating an average sum image through the following formula 6 and applying weights to the first image and the average sum image, respectively.

[0132]

[0133] In Equation 6, k=2, 3, 4, 5, ..., N, where N represents the number of additional images. Referring to Equation 6, for example, when k=2, the average sum image is obtained through an operation of dividing the sum of the second image (i2) and the third image (i3) by N=2, and the final image (i f ) can be obtained through an operation of adding the product of the first weight (α) and the first image (i1) and the product of the second weight (1-α) and the average sum image. Referring to Equation 6 in conjunction with the embodiment illustrated in FIG. 13a, the processor (130) can obtain the average sum image through an operation of dividing the sum of the second image (i2) and the third image (i3) by 2 (value N), multiply the first image (i1) by the first weight (α), multiply the average sum image by the second weight (1-α), and generate the final image through an operation of adding the multiplied images. As described above, when N=2, the average sum image is not limited to being obtained through the average sum of the second image (i2) and the third image (i3), and the average sum image can also be obtained through the average sum of either the second image (i2) and the fourth image (i4, see FIG. 13b) or the second image (i2) and the fifth image (i5, see FIG. 13c).

[0134] FIG. 13b shows four adjacent first tiles (t) of an electronic device (100) according to one embodiment of the present disclosure. 1-1 , t 1-2 , t 1-3 , t 1-4 ) 3 of the 1st tiles (t 1-1 , t 1-2 This is a diagram illustrating the operation of obtaining two additional images (i3, i4) in addition to the second image (i2) by transforming the pixel values ​​of the pixels included in ) through outerpolation, and generating a final image using the first image (i1), the second image (i2), and the two additional images (i3, i4). Since the embodiment illustrated in FIG. 13b is identical to the embodiment illustrated in FIG. 13a except that the fourth image (i4) as well as the third image (i3) is obtained as additional images, redundant descriptions are omitted.

[0135] Referring to FIG. 13b, the processor (130, see FIG. 3) of the electronic device (100) is the first-third tile (t 1-3 The pixel value of the pixel included in ) is the 1-1 tile (t 1-1 ), 1st-2nd tile(t 1-2 ), Tiles 1-3(t 1-3 ), and tiles 1-4 (t 1-4 A fourth image (i4) can be obtained by performing extrapolation using pixel transformation values ​​based on each normalized histogram cumulative distribution function and transforming them. In FIG. 13b, the first-third tile (t 1-3 Although it is illustrated that a fourth image (i4) is obtained by converting the pixel values ​​of pixels included in ), embodiments of the present disclosure are not limited to those illustrated in the drawings. In one embodiment of the present disclosure, the processor (130) [t] adjacent four first tiles (t 1-1 , t 1-2 , t 1-3 , t 1-4 ) Tile 1-1 (t 1-1The remaining tiles excluding ), for example, the 1st-2nd tile (t 1-2 ), Tiles 1-3(t 1-3 ), and tiles 1-4 (t 1-4 A fourth image (i4) can also be obtained by converting the pixel value of a pixel included within any one of the tiles.

[0136] The processor (130) can obtain an average sum image using the aforementioned formula 6 and obtain a final image by applying weights to the first image (i1) and the average sum image, respectively. For example, the processor (130) can obtain an average sum image by performing an operation to divide the sum of the second image (i2), the third image (i3), and the fourth image (i4) by 3 (value of N), and generate a final image by performing an operation to multiply the first image (i1) by a first weight (α), multiply the average sum image by a second weight (1-α), and sum the multiplied images. When N=3, the average sum image is not limited to being obtained through the average sum of the second image (i2), the third image (i3), and the fourth image (i4); instead, three images from the second image (i2) to the fifth image (i5, see FIG. 13c) can be selected, and an average sum image can also be obtained through the average sum of the three selected images.

[0137] FIG. 13c shows four adjacent first tiles (t) of an electronic device (100) according to one embodiment of the present disclosure. 1-1 , t 1-2 , t 1-3 , t 1-4This is a diagram illustrating the operation of obtaining three additional images (i3, i4, i5) in addition to the second image (i2) by transforming the pixel values ​​of the pixels included in each through outerpolation, and generating a final image using the first image (i1), the second image (i2), and the three additional images (i3, i4, i5). Since the embodiment illustrated in FIG. 13c is identical to the embodiment illustrated in FIG. 13b except that the fifth image (i5) is obtained as an additional image as well as the third image (i3) and the fourth image (i4), redundant descriptions are omitted.

[0138] Referring to FIG. 13c, the processor (130, see FIG. 3) of the electronic device (100) is the first-fourth tile (t 1-4 The pixel value of the pixel included in ) is the 1-1 tile (t 1-1 ), 1st-2nd tile(t 1-2 ), Tiles 1-3(t 1-3 ), and tiles 1-4 (t 1-4 A fifth image (i5) can be obtained by performing extrapolation using pixel transformation values ​​based on each normalized histogram cumulative distribution function. The processor (130) can obtain an average sum image using the aforementioned Equation 6 and obtain a final image by applying weights to the first image (i1) and the average sum image, respectively. For example, the processor (130) can obtain an average sum image by performing an operation to divide the sum of the second image (i2) to the fifth image (i5) by 4 (value of N), multiply the first image (i1) by a first weight (α), multiply the average sum image by a second weight (1-α), and generate a final image by performing an operation to sum the multiplied images.

[0139] The electronic device (100) according to the embodiment illustrated in FIG. 12, FIG. 13a, FIG. 13b, and FIG. 13c may slightly increase the amount of computation by acquiring at least one additional image in addition to acquiring a second image (i2). However, in this case, an average sum image is obtained through the average sum of the second image (i2) and at least one additional image, and a final image (i) is obtained by combining the average sum image and the first image. f By obtaining ), a technical effect is provided that allows for obtaining a high-quality final image with reduced halo artifacts using only dual linear interpolation and extraneous operations, without the need to calculate the histogram cumulative distribution function, which has a relatively large amount of computation, multiple times.

[0140] The present disclosure provides a method for an electronic device (100) to enhance the local contrast of an image. The method of operation of the electronic device (100) may include a step (S210) of dividing the entire area of ​​an original image into a plurality of first tiles and obtaining a first image by applying a CLAHE (Contrast Limited Adaptive Histogram Equalization) algorithm that reflects histogram information obtained from the divided plurality of first tiles into a second tile. The method of operation of the electronic device (100) may include a step (S220) of dividing the entire area of ​​an original image into a plurality of second tiles using a straight line connecting the midpoints of the sides of each of the plurality of first tiles. The method of operation of the electronic device (100) may include a step (S230) of obtaining a second image by performing bilinear interpolation to transform the pixel value of a pixel included in a second tile that is commonly superimposed on four adjacent first tiles among a plurality of second tiles, using a pixel transformation value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles, and by performing outerpolation to transform the pixel value of a pixel located outside the second tile among pixels within any one of the four adjacent first tiles, using a pixel transformation value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles. The method of operation of the electronic device (100) may include a step (S240) of obtaining a final image by applying weights to each of the first image and the second image, and combining the first image and the second image to which the weights have been applied.

[0141] In one embodiment of the present disclosure, a plurality of second tiles may be arranged so as to be offset from each other by a distance equal to half the size of the side of each of the plurality of first tiles.

[0142] In one embodiment of the present disclosure, the boundary lines of a plurality of second tiles may be orthogonal to each other with the boundary lines of a plurality of first tiles.

[0143] In one embodiment of the present disclosure, the method of operating the electronic device (100) may further include the step of storing a normalized histogram cumulative distribution function for each of a plurality of first tiles as a look-up table (LUT). The step of acquiring the second image (S230) may include the step of acquiring a normalized histogram cumulative distribution function for each of a plurality of first tiles from the look-up table.

[0144] In one embodiment of the present disclosure, the step of acquiring the second image (S230) may include a step (S610) of converting the pixel value of a first pixel located within a second area defined by a second tile that is commonly overlapped with the four adjacent first tiles among a plurality of second tiles within a first area including four adjacent first tiles among the entire area of ​​the first image, based on pixel conversion values ​​based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles of the first pixel and a ratio based on the distance between the first pixel and the boundary line or the extension line of the boundary line of the second area. The step of acquiring the second image (S230) may include a step (S620) of converting the pixel value of a second pixel located outside the second area among the pixels within the first area, based on pixel conversion values ​​based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles and a ratio based on the distance between the second pixel and the boundary line or the extension line of the boundary line of the second area.

[0145] In one embodiment of the present disclosure, the four adjacent first tiles may include a first-1 tile containing a first pixel and a second pixel that are subject to pixel value conversion within a first area, a first-2 tile adjacent to the first-1 tile along a first direction, a first-3 tile closest to the first-1 tile along a second direction, and a first-4 tile closest to both the first-2 tile and the first-3 tile, and adjacent to the first-1 tile in a diagonal direction.

[0146] In one embodiment of the present disclosure, in the step of converting the pixel value of the first pixel, the ratio according to the distance may be a ratio according to the distance between the first pixel and the boundary line of the second area or the extension line of the boundary line on a virtual straight line connecting the first pixel and the boundary line of the second area or the extension line of the boundary line in a vertical direction according to the X-axis and Y-axis directions.

[0147] In one embodiment of the present disclosure, in the step of converting the pixel value of the second pixel, the ratio according to the distance may be a ratio according to the distance between the second pixel and the boundary line of the second area or the extension line of the boundary line on a virtual straight line connecting the second pixel and the boundary line of the second area or the extension line of the boundary line in a vertical direction according to the X-axis and Y-axis directions.

[0148] In one embodiment of the present disclosure, the step of acquiring the final image (S240) may include the step (S1010) of applying a first weighting parameter to the first image and applying a second weighting parameter to the second image. The first weighting parameter may be a value greater than or equal to the second weighting parameter.

[0149] In one embodiment of the present disclosure, the step of obtaining the final image (S240) may include the step (S1020) of generating the final image by linearly combining a first image to which a first weight parameter is applied and a second image to which a second weight parameter is applied.

[0150] In one embodiment of the present disclosure, the step of acquiring the second image (S230) may further include the step of acquiring at least one additional image by performing an outerpolation using pixel transformation values ​​based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles to transform the pixel values ​​of the pixels included in at least one of the first-2 tiles, the first-3 tiles, and the first-4 tiles. The step of acquiring the final image (S240) may include the step of acquiring an average sum image through an operation of dividing the sum of the second image and at least one additional image by the number of the second image and at least one additional image (S1230), and the step of acquiring the final image by applying a first weight parameter to the first image, applying a second weight parameter to the average sum image, and combining the weighted first image and the average sum image.

[0151] The present disclosure provides an electronic device (100) for enhancing local contrast of an image. The electronic device (100) may include at least one processor (110) comprising processing circuitry, and a memory (120) for storing one or more instructions. By executing the one or more instructions individually or collectively by the at least one processor (110), the electronic device (100) may divide the entire area of ​​the original image into a plurality of first tiles and obtain a first image by applying a CLAHE (Contrast Limited Adaptive Histogram Equalization) algorithm that reflects histogram information obtained from the divided plurality of first tiles into second tiles. By executing the one or more instructions individually or collectively by the at least one processor (110), the electronic device (100) may divide the entire area of ​​the original image into a plurality of second tiles using a straight line connecting the midpoints of the sides of each of the plurality of first tiles.By executing one or more of the above instructions individually or collectively by the at least one processor (110), the electronic device (100) can obtain a second image by performing bilinear interpolation to transform the pixel value of a pixel included in a second tile that is commonly superimposed on four adjacent first tiles among a plurality of second tiles, using a pixel transformation value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles, and by performing outerpolation to transform the pixel value of a pixel located outside the second tile among pixels within any one of the four adjacent first tiles, using a pixel transformation value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles. By executing the above one or more instructions individually or collectively by the at least one processor (110), the electronic device (100) can obtain a final image by applying weights to each of the first image and the second image and combining the weighted first image and the second image.

[0152] In one embodiment of the present disclosure, a plurality of second tiles may be arranged so as to be offset from each other by a distance equal to half the size of the side of each of the plurality of first tiles.

[0153] In one embodiment of the present disclosure, the boundary lines of a plurality of second tiles may be orthogonal to each other with the boundary lines of a plurality of first tiles.

[0154] In one embodiment of the present disclosure, by executing one or more instructions individually or collectively by at least one processor (110), the electronic device (100) may store a normalized histogram cumulative distribution function for each of a plurality of first tiles as a look-up table (LUT) in a storage space in memory (120). By executing one or more instructions individually or collectively by at least one processor (110), the electronic device (100) may obtain a normalized histogram cumulative distribution function for each of a plurality of first tiles from the look-up table in order to obtain a second image.

[0155] In one embodiment of the present disclosure, by executing one or more instructions individually or collectively by at least one processor (110), the electronic device (100) can convert the pixel value of a first pixel located in a second area defined by a second tile that is commonly overlapped with four adjacent first tiles among a plurality of second tiles within a first area including four adjacent first tiles in the entire area of ​​a first image, based on pixel conversion values ​​according to a normalized histogram cumulative distribution function of each of the four adjacent first tiles of the first pixel and a ratio according to the distance between the first pixel and the boundary line or extension line of the boundary line of the second area. By executing one or more of the above instructions individually or collectively by at least one processor (110), the electronic device (100) can convert the pixel value of a second pixel located outside the second region among the pixels within the first region based on pixel conversion values ​​according to the normalized histogram cumulative distribution function of each of the four adjacent first tiles and the ratio according to the distance between the second pixel and the boundary line of the second region or the extension line of the boundary line.

[0156] In one embodiment of the present disclosure, the first area may be a rectangular area including four adjacent first tiles.

[0157] In one embodiment of the present disclosure, the four adjacent first tiles may include a first-1 tile containing a first pixel and a second pixel that are subject to pixel value conversion within a first area, a first-2 tile closest to the first-1 tile along a first direction, a first-3 tile closest to the first-1 tile along a second direction, and a first-4 tile closest to both the first-2 tile and the first-3 tile and diagonally adjacent to the first-1 tile.

[0158] In one embodiment of the present disclosure, in an operation to convert the pixel value of a first pixel, the ratio according to distance may be a ratio according to the distance between the first pixel and the boundary line or extension of the boundary line of a second area on a virtual straight line connecting the first pixel and the boundary line or extension of the boundary line of a second area in a vertical direction according to the X-axis and Y-axis directions. In one embodiment of the present disclosure, in an operation to convert the pixel value of a second pixel, the ratio according to distance may be a ratio according to the distance between the second pixel and the boundary line or extension of the boundary line of a second area on a virtual straight line connecting the second pixel and the boundary line or extension of the boundary line of a second area in a vertical direction according to the X-axis and Y-axis directions.

[0159] In one embodiment of the present disclosure, by executing one or more instructions individually or collectively by at least one processor (110), the electronic device (100) may apply a first weighting parameter to a first image and apply a second weighting parameter to a second image. The first weighting parameter may be a value greater than or equal to the second weighting parameter.

[0160] In one embodiment of the present disclosure, by executing one or more instructions individually or collectively by at least one processor (110), the electronic device (100) can linearly combine a first image with a first weight parameter and a second image with a second weight parameter to generate a final image.

[0161] In one embodiment of the present disclosure, by executing one or more instructions individually or collectively by at least one processor (110), the electronic device (100) can obtain at least one additional image by performing an outerpolation using pixel transformation values ​​by a normalized histogram cumulative distribution function of each of the four adjacent first tiles to transform the pixel values ​​of the pixels included in at least one tile among the first-2 tile, the first-3 tile, and the first-4 tile. By executing one or more instructions individually or collectively by at least one processor (110), the electronic device (100) can obtain an average sum image by performing an operation to divide the sum of the second image and at least one additional image by the number of the second image and at least one additional image, apply a first weight parameter to the first image, apply a second weight parameter to the average sum image, and combine the weighted first image and the average sum image to obtain a final image. The present disclosure provides a computer program product comprising a computer-readable storage medium.The above storage medium comprises the operation of acquiring a first image by dividing the entire area of ​​an original image into a plurality of first tiles and applying a CLAHE (Contrast Limited Adaptive Histogram Equalization) algorithm that reflects histogram information obtained from the divided plurality of first tiles into a second tile; the operation of dividing the entire area of ​​the original image into a plurality of second tiles using a straight line connecting the midpoints of the sides of each of the plurality of first tiles; and the operation of acquiring a second image by performing bilinear interpolation to transform the pixel value of a pixel included in a second tile that is commonly superimposed on four adjacent first tiles among the plurality of second tiles using a pixel transformation value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles, and performing outerpolation to transform the pixel value of a pixel located outside the second tile among pixels within any one of the four adjacent first tiles using a pixel transformation value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles. The electronic device (100) may include instructions readable by the electronic device (100) to perform the operation of obtaining a final image by applying weights to each of the first image and the second image and combining the first image and the second image to which the weights have been applied.

[0162] A program executed by the electronic device (100) described in the present disclosure may be implemented as a hardware component, a software component, and / or a combination of a hardware component and a software component. The program may be executed by any system capable of executing computer-readable instructions.

[0163] Software may include a computer program, code, instructions, or a combination of one or more of these, and may configure a processing unit to operate as desired or command the processing unit independently or collectively.

[0164] Software can be implemented as a computer program containing instructions stored on a computer-readable storage medium. Examples of computer-readable recording media include magnetic storage media (e.g., ROM (read-only memory), RAM (random-access memory), floppy disks, hard disks, etc.) and optical reading media (e.g., CD-ROMs, DVDs (Digital Versatile Discs)). Computer-readable recording media can be distributed across networked computer systems, allowing computer-readable code to be stored and executed in a distributed manner. The medium is readable by a computer, stored in memory, and can be executed by a processor.

[0165] Computer-readable storage media may be provided in the form of non-transitory storage media. Here, 'non-transitory' means only that the storage medium does not contain a signal and is tangible, and does not distinguish between cases where data is stored semi-permanently or temporarily on the storage medium. For example, a 'non-transitory storage medium' may include a buffer in which data is stored temporarily.

[0166] In addition, the program according to the embodiments disclosed herein may be provided by being included in a computer program product. The computer program product may be traded between a seller and a buyer as a product.

[0167] A computer program product may include a software program and a computer-readable storage medium on which the software program is stored. For example, the computer program product may be from the manufacturer of the electronic device (100) or an electronic market (e.g., Samsung Galaxy Store). TM It may include a product in the form of a software program that is distributed electronically through ). For electronic distribution, at least a portion of the software program may be stored on a storage medium or temporarily created. In this case, the storage medium may be a server of the manufacturer of the electronic device (100), a server of an electronic market, or a storage medium of a relay server that temporarily stores the software program.

[0168] A computer program product may include a storage medium of a server or a storage medium of an electronic device (100) in a system composed of an electronic device (100) and / or a server. Alternatively, if there is a third device that is communicationally connected to the electronic device (100), the computer program product may include a storage medium of the third device. Alternatively, the computer program product may include a software program itself that is transmitted from the electronic device (100) to the third device or from the third device to the electronic device.

[0169] In this case, either the electronic device (100) or one of the third devices may execute a computer program product to perform the method according to the disclosed embodiments. Alternatively, at least one of the electronic device (100) and the third device may execute a computer program product to perform the method according to the disclosed embodiments in a distributed manner.

[0170] For example, an electronic device (100) can execute a computer program product stored in memory (120, see FIG. 3) to control another electronic device that is connected to the electronic device (100) to perform a method according to the disclosed embodiments.

[0171] As another example, a third device may execute a computer program product to control an electronic device connected to the third device in communication to perform the method according to the disclosed embodiment.

[0172] When the third device executes a computer program product, the third device may download the computer program product from the electronic device (100) and execute the downloaded computer program product. Alternatively, the third device may execute a computer program product provided in a pre-loaded state to perform the method according to the disclosed embodiments.

[0173] Although the embodiments have been described above with reference to limited examples and drawings, those skilled in the art can make various modifications and variations from the description above. For example, appropriate results can be achieved even if the described techniques are performed in a different order than described, and / or components such as the described computer system or module are combined or assembled in a form different from described, or replaced or substituted by other components or equivalents.

Claims

1. A method for an electronic device (100) to improve the local contrast of an image, A step (S210) of dividing the entire area of ​​the original image into a plurality of first tiles and applying the CLAHE (Contrast Limited Adaptive Histogram Equalization) algorithm to the plurality of divided first tiles to obtain a first image; A step (S220) of dividing the entire area of ​​the original image into a plurality of second tiles using a straight line connecting the midpoints of the sides of each of the plurality of first tiles; A step (S230) of obtaining a second image by performing bilinear interpolation to transform the pixel value of a pixel included within a second tile that is commonly superimposed on four adjacent first tiles among the plurality of second tiles, using a pixel transformation value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles, and by performing outerpolation to transform the pixel value of a pixel located outside the second tile among pixels within any one of the four adjacent first tiles, using a pixel transformation value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles; and A step (S240) of obtaining a final image by applying weights to each of the first image and the second image, and combining the first image and the second image to which the weights have been applied; A method including 2. In Paragraph 1, The above plurality of second tiles are, A method in which the plurality of first tiles are arranged so as to be offset from each other by a distance equal to half the size of the side of each of the above-mentioned tiles.

3. In Paragraph 1 or 2, A method in which the boundary lines of the plurality of second tiles are orthogonal to each other with the boundary lines of the plurality of first tiles.

4. In any one of paragraphs 1 to 3, The step of acquiring the second image (S230) is, A step (S610) of transforming the pixel value of a first pixel located within a second region defined by a second tile that is commonly overlapped with the four adjacent first tiles among the plurality of second tiles within a first region including the four adjacent first tiles among the entire area of ​​the first image, based on pixel transformation values ​​according to the normalized histogram cumulative distribution function of each of the four adjacent first tiles of the first pixel and a ratio according to the distance between the first pixel and the boundary line or the extension line of the boundary line of the second region; and A step (S620) of converting the pixel value of a second pixel located outside the second region among the pixels within the first region based on pixel conversion values ​​according to the normalized histogram cumulative distribution function of each of the four adjacent first tiles and a ratio according to the distance between the second pixel and the boundary line of the second region or the extension line of the boundary line; A method including 5. In any one of paragraphs 1 through 4, The step of acquiring the final image (S240) above is, A step (S1010) of applying a first weight parameter to the first image and applying a second weight parameter to the second image; Includes, A method in which the first weight parameter is greater than or equal to the second weight parameter.

6. In Paragraph 1, The above four adjacent first tiles are, A method comprising a first-1 tile containing a pixel value conversion target pixel within the first region, a first-2 tile closest to the first-1 tile along a first direction, a first-3 tile closest to the first-1 tile along a second direction, and a first-4 tile closest to both the first-2 tile and the first-3 tile, and adjacent to the first-1 tile in a diagonal direction.

7. In Paragraph 6, The step of acquiring the second image (S230) is, A step of obtaining at least one additional image by transforming the pixel values ​​of pixels included in at least one of the first-2 tiles, the first-3 tiles, and the first-4 tiles by performing an outerpolation using pixel transformation values ​​based on the normalized histogram cumulative distribution function of each of the four adjacent first tiles; Includes more, The step of acquiring the final image (S240) above is, A step (S1230) of obtaining an average sum image through an operation of dividing the sum of the second image and the at least one additional image by the number of the second image and the at least one additional image; and A step (S1240) of obtaining the final image by applying a first weight parameter to the first image, applying a second weight parameter to the average sum image, and combining the first image with the applied weights and the average sum image; A method including 8. In an electronic device (100) for improving the local contrast of an image, At least one processor (110) including processing circuitry; and Memory (120) for storing one or more instructions; Includes, By executing the above one or more instructions individually or collectively by the at least one processor (110), the electronic device (100) is: The entire area of ​​the original image is divided into a plurality of first tiles, and a first image is obtained by applying the CLAHE (Contrast Limited Adaptive Histogram Equalization) algorithm to the divided plurality of first tiles. Using a straight line connecting the midpoints of the sides of each of the plurality of first tiles, the entire area of ​​the original image is divided into a plurality of second tiles, and A second image is obtained by performing bilinear interpolation to transform the pixel value of a pixel included within a second tile that is commonly superimposed on four adjacent first tiles among the plurality of second tiles, using a pixel transformation value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles, and by performing outerpolation to transform the pixel value of a pixel located outside the second tile among pixels within any one of the four adjacent first tiles, using a pixel transformation value based on a normalized histogram cumulative distribution function of each of the four adjacent first tiles. An electronic device (100) that applies weights to each of the first image and the second image, and obtains a final image by combining the first image and the second image to which the weights are applied.

9. In Paragraph 8, The above plurality of second tiles are, An electronic device (100) arranged so as to be offset from each other by a distance equal to half the size of the side of each of the plurality of first tiles.

10. In Paragraph 8 or 9, The boundary lines of the plurality of second tiles are orthogonal to each other with the boundary lines of the plurality of first tiles, in an electronic device (100).

11. In any one of paragraphs 8 through 10, By executing the above one or more instructions individually or collectively by the at least one processor (110), the electronic device (100) is: The pixel value of a first pixel located within a second region defined by a second tile that is commonly overlapped with the four adjacent first tiles among the plurality of second tiles within a first region including the four adjacent first tiles among the entire area of ​​the first image is transformed based on pixel transformation values ​​according to the normalized histogram cumulative distribution function of each of the four adjacent first tiles of the first pixel and a ratio according to the distance between the first pixel and the boundary line or the extension line of the boundary line of the second region, and An electronic device (100) that converts the pixel value of a second pixel located outside the second region among the pixels within the first region based on pixel conversion values ​​according to a normalized histogram cumulative distribution function of each of the four adjacent first tiles and a ratio according to the distance between the second pixel and the boundary line of the second region or the extension line of the boundary line.

12. In any one of paragraphs 8 through 11, By executing the above one or more instructions individually or collectively by the at least one processor (110), the electronic device (100) is: A first weight parameter is applied to the first image, and a second weight parameter is applied to the second image, and The electronic device (100), wherein the first weight parameter is greater than or equal to the second weight parameter.

13. In Paragraph 12, By executing the above one or more instructions individually or collectively by the at least one processor (110), the electronic device (100) is: An electronic device (100) that generates the final image by linearly combining the first image to which the first weight parameter is applied and the second image to which the second weight parameter is applied.

14. In Paragraph 8, The above four adjacent first tiles are, An electronic device (100) comprising a first-1 tile containing a pixel value conversion target pixel within the first region, a first-2 tile closest to the first-1 tile along a first direction, a first-3 tile closest to the first-1 tile along a second direction, and a first-4 tile closest to both the first-2 tile and the first-3 tile and adjacent to the first-1 tile in a diagonal direction.

15. In Paragraph 14, By executing the above one or more instructions individually or collectively by the at least one processor (110), the electronic device (100) is: At least one additional image is obtained by transforming the pixel values ​​of pixels included in at least one of the above 1-2 tiles, above 1-3 tiles, and above 1-4 tiles by performing outerpolation using pixel transformation values ​​based on the normalized histogram cumulative distribution function of each of the four adjacent 1 tiles, and An average sum image is obtained through an operation of dividing the sum of the second image and the at least one additional image by the number of the second image and the at least one additional image, and An electronic device (100) that obtains the final image by applying a first weighting parameter to the first image, applying a second weighting parameter to the average sum image, and combining the first image with the weights applied and the average sum image.