CN111563865A - Image detail enhancement method and device for brightness maintenance of consumer electronics - Google Patents

Image detail enhancement method and device for brightness maintenance of consumer electronics Download PDF

Info

Publication number
CN111563865A
CN111563865A CN202010322148.2A CN202010322148A CN111563865A CN 111563865 A CN111563865 A CN 111563865A CN 202010322148 A CN202010322148 A CN 202010322148A CN 111563865 A CN111563865 A CN 111563865A
Authority
CN
China
Prior art keywords
array
length
histogram
gray level
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202010322148.2A
Other languages
Chinese (zh)
Inventor
王海峰
章怡
范鑫
陈海忠
吴卫华
薛勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu University of Technology
Original Assignee
Jiangsu University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu University of Technology filed Critical Jiangsu University of Technology
Priority to CN202010322148.2A priority Critical patent/CN111563865A/en
Publication of CN111563865A publication Critical patent/CN111563865A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Studio Devices (AREA)

Abstract

The invention provides an image detail enhancement method and device for maintaining brightness of a consumer electronic product, which are characterized in that on the basis of an image histogram, the histogram of an input image is automatically divided into a plurality of block histograms according to the characteristics of the input image, histogram equalization calculation is carried out in each block, and finally an enhanced image is merged and output, so that the contrast and detail presenting capability of the output image are improved under the condition that the brightness of the input image and the brightness of the output image are basically consistent according to the requirements of the consumer electronic product and an infrared image processing image, the brightness of the input image can be well maintained, the contrast enhancement of the image can be realized, and the image detail can be clearly presented.

Description

