CN118071665A - Image display method and device, electronic equipment and storage medium - Google Patents

Image display method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN118071665A
CN118071665A CN202211448367.0A CN202211448367A CN118071665A CN 118071665 A CN118071665 A CN 118071665A CN 202211448367 A CN202211448367 A CN 202211448367A CN 118071665 A CN118071665 A CN 118071665A
Authority
CN
China
Prior art keywords
target
mapping function
preset
gray
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.)
Pending
Application number
CN202211448367.0A
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202211448367.0A priority Critical patent/CN118071665A/en
Publication of CN118071665A publication Critical patent/CN118071665A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

The disclosure relates to an image color development method and device, electronic equipment and storage medium. The method comprises the following steps: acquiring current ambient light intensity and an image to be displayed; determining the distribution condition of the pixel points according to the pixel values of the pixel points in the image; under the condition that the ambient light intensity is larger than a preset light intensity threshold value, determining a target mapping function from a preset mapping function set according to the distribution condition of the pixel points; wherein, each mapping function in the preset mapping function set is used for adjusting pixel values; according to the target mapping function, adjusting pixel values of pixel points in the image; and displaying the image after the pixel values of the pixel points are adjusted. By the method, the display effect of the image when the ambient light is brighter can be improved.

Description

Image display method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of image processing, and in particular relates to an image display method and device, electronic equipment and a storage medium.
Background
Because more dark scenes may exist in the video or the image, the effect of displaying the image or the video including the dark scenes is poor when the ambient light intensity is high, so that the user cannot obtain better visual experience when the ambient light intensity is high.
Disclosure of Invention
The disclosure provides an image display method and device, electronic equipment and storage medium.
According to a first aspect of an embodiment of the present disclosure, there is provided an image display method including:
Acquiring current ambient light intensity and an image to be displayed;
determining the distribution condition of the pixel points according to the pixel values of the pixel points in the image;
Under the condition that the ambient light intensity is larger than a preset light intensity threshold value, determining a target mapping function from a preset mapping function set according to the distribution condition of the pixel points; wherein, each mapping function in the preset mapping function set is used for adjusting pixel values;
According to the target mapping function, adjusting pixel values of pixel points in the image;
and displaying the image after the pixel values of the pixel points are adjusted.
In some embodiments, the distribution condition of the pixels includes a gray average value of the image and a duty ratio of the pixels distributed in a preset gray range;
Determining a target mapping function from a preset mapping function set according to the distribution condition of the pixel points, wherein the determining comprises the following steps:
Determining a gray average value interval in which the gray average value of the image falls;
Determining a target mapping function from a preset mapping function set according to the gray average value interval, the duty ratio of pixel points distributed in a preset gray range and a preset corresponding relation; the preset corresponding relation comprises a gray level average value interval, a preset gray level range, a pixel point duty ratio interval and an association relation between mapping functions.
In some embodiments, the determining, according to the gray average interval, the duty ratio of the pixel distribution in the preset gray range, and the preset correspondence, the target mapping function from the preset mapping function set includes:
determining a target gray scale range corresponding to the gray scale mean value interval and a target duty ratio interval according to the preset corresponding relation;
And determining the target mapping function from the preset mapping function set based on the preset corresponding relation according to a comparison result of whether the duty ratio of the pixel points of the image distributed in the target gray scale range is in the target duty ratio interval or not.
In some embodiments, the determining, according to the comparison result of whether the duty ratio of the pixel point distribution of the image in the target gray scale range is in the target duty ratio interval, the target mapping function from the preset mapping function set based on the preset correspondence includes:
Under the condition that the duty ratio of the pixel points of the image distributed in the target gray scale range is in the target duty ratio interval, determining a target mapping function corresponding to the gray scale mean value interval, the target gray scale range and the target duty ratio interval in the preset mapping function set according to the preset corresponding relation;
And under the condition that the duty ratio of the pixel points of the image distributed in the target gray scale range is not in the target duty ratio interval, determining a target mapping function corresponding to the gray scale mean value interval in the preset mapping function set.
In some embodiments, the gray mean interval corresponds to a target gray range of a plurality of different gray levels; and determining, in the preset mapping function set, a target mapping function corresponding to the gray mean value interval, the target gray range, and the target duty range according to the preset correspondence when the duty ratio of the pixel points of the image distributed in the target gray range is in the target duty ratio interval, where the target mapping function includes:
Traversing according to the sequence from low gray level to high gray level of the target gray level range, determining the target mapping function in the preset mapping function set according to the preset corresponding relation under the condition that the pixel points of the image are distributed in the target gray level range currently traversed and the duty ratio of the pixel points falls into the target duty ratio interval corresponding to the target gray level range, and stopping traversing.
In some embodiments, the target duty cycle interval corresponding to the target gray scale range includes at least two; and determining, in the preset mapping function set, a target mapping function corresponding to the gray mean value interval, the target gray range, and the target duty range according to the preset correspondence when the duty ratio of the pixel points of the image distributed in the target gray range is in the target duty ratio interval, where the target mapping function includes:
Traversing according to the sequence from big to small of the target duty ratio interval corresponding to the target gray scale range, determining the target mapping function in the preset mapping function set according to the preset corresponding relation under the condition that the duty ratio of the pixel points of the image distributed in the target gray scale range is in the currently traversed target duty ratio interval, and stopping traversing.
In some embodiments, the determining, in the preset mapping function set, the target mapping function corresponding to the gray average interval when the duty ratio of the pixel points of the image distributed in the target gray range is not in the target duty ratio interval includes:
And determining a target mapping function, corresponding to the gray average value interval, of which the pixel value before the characterization adjustment is consistent with the pixel value after the adjustment in the preset mapping function set under the condition that the duty ratio of the pixel points of the image distributed in the target gray range is not in the target duty ratio interval and the gray average value of the image is larger than a preset gray average value threshold value.
In some embodiments, in the preset correspondence, the degree of increase of each mapping function to the same pixel value is inversely related to the gray level of the gray mean interval corresponding to the mapping function.
In some embodiments, in the preset correspondence, the degree of increase of the same pixel value by each mapping function corresponding to the same gray average interval is inversely related to the gray level of the preset gray range corresponding to the mapping function.
In some embodiments, in the preset correspondence, the degree of increase of the same pixel value by each mapping function corresponding to the same gray average value interval and the same preset gray range is positively related to the size of the duty cycle interval of the pixel point corresponding to the mapping function.
According to a second aspect of the embodiments of the present disclosure, there is provided an image display apparatus including:
the acquisition module is used for acquiring the current ambient light intensity and an image to be displayed;
The first determining module is used for determining the distribution condition of the pixel points according to the pixel values of the pixel points in the image;
the second determining module is used for determining a target mapping function from a preset mapping function set according to the distribution condition of the pixel points under the condition that the ambient light intensity is larger than a preset light intensity threshold value; wherein, each mapping function in the preset mapping function set is used for adjusting pixel values;
the adjusting module is used for adjusting the pixel value of the pixel point in the image according to the target mapping function;
and the display module is used for displaying the image after the pixel values of the pixel points are adjusted.
In some embodiments, the distribution condition of the pixels includes a gray average value of the image and a duty ratio of the pixels distributed in a preset gray range; the second determining module is used for determining a gray average value interval in which the gray average value of the image falls; determining a target mapping function from a preset mapping function set according to the gray average value interval, the duty ratio of pixel points distributed in a preset gray range and a preset corresponding relation; the preset corresponding relation comprises a gray level average value interval, a preset gray level range, a pixel point duty ratio interval and an association relation between mapping functions.
In some embodiments, the second determining module is configured to determine, according to the preset correspondence, a target gray scale range and a target duty cycle interval corresponding to the gray scale average interval; and determining the target mapping function from the preset mapping function set based on the preset corresponding relation according to a comparison result of whether the duty ratio of the pixel points of the image distributed in the target gray scale range is in the target duty ratio interval or not.
In some embodiments, the second determining module is configured to determine, in the preset mapping function set, a target mapping function corresponding to the gray average interval, the target gray range, and the target duty interval according to the preset correspondence when a duty ratio of pixels of the image distributed in the target gray range is in the target duty interval; and under the condition that the duty ratio of the pixel points of the image distributed in the target gray scale range is not in the target duty ratio interval, determining a target mapping function corresponding to the gray scale mean value interval in the preset mapping function set.
In some embodiments, the gray mean interval corresponds to a target gray range of a plurality of different gray levels; the second determining module is configured to traverse according to the order from low gray level to high gray level of the target gray level range, determine, according to the preset correspondence, the target mapping function in the preset mapping function set, and stop traversing when the pixel points of the image are distributed in the target gray level range currently traversed and the duty ratio of the pixel points falls into a target duty ratio interval corresponding to the target gray level range.
In some embodiments, the target duty cycle interval corresponding to the target gray scale range includes at least two; the second determining module is configured to traverse according to a sequence from large to small of a target duty ratio interval corresponding to the target gray scale range, determine, according to the preset correspondence, the target mapping function in the preset mapping function set, and stop traversing when the duty ratio of the pixel points of the image distributed in the target gray scale range is in the currently traversed target duty ratio interval.
In some embodiments, the second determining module is configured to determine, in the preset mapping function set, a target mapping function corresponding to the gray scale average value interval and having a pixel value before the characterization adjustment consistent with a pixel value after the adjustment, where a duty ratio of pixel points of the image distributed in the target gray scale range is not in the target duty ratio interval, and a gray scale average value of the image is greater than a preset gray scale average value threshold.
In some embodiments, in the preset correspondence, the degree of increase of each mapping function to the same pixel value is inversely related to the gray level of the gray mean interval corresponding to the mapping function.
In some embodiments, in the preset correspondence, the degree of increase of the same pixel value by each mapping function corresponding to the same gray average interval is inversely related to the gray level of the preset gray range corresponding to the mapping function.
In some embodiments, in the preset correspondence, the degree of increase of the same pixel value by each mapping function corresponding to the same gray average value interval and the same preset gray range is positively related to the size of the duty cycle interval of the pixel point corresponding to the mapping function.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
A processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the method as described in the first aspect above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium comprising:
the instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method as described in the first aspect above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
According to the embodiment of the disclosure, when the ambient light intensity is greater than the preset light intensity threshold, the image display device adaptively selects an optimal target mapping function from a preset mapping function set according to the distribution condition of the pixel points, and adjusts the pixel values of the pixel points. Because the distribution condition of the pixels can represent the darkness of the image, the image display device in the embodiment of the disclosure adaptively selects the target mapping function matched with the darkness of the image from the preset mapping function set according to the distribution condition of the pixels, so as to realize that if the distribution condition of the pixels represents the darkness of the image to be larger under the condition of brighter ambient light, the pixel value of the pixels of the image is increased to a larger extent (such as increasing the gray level of the pixels) according to the target mapping function, thereby enabling a user to more clearly observe the details of the darkness in the image; under the condition that the ambient light is brighter, if the distribution condition of the pixel points represents that the darkness degree of the image is smaller, the pixel values of the pixel points of the image are increased to a smaller degree according to the target mapping function, so that a user can clearly observe the details of the darkness part in the image and simultaneously consider the power consumption of the image display device; thus, embodiments of the present disclosure may enable adaptive brightness of images for different levels of darkness of the images. When the distribution condition of the pixel points represents that the whole image is brighter, an objective mapping function representing that the pixel value before adjustment is consistent with the pixel value after adjustment can be determined according to the distribution condition of the pixel points, namely, the pixel points are not lightened, so that the power consumption of the image display device is reduced, and meanwhile, the whitening phenomenon of the image is reduced. Therefore, compared with the case that the darkness degree of the images is not distinguished and the pixel value is adjusted based on the same mapping function, the embodiment of the disclosure can further improve the display effect of the images and has the characteristic of high universality.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating an example of an image display method according to an embodiment of the present disclosure.
Fig. 2 is a diagram illustrating a preset correspondence relationship according to an embodiment of the present disclosure.
Fig. 3 is an exemplary diagram of a preset mapping function set according to an embodiment of the present disclosure.
Fig. 4 is a flowchart illustrating an example of an image display method according to an embodiment of the present disclosure.
Fig. 5 is a diagram of an image display device according to an embodiment of the present disclosure.
Fig. 6 is a block diagram of an electronic device shown in an embodiment of the disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The image display method provided by the embodiment of the present disclosure may be an image display apparatus, for example, a User Equipment (UE) with a display component, a mobile device, a User terminal, a mobile phone, a tablet computer, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, and the like. In some possible implementations, the image display method may be implemented by a processor invoking computer readable instructions stored in a memory.
Fig. 1 is a flowchart illustrating an example of an image display method according to an embodiment of the disclosure, as shown in fig. 1, including the following steps:
s11, acquiring current ambient light intensity and an image to be displayed;
S12, determining the distribution condition of the pixel points according to the pixel values of the pixel points in the image;
S13, under the condition that the ambient light intensity is larger than a preset light intensity threshold value, determining a target mapping function from a preset mapping function set according to the distribution condition of the pixel points; wherein, each mapping function in the preset mapping function set is used for adjusting pixel values;
S14, according to the target mapping function, adjusting pixel values of pixel points in the image;
and S15, displaying the image after the pixel values of the pixel points are adjusted.
In step S11, the image display apparatus may acquire the current ambient light intensity based on an ambient light sensor such as a photoresistor, a photodiode, a phototransistor, or the like.
In the embodiment of the present disclosure, the image to be displayed may be a separate image or may be an image frame in a video stream, which is not limited in the present disclosure. The image display device obtains the image to be displayed, for example, the image to be displayed indicated by the operation is obtained when the user operation is detected, or the image frame in the video stream to be played is obtained in the video playing process.
In step S12, if the acquired image is a gray scale image, the image display device according to the embodiment of the present disclosure may determine a gray scale average value of each pixel point, determine a total amount and/or a duty ratio of the pixel points distributed in different preset gray scale ranges based on a method such as histogram statistics, and so on, so as to determine a distribution condition of the pixel points.
If the acquired image is a color image, the image display device can determine the average value of the pixel values of each color channel, the total amount and/or the duty ratio of the pixel points distributed in different preset pixel value ranges and the like aiming at the pixel values of each color channel; in addition, the image display apparatus may convert the acquired color image into a gray-scale image based on a weighted average method, a maximum value method, a minimum value method, or the like, and then determine the distribution of the pixels using the foregoing method, which is not limited in the present disclosure.
In some embodiments, the image display device may determine, as the average gray level value of the image, an average value of gray levels of each pixel point other than the preset maximum gray level and the preset minimum gray level according to the gray levels of each pixel point in the image; taking the gray scale range (0, 255) as an example, the preset maximum gray scale is 255, and the preset minimum gray scale is 0. The average darkness of the image can be represented by the gray average value of the image, so that the influence of the extreme value of gray on the determination of the average darkness of the image can be reduced, and the accuracy of representing the average darkness of the image by the gray average value is improved.
In some embodiments, the image display apparatus may perform histogram statistics on the gray levels of the pixels in the image, and normalize the histogram statistics result, for example, normalize the gray levels of the pixels to (0, 255), and determine the duty ratio of the pixel value distribution within the preset gray level range according to the histogram statistics result after normalization. By the scheme, the influence of overflowed gray scales on the duty ratio of pixel value distribution in a preset gray scale range can be reduced, and accuracy is improved.
In step S13, the preset mapping function set includes a plurality of mapping functions, each of which may be a linear function, a nonlinear function (such as a Gamma function), etc., and the mapping functions may be a mapping between an initial pixel value and a target pixel value, a mapping between an initial pixel value and an increased value of a pixel value, a mapping between a weighting coefficient of an initial pixel value and a pixel value, etc., which is not limited in the present disclosure.
In some embodiments, when the distribution condition of the pixels includes a gray average value of each pixel, determining a mapping function corresponding to the gray average value in a preset mapping function set as a target mapping function according to a preset corresponding relation; the preset corresponding relation comprises an association relation between the gray average value and the mapping function.
In some embodiments, in the case that the distribution situation of the pixel points includes a total amount and/or a duty ratio of the pixel points distributed in different preset gray scale ranges, determining a mapping function corresponding to the total amount and/or the duty ratio in a preset mapping function set as a target mapping function according to a preset corresponding relation; the preset corresponding relation comprises an association relation between the total amount and/or the duty ratio and the mapping function.
In some embodiments, under the condition that the distribution condition of the pixel points includes a gray average value of each pixel point and total amount and/or duty ratio of the pixel points distributed in different preset gray ranges, determining a mapping function corresponding to the gray average value and the total amount and/or duty ratio in a preset mapping function set as a target mapping function according to a preset corresponding relation; the preset corresponding relation comprises a gray average value, a total amount and/or a duty ratio and an incidence relation between mapping functions.
Taking an image as a color image as an example, in the same manner as the above-mentioned determination of the target mapping function according to the distribution condition of the pixels of the gray image, for each color channel of the color image, the mapping function corresponding to the distribution condition of the pixels of the color channel is determined as the target mapping function corresponding to the color channel, which is not described herein.
It should be noted that, the adjustment degree of each mapping function in the preset mapping function set to the pixel value should not be too great, so as to reduce the phenomenon of image whitening caused by too great increase degree of the pixel value. In addition, in the case that the image is a color image, the pixel value improvement degree after adjustment of each color channel needs to be adapted (for example, each color channel improves the pixel value with the same weighting coefficient), so that the gray corresponding to the pixel point after the pixel value is increased is a positive integer multiple of the gray corresponding to the pixel point before the pixel point is increased, and the image is improved without changing the content of the image.
It can be appreciated that in the specific implementation process, the distribution condition of the pixel points can be determined first, and then whether the ambient light intensity is greater than a preset light intensity threshold value is judged; or judging whether the ambient light intensity is larger than a preset light intensity threshold value, and then determining the distribution condition of the pixel points.
In step S14, after determining the target mapping function, the image display apparatus adjusts the pixel value of each pixel point according to the target mapping function, for example, if the target mapping function includes a mapping between the initial pixel value and the target pixel value, the image display apparatus may determine, according to the target mapping function, the target pixel value corresponding to the pixel value of the pixel point as the adjusted pixel value; if the target mapping function includes a mapping between an initial pixel value and an increased value of the pixel value, the image display apparatus may determine, according to the target mapping function, a sum of the pixel value of the pixel point and the increased value corresponding to the pixel value as an adjusted pixel value; if the target mapping function includes a mapping between the initial pixel value and the weighting coefficient of the pixel value, the image display device may determine, according to the target mapping function, a result of a product of the pixel value of the pixel point and the weighting coefficient corresponding to the pixel value as an adjusted pixel value, etc., so that in step S15, the image display device displays the image after the adjustment of the pixel value.
In the related art, when the ambient light is brighter, the pixel values are mapped by using the same Gamma function to lighten the image. It can be understood that, in the image display device according to the embodiment of the present disclosure, when the ambient light intensity is greater than the preset light intensity threshold, according to the distribution situation of the pixel points, an optimal target mapping function is adaptively selected from the preset mapping function set, and the pixel values of the pixel points are adjusted. Because the distribution condition of the pixels can represent the darkness of the image, the image display device in the embodiment of the disclosure adaptively selects the target mapping function matched with the darkness of the image from the preset mapping function set according to the distribution condition of the pixels, so as to realize that if the distribution condition of the pixels represents the darkness of the image to be larger under the condition of brighter ambient light, the pixel value of the pixels of the image is increased to a larger extent (such as increasing the gray level of the pixels) according to the target mapping function, thereby enabling a user to more clearly observe the details of the darkness in the image; under the condition that the ambient light is brighter, if the distribution condition of the pixel points represents that the darkness degree of the image is smaller, the pixel values of the pixel points of the image are increased to a smaller degree according to the target mapping function, so that a user can clearly observe the details of the darkness part in the image and simultaneously consider the power consumption of the image display device; thus, embodiments of the present disclosure may enable adaptive brightness of images for different levels of darkness of the images. When the distribution condition of the pixel points represents that the whole image is brighter, an objective mapping function representing that the pixel value before adjustment is consistent with the pixel value after adjustment can be determined according to the distribution condition of the pixel points, namely, the pixel points are not lightened, so that the power consumption of the image display device is reduced, and meanwhile, the whitening phenomenon of the image is reduced. Therefore, compared with the case that the darkness degree of the images is not distinguished and the pixel value is adjusted based on the same mapping function, the embodiment of the disclosure can further improve the display effect of the images and has the characteristic of high universality.
In some embodiments, the distribution condition of the pixels includes a gray average value of the image and a duty ratio of the pixels distributed in a preset gray range;
Determining a target mapping function from a preset mapping function set according to the distribution condition of the pixel points, wherein the determining comprises the following steps:
Determining a gray average value interval in which the gray average value of the image falls;
Determining a target mapping function from a preset mapping function set according to the gray average value interval, the duty ratio of pixel points distributed in a preset gray range and a preset corresponding relation; the preset corresponding relation comprises a gray level average value interval, a preset gray level range, a pixel point duty ratio interval and an association relation between mapping functions.
In the embodiment of the disclosure, the distribution condition of the pixel points includes a gray average value of an image and a duty ratio of the pixel points distributed in a preset gray range; the image display device can compare the gray average value of the image with a preset gray average value interval and determine a gray average value interval in which the gray average value falls; and determining the duty ratio of pixel distribution in a preset gray scale range based on histogram statistics and other methods.
It can be understood that the gray average interval in which the gray average of the image falls is inversely related to the average darkness of the image; the number of the preset gray scale ranges can be one or a plurality of, and the darkness degree represented by the preset gray scale ranges is inversely related to the gray scale of the preset gray scale ranges; the duty ratio of the pixel points distributed in the preset gray scale range can represent the concentration degree of the darkness degree represented by the gray scale of the pixel points in the preset gray scale range. When the ambient light intensity is high, the smaller the gray average value of the image is, the larger the duty ratio of the pixel points distributed in a low preset gray range (such as 0-75) is, and the greater the brightness of the pixel points is.
The image display device of the embodiment of the disclosure determines, based on a preset corresponding relation, a mapping function corresponding to a gray-scale average value interval and a duty ratio interval within a preset gray-scale range based on the preset corresponding relation after determining the gray-scale average value interval and the duty ratio within the preset gray-scale range, and determines the mapping function as a target mapping function; the preset corresponding relation comprises a gray level average value interval, a preset gray level range, a pixel point duty ratio interval and an association relation between mapping functions.
The preset mapping function set comprises a mapping function A and a mapping function B; the preset corresponding relation also comprises a gray average value interval (77, 101), a preset gray range (0, 25), a pixel point duty ratio interval (0.3,1) and a mapping function B, if the gray average value of the image is 50 and the pixel point duty ratio distributed in (0, 25) is 0.6, the target mapping function is determined to be the mapping function A based on the preset corresponding relation, and then the pixel value of the pixel point is adjusted based on the mapping function A.
It can be appreciated that, after determining the gray average value of the image and the duty ratio of the pixel distribution in the preset gray range, the image display device in the embodiment of the disclosure determines the target mapping function based on the preset corresponding relationship, so that the convenience of determining the target mapping function can be improved. In addition, as the gray mean value interval represents the average darkness of the image and the duty ratio in the preset gray range represents the concentration degree of the darkness represented by the gray level of the pixel point in the preset gray range, the target mapping function determined based on the preset corresponding relation is matched with the average darkness of the image and the concentration degree of the darkness of the pixel point, so that the optimal target mapping function is adaptively adapted, and the image display effect after the pixel value is adjusted based on the target mapping function is improved.
In some embodiments, the determining, according to the gray average interval, the duty ratio of the pixel distribution in the preset gray range, and the preset correspondence, the target mapping function from the preset mapping function set includes:
determining a target gray scale range corresponding to the gray scale mean value interval and a target duty ratio interval according to the preset corresponding relation;
And determining the target mapping function from the preset mapping function set based on the preset corresponding relation according to a comparison result of whether the duty ratio of the pixel points of the image distributed in the target gray scale range is in the target duty ratio interval or not.
In the embodiment of the disclosure, the gray average value interval, the preset gray range and the duty ratio interval of the pixel point in the preset corresponding relationship may be multiple.
According to the gray average value interval in which the gray average value of the image falls and the preset corresponding relation, the image display device of the embodiment of the disclosure determines a preset gray range corresponding to the gray average value interval as a target gray range, and determines a duty ratio interval of a pixel point corresponding to the preset gray range in the gray average value interval as a target duty ratio interval.
After determining the target gray scale range and the target duty ratio interval, the image display device selects the duty ratio in the target gray scale range from the duty ratio in the preset gray scale range, judges whether the duty ratio in the target gray scale range is in the target duty ratio interval, and then determines a target mapping function from a preset mapping function set according to the judging result and the preset corresponding relation. The preset gray scale range at least comprises a target gray scale range, so that after the image display device determines the target gray scale range, the duty ratio in the target gray scale range can be obtained based on the duty ratio in the preset gray scale range, and the distribution of the pixel points does not need to be counted again.
For example, when the judging result represents that the duty ratio in the target gray scale range is in the target duty ratio interval, determining the mapping function corresponding to the gray scale mean value interval, the target gray scale range and the target duty ratio interval as a target mapping function according to the preset corresponding relation; when the judgment result indicates that the duty ratio in the target gray scale range is not in the target duty ratio interval, the mapping function corresponding to any gray scale mean value interval, the target gray scale range or the target duty ratio interval can be determined as the target mapping function according to the preset corresponding relation.
It may be appreciated that, according to the preset correspondence, the image display device of the embodiment of the present disclosure first determines a target gray scale range and a target duty ratio range (first layer mapping) corresponding to the gray scale average range, then determines whether the duty ratio in the target gray scale range falls into the target duty ratio range, and determines a target mapping function (second layer mapping) from a preset mapping function set according to the determination result and the preset correspondence, so that on one hand, the situation that the target mapping function cannot be matched due to the fact that the duty ratio in the target gray scale range does not fall into the target duty ratio range can be reduced, and on the other hand, the order and efficiency of determining the target mapping function can be improved according to the multi-layer mapping.
Fig. 2 is a preset correspondence example diagram illustrating an embodiment of the present disclosure, and fig. 3 is a preset mapping function set example diagram illustrating an embodiment of the present disclosure. In fig. 2, avgV denotes a gray-scale average value of an image; avgV <30, 31< avgV <76, 77< avgV <101, 102< avgV <127, 128< avgV correspond to the aforementioned gray scale average interval; h1 represents the duty ratio within the preset gray scale range (0, 25); h2 represents the duty ratio within the preset gray scale ranges (26, 50), H3 represents the duty ratio within the preset gray scale ranges (51, 75), each preset gray scale range corresponds to a duty ratio interval; "other" means a case where the duty ratio in the preset gradation range does not fall within the preset gradation range; 1-14 are the identifiers of the mapping functions in the preset mapping function set, and the identifiers of the mapping functions have a one-to-one correspondence with the mapping functions in the preset mapping function set in fig. 3.
In fig. 2, taking an example that a gray average interval in which the gray average avgV of the image falls is 31< avgv <76, the gray average interval corresponds to a target gray range (0, 25) and a target duty ratio interval (0.4,1); the gray average interval also corresponds to a target gray range (51, 75), and the target duty ratio interval is (0.2,1). If the duty ratio of the pixel points distributed in the (0, 25) is larger than 0.4, selecting a mapping function marked as 13 from a preset mapping function set according to a preset corresponding relation as a target mapping function; if the duty ratio of the pixel points distributed in (0, 25) is smaller than or equal to 0.4 and the duty ratio of the pixel points distributed in (51, 75) is larger than 0.2, selecting a mapping function marked as 12 from a preset mapping function set as a target mapping function; if the duty ratio of the pixel points distributed in (0, 25) is less than or equal to 0.4 and the duty ratio of the pixel points distributed in (51, 75) is less than or equal to 0.2, corresponding to the 'other' condition, a mapping function marked as 11 is selected from a preset mapping function set as a target mapping function. Other mappings in fig. 2 are understood with reference to the above, and are not described in detail herein.
In the embodiment of the disclosure, the mapping function is a Gamma function, fig. 3 shows 14 groups of Gamma curves, each Gamma curve corresponds to one Gamma function, the gray scale in fig. 3 has a value range of 0-1023, the horizontal axis represents the initial gray scale (i.e. the gray scale of the pixel to be adjusted), and the vertical axis represents the mapped gray scale. The image display device can adaptively select any Gamma curve according to the distribution condition of the pixel points, and determines the gray level after mapping the gray level of the pixel points as the initial gray level as the adjusted gray level. The marks of the 14 groups of Gamma curves in FIG. 3 decrease from 14 to 1 in order from top to bottom, corresponding to the marks of the Gamma function in FIG. 2. As can be seen from fig. 3, the larger the mark of the Gamma curve is, the larger the gray value corresponding to the same initial gray value is, i.e. the greater the degree of lifting the gray value is. The smaller the gray value is, the larger the increasing degree of the gray value is, so that the brightness of the pixel value with larger darkness is increased, and the details of the dark part of the image are clearer.
It will be appreciated that, in connection with fig. 2 and 3, avgv characterizes the average darkness of an image, the smaller the avgV value, the greater the darkness of the characterization image; h1, H2 and H3 respectively represent the gray scale duty ratio of the image at the low, medium and high levels, when avgV is smaller and the H1 is larger, the average darkness of the represented image is larger, the duty ratio of the pixel point concentrated at the lower gray scale is higher, and at the moment, the details of the dark part of the image are not clear. Therefore, the image display device selects a Gamma function with a larger mark, such as a Gamma function marked as 14, from a preset mapping function set based on a preset corresponding relation, so that the pixel value is increased to a larger extent, an image with the increased pixel value is displayed, and the display effect of the image with a larger darkness degree under brighter ambient light is improved.
In addition, when avgV >150, the slope of the Gamma curve, corresponding to the mark 1, is 1, i.e., the pixel values before and after mapping are the same. Because the brightness of the characterization image is larger when avgV is more than 150, the image has better display effect under the condition of not adjusting the pixel value of the pixel point; this scheme can reduce the phenomenon of whitening after the image is lightened, and reduce the power consumption of the image display device, compared with the image is lightened (the gradation of the pixel value is increased) at avgV > 150.
In some embodiments, the determining, according to the comparison result of whether the duty ratio of the pixel point distribution of the image in the target gray scale range is in the target duty ratio interval, the target mapping function from the preset mapping function set based on the preset correspondence includes:
Under the condition that the duty ratio of the pixel points of the image distributed in the target gray scale range is in the target duty ratio interval, determining a target mapping function corresponding to the gray scale mean value interval, the target gray scale range and the target duty ratio interval in the preset mapping function set according to the preset corresponding relation;
And under the condition that the duty ratio of the pixel points of the image distributed in the target gray scale range is not in the target duty ratio interval, determining a target mapping function corresponding to the gray scale mean value interval in the preset mapping function set.
In the embodiment of the disclosure, when the judging result indicates that the duty ratio in the target gray scale range falls into the target duty ratio interval, the image display device determines the target mapping function according to the association relationship among the gray scale mean value interval, the target gray scale range, the target duty ratio interval and the mapping function in the preset corresponding relationship.
It can be understood that the target mapping function determined by the embodiment of the disclosure is matched with the average darkness degree of the image represented by the gray average value interval, the target gray range and the concentration degree of the darkness degree represented by the target duty ratio interval, so that the accuracy of determining the target mapping function can be improved, and the overall display effect of the image after the pixel value is adjusted based on the target mapping function is improved.
In the embodiment of the disclosure, when the judging result indicates that the duty ratio in the target gray scale range does not fall into the target duty ratio interval, the image display device may determine, according to the association relationship between the gray scale mean interval and the mapping function in the preset corresponding relationship, the mapping function corresponding to the gray scale mean interval as the target mapping function; or determining a mapping function corresponding to the gray average value of the image as a target mapping function according to a preset gray average value corresponding relation, wherein the preset gray average value corresponding relation comprises a corresponding relation between the gray average value and the mapping function.
It may be appreciated that, in the case where the judging result indicates that the duty ratio in the target gray scale range does not fall into the target duty ratio interval, the image display device according to the embodiment of the present disclosure determines, according to the gray scale average value interval that characterizes the average darkness degree of the image, the mapping function corresponding to the gray scale average value interval as the target mapping function, and compared with determining, as the target mapping function, the foregoing preset mapping function in the case where the duty ratio in the target gray scale range does not fall into the target duty ratio interval, the image display device may improve the matching degree of determining the target mapping function and the average darkness degree of the image, thereby improving the overall display effect of the image after adjusting the pixel value based on the target mapping function.
In some embodiments, the gray mean interval corresponds to a target gray range of a plurality of different gray levels; and determining, in the preset mapping function set, a target mapping function corresponding to the gray mean value interval, the target gray range, and the target duty range according to the preset correspondence when the duty ratio of the pixel points of the image distributed in the target gray range is in the target duty ratio interval, where the target mapping function includes:
Traversing according to the sequence from low gray level to high gray level of the target gray level range, determining the target mapping function in the preset mapping function set according to the preset corresponding relation under the condition that the duty ratio of the pixel points of the image distributed in the currently traversed target gray level range falls into the target duty ratio interval corresponding to the target gray level range, and stopping traversing.
In the embodiments of the present disclosure, the target gray scale range includes a range of different gray scales, the lower the gray scale, the greater the darkness of the target gray scale range characterization.
According to the embodiment of the disclosure, the image display device traverses the target gray scale range according to the sequence from low gray scale to high gray scale of the target gray scale range, namely traverses the target gray scale range according to the sequence from high dark scale to low gray scale of the target gray scale range, and judges whether the duty ratio in the target gray scale range falls into a target duty ratio interval corresponding to the currently traversed target gray scale range; if the duty ratio in the target gray scale range falls into a target duty ratio interval corresponding to the currently traversed target gray scale range, determining a mapping function corresponding to the currently traversed target gray scale range and the target duty ratio interval as a target mapping function according to a preset corresponding relation, and stopping traversing; if the duty ratio in the target gray scale range does not fall into the target duty ratio interval corresponding to the currently traversed target gray scale range, performing the next traversal according to the sequence from low gray scale to high gray scale of the target gray scale range; and if the duty ratio in the target gray scale range does not fall into the target duty ratio interval corresponding to each traversed target gray scale range, determining the mapping function corresponding to the gray scale mean interval as a target mapping function.
It can be understood that, since the gray level of the target gray level range is inversely related to the darkness, the greater the corresponding adjustment degree of the pixel point of the image is required; therefore, if the ambient light intensity is greater than the preset light intensity threshold, that is, the ambient light is brighter, the target mapping function is determined according to the target gray scale range with a larger darkness degree and the corresponding target duty ratio interval, so that the gray scale of the pixel point is increased to a larger degree according to the target mapping function. Therefore, the image display device according to the embodiment of the disclosure traverses according to the sequence from low to high (i.e., the sequence from high to low in darkness) of the target gray scale range, and determines the optimal target mapping function according to the preset corresponding relation when the duty ratio of the pixel points of the image distributed in the currently traversed target gray scale range is within the target duty ratio interval, so that other target gray scale ranges with darkness lower than the currently traversed target gray scale range do not need to be traversed on the basis of the optimal target mapping function.
In some embodiments, the target duty cycle interval corresponding to the target gray scale range includes at least two; and determining, in the preset mapping function set, a target mapping function corresponding to the gray mean value interval, the target gray range, and the target duty range according to the preset correspondence when the duty ratio of the pixel points of the image distributed in the target gray range is in the target duty ratio interval, where the target mapping function includes:
Traversing according to the sequence from big to small of the target duty ratio interval corresponding to the target gray scale range, determining the target mapping function in the preset mapping function set according to the preset corresponding relation under the condition that the duty ratio of the pixel points of the image distributed in the target gray scale range is in the currently traversed target duty ratio interval, and stopping traversing.
In the embodiment of the disclosure, the same target gray scale range may correspond to different target duty ratio intervals, and the larger the target duty ratio interval is, the larger the concentration degree of darkness degree represented by gray scale of the pixel points in the target gray scale range is.
According to the embodiment of the disclosure, the image display device traverses the target duty ratio interval corresponding to the target gray scale range according to the sequence from big to small of the target duty ratio interval corresponding to the target gray scale range, and judges whether the duty ratio in the target gray scale range falls into the currently traversed target duty ratio interval corresponding to the target gray scale range; if the duty ratio in the target gray scale range falls into the currently traversed target duty ratio interval, determining a mapping function corresponding to the target gray scale range and the currently traversed target duty ratio interval as a target mapping function according to a preset corresponding relation, and stopping traversing; if the duty ratio in the target gray scale range does not fall into the currently traversed target duty ratio interval corresponding to the target gray scale range, performing next traversal according to the sequence from the large to the small of the target duty ratio interval corresponding to the target gray scale range; and if the duty ratio in the target gray scale range does not fall into the traversed target duty ratio interval corresponding to the target gray scale range, determining a mapping function corresponding to the gray scale mean interval as a target mapping function.
It can be understood that, because the target duty ratio interval corresponding to the target gray scale range is positively correlated with the concentration degree of the darkness degree represented by the gray scale of the pixel point in the target gray scale range, the greater the concentration degree is, the greater the corresponding adjustment degree of the pixel point of the image is required; therefore, if the ambient light intensity is greater than the preset light intensity threshold, that is, the ambient light is brighter, the target mapping function is determined according to the target duty ratio interval corresponding to the target gray scale range with a larger concentration degree, so that the gray scale of the pixel point is increased to a larger degree according to the target mapping function. Therefore, the image display device of the embodiment traverses according to the sequence from big to small of the target duty ratio interval corresponding to the target gray scale range, determines the optimal target mapping function according to the preset corresponding relation under the condition that the duty ratio of the pixel points of the image distributed in the target gray scale range is in the currently traversed target duty ratio interval, and does not need to traverse other target duty ratio intervals with the characterization concentration degree lower than that of the currently traversed target duty ratio interval on the basis, and accuracy and efficiency of determining the target mapping function can be improved through the scheme.
In some embodiments, the determining, in the preset mapping function set, the target mapping function corresponding to the gray average interval when the duty ratio of the pixel points of the image distributed in the target gray range is not in the target duty ratio interval includes:
And determining a target mapping function, corresponding to the gray average value interval, of which the pixel value before the characterization adjustment is consistent with the pixel value after the adjustment in the preset mapping function set under the condition that the duty ratio of the pixel points of the image distributed in the target gray range is not in the target duty ratio interval and the gray average value of the image is larger than a preset gray average value threshold value.
In the embodiment of the disclosure, the duty ratio of the pixel points of the image distributed in the target gray scale range is not in the target duty ratio interval, and if the gray scale average value of the image is larger than the preset gray scale average value threshold (e.g. 150) and the represented image is brighter, the user can clearly see the details of the original image without adjusting the pixel value of the image when the ambient light intensity is larger than the preset light intensity threshold. In this regard, in the image display device according to the embodiment of the present disclosure, when the duty ratio of the pixel points of the image distributed in the target gray scale range is not in the target duty ratio interval, and the gray scale average value of the image is greater than the preset gray scale average value threshold, the target mapping function corresponding to the gray scale average value interval, where the pixel value before the characterization adjustment is consistent with the pixel value after the adjustment, is determined, so that the pixel value of the image is not adjusted according to the darkness degree adaptation of the image, and the problem that the whole image is whitened after the pixel value of the image is increased, for example, can be reduced while the power consumption of the image display device is reduced.
In some embodiments, in the preset correspondence, the degree of increase of each mapping function to the same pixel value is inversely related to the gray level of the gray mean interval corresponding to the mapping function.
In the embodiment of the disclosure, since the gray average value interval in which the gray average value of the image falls is inversely related to the average darkness of the image, the smaller the gray average value interval, the larger the average darkness of the image, and the greater the brightness of the pixel value of the pixel point. Therefore, in the embodiment of the disclosure, the degree of increase of the same pixel value by each mapping function in the corresponding relation is preset, and the degree of increase of the same pixel value by each mapping function is inversely related to the gray level of the gray mean value interval corresponding to the mapping function, so that the pixel value of the pixel point in the image with larger average darkness degree is brightened to a larger degree, and the display effect of the image when the ambient light is brighter is improved.
In some embodiments, in the preset correspondence, the degree of increase of the same pixel value by each mapping function corresponding to the same gray average interval is inversely related to the gray level of the preset gray range corresponding to the mapping function.
In the embodiment of the disclosure, since the gray level of the preset gray range is inversely related to the darkness, the smaller the gray level of the preset gray range, which falls into the pixel point of the image, the larger the darkness representing the distribution of the pixel point, and the greater the brightness of the pixel value of the pixel point. Therefore, in the preset correspondence, the increasing degree of the same pixel value by each mapping function corresponding to the same gray mean value interval is inversely related to the gray level of the preset gray range corresponding to the mapping function, so that the pixel value of the pixel point in the distributed image with larger darkness degree is brightened to a larger degree, and the display effect of the image when the ambient light is brighter is improved.
In some embodiments, in the preset correspondence, the degree of increase of the same pixel value by each mapping function corresponding to the same gray average value interval and the same preset gray range is positively related to the size of the duty cycle interval of the pixel point corresponding to the mapping function.
In the embodiment of the disclosure, since the duty ratio interval corresponding to the same preset gray scale range is positively correlated with the concentration degree of the darkness degree corresponding to the gray scale of the pixel point in the preset gray scale range, the greater the concentration degree, the greater the degree of the pixel point to be lightened. Therefore, in the preset corresponding relation, the increasing degree of the same pixel value by each mapping function corresponding to the same gray average value interval and the same preset gray range is positively correlated with the size of the duty ratio interval of the pixel points corresponding to the mapping function, so that the pixel values of the pixel points of the image with larger concentration degree of the dark degree are lightened to a larger degree, and the display effect of the image when the ambient light is brighter is improved.
Fig. 4 is a flowchart illustrating an example of an image display method according to an embodiment of the disclosure, as shown in fig. 4, including the following steps:
s21, acquiring images in an album;
In the embodiment of the disclosure, if the album is stored in the image display device, the image display device may automatically trigger to acquire the image in the album or acquire the detected image in the album indicated by the user operation; if the album is stored in other devices, the image pixel device may acquire the images in the album transmitted by the devices in a wireless or wired manner. The image in the album acquired by the image display device corresponds to the image to be displayed.
S22, judging whether the illumination intensity collected by the light sensor is greater than 10000 lux;
In an embodiment of the present disclosure, the light sensor may include, for example, the aforementioned photoresistor, photodiode, phototriode, etc., for obtaining the illumination intensity corresponding to the aforementioned current ambient light intensity; the image display device acquires the illumination intensity and judges whether the illumination intensity is more than 10000 lux; wherein 10000 lux corresponds to the preset light intensity threshold.
If the illumination intensity is greater than 10000 lux, executing step S23; otherwise the image display device directly outputs the image.
S23, obtaining image histogram information;
In the embodiment of the disclosure, the image display device determines image histogram information based on a histogram statistics method and the like according to pixel values of pixel points in an image, wherein the image histogram information corresponds to distribution conditions of the pixel points and comprises a gray average value of the image and a duty ratio of pixel points distributed in a preset gray range.
S24, adaptively selecting a proper Gamma function for mapping;
In an embodiment of the disclosure, a Gamma function module of an image display device stores a preset mapping function set, where the preset function set includes a plurality of Gamma functions. An adaptive selection module of the image display device determines a gray average value interval in which a gray average value of an image falls, and adaptively selects a proper Gamma function (corresponding to the target mapping function) from a preset mapping function set according to the gray average value interval, the duty ratio of pixel points distributed in a preset gray range and a preset corresponding relation; the preset corresponding relation comprises a gray level average value interval, a preset gray level range, a pixel point duty ratio interval and a incidence relation between Gamma functions; the Gamma function includes a mapping between initial pixel values and target pixel values.
After adaptively selecting a proper Gamma function, the image display device according to the embodiment of the present disclosure uses a pixel value of each pixel point in an image as an initial pixel value, determines a target pixel value mapped by the initial pixel value based on the Gamma function, determines the target pixel value as an adjusted pixel value, and executes step S25 to output an image with the adjusted pixel value.
It can be understood that, in the image display device according to the embodiment of the present disclosure, when the ambient light intensity is greater than the preset light intensity threshold, according to the distribution situation of the pixel points, an optimal target mapping function is adaptively selected from the preset mapping function set, and the pixel values of the pixel points are adjusted. Because the distribution condition of the pixels can represent the darkness of the image, the image display device in the embodiment of the disclosure adaptively selects the target mapping function matched with the darkness of the image from the preset mapping function set according to the distribution condition of the pixels, so as to realize that if the distribution condition of the pixels represents the darkness of the image to be larger under the condition of brighter ambient light, the pixel value of the pixels of the image is increased to a larger extent (such as increasing the gray level of the pixels) according to the target mapping function, thereby enabling a user to more clearly observe the details of the darkness in the image; under the condition that the ambient light is brighter, if the distribution condition of the pixel points represents that the darkness degree of the image is smaller, the pixel values of the pixel points of the image are increased to a smaller degree according to the target mapping function, so that a user can clearly observe the details of the darkness part in the image and simultaneously consider the power consumption of the image display device; thus, embodiments of the present disclosure may enable adaptive brightness of images for different levels of darkness of the images. When the distribution condition of the pixel points represents that the whole image is brighter, an objective mapping function representing that the pixel value before adjustment is consistent with the pixel value after adjustment can be determined according to the distribution condition of the pixel points, namely, the pixel points are not lightened, so that the power consumption of the image display device is reduced, and meanwhile, the whitening phenomenon of the image is reduced. Therefore, compared with the case that the darkness degree of the images is not distinguished and the pixel value is adjusted based on the same mapping function, the embodiment of the disclosure can further improve the display effect of the images and has the characteristic of high universality.
Fig. 5 is a diagram of an image display apparatus according to an exemplary embodiment. Referring to fig. 5, the apparatus includes:
an obtaining module 501, configured to obtain a current ambient light intensity and an image to be displayed;
A first determining module 502, configured to determine a distribution situation of pixel points according to pixel values of each pixel point in the image;
A second determining module 503, configured to determine, according to the distribution of the pixels, a target mapping function from a preset mapping function set when the ambient light intensity is greater than a preset light intensity threshold; wherein, each mapping function in the preset mapping function set is used for adjusting pixel values;
An adjustment module 504, configured to adjust pixel values of pixel points in the image according to the target mapping function;
the display module 505 is configured to display an image after adjusting the pixel value of the pixel point.
In some embodiments, the distribution condition of the pixels includes a gray average value of the image and a duty ratio of the pixels distributed in a preset gray range; the second determining module 503 is configured to determine a gray average interval in which a gray average of the image falls; determining a target mapping function from a preset mapping function set according to the gray average value interval, the duty ratio of pixel points distributed in a preset gray range and a preset corresponding relation; the preset corresponding relation comprises a gray level average value interval, a preset gray level range, a pixel point duty ratio interval and an association relation between mapping functions.
In some embodiments, the second determining module 503 is configured to determine, according to the preset correspondence, a target gray scale range and a target duty cycle interval corresponding to the gray scale average interval; and determining the target mapping function from the preset mapping function set based on the preset corresponding relation according to a comparison result of whether the duty ratio of the pixel points of the image distributed in the target gray scale range is in the target duty ratio interval or not.
In some embodiments, the second determining module 503 is configured to determine, in the preset mapping function set, a target mapping function corresponding to the gray average interval, the target gray range, and the target duty interval according to the preset correspondence when a duty ratio of pixels of the image distributed in the target gray range is in the target duty interval; and under the condition that the duty ratio of the pixel points of the image distributed in the target gray scale range is not in the target duty ratio interval, determining a target mapping function corresponding to the gray scale mean value interval in the preset mapping function set.
In some embodiments, the gray mean interval corresponds to a target gray range of a plurality of different gray levels; the second determining module 503 is configured to traverse the target gray scale range in order from low gray scale to high gray scale, determine, according to the preset correspondence, the target mapping function in the preset mapping function set, and stop traversing when the pixel point of the image is distributed in a target duty ratio interval corresponding to the target gray scale range currently traversed, where the duty ratio of the pixel point falls into the target duty ratio interval corresponding to the target gray scale range.
In some embodiments, the target duty cycle interval corresponding to the target gray scale range includes at least two; the second determining module 503 is configured to traverse the target duty ratio interval corresponding to the target gray scale range in order from large to small, determine, according to the preset correspondence, the target mapping function in the preset mapping function set, and stop traversing when the duty ratio of the pixel points of the image distributed in the target gray scale range is in the currently traversed target duty ratio interval.
In some embodiments, the second determining module 503 is configured to determine, in the preset mapping function set, a target mapping function corresponding to the gray scale average value interval and having a pixel value before the characterization adjustment consistent with a pixel value after the adjustment, where a duty ratio of the pixel points of the image distributed in the target gray scale range is not in the target duty ratio interval, and a gray scale average value of the image is greater than a preset gray scale average value threshold.
In some embodiments, in the preset correspondence, the degree of increase of each mapping function to the same pixel value is inversely related to the gray level of the gray mean interval corresponding to the mapping function.
In some embodiments, in the preset correspondence, the degree of increase of the same pixel value by each mapping function corresponding to the same gray average interval is inversely related to the gray level of the preset gray range corresponding to the mapping function.
In some embodiments, in the preset correspondence, the degree of increase of the same pixel value by each mapping function corresponding to the same gray average value interval and the same preset gray range is positively related to the size of the duty cycle interval of the pixel point corresponding to the mapping function.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 6 is a block diagram of an electronic device 800, according to an example embodiment. For example, the electronic device 800 may be a mobile phone, a mobile computer, or the like.
Referring to fig. 6, an electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 806 provides power to the various components of the electronic device 800. Power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for electronic device 800.
The multimedia component 808 includes a screen between the electronic device 800 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the electronic device 800. For example, the sensor assembly 814 may detect an on/off state of the device 800, a relative positioning of the components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in position of the electronic device 800 or a component of the electronic device 800, the presence or absence of a user's contact with the electronic device 800, an orientation or acceleration/deceleration of the electronic device 800, and a change in temperature of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices, either wired or wireless. The electronic device 800 may access a wireless network based on a communication standard, such as Wi-Fi,4G, or 5G, or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including instructions executable by processor 820 of electronic device 800 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
A non-transitory computer readable storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the aforementioned image display method.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (13)

