Image quality optimization method, intelligent terminal and storage medium

By optimizing the sharpness and color of the distant view area of ​​the image, the problem of insufficient image brightness adjustment in the existing technology is solved, the sharpness and color of the image are improved, and the clarity and color performance of the image are significantly improved.

CN113965663BActive Publication Date: 2024-09-20SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010705121.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-21
Publication Date
2024-09-20
Estimated Expiration
2040-07-21

AI Technical Summary

Technical Problem

In the existing technology, image quality optimization mainly focuses on brightness adjustment, which is difficult to improve the display effect of complex image content, especially the contrast and color performance of the foreground and distant view areas are not obvious enough.

Method used

By obtaining the image to be optimized, the sharpness parameters of the distant view area are determined for sharpness optimization, and the color adjustment is performed according to the color parameters of the sharpness optimized image to achieve optimization of both the sharpness and color of the image, especially for the distant view area. Sharpness and color processing.

Benefits of technology

The clarity and color vividness of the image are improved, making the contrast between the foreground and distant view areas more obvious, significantly improving the image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113965663B
    Figure CN113965663B
Patent Text Reader

Abstract

The present invention discloses an image quality optimization method, an intelligent terminal, and a storage medium, wherein the method comprises: obtaining an image to be optimized, determining a sharpness parameter of a distant view area in the image to be optimized; optimizing the sharpness of the distant view area according to the sharpness parameter to obtain a sharpness optimized image; determining a color parameter of the sharpness optimized image, and optimizing the color of the sharpness optimized image according to the color parameter to obtain a quality optimized image; wherein the color parameter is the pixel mean of the pixel points corresponding to each color channel in the sharpness optimized image. The present invention can optimize the image at two levels, namely, sharpness and color, and only optimizes the sharpness of the distant view area, so that the quality optimized image finally obtained is clearer and has more vivid colors, thereby effectively improving the image quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an image quality optimization method, an intelligent terminal and a storage medium. Background Art

[0002] With the development of Internet technology and communication technology, smart terminals have played an increasingly important role in modern people's lives, meeting the various needs of users.

[0003] Smart terminals are mainly used for display, whether playing videos, displaying pictures or texts. If the displayed image quality is not good, it will inevitably affect the user's use. In the prior art, the optimization of image quality is basically to optimize the brightness of the image, so that the image is displayed more clearly. However, it is difficult to meet user needs by only optimizing the brightness of the image, especially when the content in the image is complex. Only increasing the brightness will not improve the display effect.

[0004] Therefore, the existing technology still needs to be improved and developed. Summary of the invention

[0005] The technical problem to be solved by the present invention is that, in view of the above-mentioned defects of the prior art, an image quality optimization method, an intelligent terminal and a storage medium are provided, aiming to solve the problem that the optimization of image quality in the prior art basically only optimizes the brightness of the image, which is difficult to meet the user's usage needs.

[0006] The technical solution adopted by the present invention to solve the problem is as follows:

[0007] In a first aspect, an embodiment of the present invention provides a method for optimizing image quality, wherein the method comprises:

[0008] Acquire an image to be optimized, and determine a sharpness parameter of a distant view area in the image to be optimized;

[0009] According to the sharpness parameter, the sharpness of the distant view area is optimized to obtain a sharpness optimized image;

[0010] Determine color parameters of the sharpness-optimized image, and perform color optimization on the sharpness-optimized image according to the color parameters to obtain a quality-optimized image; wherein the color parameters are pixel means of pixel points corresponding to each color channel in the sharpness-optimized image.

[0011] In one implementation, obtaining the image to be optimized includes:

[0012] Obtaining a playback instruction, and executing a playback operation corresponding to the playback instruction in response to the playback instruction;

[0013] After the image signal is detected, the image to be played is acquired, and the image to be played is used as the image to be optimized.

[0014] In one implementation, the step of obtaining the distant view area in the image to be optimized includes:

[0015] According to the image to be optimized, determining a foreground area in the image;

[0016] According to the foreground area, a distant view area in the image to be optimized is determined, where the distant view area is a remaining area in the image to be optimized after removing the foreground area.

[0017] In one implementation, determining the foreground area in the image according to the image to be optimized includes:

[0018] Obtaining depth of field information of pixel points in the image to be optimized;

[0019] Comparing the depth of field information with a preset depth of field threshold;

