Image contrast adjustment method, system, device and computer storage medium

By dividing the image into sub-images and determining the grayscale threshold based on its contrast characteristic information for adjustment, the problem of insufficient or excessive stretching in image contrast adjustment is solved, and a better visual effect is achieved.

CN113989127BActive Publication Date: 2025-09-02ZHEJIANG UNIVIEW TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010731356.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-27
Publication Date
2025-09-02
Estimated Expiration
2040-07-27

AI Technical Summary

Technical Problem

Existing image contrast adjustment methods are prone to insufficient or excessive stretching during the adjustment process, which leads to the picture jump and affects the user experience.

Method used

The image to be adjusted is divided into a preset number of sub-images, the target contrast characteristic information of each sub-image is obtained, the target grayscale value is determined as the grayscale threshold, and the contrast adjustment is performed based on the grayscale threshold.

Benefits of technology

Through adaptive grayscale threshold adjustment, the adaptability of image contrast adjustment is improved, insufficient or excessive stretching is avoided, and the visual effect of the image is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113989127B_ABST
    Figure CN113989127B_ABST
Patent Text Reader

Abstract

The present application discloses an image contrast adjustment method, system, device, and computer storage medium, which include obtaining an image to be adjusted; dividing the image to be adjusted into a preset number of sub-images; obtaining target contrast feature information of each sub-image; determining a target grayscale value corresponding to each target contrast feature information in the grayscale value of the image to be adjusted; using the target grayscale value as a grayscale threshold, and performing contrast adjustment on the image to be adjusted based on the grayscale threshold to obtain a target image. In the present application, because the contrast feature information can reflect the contrast information of the sub-images, the target grayscale value is subsequently determined. If the target grayscale value is used as the grayscale threshold, the grayscale threshold can be matched with the contrast information of the image to be adjusted. In this way, performing contrast adjustment on the image to be adjusted based on the grayscale threshold is equivalent to performing contrast adjustment on the image based on the contrast information of the image itself, which can ensure that the adjustment process is adapted to the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image adjustment technology, and more specifically, to an image contrast adjustment method, system, device, and computer storage medium. Background Art

[0002] Contrast refers to the measurement of the different brightness levels between the brightest white and the darkest black in the light and dark areas of an image. The larger the difference range, the greater the contrast, and the smaller the difference range, the smaller the contrast. During the image acquisition process, due to the influence of factors such as ambient lighting, the image has an unsatisfactory contrast. Therefore, in order to enhance the visual effect of the image and facilitate the human eye to observe the image, the contrast of the image can be improved through contrast enhancement technology, so that the target object in the originally darker image can be clearly distinguished and the details are clearly discernible. For example, the contrast of the image can be adjusted through a linear stretching algorithm. However, during the adjustment process, when the image to be adjusted is changed, the screen may jump due to insufficient or excessive stretching, affecting the user experience.

[0003] In summary, how to improve the adaptability of the image contrast adjustment method is an urgent problem to be solved by those skilled in the art. Summary of the Invention

[0004] The purpose of this application is to provide an image contrast adjustment method, which can, to a certain extent, solve the technical problem of how to improve the adaptability of the image contrast adjustment method. This application also provides an image contrast adjustment system, device, and computer-readable storage medium.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] A method for adjusting image contrast, comprising:

[0007] Get the image to be adjusted;

[0008] Dividing the image to be adjusted into a preset number of sub-images;

[0009] Acquiring target contrast feature information of each of the sub-images;

[0010] Determining the target grayscale value corresponding to each target contrast feature information in the grayscale value of the image to be adjusted;

[0011] The target grayscale value is used as a grayscale threshold, and contrast adjustment is performed on the image to be adjusted based on the grayscale threshold to obtain a target image.

[0012] Preferably, determining the target grayscale value corresponding to each target contrast feature information in the grayscale value of the image to be adjusted includes:

[0013] Obtaining a first correspondence between contrast feature information and a stretching ratio coefficient;

[0014] Obtaining a second corresponding relationship between the stretching ratio coefficient and the cumulative grayscale probability density value;

[0015] Determining, based on the first corresponding relationship, a target stretching ratio coefficient corresponding to each target contrast feature information;

[0016] Based on the second corresponding relationship, determining the target grayscale probability density value corresponding to each of the target stretching scale coefficients;

[0017] Determining a target grayscale level corresponding to the target grayscale probability density value, and determining a grayscale value corresponding to the target grayscale level as the target grayscale value;

[0018] Among them, the stretching scale coefficient includes the ratio of the number of target pixels to the total number of pixels in the image; the cumulative grayscale probability density value includes the sum of the grayscale probability densities of the target pixels; and the target pixels include pixels whose grayscale values ​​are less than or equal to the cutoff grayscale value.

[0019] Preferably, determining the target stretching ratio coefficient corresponding to each target contrast feature information based on the first corresponding relationship includes:

[0020] determining a median value in the target contrast feature information;

[0021] Classifying the target contrast feature information greater than the median value as first-category contrast feature information;

[0022] Classifying the target contrast feature information that is less than or equal to the median value as second-category contrast feature information;

[0023] Determine, based on the first corresponding relationship, a first stretching ratio coefficient corresponding to each piece of the first-type contrast feature information, and use the difference between 1 and the first stretching ratio coefficient as the target stretching ratio coefficient corresponding to the first-type contrast feature information;

[0024] Based on the first corresponding relationship, the second stretching ratio coefficient corresponding to each piece of the second-type contrast feature information is determined, and the second stretching ratio coefficient is directly used as the target stretching ratio coefficient corresponding to the second-type contrast feature information.

[0025] Preferably, the step of adjusting the contrast of the image to be adjusted based on the grayscale threshold comprises:

[0026] Determine the stretching multiple and the brightness gain value based on the adjacent grayscale thresholds;

[0027] In the image to be adjusted, determining pixels of a first type whose grayscale values ​​are between adjacent grayscale thresholds;

[0028] The grayscale value of the first type of pixels is adjusted based on the stretching factor and the brightness gain value.