1. An image display method, the method comprising:
Acquiring current ambient light intensity and an image to be displayed;
determining the distribution condition of the pixel points according to the pixel values of the pixel points in the image;
Under the condition that the ambient light intensity is larger than a preset light intensity threshold value, determining a target mapping function from a preset mapping function set according to the distribution condition of the pixel points; wherein, each mapping function in the preset mapping function set is used for adjusting pixel values;
According to the target mapping function, adjusting pixel values of pixel points in the image;
and displaying the image after the pixel values of the pixel points are adjusted.
2. The method according to claim 1, wherein the distribution condition of the pixels comprises a gray average value of the image and a duty ratio of the pixels distributed in a preset gray range;
Determining a target mapping function from a preset mapping function set according to the distribution condition of the pixel points, wherein the determining comprises the following steps:
Determining a gray average value interval in which the gray average value of the image falls;
Determining a target mapping function from a preset mapping function set according to the gray average value interval, the duty ratio of pixel points distributed in a preset gray range and a preset corresponding relation; the preset corresponding relation comprises a gray level average value interval, a preset gray level range, a pixel point duty ratio interval and an association relation between mapping functions.
3. The method according to claim 2, wherein the determining the target mapping function from the preset mapping function set according to the gray average interval, the duty ratio of the pixel distribution in the preset gray range, and the preset correspondence includes:
determining a target gray scale range corresponding to the gray scale mean value interval and a target duty ratio interval according to the preset corresponding relation;
And determining the target mapping function from the preset mapping function set based on the preset corresponding relation according to a comparison result of whether the duty ratio of the pixel points of the image distributed in the target gray scale range is in the target duty ratio interval or not.
4. A method according to claim 3, wherein the determining the target mapping function from the preset mapping function set based on the preset correspondence according to the comparison result of whether the duty ratio of the pixel point distribution of the image in the target gray scale range is in the target duty ratio interval includes:
Under the condition that the duty ratio of the pixel points of the image distributed in the target gray scale range is in the target duty ratio interval, determining a target mapping function corresponding to the gray scale mean value interval, the target gray scale range and the target duty ratio interval in the preset mapping function set according to the preset corresponding relation;
And under the condition that the duty ratio of the pixel points of the image distributed in the target gray scale range is not in the target duty ratio interval, determining a target mapping function corresponding to the gray scale mean value interval in the preset mapping function set.
5. The method of claim 4, wherein the gray-scale mean interval corresponds to a target gray-scale range of a plurality of different gray scales; and determining, in the preset mapping function set, a target mapping function corresponding to the gray mean value interval, the target gray range, and the target duty range according to the preset correspondence when the duty ratio of the pixel points of the image distributed in the target gray range is in the target duty ratio interval, where the target mapping function includes:
Traversing according to the sequence from low gray level to high gray level of the target gray level range, determining the target mapping function in the preset mapping function set according to the preset corresponding relation under the condition that the pixel points of the image are distributed in the target gray level range currently traversed and the duty ratio of the pixel points falls into the target duty ratio interval corresponding to the target gray level range, and stopping traversing.
6. The method of claim 4, wherein the target duty cycle interval for the target gray scale range comprises at least two; and determining, in the preset mapping function set, a target mapping function corresponding to the gray mean value interval, the target gray range, and the target duty range according to the preset correspondence when the duty ratio of the pixel points of the image distributed in the target gray range is in the target duty ratio interval, where the target mapping function includes:
Traversing according to the sequence from big to small of the target duty ratio interval corresponding to the target gray scale range, determining the target mapping function in the preset mapping function set according to the preset corresponding relation under the condition that the duty ratio of the pixel points of the image distributed in the target gray scale range is in the currently traversed target duty ratio interval, and stopping traversing.
7. The method according to claim 4, wherein the determining, in the preset mapping function set, the target mapping function corresponding to the gray average interval if the duty ratio of the pixel distribution of the image in the target gray range is not in the target duty ratio interval, includes:
And determining a target mapping function, corresponding to the gray average value interval, of which the pixel value before the characterization adjustment is consistent with the pixel value after the adjustment in the preset mapping function set under the condition that the duty ratio of the pixel points of the image distributed in the target gray range is not in the target duty ratio interval and the gray average value of the image is larger than a preset gray average value threshold value.
8. The method according to claim 2, wherein in the preset correspondence, the degree of increase of each mapping function to the same pixel value is inversely related to the gray level of the gray mean interval corresponding to the mapping function.
9. The method according to claim 2, wherein in the preset correspondence, the degree of increase of the same pixel value by each mapping function corresponding to the same gray-scale mean interval is inversely related to the gray scale of the preset gray-scale range corresponding to the mapping function.
10. The method according to claim 2, wherein in the preset correspondence, the degree of increase of the same pixel value by each mapping function corresponding to the same gray scale average value interval and the same preset gray scale range is positively correlated with the size of the duty cycle interval of the pixel point corresponding to the mapping function.
11. An image display device, the device comprising:
the acquisition module is used for acquiring the current ambient light intensity and an image to be displayed;
The first determining module is used for determining the distribution condition of the pixel points according to the pixel values of the pixel points in the image;
the second determining module is used for determining a target mapping function from a preset mapping function set according to the distribution condition of the pixel points under the condition that the ambient light intensity is larger than a preset light intensity threshold value; wherein, each mapping function in the preset mapping function set is used for adjusting pixel values;
the adjusting module is used for adjusting the pixel value of the pixel point in the image according to the target mapping function;
and the display module is used for displaying the image after the pixel values of the pixel points are adjusted.
12. An electronic device, comprising:
a processor; a memory for storing processor-executable instructions;
Wherein the processor is configured to perform the method of any one of claims 1 to 10.
13. A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1 to 10.
CN202211448367.0A 2022-11-18 2022-11-18 Image display method and device, electronic equipment and storage medium Pending CN118071665A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211448367.0A CN118071665A (en) 2022-11-18 2022-11-18 Image display method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211448367.0A CN118071665A (en) 2022-11-18 2022-11-18 Image display method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118071665A true CN118071665A (en) 2024-05-24