Image detail enhancement method and device for brightness maintenance of consumer electronics
Technical Field
The invention relates to the technical field of image contrast enhancement, in particular to an image detail enhancement method and device for maintaining brightness of a consumer electronic product.
Background
Global histogram equalization is one of the common methods for digital image enhancement, and although the algorithm is simple to implement, the algorithm is not suitable for being implemented in consumer electronics products such as televisions, digital cameras, video cameras and the like. This is because the conventional global histogram equalization algorithm (HE) cannot well maintain the brightness of the input and output images, i.e., the output image processed by the HE algorithm has a large deviation between the brightness and the brightness of the input image. Therefore, for some consumer electronics and infrared image processing systems (requiring the output image to maintain the brightness of the input image), HE algorithms often fail to provide a satisfactory output image.
To be able to effectively solve this problem, many HE-based algorithms have been proposed. Although some methods can achieve contrast enhancement of the image as a whole and maintain good brightness, effective enhancement is often not achieved for local details, and as a result, a satisfactory output image cannot be obtained.
Disclosure of Invention
The present invention aims to provide a method and apparatus for image detail enhancement for brightness preservation of consumer electronics products that overcomes one of the above problems, or at least partially solves any of the above problems.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
one aspect of the present invention provides a method for enhancing image details of brightness preservation of a consumer electronic product, comprising: calculating a gray level histogram h (I) and a probability p (I) of a gray level input image I, wherein I is a gray level, setting an output image imageout to be the same as the input image I in size, and setting numerical values to be a zero matrix; using the first array h1Recording the histogram according with the first rule, using the first gray level array id1Recording corresponding gray levels using a second array h2Recording the histogram according with the second rule, and using the second gray level array id2Recording corresponding gray levels, wherein the first rule comprises 0<p(i)<1/255, the second rule includes: p (i)>1/255, respectively; the first array h1And a second number group h2Performing subdivision using jgh1The array records a first gray level array id1The difference between two adjacent numbers in the sequence,using jg1Array record jgh1(x)>Number of division blocks size 1+ length (jg) as a numerical value of a preset value1) A plurality of; by jgh2Array record second gray level array id2The difference between two adjacent numbers is determined by jg2Array record jgh2(x)>Number of division blocks size 1+ length (jg) as a numerical value of a preset value2) A plurality of; setting a first public array Hx to store the block histogram, and setting a second public array idx to store the gray level of the first public array Hx, wherein the first array h1The acquisition mode of each block histogram Hx is as follows: judgment jg1Whether the array is empty or not, if so, determining a first array h1Cannot be divided, let the first common array Hx be h1The second common array idx ═ id1The length of the block histogram stored in the first public array Hx is length (Hx); if not, determining a first array h1Can be divided again, and the number of divided blocks is 1+ length (jg)1) 1. (1+ length (jg))1) H ═ h) for any block histogram1(T1:jg1(i) Idx ═ id corresponding to the gray level of the block histogram)1(T1:jg1(i) N), wherein i ═ 1.. n)1-1, when i is 1, T1 is 1, and when i is 211, T1 ═ 1+ jg1(i) (ii) a Second array h2The acquisition mode of each block histogram Hx is as follows: judgment jg2Whether the array is empty or not, if so, determining a second array h2Cannot be divided, let the first common array Hx be h2The second common array idx ═ id2The length of the block histogram stored in the first public array Hx is length (Hx); if not, determining a second array h2Can be divided again, and the number of divided blocks is 1+ length (jg)2) 1. (1+ length (jg))2) H ═ h) for any block histogram2(T2:jg2(i) Idx ═ id corresponding to the gray level of the block histogram)2(T2:jg2(i) N), wherein i ═ 1.. n)2-1, when i is 1, T2 is 1, and when i is 221, T2 ═ 1+ jg2(i) (ii) a Calculating the probability of each block histogram in the first public array Hx
Figure BDA0002461825830000021
Cumulative probability
Figure BDA0002461825830000022
Length (hx); calculating the histogram of each block in the first public array Hx according to the following formula:
Figure BDA0002461825830000031
where i 1.. length (hx), f (i) is the gray value of the output image, P1Adjusting parameters of image details, brightness and contrast; and outputting an output image imageout.
Wherein, P1Value range [0,1 ]]。
Wherein, P1=0.1。
Wherein the preset value is 20.
Another aspect of the present invention provides an image detail enhancement apparatus for brightness preservation of a consumer electronic product, comprising: the first calculation module is used for calculating a gray level histogram h (I) and a probability p (I) of a gray level input image I, wherein I is a gray level, the size of an output image imageout is set to be the same as that of the input image I, and the numerical value is set to be a zero matrix; a recording module for utilizing the first array h1Recording the histogram according with the first rule, using the first gray level array id1Recording corresponding gray levels using a second array h2Recording the histogram according with the second rule, and using the second gray level array id2Recording corresponding gray levels, wherein the first rule comprises 0<p(i)<1/255, the second rule includes: p (i)>1/255, respectively; a partitioning module for partitioning the first array h1And a second number group h2Performing subdivision using jgh1The array records a first gray level array id1The difference between two adjacent numbers is determined by jg1Array record jgh1(x)>Number of division blocks size 1+ length (jg) as a numerical value of a preset value1) A plurality of; by jgh2Array record second gray level array id2The difference between two adjacent numbers is determined by jg2Array record jgh2(x)>Number of division blocks size 1+ length (jg) as a numerical value of a preset value2) A plurality of; a determining module for setting a first public array Hx storing block histogram and a second public array idx storing gray level of the first public array Hx, wherein the first array h1The acquisition mode of each block histogram Hx is as follows: judgment jg1Whether the array is empty or not, if so, determining a first array h1Cannot be divided, let the first common array Hx be h1The second common array idx ═ id1The length of the block histogram stored in the first public array Hx is length (Hx); if not, determining a first array h1Can be divided again, and the number of divided blocks is 1+ length (jg)1) 1. (1+ length (jg))1) H ═ h) for any block histogram1(T1:jg1(i) Idx ═ id corresponding to the gray level of the block histogram)1(T1:jg1(i) N), wherein i ═ 1.. n)1-1, when i is 1, T1 is 1, and when i is 211, T1 ═ 1+ jg1(i) (ii) a Second array h2The acquisition mode of each block histogram Hx is as follows: judgment jg2Whether the array is empty or not, if so, determining a second array h2Cannot be divided, let the first common array Hx be h2The second common array idx ═ id2The length of the block histogram stored in the first public array Hx is length (Hx); if not, determining a second array h2Can be divided again, and the number of divided blocks is 1+ length (jg)2) 1. (1+ length (jg))2) H ═ h) for any block histogram2(T2:jg2(i) Idx ═ id corresponding to the gray level of the block histogram)2(T2:jg2(i) N), wherein i ═ 1.. n)2-1, when i is 1, T2 is 1, and when i is 221, T2 ═ 1+ jg2(i) (ii) a A second calculation module for calculating the probability of each block histogram in the first public array Hx
Figure BDA0002461825830000041
Cumulative probability
Figure BDA0002461825830000042
Length (hx); a third calculation module for calculating each of the first common array HxThe block histogram is calculated as follows:
Figure BDA0002461825830000043
where i 1.. length (hx), f (i) is the gray value of the output image, P1Adjusting parameters of image details, brightness and contrast; and the output module is used for outputting an output image imageout.
Wherein, P1Value range [0,1 ]]。
Wherein, P1=0.1。
Wherein the preset value is 20.
Therefore, the image detail enhancement method and device for maintaining the brightness of the consumer electronic product provided by the embodiment of the invention automatically divide the histogram of the input image into a plurality of block histograms according to the characteristics of the input image on the basis of the image histogram, perform histogram equalization calculation in each block, and finally combine and output the enhanced image, so that the contrast and detail presenting capability of the output image can be improved under the condition that the brightness of the input image and the brightness of the output image are basically consistent according to the requirements of the consumer electronic product and an infrared image processing image, the brightness of the input image can be better maintained, the contrast enhancement of the image can be realized, and the image detail can be clearly presented.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flowchart of an image detail enhancement method for brightness preservation of a consumer electronic product according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an image detail enhancement apparatus for brightness preservation of a consumer electronic product according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a flowerpot as a general brightness image according to an embodiment of the present invention;
FIG. 4 is a schematic view of a low-brightness image-landscape provided by an embodiment of the present invention;
FIG. 5 is a schematic diagram of an infrared image provided by an embodiment of the present invention;
fig. 6 is a schematic diagram of a high-brightness image, namely a quincunx image, according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 shows a flowchart of an image detail enhancement method for brightness preservation of a consumer electronic product according to an embodiment of the present invention, and referring to fig. 1, the image detail enhancement method for brightness preservation of a consumer electronic product according to an embodiment of the present invention includes:
s1, calculating a gray level histogram h (I) and a probability p (I) of the gray level input image I, wherein I is a gray level, setting the size of the output image imageout to be the same as that of the input image I, and setting the numerical value to be a zero matrix.
Specifically, the gray level histogram h (I) and the probability p (I) of the input image I may be calculated using existing formulas. Wherein: probability of
Figure BDA0002461825830000061
The image size of the output image imageout may be the same as the matrix of the input image I, for example the matrix of the input image I is 20 × 11, the output image imageout is also 20 × 11, and the data in the data table of the output image imageout is 0.
S2, using the first array h1Recording the histogram according with the first rule, using the first gray level array id1Recording corresponding gray levels using a second array h2Recording the histogram according with the second rule, and using the second gray level array id2Recording corresponding gray levels, wherein the first rule comprises 0<p(i)<1/255, the second rule includes: p (i)>1/255。
Specifically, 0 is added<p(i)<The 1/255 histogram is classified as h1Array records, i.e. h1(1)...h1(n1) Record statistics, id1(1)...id1(n1) I.e. id1The array records corresponding gray levels; for the same reason, p (i)>1/255 into another class2Array records, i.e. h2(1)...h2(n2) Record statistics, id2(1)...id2(n2) I.e. id2The array records the corresponding gray levels. Wherein n is1Is a first array h1Number of histograms in, n2Is a second array h2Number of histograms in (1).
S3, converting the first array h into a second array h1And a second number group h2Performing subdivision using jgh1The array records a first gray level array id1The difference between two adjacent numbers is determined by jg1Array record jgh1(x)>Number of division blocks size 1+ length (jg) as a numerical value of a preset value1) A plurality of; by jgh2Array record second gray level array id2The difference between two adjacent numbers is determined by jg2Array record jgh2(x)>Number of division blocks size 1+ length (jg) as a numerical value of a preset value2) And (4) respectively.
As an optional implementation manner of the embodiment of the present invention, the preset value is 20. Specifically, this step performs histogram h1、h2And then cutting. Using formula jgh1(x)=id1(x+1)-id1(x)x=1...n1-1, record id1Jgh is given to difference and difference value of two adjacent digit groups1In array, jgh will be simultaneously1(x)>Place array jg for a value of 201In (1) + length (jg) of the number of divided blocks1) A plurality of; similarly, using formula jgh2(x)=id2(x+1)-id2(x)x=1...n2-1, record id2Jgh is given to difference and difference value of two adjacent digit groups2In array, jgh will be simultaneously2(x)>Place array jg for a value of 202In (1) + length (jg) of the number of divided blocks2) And (4) respectively.
S4, setting a first public array Hx to store the block histogram, and setting a second public array idx to store the gray level of the first public array Hx, wherein the first array h1The acquisition mode of each block histogram Hx is as follows: judgment jg1Whether the array is empty or not, if so, determining a first array h1Cannot be divided, let the first common array Hx be h1The second common array idx ═ id1The length of the block histogram stored in the first public array Hx is length (Hx); if not, determining a first array h1Can be divided again, and the number of divided blocks is 1+ length (jg)1) 1. (1+ length (jg))1) H ═ h) for any block histogram1(T1:jg1(i) Idx ═ id corresponding to the gray level of the block histogram)1(T1:jg1(i) N), wherein i ═ 1.. n)1-1, when i is 1, T1 is 1, and when i is 211, T1 ═ 1+ jg1(i) (ii) a Second array h2The acquisition mode of each block histogram Hx is as follows: judgment jg2Whether the array is empty or not, if so, determining a second array h2Cannot be divided, let the first common array Hx be h2The second common array idx ═ id2The length of the block histogram stored in the first public array Hx is length (Hx); if not, determining a second array h2Can be divided again, and the number of divided blocks is 1+ length (jg)2) 1. (1+ length (jg))2) H ═ h) for any block histogram2(T2:jg2(i) Idx ═ id corresponding to the gray level of the block histogram)2(T2:jg2(i) N), wherein i ═ 1.. n)2-1, when i is 1, T2 is 1, and when i is 221, T2 ═ 1+ jg2(i)。
Specifically, a public array Hx is set to store a block histogram, a public array idx is set to store the gray level of Hx, and a histogram h is set to store a gray level of Hx1The acquisition mode of each block histogram Hx is as follows: first, determine the array jg1Whether it is empty (isempty (jg)1) 1), if empty, indicates histogram h1Can notWhen the division is performed, Hx is h1,idx=id1The length of the block Hx is length (Hx); second, if not empty, it indicates a histogram h1Can be divided again, the number of the blocks which can be divided is 1+ length (jg)1) And (4) respectively. For 1. (1+ length (jg)1) H ═ h) for any block histogram1(T1:jg1(i) Idx ═ id corresponding to the gray level of the block histogram)1(T1:jg1(i) N), wherein i ═ 1.. n)1The variables T1, when i is 1, are T1 is 1 and when i is 21The variable T1 is the processed jg of the previous block at time-11(i) +1, i.e. T1 ═ 1+ jg1(i)。
(5) Similarly, as in step (4), histogram h is obtained2The histogram Hx of each block. First, determine the array jg2Whether it is empty (isempty (jg)2) 1), if empty, indicates histogram h2When the division is impossible, Hx is h2,idx=id2The length of the block Hx is length (Hx); second, if not empty, it indicates a histogram h2Can be divided again, the number of the blocks which can be divided is 1+ length (jg)2) And (4) respectively. For 1. (1+ length (jg)2) H ═ h) for any block histogram2(T2:jg2(i) Idx ═ id corresponding to the gray level of the block histogram)2(T2:jg2(i) N), wherein i ═ 1.. n)2The variables T2, when i is 1, are T2 is 1 and when i is 22The variable T2 is the processed jg of the previous block at time-12(i) +1, i.e. T2 ═ 1+ jg2(i)。
S5, calculating the probability of each block histogram in the first public array Hx
Figure BDA0002461825830000081
Cumulative probability
Figure BDA0002461825830000082
Length (hx);
s6, calculating the histogram of each block in the first public array Hx according to the following formula:
Figure BDA0002461825830000083
where i 1.. length (hx), f (i) is the gray value of the output image, P1The adjusting parameters of image detail, brightness and contrast are obtained.
As an alternative to the embodiment of the present invention, P1Value range [0,1 ]]. Preferred P10.1. In particular, P1Is variable as required, P1The contrast and the information entropy of the image can be finely adjusted, and 0.1 is selected in the actual calculation process, so that the calculation can be simplified and the calculation speed can be increased.
S7, outputting an output image imageout.
Therefore, the image detail enhancement method for maintaining the brightness of the consumer electronic product provided by the embodiment of the invention adopts local histogram processing of the histogram automatic segmentation technology, has simple and effective algorithm, can well maintain the brightness of an input image, can realize image contrast enhancement at the same time, clearly presents image details, and can be suitable for a consumer electronic product image and infrared image processing system with higher brightness maintenance requirement.
Fig. 2 is a schematic structural diagram illustrating an image detail enhancement apparatus for maintaining brightness of a consumer electronic product according to an embodiment of the present invention, where the image detail enhancement apparatus for maintaining brightness of a consumer electronic product according to an embodiment of the present invention is applied to the foregoing method, and only the structure of the image detail enhancement apparatus for maintaining brightness of a consumer electronic product is briefly described below, and other things are not considered to be the best, with reference to the related description in the image detail enhancement method for maintaining brightness of a consumer electronic product, see fig. 2, the image detail enhancement apparatus for maintaining brightness of a consumer electronic product according to an embodiment of the present invention includes:
the first calculation module is used for calculating a gray level histogram h (I) and a probability p (I) of a gray level input image I, wherein I is a gray level, the size of an output image imageout is set to be the same as that of the input image I, and the numerical value is set to be a zero matrix;
a recording module for utilizing the first array h1The record conforms to the first ruleUsing a first gray level array id1Recording corresponding gray levels using a second array h2Recording the histogram according with the second rule, and using the second gray level array id2Recording corresponding gray levels, wherein the first rule comprises 0<p(i)<1/255, the second rule includes: p (i)>1/255;
A partitioning module for partitioning the first array h1And a second number group h2Performing subdivision using jgh1The array records a first gray level array id1The difference between two adjacent numbers is determined by jg1Array record jgh1(x)>Number of division blocks size 1+ length (jg) as a numerical value of a preset value1) A plurality of; by jgh2Array record second gray level array id2The difference between two adjacent numbers is determined by jg2Array record jgh2(x)>Number of division blocks size 1+ length (jg) as a numerical value of a preset value2) A plurality of;
a determining module for setting a first public array Hx storing block histogram and a second public array idx storing gray level of the first public array Hx, wherein the first array h1The acquisition mode of each block histogram Hx is as follows: judgment jg1Whether the array is empty or not, if so, determining a first array h1Cannot be divided, let the first common array Hx be h1The second common array idx ═ id1The length of the block histogram stored in the first public array Hx is length (Hx); if not, determining a first array h1Can be divided again, and the number of divided blocks is 1+ length (jg)1) 1. (1+ length (jg))1) H ═ h) for any block histogram1(T1:jg1(i) Idx ═ id corresponding to the gray level of the block histogram)1(T1:jg1(i) N), wherein i ═ 1.. n)1-1, when i is 1, T1 is 1, and when i is 211, T1 ═ 1+ jg1(i) (ii) a Second array h2The acquisition mode of each block histogram Hx is as follows: judgment jg2Whether the array is empty or not, if so, determining a second array h2Cannot be divided, let the first common array Hx be h2The second common array idx ═ id2First common array HThe length of the block histogram stored by x is length (Hx); if not, determining a second array h2Can be divided again, and the number of divided blocks is 1+ length (jg)2) 1. (1+ length (jg))2) H ═ h) for any block histogram2(T2:jg2(i) Idx ═ id corresponding to the gray level of the block histogram)2(T2:jg2(i) N), wherein i ═ 1.. n)2-1, when i is 1, T2 is 1, and when i is 221, T2 ═ 1+ jg2(i);
A second calculation module for calculating the probability of each block histogram in the first public array Hx
Figure BDA0002461825830000101
Cumulative probability
Figure BDA0002461825830000102
Length (hx);
the third calculation module is used for calculating the histogram of each block in the first public array Hx according to the following formula:
Figure BDA0002461825830000103
where i 1.. length (hx), f (i) is the gray value of the output image, P1Adjusting parameters of image details, brightness and contrast;
and the output module is used for outputting an output image imageout.
As an alternative to the embodiment of the present invention, P1Value range [0,1 ]]。
As an alternative to the embodiment of the present invention, P1=0.1。
As an optional implementation manner of the embodiment of the present invention, the preset value is 20.
Therefore, the image detail enhancing device for maintaining the brightness of the consumer electronic product provided by the embodiment of the invention adopts local histogram processing of the histogram automatic segmentation technology, has simple and effective algorithm, can well maintain the brightness of an input image, can realize image contrast enhancement at the same time, clearly presents image details, and can be suitable for a consumer electronic product image and infrared image processing system with higher brightness maintaining requirement.
In order to better illustrate the positive effects of the invention, algorithms such as GHE, BBHE, BHEPL, BHEMHE and the like are compared with indexes such as running time, average brightness error (ABME), peak signal-to-noise ratio (PSNR) and the like of the invention, data is an average value of processed 20 images, and a data table is shown in Table 1.
GHE BBHE BHEMHE BHEPL The invention
Time of day 0.32 0.3934 0.3948 0.4026 0.3378
ABME 43.29 13.39 15.79 6.11 5.5934
PSNR 14.57 20.94 19.54 25.46 28.13
TABLE 1
From table 1, the running speed of the present invention is almost consistent with that of the classic Global Histogram (GHE) algorithm, and the average brightness error (ABME) is minimum, which shows that the enhanced image of the present invention is basically consistent with the input image in brightness; meanwhile, the peak signal-to-noise ratio (PSNR) of the image processed by the method is highest, and the noise suppression is optimal.
Meanwhile, the images before and after being processed by the image detail enhancement method for brightness maintenance of the consumer electronic product provided by the embodiment of the invention are shown by fig. 3, 4, 5 and 6.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (8)