[0029] Preferably, determining the stretching multiple and the brightness gain value based on the adjacent grayscale thresholds includes:

[0030] Determine the stretching multiple and the brightness gain value based on the adjacent grayscale thresholds by adjusting the coefficient determination formula;

[0031] The adjustment coefficient determination formula includes:

[0032]

[0033] Wherein, a represents the stretching multiple, b represents the brightness gain value; Out R 、Out L Indicates the preset grayscale value; R Indicates the grayscale threshold with the larger median value of the adjacent grayscale thresholds; L Indicates the grayscale threshold with a smaller median value among the adjacent grayscale thresholds;

[0034] The adjusting the grayscale value of the first type of pixels based on the stretching multiple and the brightness gain value includes:

[0035] Adjusting the grayscale value of the first type of pixels based on the stretching factor and the brightness gain value using a contrast adjustment formula;

[0036] The contrast adjustment formula includes:

[0037] imOut(x,y)=a*imIn(x,y)+b;

[0038] Among them, imOut(x,y) represents the grayscale value of the first type of pixels after adjustment; imIn(x,y) represents the original grayscale value of the first type of pixels; (x,y) represents the position coordinates of the first type of pixels in the image to be adjusted.

[0039] Preferably, dividing the image to be adjusted into a preset number of sub-images includes:

[0040] Dividing the image to be adjusted into a preset number of sub-images using a threshold-based image segmentation method;

[0041] The types of the thresholds include median, mean, value determined based on the great law method, value determined based on the histogram bimodal method, and value determined based on the iterative method.

[0042] Preferably, the types of target contrast feature information include variance, standard deviation, Weber contrast, and root mean square contrast.

[0043] Preferably, before dividing the image to be adjusted into a preset number of sub-images, the method further includes:

[0044] Get the number of preset grayscale thresholds;

[0045] The number of the preset grayscale thresholds is used as the preset number.

[0046] An image contrast adjustment system, comprising:

[0047] An image acquisition module, used for acquiring the image to be adjusted;

[0048] An image division module, configured to divide the image to be adjusted into a preset number of sub-images;

[0049] a contrast feature information acquisition module, configured to acquire target contrast feature information of each sub-image;

[0050] a contrast adjustment interval acquisition module, which determines, among the grayscale values ​​of the image to be adjusted, target grayscale values ​​corresponding to the target contrast feature information;

[0051] The contrast adjustment module is configured to use the target grayscale value as a grayscale threshold, and perform contrast adjustment on the image to be adjusted based on the grayscale threshold to obtain a target image.

[0052] An image contrast adjustment device, comprising:

[0053] Memory for storing computer programs;

[0054] A processor is configured to implement the steps of any of the above-mentioned image contrast adjustment methods when executing the computer program.

[0055] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-mentioned image contrast adjustment methods.

[0056] The present application provides a method for adjusting image contrast, comprising: obtaining an image to be adjusted; dividing the image to be adjusted into a preset number of sub-images; obtaining target contrast feature information for each sub-image; determining target grayscale values ​​corresponding to each target contrast feature information within the grayscale values ​​of the image to be adjusted; and using the target grayscale values ​​as grayscale thresholds to perform contrast adjustment on the image to be adjusted based on the grayscale thresholds to obtain a target image. In the present application, the image to be adjusted is divided into sub-images, and contrast feature information for each sub-image is obtained. Because the contrast feature information can reflect the contrast information of the sub-images, the target grayscale values ​​corresponding to each target contrast feature information within the grayscale values ​​of the image to be adjusted are subsequently determined. Using the target grayscale values ​​as grayscale thresholds can ensure that the grayscale thresholds match the contrast information of the image to be adjusted. Thus, performing contrast adjustment on the image to be adjusted based on the grayscale thresholds is equivalent to performing contrast adjustment on the image based on the image's own contrast information, ensuring that the adjustment process is consistent with the image. The present application also provides an image contrast adjustment system, device, and computer-readable storage medium that solves corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0058] Figure 1 A flowchart of an image contrast adjustment method provided in an embodiment of the present application;

[0059] Figure 2 Schematic diagram of contrast jump;

[0060] Figure 3 Flowchart for determining target grayscale value;

[0061] Figure 4 is a pattern diagram of the first correspondence;

[0062] Figure 5 Flowchart for determining target stretch scale factor;

[0063] Figure 6 A schematic structural diagram of an image contrast adjustment system provided in an embodiment of the present application;

[0064] Figure 7 A schematic structural diagram of an image contrast adjustment device provided in an embodiment of the present application;

[0065] Figure 8Another structural schematic diagram of an image contrast adjustment device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0066] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0067] See also Figure 1 , Figure 1 A flowchart of an image contrast adjustment method provided in an embodiment of the present application.

[0068] An image contrast adjustment method provided in an embodiment of the present application may include the following steps:

[0069] Step S11: Acquire the image to be adjusted.

[0070] In practical applications, the image to be adjusted can be obtained first. The image to be adjusted is also the image that needs contrast adjustment. Its type can be determined according to actual needs. For example, the image to be adjusted can be an image taken by a monitoring device, a photo taken by a mobile phone, etc.

[0071] Step S12: Divide the image to be adjusted into a preset number of sub-images.

[0072] Step S13: Obtain target contrast feature information of each sub-image.

[0073] Step S14: determining the target grayscale value corresponding to each target contrast feature information in the grayscale value of the image to be adjusted.

[0074] In practical applications, since the contrast information of each image is different, if the contrast is adjusted according to a unified contrast adjustment parameter, the image will experience contrast jumps, such as Figure 2 The debugging process shown in Figure 2 In the image, the left image is the image after the original image is adjusted using the contrast adjustment parameters suitable for the image itself, and the right image is the image after the original image is adjusted using the contrast adjustment parameters not suitable for the image itself. Figure 2It can be seen that the contrast adjustment effect is very poor. In order to solve this problem, considering that the grayscale threshold used in the contrast image adjustment process is equivalent to dividing the contrast of the image accordingly, the present application starts from the perspective of determining the grayscale threshold used for adjustment based on the contrast information of the image. After obtaining the image to be adjusted, the image to be adjusted is divided into a preset number of sub-images. The specific value of the preset number can be determined according to actual needs, for example, the preset number can be 2, 3, etc.; the target contrast feature information of each sub-image is obtained, and the contrast feature information is also the corresponding information that can reflect the contrast of the image, and its type can be determined according to actual needs; and the more pixels with high grayscale values ​​and low grayscale values ​​in the image, the higher the contrast of the image, so there is a connection between the contrast of the image and the grayscale value of the image. Therefore, in the grayscale value of the image to be adjusted, the target grayscale value corresponding to each target contrast feature information is determined, so that the target grayscale value is adapted to the contrast of the image itself.

