Color image enhancement method and device based on histogram segmentation

By performing histogram segmentation and histogram equalization processing on color images, combining color recovery factors to merge component images, the problems of large amount of calculation and color distortion in traditional methods are solved, and efficient color image enhancement is achieved.

CN119809950APending Publication Date: 2025-04-11BEIJING INST OF ENVIRONMENTAL FEATURES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411882726.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The traditional color image enhancement method has a large amount of calculation and severe image color distortion.

Method used

The color image enhancement method based on histogram segmentation is adopted, and the image component map is segmented through the grayscale median value and maximum information entropy theory to obtain multiple grayscale areas, and each area is subjected to histogram equalization, and finally the component map after the merge process is based on the color recovery factor.

Benefits of technology

On the basis of maintaining the original image color, the image processing effect is improved, the calculation process is simplified, and the calculation amount is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119809950A_ABST
    Figure CN119809950A_ABST
Patent Text Reader

Abstract

The invention provides a color image enhancement method and device based on histogram segmentation. The method comprises the following steps of: respectively segmenting a gray histogram of each component graph by taking a gray median as a first segmentation threshold to respectively obtain two first gray regions; according to a second segmentation threshold determined by a maximum information entropy theory and an equal area segmentation principle, segmenting each first gray scale region in the gray scale histogram of each component graph to obtain four second gray scale regions; performing histogram equalization processing on each second gray region in each component graph to obtain an enhanced component graph; combining each enhanced component graph based on a corresponding color recovery factor to obtain an image after color enhancement; wherein the color recovery factor is determined and obtained based on the proportion of the gray level number of each component graph in the total gray level number of the to-be-processed image. According to the scheme, the image processing effect can be enhanced on the basis of keeping the color of the original image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of color image enhancement, and in particular to a color image enhancement method and device based on histogram segmentation. Background Art

[0002] There are several main methods for color image enhancement: (1) First convert the image from RGB color space to HIS color space, and then enhance the brightness component I. Because the color space needs to be converted to each other, the amount of calculation will increase. (2) First divide the color image into three sub-images, R, G, and B, process these three sub-images separately, and then merge them after processing. The color of the image processed by this method is seriously distorted. (3) Directly process the 3D color image, calculate the joint probability density of the three sub-images R, G, and B, and then perform histogram equalization based on this probability density. This method has a complex algorithm for calculating the joint probability density and a large amount of calculation.

[0003] Therefore, there is an urgent need to provide a color image enhancement method and device based on histogram segmentation. Summary of the invention

[0004] In order to solve the problems of large amount of calculation and serious image color distortion in traditional color image enhancement methods, the embodiments of the present invention provide a color image enhancement method and device based on histogram segmentation.

[0005] In a first aspect, an embodiment of the present invention provides a color image enhancement method based on histogram segmentation, the method comprising:

[0006] Obtaining a component map of the image to be processed and the grayscale level of each component map; wherein the component map includes an R component map, a G component map and a B component map;

[0007] Each component image is segmented using the grayscale median as the first segmentation threshold to obtain two first grayscale regions;

[0008] According to the second segmentation threshold determined by the maximum information entropy theory and the principle of equal area segmentation, each of the first grayscale regions in the grayscale histogram of each component image is segmented to obtain four second grayscale regions respectively;

[0009] Performing histogram equalization processing on each of the second grayscale regions in each component image respectively to obtain an enhanced component image;

[0010] Each enhanced component image is merged based on the corresponding color restoration factor to obtain a color enhanced image; wherein the color restoration factor is determined based on the proportion of the grayscale number of each component image in the total number of grayscale levels of the image to be processed.

[0011] In a second aspect, an embodiment of the present invention further provides a color image enhancement device based on histogram segmentation, the device comprising:

[0012] An acquisition unit, used to acquire a component map of the image to be processed and the grayscale level of each component map; wherein the component map includes an R component map, a G component map and a B component map;

[0013] A first segmentation unit is used to segment each component image by taking the grayscale median as a first segmentation threshold, and obtain two first grayscale regions respectively;

[0014] A second segmentation unit is used to determine a second segmentation threshold according to the maximum information entropy theory and the principle of equal area segmentation, and to segment each of the first grayscale regions in the grayscale histogram of each component image to obtain four second grayscale regions respectively;

[0015] an equalization unit, configured to perform a histogram equalization process on each of the second grayscale regions in each component image to obtain an enhanced component image;

[0016] The merging unit is used to merge each enhanced component image based on the corresponding color restoration factor to obtain a color enhanced image; wherein the color restoration factor is determined based on the proportion of the grayscale level of each component image in the total number of grayscale levels of the image to be processed.