[0020] If the depth of field information is less than the depth of field threshold, the area composed of the pixels corresponding to the depth of field information is used as the foreground area.

[0021] In one implementation, optimizing the sharpness of the distant view area according to the sharpness parameter includes:

[0022] According to the distant view area, obtaining a preset target sharpness parameter corresponding to the distant view area;

[0023] According to the target sharpness parameter, the sharpness parameter of the distant view area is controlled to be optimized with a first preset value as a step size, so that the sharpness parameter reaches the target sharpness parameter.

[0024] In one implementation, the obtaining of color parameters of the sharpness optimized image includes:

[0025] Obtaining pixel values ​​of pixel points corresponding to each color channel in the sharpness optimized image, and generating a color histogram according to the pixel values;

[0026] According to the color histogram, the pixel mean of the pixel points corresponding to each color channel is calculated, and the pixel mean of the pixel points corresponding to each color channel is used as the color parameter.

[0027] In one implementation, the step of performing color optimization on the sharpness-optimized image according to the color parameter includes:

[0028] According to the pixel mean, the color corresponding to the pixel mean that meets a preset condition among the pixel means is used as the color to be optimized, and the preset condition is that the pixel mean satisfies a pixel threshold range;

[0029] According to the color to be optimized, the RGB value of the color to be optimized is obtained, and the RGB value of the color to be optimized is adjusted.

[0030] In one implementation, the obtaining the RGB value of the color to be optimized according to the color to be optimized, and adjusting the RGB value of the color to be optimized includes:

[0031] According to the color to be optimized, obtaining a preset target RGB value corresponding to the color to be optimized;

[0032] According to the target RGB value, the RGB value corresponding to the color to be optimized is controlled to increase in steps of a second preset value until the RGB value increases to the target RGB value.

[0033] In a second aspect, an embodiment of the present invention further provides an image quality optimization device, wherein the device comprises:

[0034] An image acquisition unit, used to acquire the image to be optimized and determine the sharpness parameter of the distant view area in the image to be optimized;

[0035] A sharpness optimization unit, configured to optimize the sharpness of the distant view area according to the sharpness parameter to obtain a sharpness optimized image;

[0036] A color optimization unit is used to determine the color parameters of the sharpness optimized image and perform color optimization on the sharpness optimized image according to the color parameters to obtain a quality optimized image; wherein the color parameters are the pixel mean values ​​of the pixel points corresponding to each color channel in the sharpness optimized image.

[0037] In a third aspect, the present invention also provides an intelligent terminal comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, including a method for executing image quality optimization as described in any one of the above.

[0038] In a fourth aspect, an embodiment of the present invention further provides a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute an image quality optimization method as described in any one of the above.

[0039] Beneficial effects of the present invention: The embodiment of the present invention first obtains the image to be optimized, and then, based on the image to be optimized, determines the distant view area in the image to be optimized. Next, the sharpness parameters of the distant view area are obtained, and the sharpness parameters are optimized to obtain a sharpness-optimized image. Finally, the color parameters of the sharpness-optimized image are obtained. Since the color parameters reflect the pixel mean of the pixel points corresponding to each color channel in the sharpness-optimized image, the sharpness-optimized image is color-optimized according to the color parameters, thereby obtaining a quality-optimized image. It can be seen that in this embodiment, the image can be optimized at two levels, namely, sharpness and color, and only the sharpness of the distant view area is optimized, so that the foreground area and the distant view area in the final quality-optimized image have a more obvious contrast, and the image is clearer and the color is more vivid, thereby effectively improving the image quality. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0041] Figure 1 It is a flowchart of an image quality optimization method provided by an embodiment of the present invention.

[0042] Figure 2 It is a schematic diagram of a process of obtaining a distant view area in an image to be optimized in the image quality optimization method provided in an embodiment of the present invention.

[0043] Figure 3 It is a schematic diagram of the process of sharpness optimization in the image quality optimization method provided in an embodiment of the present invention.

[0044] Figure 4 It is a flowchart of color optimization in the image quality optimization method provided by an embodiment of the present invention.

[0045] Figure 5 It is a principle block diagram of an image quality optimization device provided by an embodiment of the present invention.

[0046] Figure 6 It is a block diagram of the internal structure principle of the intelligent terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0048] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0049] In the prior art, the optimization of image quality is basically to optimize the brightness of the image, so that the image is displayed more clearly. However, it is difficult to meet user needs by only optimizing the brightness of the image, especially when the content of the image is complex (for example, there are many people and many landscapes in an image). Simply increasing the brightness of the image will not improve the display effect.

[0050] In order to solve the problems of the prior art, this embodiment provides an image quality optimization method, through which the image can be optimized at two levels, namely, sharpness and color, and only the sharpness of the distant view area is optimized, so that the contrast between the foreground area and the distant view area in the final quality-optimized image is more obvious, and the image is clearer and the color is more vivid, which effectively improves the image quality. In the specific implementation, the image to be optimized is first obtained, and then, based on the image to be optimized, the distant view area in the image to be optimized is determined. Next, the sharpness parameters of the distant view area are obtained, and the sharpness parameters are optimized to obtain a sharpness-optimized image. Finally, the color parameters of the sharpness-optimized image are obtained. Since the color parameters reflect the pixel mean of the pixel points corresponding to each color channel in the sharpness-optimized image, the color of the sharpness-optimized image is optimized according to the color parameters, so as to obtain a quality-optimized image, which achieves optimization at two levels, namely, sharpness and color, and has higher picture quality.

[0051] For example, an image to be optimized is obtained, which is a landscape photo of a person with a snow-capped mountain as the background. Then, a distant view area is obtained from the image to be optimized, which is the snow-capped mountain background. Then, the sharpness parameter of the distant view area (i.e., the snow-capped mountain background) is obtained, which is the sharpness value of the snow-capped mountain background. Then, the sharpness value of the snow-capped mountain background is optimized to obtain a sharpness-optimized image. Due to the sharpness optimization, the edge contrast between the person and the snow-capped mountain background is higher in the sharpness-optimized image, that is, the sharpness-optimized image is a clearer image than the image to be optimized. Next, the color parameters of the sharpness-optimized image are obtained. Since the color parameters reflect the pixel mean value of the pixel points corresponding to each color channel in the sharpness-optimized image (for example, the color parameters include the pixel mean value of the pixel points corresponding to the color channel of the white area of ​​the snow-capped mountain), the sharpness-optimized image can be color-optimized according to the color parameters to obtain a quality-optimized image with brighter colors. In this example, since only the sharpness optimization and color adjustment are performed on the snow-capped mountain background (i.e., the distant view area), the contrast between the snow-capped mountain and the character in the obtained quality-optimized image will be more obvious, and the color of the snow-capped mountain and the character will be more realistic, thereby improving the image quality of the image to be optimized.

[0052] Exemplary Methods

[0053] This embodiment provides an image quality optimization method, which can be applied to smart terminals. Figure 1 As shown in , the method includes:

[0054] Step S100: acquiring an image to be optimized, and determining a sharpness parameter of a distant view area in the image to be optimized.

[0055] When optimizing the image quality, its essence is to make the image look clearer, the objects in the foreground and background are clearly layered, and the color restoration is high. Therefore, after obtaining the image to be optimized, the distant view area can be obtained according to the image to be optimized, so as to optimize the distant view area, thereby achieving a clear layering of the foreground area and the distant view area in the image to be optimized, and the contrast is more obvious. In this embodiment, the foreground area is the area composed of pixel points whose depth of field information is less than a preset depth of field threshold in the image to be optimized. The depth of field threshold is used to measure whether the area composed of pixel points in the image to be optimized is a foreground area or a distant view area. If the depth of field information is less than the depth of field threshold, it means that the area composed of pixel points corresponding to the depth of field information less than the depth of field threshold is closer to the camera lens, so the area composed of pixel points corresponding to the depth of field information less than the depth of field threshold is the foreground area in the image to be optimized. For example, if the image to be optimized is a portrait landscape photo, which includes a portrait area and a snow scene area behind the portrait area, in this portrait landscape photo, the depth of field information of the pixel points in the portrait area is less than the depth of field threshold (that is, the portrait area is closer to the camera than the snow scene area), so the portrait area is the foreground area.

[0056] In this embodiment, the image to be optimized is the image to be played by the smart terminal. After the sharpness optimization and color optimization, the image with optimized image quality is the image to be actually played by the smart terminal. Therefore, in the specific implementation, this embodiment needs to detect in advance whether the smart terminal has a signal input, such as whether an external playback device (such as a network box) is connected, and then detect whether a playback instruction is received. When the playback instruction is received, the corresponding playback operation is performed according to the playback instruction (such as playing a TV series according to the playback execution). When the image signal is detected, the image to be played is obtained, and the image to be played is the image to be optimized. After obtaining the image to be optimized, the distant view area can be obtained from the image to be optimized.

[0057] In one implementation, the present embodiment achieves acquisition of the distant view area by determining the foreground area in the image to be optimized. Figure 2 As shown in , the specific steps include:

[0058] Step S101, determining a foreground area in the image according to the image to be optimized;

[0059] Step S102: determining a distant view area in the image to be optimized according to the foreground area, wherein the distant view area is a remaining area in the image to be optimized after removing the foreground area.

[0060] Since there are many contents in the image to be optimized, for example, the image to be optimized in the above example is a landscape photo of a person, and the background is a snow-capped mountain, that is, the image to be optimized includes a person and a snow scene, and the person belongs to the foreground area, and the snow scene belongs to the distant view area (that is, the part of the image to be optimized except the person), so in this embodiment, the person is identified, that is, the foreground area in the image to be optimized is determined, and then the distant view area in the image to be optimized is determined. Since in this embodiment, the sharpness optimization and color optimization are performed on the distant view area in the image to be optimized, it is necessary to first determine the distant view area in the image to be optimized. In a specific embodiment, in this embodiment, the foreground area in the image to be optimized is first determined according to the image to be optimized, and then, the distant view area in the image to be optimized is obtained according to the determined foreground area, and the distant view area is the area left after the foreground area is removed from the image to be optimized. In an implementation method, in this embodiment, the foreground area in the image to be optimized is determined by obtaining the depth of field information of the pixel points in the image to be optimized. In a clear image captured by a camera lens or other imager, the pixel points of the object can be guaranteed to be clear within a distance range in front and behind. This distance range is the depth of field (DOF) information. The shooting distance is proportional to the depth of field. That is, the closer the distance between the object and the camera is, the shallower the depth of field is. Therefore, the depth of field information corresponding to the pixel points of each object in the captured image is different. In specific applications, when the camera lens focuses on a certain object, that is, the focus is focused on a certain point of the captured scene, the image captured by the object as the focus point and other objects within a certain distance range before and after the object can be relatively clear. For example, when taking a landscape photo of a person, the background is a snow scene. When shooting, the person is focused as the focus. In the captured landscape photo of the person, the person and other scenes within a certain distance range before and after the person (such as the snow scene) are also relatively clear. However, since the distances of the person and the snow scene relative to the camera are different, the depth of field information of the pixel points in the person landscape photo is also different. When the depth of field information of a certain pixel point meets the preset depth of field threshold, it can be determined whether the area where the pixel point is located is the foreground area.

[0061] Specifically, the present embodiment first obtains the depth of field information of the pixel points in the image to be optimized, and then compares the depth of field information with a preset depth of field threshold. The depth of field threshold is used to measure whether the area composed of the pixel points in the image to be optimized is a foreground area or a distant view area. If the depth of field information is less than the depth of field threshold, it means that the object composed of the pixel points corresponding to these depth of field information (that is, in the image to be optimized, the area composed of the pixel points corresponding to these depth of field information) is closer to the camera, so the area composed of the pixel points corresponding to these depth of field information is the foreground area in the image to be optimized. When the foreground area is determined, the distant view area in the image to be optimized is the area remaining after removing the foreground area from the image to be optimized. Therefore, the present embodiment can analyze the depth of field information of the pixel points in the image to be optimized based on the characteristics of the depth of field, so as to determine the foreground area in the image to be optimized.

[0062] For example, referring to the figure landscape photo in the above example (i.e., the image to be optimized), there are figures and snow-capped mountains in the background in the figure landscape photo. In this example, the depth of field information of all pixels in the figure landscape photo can be first obtained, based on the characteristic that the closer the subject is to the camera, the smaller the depth of field value. The obtained depth of field information is compared with the preset depth of field threshold to determine which areas are the foreground area in the figure landscape photo. For example, when the depth of field values ​​of the pixels in the figure area of ​​the figure landscape photo are in the range of 110mm-128mm, the depth of field values ​​of the pixels in the snow-capped mountain area are in the range of 290mm-314mm, and the preset depth of field threshold is 150mm, it can be obviously concluded that the depth of field values ​​of the pixels in the figure area are less than the depth of field threshold. That is, the figure area is closer to the camera, so the figure area is the foreground area in the figure landscape photo, and other areas except the figure area (i.e., the snow-capped mountain area) are the distant view areas in the figure landscape photo.

[0063] After obtaining the distant view area, it is necessary to optimize the sharpness of the distant view area. Figure 1 In step S200, according to the sharpness parameter, the sharpness of the distant view area is optimized to obtain a sharpness optimized image.

[0064] In this embodiment, it is necessary to make the layers of objects in the foreground area and the background area of ​​the image to be optimized more distinct. Generally speaking, the foreground area (such as a person) in the image to be optimized is closer to the shooting device than the background area (such as the snow-capped mountain background), so the contour edges of objects in the foreground area are generally clearer. Therefore, in this embodiment, only the sharpness of the background area needs to be optimized, so that the contours of objects in the foreground area and the background area can be made clearer, and the layers between the background area and the foreground area can be made clearer.

[0065] In one embodiment, Figure 3 As shown in , in this embodiment, the sharpness optimization for the distant view area includes the following steps:

[0066] Step S201: acquiring a preset target sharpness parameter corresponding to the distant view area according to the distant view area;

[0067] Step S202: According to the target sharpness parameter, the sharpness parameter of the distant view area is controlled to be optimized with a first preset value as a step size, so that the sharpness parameter reaches the target sharpness parameter.

[0068] In this embodiment, after obtaining the distant view area in the image to be optimized, the sharpness parameter of the distant view area, that is, the sharpness value, is obtained. The sharpness parameter can be directly obtained through image processing software (such as Photoshop software). After obtaining the sharpness parameter, a preset target sharpness parameter is obtained, and the target sharpness parameter is a target sharpness value, which can achieve the optimal effect of the sense of hierarchy between the distant view area and the near view area in the image to be optimized. Of course, the target sharpness parameter in this embodiment can be set independently, and this embodiment is not limited to this. After obtaining the target sharpness parameter, the sharpness parameter of the distant view area can be controlled to be optimized with a first preset value as a step size according to the target sharpness parameter, so that the sharpness parameter reaches the target sharpness parameter. In one embodiment, the first preset value can be set to 1 in this embodiment, that is, when the sharpness parameter is adjusted, it is adjusted with a step size of 1, and the sharpness parameter is gradually adjusted (including gradually increasing or gradually decreasing) so that the sharpness parameter is close to the target sharpness parameter and reaches the target sharpness parameter. In this embodiment, by setting the first preset value to 1, the sharpness parameter is adjusted in steps of 1 each time, which is not so abrupt, thereby achieving fine control of the sharpness parameter.

[0069] In other implementations, in this embodiment, when adjusting the sharpness parameter, it includes increasing the sharpness parameter, and it may also include decreasing the sharpness parameter, but the ultimate goal is to make the sharpness parameter equal to the target sharpness parameter, so that the sharpness parameter can be optimized. When the sharpness parameter optimization is completed, a sharpness optimized image can be generated. The sharpness optimized image is an image obtained by optimizing the sharpness of the distant view image in the image to be optimized. Compared with the image to be optimized, the layers between the near view area and the distant view area are more distinct.

[0070] After obtaining the sharpness optimized image, this embodiment continues to perform color optimization on the sharpness optimized image, that is, performing Figure 1 Step S300, determining color parameters of the sharpness-optimized image, and performing color optimization on the sharpness-optimized image according to the color parameters to obtain a quality-optimized image; wherein the color parameters are pixel means of pixels corresponding to each color channel in the sharpness-optimized image.

[0071] In this embodiment, in order to achieve color optimization, it is necessary to obtain the color parameters in the sharpness optimized image, and the color parameters refer to the pixel mean of the pixels in each color channel in the sharpness optimized image. This embodiment is based on the color parameters to optimize the color of the sharpness optimized image. Therefore, this embodiment first needs to determine the pixel mean of the pixels of each color channel in the sharpness optimized image. In specific implementation, this embodiment first obtains the pixel values ​​of the pixels of each color channel (specifically 7 colors, namely red, orange, green, yellow, cyan, blue and purple) in the sharpness optimized image, and then generates a color histogram based on the pixel values, which can reflect the pixel values ​​of the pixels in each color channel. The method of generating a color histogram in this embodiment can be obtained by using image processing software. Then, according to the color histogram, the pixel mean of the pixels of each color channel can be calculated, and the pixel mean of each color channel is the color parameter. In specific implementation, when obtaining the pixel values ​​of the pixels in each color channel, this embodiment can set an array for each color channel, and the data in the array represents the pixel values ​​of the pixels of a certain color channel. For example, red = {a, b, c}, where a, b, c represent the pixel values ​​of the three red channel pixels obtained from the sharpness optimized image, and the three red pixel values ​​can be pixel values ​​collected from different positions in the sharpness optimized image, and then the pixel mean is calculated based on the pixel values ​​in the array, and the color histogram is generated. After the pixel mean (i.e., color parameter) of the pixel corresponding to each color channel is obtained, the sharpness optimized image needs to be color optimized according to the color parameter.

[0072] Specifically, Figure 4 As shown in , the step S300 includes the following steps:

[0073] Step S301: according to the pixel mean, taking the color corresponding to the pixel mean that meets a preset condition among the pixel mean as the color to be optimized, wherein the preset condition is that the pixel mean meets a pixel threshold range;

[0074] Step S302: According to the color to be optimized, obtain the RGB value of the color to be optimized, and adjust the RGB value of the color to be optimized.

[0075] During specific implementation, since the sharpness optimized image needs to be color optimized in this embodiment, it is necessary to first determine which color needs to be optimized, that is, determine the color to be optimized. In one implementation, after obtaining the pixel mean, this embodiment analyzes the pixel mean, and uses the color corresponding to the pixel mean that meets the preset condition in the pixel mean as the color to be optimized, and the preset condition is that the pixel mean satisfies the pixel threshold range. In other words, this embodiment compares the obtained pixel mean with the pixel threshold range. If the pixel mean satisfies the pixel threshold range, the color of the pixel points corresponding to these pixel means is used as the color to be optimized, so as to optimize the color to be optimized.

[0076] In a specific implementation, the present embodiment can first arrange the obtained pixel means in descending order (i.e., arrange in order from large to small pixel means) or in ascending order (i.e., arrange in order from small to large pixel means). By arranging the pixel means, it is possible to more quickly determine which pixel means satisfy the pixel threshold range, thereby quickly determining which colors are to be optimized. It is worth noting that the preset condition in the present embodiment is that the pixel mean satisfies the pixel threshold range, which includes at least two methods, one method is that the pixel mean is greater than the preset pixel threshold range, and the other method is that the pixel mean is less than the pixel threshold range. The present embodiment measures which colors need to be optimized by setting the pixel threshold range. When the pixel mean is greater than the pixel threshold range, it means that the colors of the pixels corresponding to these pixel means are too bright and the colors are too saturated, and the colors of the pixels corresponding to these pixel means need to be adjusted. When the pixel mean is greater than the pixel threshold range, it means that the colors of the pixels corresponding to these pixel means are not bright enough and not real enough, and the colors of the pixels corresponding to these pixel means need to be adjusted. For example, this embodiment selects 3 pixel means from the arranged pixel means, and these 3 pixel means are smaller than the pixel threshold range, and then obtains 3 colors corresponding to these 3 pixel means respectively. These 3 colors are the colors to be optimized. When performing color adjustment, only the colors to be optimized need to be optimized, and other colors are not optimized.

[0077] When the color to be optimized is determined, it is necessary to optimize the color to be optimized. In this embodiment, the RGB value (color gamut value) of the color to be optimized is first obtained, and the RGB value of the color to be optimized is adjusted to achieve color optimization of the sharpness optimized image. Specifically, the present embodiment can obtain a preset target RGB value. The target RGB value is preset, and the target RGB value can achieve a more realistic effect on the color in the sharpness optimized image. The target RGB value in this embodiment can be set independently, and this embodiment is not limited to this. After obtaining the target RGB value, the RGB value of the color to be optimized can be controlled to be optimized with a second preset value as a step size according to the target RGB value, so that the RGB value of the color to be optimized reaches the target target RGB value. In one embodiment, the present embodiment can set the second preset value to 1, that is, when the RGB value of the color to be optimized is adjusted, it is adjusted with 1 as a step size (including gradual increase or gradual decrease), gradually making the RGB value of the color to be optimized close to the target RGB value and reach the target RGB value. In this embodiment, the second preset value is set to 1, so that each adjustment of the RGB value of the color to be optimized is performed in steps of 1, which is not so abrupt, thereby achieving fine control of color optimization.