[0075] In a specific application scenario, in the process of dividing the image to be adjusted into a preset number of sub-images, a threshold-based image segmentation method can be used to divide the image to be adjusted into the preset number of sub-images; and the types of thresholds include median, mean, value determined based on the law of magnitude, value determined based on the histogram bimodal method, value determined based on an iterative method, etc. Assuming that the threshold is the mean, in the process of dividing the image to be adjusted into the preset number of sub-images using the threshold-based image segmentation method, it is necessary to first calculate the mean of the image, then divide the image composed of pixels with values ​​greater than the mean into one sub-image, and divide the image composed of pixels with values ​​less than or equal to the mean into another sub-image, etc.

[0076] In specific application scenarios, the types of target contrast feature information may include variance, standard deviation, Weber contrast, root mean square contrast, etc. The type of contrast feature information can be determined according to actual needs. Assuming that the type of contrast feature information is standard deviation, the calculation formula of contrast feature information can be as follows:

[0077]

[0078] Where μ represents the mean of the image to be adjusted; M×N represents the number of pixels of the image to be adjusted; σ L The standard deviation of the sub-image composed of pixels whose values ​​are less than the mean of the image to be adjusted; C L Indicates the number of pixels whose values ​​are less than the mean value of the image to be adjusted; μ L Represents the mean value of the sub-image composed of pixels whose values ​​are less than the mean value of the image to be adjusted; x i represents the value of the i-th pixel; σ R The standard deviation of the sub-image composed of pixels whose values ​​are greater than or equal to the mean of the image to be adjusted; C RIndicates the number of pixels whose values ​​are greater than or equal to the mean value of the image to be adjusted; μ R Represents the mean of the sub-image composed of pixels whose values ​​are greater than or equal to the mean of the image to be adjusted; x i Represents the value of the i-th pixel.

[0079] Step S105: using the target grayscale value as the grayscale threshold, and performing contrast adjustment on the image to be adjusted based on the grayscale threshold to obtain the target image.

[0080] In practical applications, after determining the target grayscale value, the target grayscale value can be used as the grayscale threshold, and the contrast of the image to be adjusted is adjusted based on the grayscale threshold to obtain a target image that meets the contrast adjustment process and is consistent with the image.

[0081] The present application provides an image contrast adjustment method, which comprises the following steps: obtaining an image to be adjusted; dividing the image to be adjusted into a preset number of sub-images; obtaining target contrast feature information of each sub-image; determining a target grayscale value corresponding to each target contrast feature information in the grayscale value of the image to be adjusted; using the target grayscale value as a grayscale threshold, and performing contrast adjustment on the image to be adjusted based on the grayscale threshold to obtain a target image. In the present application, the image to be adjusted is divided into sub-images, and contrast feature information of each sub-image is obtained. Because the contrast feature information can reflect the contrast information of the sub-image, the target grayscale value corresponding to each target contrast feature information is subsequently determined in the grayscale value of the image to be adjusted. If the target grayscale value is used as the grayscale threshold, the grayscale threshold can be matched with the contrast information of the image to be adjusted. In this way, performing contrast adjustment on the image to be adjusted based on the grayscale threshold is equivalent to performing contrast adjustment on the image based on the contrast information of the image itself, which can ensure that the adjustment process is adapted to the image.

[0082] See also Figure 3 , Figure 3 Flowchart for determining target grayscale value.

[0083] In an image contrast adjustment method provided by an embodiment of the present application, step S14: determining the target grayscale value corresponding to each target contrast feature information in the grayscale value of the image to be adjusted can be specifically:

[0084] Step S141: obtaining a first correspondence between contrast feature information and a stretching ratio coefficient.

[0085] In practical applications, in the process of determining the target grayscale value corresponding to each target contrast feature information in the grayscale value of the image to be adjusted, the first correspondence between the contrast feature information and the stretching ratio coefficient can be obtained first. The stretching ratio coefficient is the ratio of the number of target pixels to the total number of pixels in the image. The target pixel is the pixel that meets the requirements. Assuming that the target pixel is a pixel with a grayscale value less than or equal to 100, the stretching ratio coefficient is the ratio of the number of pixels with a grayscale value less than or equal to 100 to the total number of pixels in the image.

[0086] It should be noted that the first corresponding relationship can be flexibly determined according to actual needs. Assuming that the type of contrast feature information is standard deviation, the expression of the first corresponding relationship can be

[0087]

[0088] Wherein, σ represents the standard deviation; y represents the value of the stretch ratio corresponding to the standard deviation; m represents the preset parameter value; at this time, the pattern of the first correspondence can be as follows Figure 4 shown.

[0089] Step S142: Obtain a second corresponding relationship between the stretching ratio coefficient and the cumulative grayscale probability density value.

[0090] In practical applications, after obtaining the first correspondence between contrast feature information and the stretching ratio coefficient, it is also necessary to obtain the second correspondence between the stretching ratio coefficient and the cumulative grayscale probability density value. The cumulative grayscale probability density value is the sum of the grayscale probability densities of the target pixels, and the grayscale probability density is the ratio of the number of target grayscale pixels to the total number of pixels in the image.

[0091] In specific application scenarios, the grayscale probability density and cumulative grayscale probability density values ​​can be calculated using the following formula:

[0092]

[0093] Among them, g k Represents the kth grayscale value; Indicates the gray value is g k The number of pixels; P(g k ) represents g k Gray probability density; C(g K ) represents g k The cumulative grayscale probability density value.