[0017] In a third aspect, an embodiment of the present invention further provides a computing device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of this specification is implemented.

[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method described in any embodiment of this specification.

[0019] On the other hand, an embodiment of the present application further provides a computer program product, which includes a computer program. A processor of a computer device reads the computer program from a computer-readable storage medium, and the processor executes the computer program, so that the computer device executes any of the methods described in the above embodiments.

[0020] The embodiment of the present invention provides a color image enhancement method based on histogram segmentation. First, the grayscale histograms of the three component images R, G, and B of the image to be processed are segmented in turn according to the grayscale median, maximum information entropy theory, and equal area segmentation principle. Then, the four grayscale areas obtained after the segmentation of each component image are subjected to histogram equalization processing respectively. Then, the proportion of the grayscale levels of the three component images R, G, and B in the total number of grayscale levels of the image to be processed is calculated respectively, so as to determine the color restoration factors of the three component images respectively. Finally, the R, G, and B component images after equalization processing are merged based on the corresponding color restoration factors. In this way, not only can the processing effect of the image be enhanced while maintaining the color of the original image, but the method is simple and the amount of calculation is low. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 is a flow chart of a color image enhancement method based on histogram segmentation provided by an embodiment of the present invention;

[0023] Figure 2 is a comparison diagram of images before and after being processed by a color image enhancement method based on histogram segmentation provided by an embodiment of the present invention; wherein, Figure 2 (a) is the image before processing. Figure 2 (b) is the processed image;

[0024] Figure 3 is a comparison diagram of images before and after being processed by a color image enhancement method based on histogram segmentation provided by another embodiment of the present invention; wherein, Figure 3 (a) is the image before processing. Figure 3 (b) is the processed image;

[0025] Figure 4 is a comparison diagram of images before and after being processed by a color image enhancement method based on histogram segmentation provided by another embodiment of the present invention; wherein, Figure 4 (a) is the image before processing. Figure 4 (b) is the processed image;

[0026] Figure 5 is a hardware architecture diagram of a computing device provided by an embodiment of the present invention;

[0027] Figure 6It is a structural diagram of a color image enhancement device based on histogram segmentation provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0029] The specific implementation of the above concept is described below.

[0030] Please refer to Figure 1 The embodiment of the present invention provides a color image enhancement method based on histogram segmentation, the method comprising:

[0031] Step 100, obtaining a component map of the image to be processed and the grayscale level of each component map; wherein the component map includes an R component map, a G component map and a B component map;

[0032] Step 102, segmenting each component image using the grayscale median as a first segmentation threshold to obtain two first grayscale regions respectively;

[0033] Step 104, segmenting each of the first grayscale regions in the grayscale histogram of each component image according to the second segmentation threshold determined according to the maximum information entropy theory and the principle of equal area segmentation, to obtain four second grayscale regions respectively;

[0034] Step 106, performing histogram equalization processing on each of the second grayscale regions in each component image to obtain an enhanced component image;

[0035] Step 106, merging each enhanced component image based on a corresponding color restoration factor to obtain a color enhanced image; wherein the color restoration factor is determined based on the proportion of the grayscale level of each component image in the total number of grayscale levels of the image to be processed.

[0036] In the embodiment of the present invention, the grayscale histograms of the three component images R, G, and B of the image to be processed are first segmented in sequence according to the grayscale median and maximum information entropy theory, and then the four grayscale areas obtained after segmentation of each component image are subjected to histogram equalization respectively, and then the proportion of the grayscale of the three component images R, G, and B in the total number of grayscale of the image to be processed is calculated respectively, so as to determine the color restoration factors of the three component images respectively, and finally, the R, G, and B component images after equalization are merged based on the corresponding color restoration factors. In this way, not only can the image processing effect be enhanced on the basis of maintaining the color of the original image, but also the method is simple and the amount of calculation is low.

[0037] For steps 100 to 104:

[0038] In some implementations, each of the second grayscale regions in each component image is segmented in the following manner:

[0039]

[0040] In the formula, and is the second grayscale area obtained by segmenting the two first grayscale areas, R(i,j) is the grayscale value of the pixel with abscissa i and ordinate j, R l is the lth gray level, R L and R U are the two first grayscale areas, R m is the mth gray level, R u is the u-th gray level.

[0041] In the embodiment of the present invention, firstly, according to the grayscale median R of the grayscale histogram of each component image m Each component image is segmented once as the segmentation threshold, and then according to the maximum information entropy theory and the principle of equal area segmentation, the lth gray level R is used l , the uth gray level R u The two first grayscale regions R obtained after the first segmentation are L and R U Perform equal area segmentation of the grayscale histogram to obtain four second grayscale areas, namely This can further improve the enhancement effect while maintaining the brightness of the original image.