1. A method for brightness preserving image detail enhancement for consumer electronics, comprising:
calculating a gray level histogram h (I) and a probability p (I) of a gray level input image I, wherein I is a gray level, setting an output image imageout to be the same as the input image I in size, and setting numerical values to be a zero matrix;
using the first array h1Recording the histogram according with the first rule, using the first gray level array id1Recording corresponding gray levels using a second array h2Recording the histogram according to the second ruleWith second gray level array id2Recording corresponding gray levels, wherein the first rule comprises 0<p(i)<1/255, the second rule includes: p (i)>1/255;
The first array h1And said second array h2Performing subdivision using jgh1The array records the first gray level array id1The difference between two adjacent numbers is determined by jg1Array record jgh1(x)>Number of division blocks size 1+ length (jg) as a numerical value of a preset value1) A plurality of; by jgh2The array records the second gray level array id2The difference between two adjacent numbers is determined by jg2Array record jgh2(x)>Number of division blocks size 1+ length (jg) as a numerical value of a preset value2) A plurality of;
setting a first public array Hx for storing a block histogram, and setting a second public array idx for storing the gray level of the first public array Hx, wherein the first array h1The acquisition mode of each block histogram Hx is as follows: judging the jg1Whether the array is empty or not, if so, determining the first array h1If the division is impossible, let the first common array Hx be h1The second public array idx ═ id1The length of the block histogram stored in the first public array Hx is length (Hx); if not, determining the first array h1Can be divided again, and the number of divided blocks is 1+ length (jg)1) 1. (1+ length (jg))1) H ═ h) for any block histogram1(T1:jg1(i) Idx ═ id corresponding to the gray level of the block histogram)1(T1:jg1(i) N), wherein i ═ 1.. n)1-1, when i is 1, T1 is 1, and when i is 211, T1 ═ 1+ jg1(i) (ii) a The second array h2The acquisition mode of each block histogram Hx is as follows: judging the jg2Whether the array is empty or not, if so, determining the second array h2If the division is impossible, let the first common array Hx be h2The second public array idx ═ id2The length of the block histogram stored in the first public array Hx is length (Hx); if not, determining the secondArray h2Can be divided again, and the number of divided blocks is 1+ length (jg)2) 1. (1+ length (jg))2) H ═ h) for any block histogram2(T2:jg2(i) Idx ═ id corresponding to the gray level of the block histogram)2(T2:jg2(i) N), wherein i ═ 1.. n)2-1, when i is 1, T2 is 1, and when i is 221, T2 ═ 1+ jg2(i);
Calculating the probability of each block histogram in the first public array Hx
Figure FDA0002461825820000021
Cumulative probability
Figure FDA0002461825820000022
Length (hx);
calculating the histogram of each block in the first public array Hx according to the following formula:
Figure FDA0002461825820000023
where i 1.. length (hx), f (i) is the gray value of the output image, P1Adjusting parameters of image details, brightness and contrast;
and outputting the output image imageout.
2. The method of claim 1, wherein P is P1Value range [0,1 ]]。
3. The method of claim 2, wherein P is1=0.1。
4. The method according to any one of claims 1 to 3, wherein the preset value is 20.
5. An image detail enhancement apparatus for brightness preservation of consumer electronics, comprising:
the first calculation module is used for calculating a gray level histogram h (I) and a probability p (I) of a gray level input image I, wherein I is a gray level, the size of an output image imageout is set to be the same as that of the input image I, and the numerical value is set to be a zero matrix;
a recording module for utilizing the first array h1Recording the histogram according with the first rule, using the first gray level array id1Recording corresponding gray levels using a second array h2Recording the histogram according with the second rule, and using the second gray level array id2Recording corresponding gray levels, wherein the first rule comprises 0<p(i)<1/255, the second rule includes: p (i)>1/255;
A partitioning module for partitioning the first array h1And said second array h2Performing subdivision using jgh1The array records the first gray level array id1The difference between two adjacent numbers is determined by jg1Array record jgh1(x)>Number of division blocks size 1+ length (jg) as a numerical value of a preset value1) A plurality of; by jgh2The array records the second gray level array id2The difference between two adjacent numbers is determined by jg2Array record jgh2(x)>Number of division blocks size 1+ length (jg) as a numerical value of a preset value2) A plurality of;
a determining module, configured to set a first public array Hx storing a block histogram, and a second public array idx storing a gray level of the first public array Hx, where the first array h1The acquisition mode of each block histogram Hx is as follows: judging the jg1Whether the array is empty or not, if so, determining the first array h1If the division is impossible, let the first common array Hx be h1The second public array idx ═ id1The length of the block histogram stored in the first public array Hx is length (Hx); if not, determining the first array h1Can be divided again, and the number of divided blocks is 1+ length (jg)1) 1. (1+ length (jg))1) H ═ h) for any block histogram1(T1:jg1(i) Corresponding to a block histogram having a gray level idx ═ yid1(T1:jg1(i) N), wherein i ═ 1.. n)1-1, when i is 1, T1 is 1, and when i is 211, T1 ═ 1+ jg1(i) (ii) a The second array h2The acquisition mode of each block histogram Hx is as follows: judging the jg2Whether the array is empty or not, if so, determining the second array h2If the division is impossible, let the first common array Hx be h2The second public array idx ═ id2The length of the block histogram stored in the first public array Hx is length (Hx); if not, determining the second array h2Can be divided again, and the number of divided blocks is 1+ length (jg)2) 1. (1+ length (jg))2) H ═ h) for any block histogram2(T2:jg2(i) Idx ═ id corresponding to the gray level of the block histogram)2(T2:jg2(i) N), wherein i ═ 1.. n)2-1, when i is 1, T2 is 1, and when i is 221, T2 ═ 1+ jg2(i);
A second calculating module for calculating the probability of each block histogram in the first public array Hx
Figure FDA0002461825820000031
Cumulative probability
Figure FDA0002461825820000032
Length (hx);
a third calculating module, configured to calculate the histogram of each block in the first common array Hx according to the following formula:
Figure FDA0002461825820000033
where i 1.. length (hx), f (i) is the gray value of the output image, P1Adjusting parameters of image details, brightness and contrast;
and the output module is used for outputting the output image imageout.
6. According to claim 5The apparatus of, wherein P is1Value range [0,1 ]]。
7. The apparatus of claim 6, wherein P is1=0.1。
8. The device according to any one of claims 5 to 7, characterized in that said preset value is 20.
CN202010322148.2A 2020-04-22 2020-04-22 Image detail enhancement method and device for brightness maintenance of consumer electronics Withdrawn CN111563865A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010322148.2A CN111563865A (en) 2020-04-22 2020-04-22 Image detail enhancement method and device for brightness maintenance of consumer electronics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010322148.2A CN111563865A (en) 2020-04-22 2020-04-22 Image detail enhancement method and device for brightness maintenance of consumer electronics