[0094] Step S143: Based on the first corresponding relationship, determine the target stretching ratio coefficient corresponding to each target contrast feature information.

[0095] Step S144: Based on the second corresponding relationship, determine the target grayscale probability density value corresponding to each target stretching scale coefficient.

[0096] Step S145: Determine the target grayscale level corresponding to the target grayscale probability density value, and determine the grayscale value corresponding to the target grayscale level as the target grayscale value; wherein, the stretching ratio coefficient includes the ratio of the number of target pixels to the total number of pixels in the image; the cumulative grayscale probability density value includes the sum of the grayscale probability densities of the target pixels; the target pixels include pixels whose grayscale values ​​are less than or equal to the cutoff grayscale value.

[0097] In practical applications, after obtaining the first correspondence between contrast feature information and stretching ratio coefficients, and obtaining the second correspondence between stretching ratio coefficients and cumulative grayscale probability density values, the target stretching ratio coefficients corresponding to each target contrast feature information can be determined based on the first correspondence, and the target grayscale probability density values ​​corresponding to each target stretching ratio coefficient can be determined based on the second correspondence. Because the statistical grayscale probability density values ​​are mostly based on the grayscale level of the image, it is necessary to determine the target grayscale level corresponding to the target grayscale probability density value, and then determine the grayscale value corresponding to the target grayscale level as the target grayscale value.

[0098] See also Figure 5 , Figure 5 Flowchart for determining the target stretch scale factor.

[0099] In an image contrast adjustment method provided by an embodiment of the present application, step S143: determining a target stretching ratio coefficient corresponding to each target contrast feature information based on the first correspondence relationship, can be specifically:

[0100] Step S1431: Determine the median value in the target contrast feature information.

[0101] Step S1432: Classify the target contrast feature information that is greater than the median value as the first type of contrast feature information.

[0102] Step S1433: Classify the target contrast feature information that is less than or equal to the median value as the second type of contrast feature information.

[0103] In practical applications, because the grayscale values ​​of pixels in each sub-image are different, and the overall grayscale values ​​of the sub-images are different, for example, the grayscale values ​​of all pixels in a sub-image are higher than those of another sub-image, so for the sub-image with a higher overall pixel value, the contrast feature information of the sub-image actually reflects the contrast information of the pixels with higher grayscale values ​​in the image to be adjusted, and for the sub-image with a lower overall pixel value, the contrast feature information of the sub-image actually reflects the contrast information of the pixels with lower grayscale values ​​in the image to be adjusted. Therefore, if the target stretching ratio coefficient is determined in positive order according to the first corresponding relationship, the overall pixel value will be higher. The value of the target stretching ratio coefficient of the high sub-image is larger than the true value. In order to avoid this situation, in the process of determining the target stretching ratio coefficient corresponding to each target contrast feature information based on the first corresponding relationship, it is necessary to determine the median value of the target contrast feature information, and classify the target contrast feature information greater than the median value into the first category of contrast feature information, and classify the target contrast feature information less than or equal to the median value into the second category of contrast feature information. That is, the first category of contrast feature information reflects the contrast information of the sub-image with a relatively low overall pixel value, and the second category of contrast feature information reflects the contrast information of the sub-image with a relatively high overall pixel value.

[0104] Step S1434: Based on the first correspondence, determine the first stretching ratio coefficient corresponding to each first type of contrast feature information, and use the difference between 1 and the first stretching ratio coefficient as the target stretching ratio coefficient corresponding to the first type of contrast feature information.

[0105] Step S1435: Based on the first corresponding relationship, determine the second stretching ratio coefficient corresponding to each second type of contrast feature information, and directly use the second stretching ratio coefficient as the target stretching ratio coefficient corresponding to the second type of contrast feature information.

[0106] In practical applications, because the stretching scale coefficient corresponding to the contrast feature information of the sub-image with a higher overall pixel value is at the end of the first correspondence, if the target stretching scale coefficient is determined in reverse order according to the first correspondence, the value of the target stretching scale coefficient of the sub-image with a higher overall pixel value will be close to the true value, and the maximum value of the stretching scale coefficient is 1. Therefore, based on the first correspondence, the first stretching scale coefficient corresponding to each first-category contrast feature information can be determined, and the difference between 1 and the first stretching scale coefficient is used as the target stretching scale coefficient corresponding to the first-category contrast feature information; because the stretching scale coefficient corresponding to the contrast feature information of the sub-image with a lower overall pixel value is at the beginning of the first correspondence, if the target stretching scale coefficient is determined in forward order according to the first correspondence, the value of the target stretching scale coefficient of the sub-image with a lower overall pixel value can be close to the true value. Therefore, based on the first correspondence, the second stretching scale coefficient corresponding to each second-category contrast feature information can be determined, and the second stretching scale coefficient is directly used as the target stretching scale coefficient corresponding to the second-category contrast feature information.

[0107] It should be noted that when the image to be adjusted is a low-contrast image, the values ​​of the contrast feature information of each sub-image counted are relatively small. At this time, if the target stretching ratio coefficient is determined according to the method provided in this embodiment, a target stretching ratio coefficient with a larger difference will be obtained, that is, the difference in the grayscale threshold is larger, which will make the grayscale threshold closer to the grayscale distribution range of the original image. In this way, if the contrast is adjusted according to the grayscale threshold, the contrast enhancement degree of the image will not be too large, avoiding the problem of excessive stretching of low-contrast scenes; similarly, when the image to be adjusted is a high-contrast image, the values ​​of the contrast feature information of each sub-image counted are relatively large. At this time, if the target stretching ratio coefficient is determined according to the method provided in this embodiment, a target stretching ratio coefficient with a larger overall value will be obtained, that is, the value of the grayscale threshold is larger. In this way, if the contrast is adjusted according to the grayscale threshold, the contrast enhancement degree of the image will not be too small, avoiding the problem of insufficient stretching of high-contrast scenes, so that the processed images have better effects.