[0042] In the embodiment of the present invention, the specific process of segmenting the image in the above manner is common knowledge to those skilled in the art and will not be described in detail herein.

[0043] Regarding step 106:

[0044] In some implementations, step 106 includes:

[0045] For each component graph, execute:

[0046] Calculate the probability density of each second grayscale region based on the number of pixels in the four second grayscale regions;

[0047] Calculate the cumulative distribution function of the probability density of each second grayscale region;

[0048] Each second grayscale region is transformed based on the cumulative distribution function of the probability density of each second grayscale region to obtain an enhanced component map.

[0049] In some embodiments, the probability density of each second grayscale area is calculated by the following formula:

[0050]

[0051] In the formula, and The gray level in the four second gray areas is R k The probability density of the pixel, and is the gray level R in the four second gray areas k The number of pixels, and are the total number of pixels in each second grayscale area.

[0052] In some embodiments, the cumulative distribution function of the probability density of each second grayscale region is calculated by the following formula:

[0053]

[0054] In the formula, and is the cumulative distribution function of the probability density of the four second grayscale regions, and is the probability density of gray level Ri in the four second grayscale regions;

[0055] In some implementations, each second grayscale region is transformed by the following formula:

[0056]

[0057] In the formula, and are the grayscale values ​​of the four second grayscale regions after equalization, R0 is the first grayscale level, R m is the m+1th gray level, R m+1 is the m+2th gray level, R l+1 is the l+2th gray level, Rl is the l+1th gray level, R u is the u+1th gray level, R u+1 u+2 gray level, R l-1 is the lth gray level.

[0058] In an embodiment of the present invention, each component image is segmented twice so that each component image forms four second grayscale areas, and the four second grayscale areas are respectively subjected to histogram equalization processing according to the above method, so that the pixel grayscale distribution in each component image can be more uniform, which is beneficial to improving the contrast and clarity of the image to be processed.

[0059] Regarding step 108:

[0060] In the embodiment of the present invention, for each pixel point in the unprocessed image to be processed, there is a certain proportional relationship between the gray levels of the three component images of R, G, and B corresponding to the pixel point.

[0061] Let R(i,j), G(i,j) and B(i,j) represent the grayscale levels of the three components of the original image, R, G, and B. and Respectively represent the gray levels of the three components of R, G, and B in the image after histogram equalization. At this time, This is not necessarily true, because the grayscale ratios between the R, G, and B component images change after equalization processing. At this time, directly merging each component image may cause color distortion of the processed image.

[0062] In this regard, the color restoration factor C is introduced in the embodiment of the present invention. r , whose expression is:

[0063]

[0064] In the formula, C r is the color restoration factor of the rth component image, I r (i, j) is the gray level of the rth component image, N = 3, that is, R, G, B 3 components, is the sum of the gray levels of the three component images in the original color image (the image to be processed), f is the mapping function, is the ratio of the gray level of the rth component image to the total gray levels of the original color image.

[0065] Furthermore, considering that the human eye has a logarithmic mathematical response to the image brightness, the color restoration factor in the embodiment of the present invention is expressed in the logarithmic domain as follows:

[0066]

[0067] Furthermore, to ensure that the color restoration factor is a positive number, log(1+x) is used instead of log(x), and the color restoration factor of each enhanced component image is calculated by the following formula:

[0068]

[0069] In the formula, C r (i, j) is the color restoration factor of the rth enhanced component image, α is the color parameter, which can be adjusted according to the experiment, I r (i,j) is the gray level of the rth component image, is the sum of the gray levels of the three components in the image to be processed, N=3, i.e., 3 components R, G, and B.

[0070] At this point, the three component images of the color image to be processed are respectively processed by the histogram segmentation equalization method proposed in this embodiment, and then the three component images are merged according to the corresponding restoration factors calculated by each of them, so as to achieve rapid enhancement processing of the color image to be processed while ensuring that the color of the original image is not distorted.

[0071] Figures 2 to 4 The comparison diagrams before and after the enhancement method in the embodiment of the present invention are respectively compared. Figure 2 (a) Figure 2 (b) Figure 3 (a) Figure 3 (b) Figure 4 (a) Figure 4 It can be found in (b) that the enhancement method in the embodiment of the present invention not only has an obvious enhancement effect, but also maintains the color of the picture well, and is simple to calculate.