[0078] In other embodiments, in this embodiment, when adjusting the RGB value of the color to be optimized, it includes increasing the RGB value of the color to be optimized, and it may also include decreasing the RGB value of the color to be optimized. When the pixel mean is less than the pixel threshold range, the color corresponding to the pixel points whose pixel mean is less than the pixel threshold range (i.e., the color to be optimized) and the RGB value of the color corresponding to the pixel points whose pixel mean is less than the pixel threshold range are obtained, and the RGB value of the color corresponding to the pixel points whose pixel mean is less than the pixel threshold range is increased. For example, if the color corresponding to the pixel points whose pixel mean is less than the pixel threshold range is red, that is, red is the color to be optimized, so the RGB value of red is increased until the RGB value of red reaches the target RGB value. When increasing, the RGB value of red can be increased in steps of 1, that is, each adjustment is to add 1 to the RGB value of red until the RGB value of red reaches the target RGB value. When the pixel mean is greater than the pixel threshold range, the color corresponding to the pixel points whose pixel mean is greater than the pixel threshold range (i.e., the color to be optimized) and the RGB value of the color corresponding to the pixel points whose pixel mean is greater than the pixel threshold range are obtained, and the RGB value of the color corresponding to the pixel points whose pixel mean is greater than the pixel threshold range is decreased. For example, if the color corresponding to the pixel points whose pixel mean is greater than the pixel threshold range is blue, that is, blue is the color to be optimized, so the RGB value of blue is decreased until the RGB value of blue reaches the target RGB value. When decreasing, the RGB value of blue can be decreased in steps of 1, that is, each adjustment is to reduce the RGB value of blue by 1 until the RGB value of blue reaches the target RGB value. The purpose of adjusting the RGB value of the color to be optimized in this embodiment is to make the RGB value of the color to be optimized equal to the target RGB value, so that color optimization can be achieved. When the color optimization is completed, a quality-optimized image can be generated. The quality-optimized image is optimized in two aspects, namely, sharpness and color, relative to the image to be optimized, and the picture quality is better.

[0079] It can be seen that the embodiment of the present invention first obtains the image to be optimized, and then, based on the image to be optimized, determines the distant view area in the image to be optimized. Next, the sharpness parameters of the distant view area are obtained, and the sharpness parameters are optimized to obtain a sharpness-optimized image. Finally, the color parameters of the sharpness-optimized image are obtained. Since the color parameters reflect the pixel mean of the pixel points corresponding to each color channel in the sharpness-optimized image, the sharpness-optimized image is color-optimized according to the color parameters to obtain a quality-optimized image. It can be seen that in this embodiment, the image can be optimized at two levels, namely, sharpness and color, and only the sharpness of the distant view area is optimized, so that the foreground area and the distant view area in the final quality-optimized image have a more obvious contrast, and the image is clearer and the color is more vivid, which effectively improves the image quality.

[0080] Exemplary Devices

[0081] like Figure 5 As shown in , an embodiment of the present invention provides an image quality optimization device, which includes: an image acquisition unit 510, a sharpness optimization unit 520, and a color optimization unit 530. Specifically, the image acquisition unit 510 is used to acquire the image to be optimized and determine the sharpness parameters of the distant view area in the image to be optimized. The sharpness optimization unit 520 is used to optimize the sharpness of the distant view area according to the sharpness parameters to obtain a sharpness-optimized image. The color optimization unit 530 is used to determine the color parameters of the sharpness-optimized image, and perform color optimization on the sharpness-optimized image according to the color parameters to obtain a quality-optimized image; wherein the color parameters are the pixel mean values ​​of the pixel points corresponding to each color channel in the sharpness-optimized image.

[0082] Based on the above embodiments, the present invention further provides an intelligent terminal, whose principle block diagram can be shown as follows: Figure 6 As shown. The intelligent terminal includes a processor, a memory, a network interface, a display screen, and a temperature sensor connected through a system bus. Among them, the processor of the intelligent terminal is used to provide computing and control capabilities. The memory of the intelligent terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the intelligent terminal is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an image quality optimization method is implemented. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen, and the temperature sensor of the intelligent terminal is pre-set inside the intelligent terminal to detect the operating temperature of the internal device.

[0083] Those skilled in the art will understand that Figure 6 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the smart terminal to which the scheme of the present invention is applied. The specific smart terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0084] In one embodiment, a smart terminal is provided, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, and the one or more programs include instructions for performing the following operations:

[0085] Acquire an image to be optimized, and determine a sharpness parameter of a distant view area in the image to be optimized;