Publications (1)

Publication Number Publication Date
CN111563865A true CN111563865A (en) 2020-08-21

Family

ID=72071723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010322148.2A Withdrawn CN111563865A (en) 2020-04-22 2020-04-22 Image detail enhancement method and device for brightness maintenance of consumer electronics

Country Status (1)

Country Link
CN (1) CN111563865A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117635466A (en) * 2024-01-26 2024-03-01 荣耀终端有限公司 Image enhancement method, device, electronic equipment and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117635466A (en) * 2024-01-26 2024-03-01 荣耀终端有限公司 Image enhancement method, device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US8295596B1 (en) Adaptive histogram-based video contrast enhancement
CN106851437A (en) A kind of method for extracting video frequency abstract
US10417766B2 (en) Method and device for generating metadata including frequency characteristic information of image
CN106960211A (en) Key frame acquisition methods and device
CN112348754B (en) Low-illumination color image enhancement method and device
CN111563865A (en) Image detail enhancement method and device for brightness maintenance of consumer electronics
CN112001451A (en) Data redundancy processing method, system, medium and device
CN110956201A (en) Image distortion type classification method based on convolutional neural network
US10516415B2 (en) Method of compressing convolution parameters, convolution operation chip and system
KR980003999A (en) Histogram equalization circuit based on CDF computation domain and its method
CN109801246B (en) Global histogram equalization method for adaptive threshold
Lin et al. Tri-histogram equalization based on first order statistics
CN107316276B (en) Method and device for stretching image
CN106548200A (en) A kind of image comparison system and method
CN114584804B (en) Virtual reality video stream data processing system
CN115695793A (en) JPEG image compression system
US10382516B2 (en) Detecting upscaled source video
CN111563863A (en) Histogram-limited image enhancement method and device
CN110647866B (en) Method for detecting character strokes
CN113112437A (en) Image detail enhancement method and device for maintaining brightness of wavelet domain
CN113112436A (en) Image enhancement method and device for keeping wavelet domain bilateral cumulative probability segmentation brightness
CN112581400A (en) Tuning image enhancement method based on Gaussian standard deviation and contrast
WO2022259323A1 (en) Image processing device, image processing method, and image processing program
US20090129694A1 (en) Method and apparatus thereof for enhancing digital image
Yang et al. Research and implementation of image enhancement algorithm based on local mean and standard deviation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20200821

WW01 Invention patent application withdrawn after publication