Family

ID=91110133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211448367.0A Pending CN118071665A (en) 2022-11-18 2022-11-18 Image display method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118071665A (en)

Similar Documents

Publication Publication Date Title
RU2659484C1 (en) Method and device for display brightness adjusting
RU2704724C1 (en) Method and device for displaying an image of an interface
CN113077738B (en) Ambient light detection method and device and storage medium
WO2017024728A1 (en) Method and device for reducing display brightness
CN113963659A (en) Adjusting method of display equipment and display equipment
CN111462701A (en) Backlight brightness adjusting method and device
CN111625213B (en) Picture display method, device and storage medium
JP2022027436A (en) Image processing method and device, terminal, and storage medium
US10033939B2 (en) Method and apparatus for automatic stage scene detection
CN113674718A (en) Display brightness adjusting method, device and storage medium
US10319342B2 (en) Method and device for adjusting display brightness
CN105472228B (en) Image processing method and device and terminal
CN109102779A (en) backlight adjusting method and device
CN118071665A (en) Image display method and device, electronic equipment and storage medium
CN112188111A (en) Photographing method and device, terminal and storage medium
CN111314550A (en) Display control method and device, mobile terminal and storage medium
CN113470583B (en) Display screen adjusting method and device and storage medium
WO2023240624A1 (en) Brightness adjustment method, apparatus and storage medium
WO2023236148A1 (en) Display control method and apparatus, and display device and storage medium
CN108206012A (en) Gamma correction method and device
EP4304188A1 (en) Photographing method and apparatus, medium and chip
CN115691418A (en) Luminance compensation method, luminance compensation device, and storage medium
CN117524032A (en) Optical parameter detection method, optical parameter detection device, optical parameter brightness adjustment device, electronic equipment and storage medium
CN115760606A (en) Image display method and device, electronic device and storage medium
CN113706410A (en) Image processing method, image processing device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination