METHOD AND DEVICE FOR ADJUSTING IMAGE QUALITY, AND READABLE STORAGE MEDIUM
20220351701 · 2022-11-03
Assignee
Inventors
Cpc classification
G09G2320/0686
PHYSICS
International classification
Abstract
The disclosure provides a method, device, and readable storage medium for adjusting image quality. The display device system selects a focus area of a target image, and outputs a mapping relationship curve of an input luminance value and an output luminance value of the target image. Then, an input luminance value range of pixels in the focus area of the target image is calculated, and upper and lower edge coefficients of the input luminance value range are proportionally adjusted to obtain new upper and lower edge coefficients. The mapping relationship curve is adjusted according to the new upper and lower edge coefficients, thereby adjusting the focus area of the target image.
Claims
1. A method for adjusting image quality, applied in a display device system, comprising following steps: selecting by the display device system a focus area of a target image; outputting a mapping relationship curve of an input luminance value and an output luminance value of the target image; calculating an input luminance value range of pixels in the focus area of the target image and proportionally adjusting upper and lower edge coefficients of the input luminance value range to obtain new upper and lower edge coefficients; and adjusting the mapping relationship curve according to the new upper and lower edge coefficients to adjust the focus area of the target image.
2. The method for adjusting image quality of claim 1, wherein the focus area of the target image selected by the display device system is a central area in an image display of the target image.
3. The method for adjusting image quality of claim 2, wherein when resolution of a current image is 3840×2160, the pixels in the central area of the target image are generally located in pixel ranges 1600<x<2260 and 900>y>1260, where x is the coordinate in the length direction of the image, y is the coordinate in the width direction of the image, and the origin of coordinates of the image display is at the upper left corner.
4. The method for adjusting image quality of claim 2, wherein the focus area of the target image selected by the display device system is an image area of interest.
5. The method for adjusting image quality of claim 4, wherein the image area of interest is obtained through artificial intelligence training.
6. The method for adjusting image quality of claim 4, wherein the image area of interest is an image area that is recognized through big data collection.
7. The method for adjusting image quality of claim 1, wherein the outputting the mapping relationship curve of the input luminance value and the output luminance value of the target image comprises calculating using a linear Bézier curve to initially describe the mapping relationship curve of the input luminance value and the output luminance value.
8. The method for adjusting image quality of claim 7, wherein the calculating the input luminance value range of the pixels in the focus area of the target image and proportionally adjusting the upper and lower edge coefficients of the input luminance value range to obtain the new upper and lower edge coefficients comprises: determining an upper limit value and a lower limit value of a Bézier curve of a ratio of the input luminance value and a maximum input luminance value of the pixels in the focus area of the target image; and proportionally scaling up or down interval upper and lower edge coefficients which are determined according to the upper limit value and the lower limit value of the Bézier curve to obtain the new upper and lower edge coefficients.
9. The method for adjusting image quality of claim 8, wherein the linear Bézier curve is preferably implemented by a fifth-order linear Bézier curve.
10. The method for adjusting image quality of claim 9, wherein the 5th-order linear Bézier curve is described as Lt=Ltmax×ΣC(N,k)×L0{circumflex over ( )}k×(1−L0){circumflex over ( )}(N−k)×pk, wherein C(N,k) indicates permutations of k elements among N (N=5) elements, Ltmax represents a maximum output luminance supported by a current display device, L0 represents a ratio of the input luminance value to the maximum input luminance value, k iterates from 1 to 5, and pk represents a sequence of coefficients, initially, pk=k/5, the input is correlated with the output in a linear relationship, and the luminance ratio L0 is divided into five equal intervals.
11. The method for adjusting image quality of claim 9, wherein the interval upper and lower edge coefficients are scaled up or down proportionally based on an adjustment factor which is selected based on conditions of images.
12. The method for adjusting image quality of claim 11, wherein, by applying the above adjusted upper and lower edge coefficients to the mapping relationship between the input luminance and the output luminance of the focus area of the image expressed by the fifth-order linear Bézier curve, luminance and contrast of the image can be adjusted in real-time.
13. The method for adjusting image quality of claim 8, wherein the focus area of the target image selected by the display device system is an image area of interest the image area that is recognized through the artificial intelligence training or the big data collection is customized by a user according to specific requirements for image recognition.
14. A device for adjusting image quality, comprising: a processor and a memory communicatively connected to the processor, wherein the memory stores a computer program, and the computer program, when being executed by the processor, performs the steps of the method in claim 1, wherein the processor is configured to call the computer program in the memory to perform the steps of the method for adjusting image quality in claim 1.
15. A readable storage medium, wherein the readable storage medium stores a program for adjusting image quality, wherein the program for adjusting image quality, when being executed by a processor, performs the steps of the method for adjusting image quality in claim 1.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0030] Detailed description of the embodiments of the present application is given in the following with accompanying drawings.
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
DETAILED DESCRIPTION OF EMBODIMENTS
[0037] To make the object, technical solution, and advantages of the present disclosure clearer and more comprehensible, the present disclosure is described in further detail hereinafter with reference to the accompanying drawings and by way of example. It should be understood that the specific embodiments described herein are intended only to explain not limit the present disclosure.
[0038] The present disclosure provides an image recognition technology using artificial intelligence to adjust a specific area of an image according to the features recognized by the artificial intelligence, thereby enhancing exquisiteness and sense of organization of a part of the image and improving the image quality. For example, in an application where image quality of movies or TV is enhanced, a certain portion of an image needs to be emphasized, or in the criminal investigation of the police, a portrait of one person needs to be partially highlighted. For these specific application environments requiring image quality enhancement, users may perform a setting operation on some specific images of interest in advance. The setting operation can be achieved through big data or artificial intelligence in the related art. Then, image display of the specific images can be enhanced through the method of the present disclosure during video playback or image browsing, so as to achieve the purpose of intelligently enhancing image quality of a specific area.
[0039]
[0040] Step 100: selecting by a display device system a focus area of an image.
[0041] Specifically, the focus area of the image selected by the display device system is the central area or an image area of interest in image display of the image. The adjustment of the image quality mainly comprises adjusting the luminance and the contrast level. The image area of interest in the technical solution of the present disclosure is an image area that is recognized through artificial intelligence training or big data collection. For example, in a certain image, the central area of the image display generally serves as the focus area of the image. When the resolution of the current image is 3840×2160, the pixels in the corner areas of the selected central area are generally located in pixel ranges 1600<x<2260 and 900<y<1260, where x is the coordinate in the length direction of the image, y is the coordinate in the width direction of the image, and the origin of coordinates of the image display is at the upper left corner. Of course, the central area of the image display here is only an example. Any modification can be appropriately performed in the range according to the resolution of the image display, so that the central area is suitable for images with different resolutions. In addition, the image area of interest can be set by means of artificial intelligence training or collected big data. For example, in the field of the criminal investigation of the police, facial features can be extracted and learned as the basis for subsequent image adjustments. The schemes and methods of artificial intelligence learning belong to state of the art technology, and are not repeated here.
[0042] Step S200: outputting a mapping relationship curve of an input luminance value and an output luminance value of the target image.
[0043] Specifically, the step of outputting the mapping relationship curve of the input luminance value and the output luminance value of the target image is performed by calculating using a linear Bécurve to initially describe the mapping relationship curve of the input luminance value and the output luminance value.
[0044] In the technical solution of the present disclosure, the linear Bézier curve is preferably implemented by a fifth-order linear Bézier curve. Of course, the order of the linear Bézier curve can be selected based on requirements, which can be determined according to different conditions of the image. For example, the 5th-order linear Bézier curve is described as Lt=Ltmax×ΣC(N,k)×L0{circumflex over ( )}k×(1−L0){circumflex over ( )}(N−k)×pk, wherein C(N,k) indicates permutations of k elements among N (N=5) elements, Ltmax represents the maximum output luminance supported by a current display device, L0 represents a ratio of the input luminance value to the maximum input luminance value, k iterates from 1 to 5, and pk represents the sequence of coefficients, initially, pk=k/5. There is a linear relationship between the input and the output, and the luminance ratio L0 is divided into five equal intervals.
[0045] Step S300: calculating the input luminance value range of the pixels in the focus area of the target image and proportionally adjusting the upper and lower edge coefficients of the input luminance value range to obtain new upper and lower edge coefficients.
[0046] Specifically, the step of calculating the input luminance value range of the pixels in the focus area of the target image and proportionally scaling up or down the upper and lower edge coefficients of the input luminance value range to obtain new upper and lower edge coefficients comprise the following steps: [0047] determining an upper limit value and a lower limit value of the Bézier curve of the ratio of the input luminance value and the maximum input luminance value of the pixels in the focus area of the target image, and [0048] proportionally scaling up or down interval upper and lower edge coefficients which are determined according to the upper limit value and the lower limit value to obtain the new upper and lower edge coefficients.
[0049] For example, an input luminance range L1<=L0<=L2 of the focus area of the image is obtained statistically, and then it is determined that L1 and L2 are in the five equal intervals determined in Step S200, wherein it is assumed that L1 and L2 are set as: 1/5<=L1<=2/5, 2/5<=L2<=3/5. The interval upper and lower edge coefficients determined by L1 and L2 are scaled up or down proportionally according to a scale (referred to as adjustment factor) to obtain new upper and lower edge coefficients. In this example, L1 corresponds to a lower limit coefficient P1, and L2 corresponds to an upper limit coefficient P3. It is assumed that the adjustment factor is set as 1.2. Scaling down P1 by the factor of 1.2 yields P1=0.16, and scaling up P3 by the factor of 1.2 yields P3=0.72. Accordingly, the corresponding new upper and lower edge coefficients can be obtained according to the adjustment factor.
[0050] The interval upper and lower edge coefficients are scaled up or down based on the coefficient adjustment factor that may be selected based on conditions of the image.
[0051] Step S400: adjusting the mapping relationship curve according to the new upper and lower edge coefficients to adjust the focus area of the target image.
[0052] Specifically, the luminance and contrast of the image can be adjusted in real-time by applying the above adjusted upper and lower edge coefficients to the mapping relationship between the input luminance and the output luminance of the focus area of the image expressed by the fifth-order linear Bézier curve. Smooth and continuous luminance changes in the adjusted image and coherence of image display before and after the image adjustment can be obtained without inconsistent appearance, and the image quality becomes brighter and more colorful, which greatly improves the contrast level of the specific areas of the image.
[0053] The present disclosure also provides a device for adjusting image quality.
[0058] Other specific steps performed by the program 22 for adjusting image quality are the same as the steps in the preferred embodiment of the foregoing method and can be referred t to the steps in the preferred embodiment of the foregoing method, which is not repeated here. The effect achieved by adjusting image quality through the device can be referred to the preferred embodiment of the above method, and is not repeated here.
[0059] The processor 20 may be implemented by a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or another programmable logic device, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor or the like.
[0060] The memory 21 may be an internal storage unit of the device for computing a video code rate, for example, a hard disk or a memory of the device for computing a video code rate. The memory 21 may also be an external storage device of the device for computing a video code rate, for example, a plug-in hard disk equipped on the device for computing a video code rate, a smart memory card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 21 may also include both an internal storage unit and an external storage device of the device for computing a video code rate. The memory 21 is used to store the computer program and other programs and data required by the device for computing a video code rate. The memory 21 may be used further to temporarily store data that has been output or will be output.
[0061] The present disclosure also provides a readable storage medium that stores a program for adjusting image quality. When the program for adjusting image quality is executed by a processor, the program for adjusting image quality realizes the steps of the aforementioned method for adjusting image quality. The specific steps are the same as the steps of the aforementioned method for adjusting image quality, and the resulted program for adjusting image quality is also the same as that described in the preferred embodiment of the aforementioned method. The related description will not be repeated here.
[0062] It should be understood that the above descriptions are related to only preferred embodiments of the present disclosure and not intended to limit the technical solutions of the present disclosure. For those of ordinary skill in the art, addition/reduction, replacement, modification, or improvement is allowed for the technical solutions within the spirit and principle of the present disclosure. The technical solutions after the addition/reduction, replacement, modification, or improvement should be covered by the protected scope of the appended claims of the present disclosure.