[0108] In an image contrast adjustment method provided in an embodiment of the present application, in order to facilitate contrast adjustment of an image to be adjusted, in the process of contrast adjustment of the image to be adjusted based on a grayscale threshold, a stretching ratio and a brightness gain value can be determined based on adjacent grayscale thresholds; in the image to be adjusted, a first type of pixels whose grayscale values ​​are between adjacent grayscale thresholds are determined; and the grayscale values ​​of the first type of pixels are adjusted based on the stretching ratio and the brightness gain value.

[0109] It should be noted that in the process of adjusting the contrast of the image to be adjusted based on the grayscale threshold, for pixels whose grayscale values ​​are less than the minimum grayscale threshold, the grayscale value of the pixel can be directly set to 0; and for pixels whose grayscale values ​​are greater than the maximum grayscale threshold, the grayscale value of the pixel can be directly set to the maximum grayscale value in the image to be adjusted, etc.

[0110] In practical applications, in order to further ensure the adjustment effect of the image to be adjusted and to ensure the efficiency of determining the stretching multiple and brightness gain value, in the process of determining the stretching multiple and brightness gain value based on adjacent grayscale thresholds, the stretching multiple and brightness gain value can be determined based on adjacent grayscale thresholds by using an adjustment coefficient determination formula; the adjustment coefficient determination formula includes:

[0111]

[0112] Among them, a represents the stretching multiple, b represents the brightness gain value; Out R 、Out L Indicates the preset grayscale value; R Indicates the grayscale threshold with the larger median value of adjacent grayscale thresholds; L Indicates the grayscale threshold with the smaller median value of adjacent grayscale thresholds;

[0113] Accordingly, in the process of adjusting the grayscale values ​​of the first type of pixels based on the stretching multiple and the brightness gain value, the grayscale values ​​of the first type of pixels can be adjusted based on the stretching multiple and the brightness gain value using the contrast adjustment formula;

[0114] The contrast adjustment formula includes:

[0115] imOut(x,y)=a*imIn(x,y)+b;

[0116] Among them, imOut(x,y) represents the grayscale value of the first type of pixel after adjustment; imIn(x,y) represents the original grayscale value of the first type of pixel; (x,y) represents the position coordinates of the first type of pixel in the image to be adjusted.

[0117] In an image contrast adjustment method provided in an embodiment of the present application, before dividing the image to be adjusted into a preset number of sub-images, a preset number of grayscale thresholds may be obtained; the preset number of grayscale thresholds is used as the preset number. That is, in the present application, the preset number may be determined based on the number of grayscale thresholds used in the actual contrast adjustment process. For example, if the number of grayscale thresholds is 2, the preset number is 2. In this case, the number of sub-images is 2, and the number of grayscale thresholds ultimately determined is also 2.

[0118] See also Figure 6 , Figure 6A structural diagram of an image contrast adjustment system provided in an embodiment of the present application.

[0119] An image contrast adjustment system provided in an embodiment of the present application may include:

[0120] An image acquisition module 11 is used to acquire an image to be adjusted;

[0121] An image division module 12 is configured to divide the image to be adjusted into a preset number of sub-images;

[0122] A contrast feature information acquisition module 13 is used to acquire target contrast feature information of each sub-image;

[0123] The contrast adjustment interval acquisition module 14 determines the target grayscale value corresponding to each target contrast feature information in the grayscale value of the image to be adjusted;

[0124] The contrast adjustment module 15 is configured to use the target grayscale value as a grayscale threshold, and perform contrast adjustment on the image to be adjusted based on the grayscale threshold to obtain a target image.

[0125] An image contrast adjustment system provided in an embodiment of the present application, wherein a contrast adjustment interval acquisition module may include:

[0126] A first correspondence relationship acquisition submodule, used to acquire a first correspondence relationship between contrast feature information and a stretching ratio coefficient;

[0127] A second corresponding relationship acquisition submodule is used to obtain a second corresponding relationship between the stretching ratio coefficient and the cumulative grayscale probability density value;

[0128] A stretching ratio coefficient determination submodule is used to determine the target stretching ratio coefficient corresponding to each target contrast feature information based on the first corresponding relationship;

[0129] A grayscale probability density value determination submodule is used to determine the target grayscale probability density value corresponding to each target stretching ratio coefficient based on the second corresponding relationship;

[0130] A grayscale value determination submodule is used to determine a target grayscale level corresponding to a target grayscale probability density value, and determine the grayscale value corresponding to the target grayscale level as the target grayscale value;

[0131] The stretching ratio coefficient includes the ratio of the number of target pixels to the total number of pixels in the image; the cumulative grayscale probability density value includes the sum of the grayscale probability densities of the target pixels; and the target pixels include pixels whose grayscale values ​​are less than or equal to the cutoff grayscale value.

[0132] In an image contrast adjustment system provided by an embodiment of the present application, a stretching ratio coefficient determination submodule may include:

[0133] a median determination unit, configured to determine a median in target contrast feature information;

[0134] A first-category contrast feature information determination unit, configured to classify target contrast feature information greater than a median value as first-category contrast feature information;

[0135] A second-category contrast feature information determination unit, configured to classify target contrast feature information that is less than or equal to the median value as second-category contrast feature information;

[0136] a first stretching ratio coefficient determining unit, configured to determine, based on the first correspondence, a first stretching ratio coefficient corresponding to each piece of first-type contrast feature information, and use a difference between 1 and the first stretching ratio coefficient as a target stretching ratio coefficient corresponding to the first-type contrast feature information;

[0137] The second stretching ratio coefficient determining unit is used to determine the second stretching ratio coefficient corresponding to each second type of contrast feature information based on the first corresponding relationship, and directly use the second stretching ratio coefficient as the target stretching ratio coefficient corresponding to the second type of contrast feature information.

[0138] An embodiment of the present application provides an image contrast adjustment system, wherein the contrast adjustment module may include:

[0139] An adjustment coefficient determination submodule, configured to determine a stretching multiple and a brightness gain value based on adjacent grayscale thresholds;

[0140] A first-category pixel determination submodule is used to determine, in the image to be adjusted, first-category pixels whose grayscale values ​​are between adjacent grayscale thresholds;