[0072] like Figure 5 , Figure 6 As shown, the embodiment of the present invention provides a color image enhancement device based on histogram segmentation. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, Figure 5 FIG. 1 is a hardware architecture diagram of a computing device in which a color image enhancement device based on histogram segmentation is provided in an embodiment of the present invention. Figure 5 In addition to the processor, memory, network interface, and non-volatile memory shown in the figure, the computing device in which the device is located in the embodiment may also generally include other hardware, such as a forwarding chip responsible for processing messages, etc. Taking software implementation as an example, Figure 6 As shown, as a device in a logical sense, the CPU of the computing device in which it is located reads the corresponding computer program in the non-volatile memory into the internal memory and runs it.

[0073] This embodiment provides a color image enhancement device based on histogram segmentation, the device comprising:

[0074] An acquisition unit 601 is used to acquire a component map of an image to be processed and the grayscale level of each component map; wherein the component map includes an R component map, a G component map and a B component map;

[0075] A first segmentation unit 602 is used to segment each component image using the grayscale median as a first segmentation threshold to obtain two first grayscale regions respectively;

[0076] A second segmentation unit 603 is used to determine a second segmentation threshold according to the maximum information entropy theory and the principle of equal area segmentation, and to segment each of the first grayscale regions in the grayscale histogram of each component image to obtain four second grayscale regions respectively;

[0077] An equalization unit 604 is used to perform a histogram equalization process on each of the second grayscale regions in each component image to obtain an enhanced component image;

[0078] The merging unit 605 is used to merge each enhanced component image based on the corresponding color restoration factor to obtain a color enhanced image; wherein the color restoration factor is determined based on the proportion of the grayscale level of each component image in the total number of grayscale levels of the image to be processed.

[0079] In the embodiment of the present invention, the acquisition unit 601 may be used to execute step 100 in the above method embodiment, the first segmentation unit 602 may be used to execute step 102 in the above method embodiment, the second segmentation unit 603 may be used to execute step 104 in the above method embodiment, the equalization unit 604 may be used to execute step 106 in the above method embodiment, and the merging unit 605 may be used to execute step 108 in the above method embodiment.

[0080] In one embodiment of the present invention, in the first segmentation unit 602, each of the second grayscale regions in each component image is segmented in the following manner:

[0081]

[0082]

[0083] In the formula, and is the second grayscale area obtained by segmenting the two first grayscale areas, R(i,j) is the grayscale value of the pixel with abscissa i and ordinate j, R l is the lth gray level, R L and RU are the two first grayscale areas, R m is the mth gray level, R u is the u-th gray level.

[0084] In one embodiment of the present invention, when the equalization unit 604 performs the histogram equalization processing on the second grayscale area in each component image, it is used to perform the following operations:

[0085] For each component graph, execute:

[0086] Calculate the probability density of each second grayscale area based on the number of pixels in the four second grayscale areas;

[0087] Calculate the cumulative distribution function of the probability density of each second grayscale region;

[0088] Each second grayscale region is transformed based on the cumulative distribution function of the probability density of each second grayscale region to obtain an enhanced component map.

[0089] In one embodiment of the present invention, the probability density of each second grayscale area is calculated by the following formula:

[0090]

[0091] In the formula, and The gray level in the four second gray areas is R k The probability density of the pixel, and is the gray level R in the four second gray areas k The number of pixels, and are the total number of pixels in each second grayscale area.

[0092] In one embodiment of the present invention, the cumulative distribution function of the probability density of each second grayscale region is calculated by the following formula:

[0093]

[0094] In the formula, and is the cumulative distribution function of the probability density of the four second grayscale regions, and is the probability density of the gray level Ri in the four second grayscale regions.

[0095] In one embodiment of the present invention, each second grayscale area is transformed by the following formula:

[0096]

[0097] In the formula, and is the gray value of the four second grayscale areas after equalization, R0 is the first grayscale level, R m is the m+1th gray level, R m+1 is the m+2th gray level, R l+1 is the l+2th gray level, R l is the l+1th gray level, R u is the u+1th gray level, R u+1 u+2 gray level, R l-1 is the lth gray level.

[0098] In one embodiment of the present invention, in the merging unit 605, the color restoration factor of each enhanced component image is calculated by the following formula:

[0099]

[0100] In the formula, C r (i, j) is the color restoration factor of the rth enhanced component image, α is the color parameter, I r (i,j) is the gray level of the rth component image, is the sum of the gray levels of the three components in the image to be processed, N=3, i.e., 3 components R, G, and B.