[0086] According to the sharpness parameter, the sharpness of the distant view area is optimized to obtain a sharpness optimized image;

[0087] Determine color parameters of the sharpness-optimized image, and perform color optimization on the sharpness-optimized image according to the color parameters to obtain a quality-optimized image; wherein the color parameters are pixel means of pixel points corresponding to each color channel in the sharpness-optimized image.

[0088] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0089] In summary, the present invention discloses an image quality optimization method, device, intelligent terminal, and storage medium, the method comprising: obtaining an image to be optimized, determining the sharpness parameters of a distant view area in the image to be optimized; optimizing the sharpness of the distant view area according to the sharpness parameters to obtain a sharpness-optimized image; determining the color parameters of the sharpness-optimized image, and optimizing the color of the sharpness-optimized image according to the color parameters to obtain a quality-optimized image; wherein the color parameters are the pixel mean of the pixel points corresponding to each color channel in the sharpness-optimized image. The present invention can optimize the image at two levels, namely, sharpness and color, and only optimizes the sharpness of the distant view area, so that the final quality-optimized image is clearer and the color is more vivid, thereby effectively improving the image quality.

[0090] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A method for optimizing image quality, It is characterized in that The method comprises: Acquire an image to be optimized, and determine a sharpness parameter of a distant view area in the image to be optimized; According to the sharpness parameter, the sharpness of the distant view area is optimized to obtain a sharpness optimized image; Determining color parameters of the sharpness-optimized image, and performing color optimization on the sharpness-optimized image according to the color parameters to obtain a quality-optimized image; wherein the color parameters are pixel means of pixels corresponding to each color channel in the sharpness-optimized image; The step of optimizing the sharpness of the distant view area according to the sharpness parameter comprises: According to the distant view area, a preset target sharpness parameter corresponding to the distant view area is obtained; according to the target sharpness parameter, the sharpness parameter of the distant view area is controlled to be optimized with a first preset value as a step size so that the sharpness parameter reaches the target sharpness parameter; the target sharpness parameter is a target sharpness value; Obtaining color parameters of the sharpness optimized image, including: Obtain pixel values ​​of pixels corresponding to each color channel in the sharpness optimized image, and generate a color histogram according to the pixel values; calculate the pixel mean of pixels corresponding to each color channel according to the color histogram, and use the pixel mean of pixels corresponding to each color channel as the color parameter, wherein the color channel refers to seven colors: red, orange, yellow, green, cyan, blue, and purple; and define each color channel as an array; The step of performing color optimization on the sharpness optimized image according to the color parameter comprises: According to the pixel mean, the color corresponding to the pixel mean that meets the preset condition in the pixel mean is used as the color to be optimized, and the preset condition is that the pixel mean satisfies the pixel threshold range; according to the color to be optimized, the RGB value of the color to be optimized is obtained, and the RGB value of the color to be optimized is adjusted.

2. The image quality optimization method according to claim 1, It is characterized in that The obtaining of the image to be optimized comprises: Obtaining a playback instruction, and executing a playback operation corresponding to the playback instruction in response to the playback instruction; After the image signal is detected, the image to be played is acquired, and the image to be played is used as the image to be optimized.

3. The image quality optimization method according to claim 1 or 2, It is characterized in that Acquiring a distant view area in the image to be optimized includes: According to the image to be optimized, determining a foreground area in the image; According to the foreground area, a distant view area in the image to be optimized is determined, where the distant view area is a remaining area in the image to be optimized after the foreground area is removed.

4. The image quality optimization method according to claim 3, It is characterized in that The step of determining the foreground area in the image according to the image to be optimized includes: Obtaining depth of field information of pixel points in the image to be optimized; Comparing the depth of field information with a preset depth of field threshold; If the depth of field information is less than the depth of field threshold, the area composed of pixels corresponding to the depth of field information is used as the foreground area.

5. The image quality optimization method according to claim 1, It is characterized in that The step of acquiring the RGB value of the color to be optimized according to the color to be optimized and adjusting the RGB value of the color to be optimized includes: According to the color to be optimized, obtaining a preset target RGB value corresponding to the color to be optimized; According to the target RGB value, the RGB value corresponding to the color to be optimized is controlled to increase in steps of a second preset value until the RGB value increases to the target RGB value.

6. A smart terminal, It is characterized in that The device comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, and the one or more programs include being used to execute the method according to any one of claims 1 to 5.

7. A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as claimed in any one of claims 1 to 5.