[0141] The grayscale value adjustment submodule is used to adjust the grayscale value of the first type of pixels based on the stretching multiple and the brightness gain value.

[0142] In an image contrast adjustment system provided by an embodiment of the present application, the adjustment coefficient determination submodule may include:

[0143] An adjustment coefficient determination unit, configured to determine a stretching multiple and a brightness gain value based on adjacent grayscale thresholds using an adjustment coefficient determination formula;

[0144] The formula for determining the adjustment coefficient includes:

[0145]

[0146] Among them, a represents the stretching multiple, b represents the brightness gain value; Out R 、Out L Indicates the preset grayscale value; R Indicates the grayscale threshold with the larger median value of adjacent grayscale thresholds; LIndicates the grayscale threshold with the smaller median value of adjacent grayscale thresholds;

[0147] The grayscale value adjustment submodule may include:

[0148] A grayscale value adjustment unit, configured to adjust the grayscale value of the first type of pixels based on the stretching multiple and the brightness gain value using a contrast adjustment formula;

[0149] The contrast adjustment formula includes:

[0150] imOut(x,y)=a*imIn(x,y)+b;

[0151] Among them, imOut(x,y) represents the grayscale value of the first type of pixel after adjustment; imIn(x,y) represents the original grayscale value of the first type of pixel; (x,y) represents the position coordinates of the first type of pixel in the image to be adjusted.

[0152] An image contrast adjustment system provided in an embodiment of the present application, wherein the image segmentation module may include:

[0153] An image division unit, configured to divide the image to be adjusted into a preset number of sub-images using a threshold-based image segmentation method;

[0154] The types of thresholds include median, mean, value determined based on the great law method, value determined based on the histogram bimodal method, and value determined based on the iterative method.

[0155] In an image contrast adjustment system provided by an embodiment of the present application, types of target contrast feature information may include variance, standard deviation, Weber contrast, and root mean square contrast.

[0156] An image contrast adjustment system provided in an embodiment of the present application may further include:

[0157] A grayscale threshold number acquisition module is used to acquire the number of preset grayscale thresholds before the image division module divides the image to be adjusted into a preset number of sub-images;

[0158] The quantity setting module is used to set the quantity of preset grayscale thresholds as the preset quantity.

[0159] The present application also provides an image contrast adjustment device and a computer-readable storage medium, both of which have the corresponding effects of the image contrast adjustment method provided in the embodiment of the present application. Figure 7 , Figure 7 A schematic structural diagram of an image contrast adjustment device provided in an embodiment of the present application.

[0160] An image contrast adjustment device provided in an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the following steps are implemented:

[0161] Get the image to be adjusted;

[0162] Dividing the image to be adjusted into a preset number of sub-images;

[0163] Obtain target contrast feature information of each sub-image;

[0164] Determining the target grayscale value corresponding to each target contrast feature information in the grayscale value of the image to be adjusted;

[0165] The target grayscale value is used as the grayscale threshold, and the contrast of the image to be adjusted is adjusted based on the grayscale threshold to obtain the target image.

[0166] An embodiment of the present application provides an image contrast adjustment device, including a memory 201 and a processor 202. The memory 201 stores a computer program, and when the processor 202 executes the computer program, the following steps are implemented: obtaining a first correspondence between contrast feature information and a stretching ratio coefficient; obtaining a second correspondence between the stretching ratio coefficient and a cumulative grayscale probability density value; based on the first correspondence, determining a target stretching ratio coefficient corresponding to each target contrast feature information; based on the second correspondence, determining a target grayscale probability density value corresponding to each target stretching ratio coefficient; determining a target grayscale level corresponding to the target grayscale probability density value, and determining the grayscale value corresponding to the target grayscale level as the target grayscale value; wherein the stretching ratio coefficient includes a ratio of the number of target pixels to the total number of pixels in the image; the cumulative grayscale probability density value includes the sum of the grayscale probability densities of the target pixels; and the target pixels include pixels whose grayscale values ​​are less than or equal to a cutoff grayscale value.

[0167] An embodiment of the present application provides an image contrast adjustment device, including a memory 201 and a processor 202. The memory 201 stores a computer program, and when the processor 202 executes the computer program, it implements the following steps: determining a median value in target contrast feature information; classifying target contrast feature information greater than the median value as first-category contrast feature information; classifying target contrast feature information less than or equal to the median value as second-category contrast feature information; determining, based on a first correspondence, a first stretching scale coefficient corresponding to each piece of first-category contrast feature information, and using the difference between 1 and the first stretching scale coefficient as the target stretching scale coefficient corresponding to the first-category contrast feature information; and determining, based on the first correspondence, a second stretching scale coefficient corresponding to each piece of second-category contrast feature information, and directly using the second stretching scale coefficient as the target stretching scale coefficient corresponding to the second-category contrast feature information.

[0168] An embodiment of the present application provides an image contrast adjustment device, including a memory 201 and a processor 202. The memory 201 stores a computer program, and when the processor 202 executes the computer program, it implements the following steps: determining a stretching factor and a brightness gain value based on adjacent grayscale thresholds; determining a first type of pixels whose grayscale values ​​are between adjacent grayscale thresholds in the image to be adjusted; and adjusting the grayscale values ​​of the first type of pixels based on the stretching factor and the brightness gain value.

[0169] An image contrast adjustment device provided in an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program, and when the processor 202 executes the computer program, it implements the following steps: determining a stretching factor and a brightness gain value based on adjacent grayscale thresholds using an adjustment coefficient determination formula;

[0170] The formula for determining the adjustment coefficient includes:

[0171]

[0172] Among them, a represents the stretching multiple, b represents the brightness gain value; Out R 、Out L Indicates the preset grayscale value; R Indicates the grayscale threshold with the larger median value of adjacent grayscale thresholds; L Indicates the grayscale threshold with the smaller median value of adjacent grayscale thresholds;

[0173] Accordingly, the grayscale value of the first type of pixels is adjusted based on the stretching multiple and the brightness gain value through the contrast adjustment formula;