[0101] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on a color image enhancement device based on histogram segmentation. In other embodiments of the present invention, a color image enhancement device based on histogram segmentation may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0102] The information interaction, execution process and other contents between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For the specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.

[0103] An embodiment of the present invention further provides a computing device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a color image enhancement method based on histogram segmentation in any embodiment of the present invention is implemented.

[0104] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor executes a color image enhancement method based on histogram segmentation in any embodiment of the present invention.

[0105] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can read and execute the program code stored in the storage medium.

[0106] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0107] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0108] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0109] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0110] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement a color image enhancement method based on histogram segmentation provided in the above-mentioned method embodiments.

[0111] It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0112] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A color image enhancement method based on histogram segmentation, characterized in that: include: Obtaining a component map of the image to be processed and the grayscale level of each component map; wherein the component map includes an R component map, a G component map and a B component map; The grayscale histogram of each component image is segmented using the grayscale median as the first segmentation threshold to obtain two first grayscale regions respectively; According to the second segmentation threshold determined by the maximum information entropy theory and the principle of equal area segmentation, each of the first grayscale regions in the grayscale histogram of each component image is segmented to obtain four second grayscale regions respectively; Performing histogram equalization processing on each of the second grayscale regions in each component image respectively to obtain an enhanced component image; Each enhanced component image is merged based on the corresponding color restoration factor to obtain a color enhanced image; wherein the color restoration factor is determined based on the proportion of the grayscale number of each component image in the total number of grayscale levels of the image to be processed.

2. The method according to claim 1, characterized in that Each of the second grayscale regions in each component image is segmented in the following manner: In the formula, and is the second grayscale area obtained by segmenting the two first grayscale areas, R(i,j) is the grayscale value of the pixel with abscissa i and ordinate j, R l is the lth gray level, R L and R U are the two first grayscale areas, R m is the mth gray level, R u is the u-th gray level.

3. The method according to claim 1, characterized in that The performing histogram equalization processing on the second grayscale area in each component image respectively includes: For each component graph, execute: Calculate the probability density of each second grayscale area based on the number of pixels in the four second grayscale areas; Calculate the cumulative distribution function of the probability density of each second grayscale region; Each second grayscale region is transformed based on the cumulative distribution function of the probability density of each second grayscale region to obtain an enhanced component map.

4. The method according to claim 3, characterized in that The probability density of each second grayscale area is calculated by the following formula: In the formula, and The gray level in the four second gray areas is R k The probability density of the pixel, and is the gray level R in the four second gray areas k The number of pixels, and are the total number of pixels in each second grayscale area.

5. The method according to claim 3, characterized in that: The cumulative distribution function of the probability density of each second grayscale area is calculated by the following formula: In the formula, and is the cumulative distribution function of the probability density of the four second grayscale regions, and is the probability density of gray level Ri in the four second grayscale regions; and / or Each second grayscale area is transformed by the following formula: In the formula, and is the gray value of the four second grayscale areas after equalization, R0 is the first grayscale level, R m is the m+1th gray level, R m+1 is the m+2th gray level, R l+1 is the l+2th gray level, R l is the l+1th gray level, R u is the u+1th gray level, R u+1 u+2 gray level, R l-1 is the lth gray level.

6. The method according to claim 1, characterized in that The color restoration factor of each enhanced component image is calculated by the following formula: In the formula, C r (i, j) is the color restoration factor of the rth enhanced component image, α is the color parameter, I r (i,j) is the gray level of the rth component image, is the sum of the gray levels of the three components in the image to be processed, N=3, i.e., 3 components R, G, and B.

7. A color image enhancement device based on histogram segmentation, characterized in that: include: An acquisition unit, used to acquire a component map of the image to be processed and the grayscale level of each component map; wherein the component map includes an R component map, a G component map and a B component map; A first segmentation unit is used to segment each component image by taking the grayscale median as a first segmentation threshold, and obtain two first grayscale regions respectively; A second segmentation unit is used to determine a second segmentation threshold according to the maximum information entropy theory and the principle of equal area segmentation, and to segment each of the first grayscale regions in the grayscale histogram of each component image to obtain four second grayscale regions respectively; an equalization unit, configured to perform a histogram equalization process on each of the second grayscale regions in each component image to obtain an enhanced component image; The merging unit is used to merge each enhanced component image based on the corresponding color restoration factor to obtain a color enhanced image; wherein the color restoration factor is determined based on the proportion of the grayscale level of each component image in the total number of grayscale levels of the image to be processed.

8. A computing device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises a computer program, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Color image enhancement method based on histogram segmentation

    CN104574328A

  • Image processing method and apparatus, electronic device, and storage medium

    WO2024198594A1