[0174] The contrast adjustment formula includes:

[0175] imOut(x,y)=a*imIn(x,y)+b;

[0176] Among them, imOut(x,y) represents the grayscale value of the first type of pixel after adjustment; imIn(x,y) represents the original grayscale value of the first type of pixel; (x,y) represents the position coordinates of the first type of pixel in the image to be adjusted.

[0177] An embodiment of the present application provides an image contrast adjustment device, including a memory 201 and a processor 202. The memory 201 stores a computer program, and when the processor 202 executes the computer program, the following steps are implemented: an image to be adjusted is divided into a preset number of sub-images using a threshold-based image segmentation method; wherein the types of thresholds include median, mean, value determined based on the great law method, value determined based on the histogram bimodal method, and value determined based on the iterative method.

[0178] An embodiment of the present application provides an image contrast adjustment device, wherein types of target contrast feature information include variance, standard deviation, Weber contrast, and root mean square contrast.

[0179] An image contrast adjustment device provided in an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program, and when the processor 202 executes the computer program, it implements the following steps: before dividing the image to be adjusted into a preset number of sub-images, obtaining a preset number of grayscale thresholds; and using the preset number of grayscale thresholds as the preset number.

[0180] See also Figure 8 Another image contrast adjustment device provided in an embodiment of the present application may further include: an input port 203 connected to the processor 202 for transmitting commands inputted from the outside to the processor 202; a display unit 204 connected to the processor 202 for displaying the processing results of the processor 202 to the outside world; and a communication module 205 connected to the processor 202 for enabling communication between the image contrast adjustment device and the outside world. The display unit 204 may be a display panel, a laser scanning display, or the like; the communication methods used by the communication module 205 include, but are not limited to, mobile high-definition link technology (HML), universal serial bus (USB), high-definition multimedia interface (HDMI), wireless connection: wireless fidelity technology (WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s.

[0181] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the following steps are implemented:

[0182] Get the image to be adjusted;

[0183] Dividing the image to be adjusted into a preset number of sub-images;

[0184] Obtain target contrast feature information of each sub-image;

[0185] Determining the target grayscale value corresponding to each target contrast feature information in the grayscale value of the image to be adjusted;

[0186] The target grayscale value is used as the grayscale threshold, and the contrast of the image to be adjusted is adjusted based on the grayscale threshold to obtain the target image.

[0187] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining a first correspondence between contrast feature information and a stretching ratio coefficient; obtaining a second correspondence between the stretching ratio coefficient and a cumulative grayscale probability density value; based on the first correspondence, determining a target stretching ratio coefficient corresponding to each target contrast feature information; based on the second correspondence, determining a target grayscale probability density value corresponding to each target stretching ratio coefficient; determining a target grayscale level corresponding to the target grayscale probability density value, and determining the grayscale value corresponding to the target grayscale level as the target grayscale value; wherein the stretching ratio coefficient includes a ratio of the number of target pixels to the total number of pixels in the image; the cumulative grayscale probability density value includes the sum of the grayscale probability densities of the target pixels; and the target pixels include pixels whose grayscale values ​​are less than or equal to the cutoff grayscale value.

[0188] An embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the following steps are implemented: determining a median value in target contrast feature information; classifying target contrast feature information greater than the median value as first-category contrast feature information; classifying target contrast feature information less than or equal to the median value as second-category contrast feature information; determining, based on a first correspondence, a first stretching scale coefficient corresponding to each piece of first-category contrast feature information, and using the difference between 1 and the first stretching scale coefficient as the target stretching scale coefficient corresponding to the first-category contrast feature information; determining, based on the first correspondence, a second stretching scale coefficient corresponding to each piece of second-category contrast feature information, and directly using the second stretching scale coefficient as the target stretching scale coefficient corresponding to the second-category contrast feature information.

[0189] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: determining a stretching factor and a brightness gain value based on adjacent grayscale thresholds; determining a first type of pixels whose grayscale values ​​are between adjacent grayscale thresholds in an image to be adjusted; and adjusting the grayscale values ​​of the first type of pixels based on the stretching factor and the brightness gain value.

[0190] An embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps: determining a stretching factor and a brightness gain value based on adjacent grayscale thresholds by adjusting a coefficient determination formula;

[0191] The formula for determining the adjustment coefficient includes:

[0192]

[0193] Among them, a represents the stretching multiple, b represents the brightness gain value; Out R 、Out L Indicates the preset grayscale value; R Indicates the grayscale threshold with the larger median value of adjacent grayscale thresholds; L Indicates the grayscale threshold with the smaller median value of adjacent grayscale thresholds;

[0194] Adjust the grayscale value of the first type of pixels based on the stretching multiple and the brightness gain value through the contrast adjustment formula;

[0195] The contrast adjustment formula includes:

[0196] imOut(x,y)=a*imIn(x,y)+b;

[0197] Among them, imOut(x,y) represents the grayscale value of the first type of pixel after adjustment; imIn(x,y) represents the original grayscale value of the first type of pixel; (x,y) represents the position coordinates of the first type of pixel in the image to be adjusted.

[0198] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: a threshold-based image segmentation method is used to divide the image to be adjusted into a preset number of sub-images; wherein the types of thresholds include median, mean, value determined based on the great law method, value determined based on the histogram bimodal method, and value determined based on the iterative method.

[0199] In a computer-readable storage medium provided by an embodiment of the present application, types of target contrast feature information include variance, standard deviation, Weber contrast, and root mean square contrast.

[0200] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: before dividing the image to be adjusted into a preset number of sub-images, obtaining the number of preset grayscale thresholds; and using the preset number of grayscale thresholds as the preset number.

[0201] The computer-readable storage medium involved in this application includes random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the technical field.

[0202] For descriptions of the relevant portions of the image contrast adjustment system, device, and computer-readable storage medium provided in the embodiments of this application, please refer to the detailed description of the corresponding portions of the image contrast adjustment method provided in the embodiments of this application, and will not be repeated here. Furthermore, portions of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of corresponding technical solutions in the prior art are not described in detail to avoid redundant description.

[0203] It should also be noted that, in this document, relational terms such as first and second, etc., are used only 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 "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0204] The above description of the disclosed embodiments will enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for adjusting image contrast, characterized in that: include: Get the image to be adjusted; Dividing the image to be adjusted into a preset number of sub-images; Acquiring target contrast feature information of each of the sub-images; Determining the target grayscale value corresponding to each target contrast feature information in the grayscale value of the image to be adjusted; Using the target grayscale value as a grayscale threshold, and performing contrast adjustment on the image to be adjusted based on the grayscale threshold to obtain a target image; Determining the target grayscale value corresponding to each target contrast feature information includes: Obtaining a first correspondence between contrast feature information and a stretching ratio coefficient; Obtaining a second corresponding relationship between the stretching ratio coefficient and the cumulative grayscale probability density value; determining a median value in the target contrast feature information; Classify the target contrast feature information greater than the median value as the first type of contrast feature information; Classify the target contrast feature information that is less than or equal to the median value into the second category of contrast feature information; Determine, based on the first correspondence, a first stretching ratio coefficient corresponding to each piece of first-type contrast feature information, and use the difference between 1 and the first stretching ratio coefficient as a target stretching ratio coefficient corresponding to the first-type contrast feature information; Determine, based on the first corresponding relationship, a second stretching ratio coefficient corresponding to each second type of contrast feature information, and directly use the second stretching ratio coefficient as a target stretching ratio coefficient corresponding to the second type of contrast feature information; Based on the second corresponding relationship, determining the target grayscale probability density value corresponding to each target stretching scale coefficient; A target grayscale level corresponding to the target grayscale probability density value is determined, and a grayscale value corresponding to the target grayscale level is determined as the target grayscale value.

2. The method according to claim 1, characterized in that The stretching ratio coefficient includes the ratio of the number of target pixels to the total number of pixels in the image; the cumulative grayscale probability density value includes the sum of the grayscale probability densities of the target pixels; and the target pixels include pixels whose grayscale values ​​are less than or equal to the cutoff grayscale value.

3. The method according to claim 1, characterized in that The step of adjusting the contrast of the image to be adjusted based on the grayscale threshold comprises: Determine a stretching multiple and a brightness gain value based on adjacent grayscale thresholds; In the image to be adjusted, determining pixels of a first type whose grayscale values ​​are between adjacent grayscale thresholds; The grayscale value of the first type of pixels is adjusted based on the stretching factor and the brightness gain value.

4. The method according to claim 3, characterized in that The step of determining the stretching multiple and the brightness gain value based on the adjacent grayscale thresholds includes: Determine the stretching multiple and the brightness gain value based on the adjacent grayscale thresholds by adjusting the coefficient determination formula; The adjustment coefficient determination formula includes: ; ; in, represents the stretching ratio, represents the brightness gain value; 、 Indicates the preset grayscale value; Indicates the grayscale threshold with the larger median value of the adjacent grayscale thresholds; Indicates the grayscale threshold with a smaller median value among the adjacent grayscale thresholds; The adjusting the grayscale value of the first type of pixels based on the stretching multiple and the brightness gain value includes: Adjusting the grayscale value of the first type of pixels based on the stretching factor and the brightness gain value using a contrast adjustment formula; The contrast adjustment formula includes: ; in, represents the grayscale value of the first type of pixels after adjustment; represents the original grayscale value of the first type of pixel; Indicates the position coordinates of the first type of pixels in the image to be adjusted.

5. The method according to any one of claims 1 to 4, characterized in that The step of dividing the image to be adjusted into a preset number of sub-images includes: Dividing the image to be adjusted into a preset number of sub-images using a threshold-based image segmentation method; The types of the thresholds include median, mean, value determined based on the great law method, value determined based on the histogram bimodal method, and value determined based on an iterative method.

6. The method according to claim 5, characterized in that The types of target contrast feature information include variance, standard deviation, Weber contrast, and root mean square contrast.

7. The method according to claim 5, characterized in that Before dividing the image to be adjusted into a preset number of sub-images, the method further includes: Get the number of preset grayscale thresholds; The number of the preset grayscale thresholds is used as the preset number.

8. An image contrast adjustment system, characterized in that: include: An image acquisition module, used for acquiring the image to be adjusted; An image division module, configured to divide the image to be adjusted into a preset number of sub-images; a contrast feature information acquisition module, configured to acquire target contrast feature information of each sub-image; a contrast adjustment interval acquisition module, which determines, among the grayscale values ​​of the image to be adjusted, target grayscale values ​​corresponding to the target contrast feature information; a contrast adjustment module, configured to use the target grayscale value as a grayscale threshold, and perform contrast adjustment on the image to be adjusted based on the grayscale threshold to obtain a target image; Determining the target grayscale value corresponding to each target contrast feature information includes: Obtaining a first correspondence between contrast feature information and a stretching ratio coefficient; Obtaining a second corresponding relationship between the stretching ratio coefficient and the cumulative grayscale probability density value; determining a median value in the target contrast feature information; Classify the target contrast feature information greater than the median value as the first type of contrast feature information; Classify the target contrast feature information that is less than or equal to the median value as the second type of contrast feature information; Determine, based on the first correspondence, a first stretching ratio coefficient corresponding to each piece of first-type contrast feature information, and use the difference between 1 and the first stretching ratio coefficient as a target stretching ratio coefficient corresponding to the first-type contrast feature information; Determine, based on the first corresponding relationship, a second stretching ratio coefficient corresponding to each second type of contrast feature information, and directly use the second stretching ratio coefficient as a target stretching ratio coefficient corresponding to the second type of contrast feature information; Based on the second corresponding relationship, determining the target grayscale probability density value corresponding to each target stretching scale coefficient; A target grayscale level corresponding to the target grayscale probability density value is determined, and a grayscale value corresponding to the target grayscale level is determined as the target grayscale value.

9. An image contrast adjustment device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the image contrast adjustment method according to any one of claims 1 to 7 when executing the computer program.

Citation Information

Patent Citations

  • Video image enhancement method and device

    CN105608676A