Image display method, device, electronic device and computer readable storage medium

By interpolation processing of pixel grayscale values ​​in the grayscale transition area in traditional video sources, the transition grayscale is increased, and the problem of poor color transition effect of traditional video sources is solved, improving the clarity of image display and user viewing experience .

CN113538271BActive Publication Date: 2025-02-14GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110786222.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-12
Publication Date
2025-02-14
Estimated Expiration
2041-07-12

AI Technical Summary

Technical Problem

The image color transition effect of traditional video sources is poor, resulting in blurred image display.

Method used

By acquiring the image to be processed, the grayscale transition area is determined, and the pixel grayscale values ​​in the area are interpolated to increase the transition grayscale, thereby improving the transition effect of image color.

Benefits of technology

It improves the transition effect of image color, improves the clarity of image display, weakens the mutation boundaries in the image, and improves the user's viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113538271B_ABST
    Figure CN113538271B_ABST
Patent Text Reader

Abstract

The embodiments of the present application relate to an image display method, device, electronic device and computer-readable storage medium, wherein the image display method comprises: obtaining an image to be processed having a first color depth; determining a grayscale transition region in the image to be processed, wherein the difference between the grayscale values ​​of at least two adjacent pixels in the grayscale transition region is greater than a first threshold; and interpolating the grayscale values ​​of multiple pixels in the grayscale transition region to obtain a display image having a second color depth, wherein the second color depth is greater than the first color depth. In the embodiments of the present application, the grayscale transition region can be understood as a region where there is a sudden change in grayscale. By determining the grayscale transition region and interpolating the grayscale values ​​of the pixels in the grayscale transition region, part of the transition grayscale can be added, thereby effectively improving the transition effect of the image color, and further improving the clarity of the image display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image display technology, and in particular, to an image display method, device, electronic device, and computer-readable storage medium. Background Art

[0002] In recent years, with the continuous upgrading of electronic devices, electronic devices can achieve increasingly clear and rich image display functions. However, due to the low image quality of traditional video sources, even with advanced electronic devices, it is impossible to present high-quality display effects. Especially in terms of display color, the image color transition effect of traditional video sources is not good, resulting in the problem of blurred image display. Summary of the invention

[0003] The embodiments of the present application provide an image display method, device, electronic device and computer-readable storage medium, which can optimize the transition effect of image color, thereby improving the clarity of image display.

[0004] A method for displaying an image, the method comprising:

[0005] Acquire an image to be processed with a first color depth;

[0006] Determine a grayscale transition region in the image to be processed, wherein a difference between grayscale values ​​of at least two adjacent pixels in the grayscale transition region is greater than a first threshold;

[0007] Interpolation processing is performed on the grayscale values ​​of multiple pixels in the grayscale transition area respectively to obtain a display image with a second color depth, where the second color depth is greater than the first color depth.

[0008] An image display device, comprising:

[0009] An image acquisition module, used for acquiring an image to be processed having a first color depth;

[0010] A region determination module, used for determining a grayscale transition region in the image to be processed, wherein the difference between the grayscale values ​​of at least two adjacent pixels in the grayscale transition region is greater than a first threshold;

[0011] An interpolation processing module is used to perform interpolation processing on the grayscale values ​​of multiple pixels in the grayscale transition area respectively to obtain a display image with a second color depth, where the second color depth is greater than the first color depth.

[0012] An electronic device includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned image display method.

[0013] A computer-readable storage medium stores a computer program, which implements the steps of the above-mentioned image display method when executed by a processor.

[0014] The above-mentioned image display method, device, electronic device and computer-readable storage medium, the image display method includes: obtaining an image to be processed with a first color depth; determining a grayscale transition area in the image to be processed, wherein the difference between the grayscale values ​​of at least two adjacent pixels in the grayscale transition area is greater than a first threshold; interpolating the grayscale values ​​of multiple pixels in the grayscale transition area respectively to obtain a display image with a second color depth, wherein the second color depth is greater than the first color depth. In an embodiment of the present application, the grayscale transition area can be understood as an area where there is a sudden change in grayscale. By determining the grayscale transition area and interpolating the grayscale values ​​of the pixels in the grayscale transition area, part of the transition grayscale can be added, thereby effectively improving the transition effect of the image color, and further improving the clarity of the image display. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 A diagram of an application environment of an image display method according to an embodiment;

[0017] Figure 2 One of the flowcharts of the image display method according to an embodiment;

[0018] Figure 3 is a schematic diagram of an image to be processed according to an embodiment;

[0019] Figure 4 is a schematic diagram of a display image according to an embodiment;

[0020] Figure 5 A sub-flow chart of the steps of an embodiment for respectively performing interpolation processing on the grayscale values ​​of a plurality of pixels in the grayscale transition area;

[0021] Figure 6 A sub-flow chart of the steps of an embodiment of the present invention for interpolating the grayscale values ​​of a plurality of pixels in the grayscale transition area according to the newly added grayscale quantity;

[0022] Figure 7 A sub-flow chart of the steps of an embodiment of the present invention for interpolating the grayscale values ​​of a plurality of pixels in the grayscale transition area according to the newly added grayscale quantity;

[0023] Figure 8 is a schematic diagram of a first layer of an embodiment;

[0024] Fig. 9 is a schematic diagram of a second layer of an embodiment;

[0025] Fig.10 This is a second flowchart of an image display method according to an embodiment;

[0026] Fig.11 A third flowchart of an image display method according to an embodiment;

[0027] Fig.12 is a schematic diagram of a first layer after inserting newly added pixels according to an embodiment;

[0028] Fig.13 is a schematic diagram of a second layer after inserting newly added pixels according to an embodiment;

[0029] Fig.14 is a schematic diagram of a first layer after filtering processing according to an embodiment;

[0030] Fig.15 is a schematic diagram of a fused display image according to an embodiment;

[0031] Fig.16 is a structural block diagram of an image display device according to an embodiment;

[0032] Fig.17 FIG. 1 is a schematic diagram of the internal structure of an electronic device in an embodiment. DETAILED DESCRIPTION

[0033] In order to facilitate understanding of the embodiments of the present application, the embodiments of the present application will be described more fully below with reference to the relevant drawings. The preferred embodiments of the embodiments of the present application are given in the drawings. However, the embodiments of the present application can be implemented in many different forms and are not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the embodiments of the present application more thorough and comprehensive.

[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art of the technical field of the embodiments of the present application. The terms used herein in the specification of the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the embodiments of the present application. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0035] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first layer may be referred to as a second layer, and similarly, a second layer may be referred to as a first layer without departing from the scope of this application. Both the first layer and the second layer are layers, but they are not the same layer.

[0036] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In the description of the present application, the meaning of "several" is at least one, such as one, two, etc., unless otherwise clearly and specifically defined.

[0037] Figure 1 FIG. 1 is an application environment diagram of an image display method according to an embodiment. Figure 1 As shown, the application environment includes a terminal 110 and a server 120. The terminal 110 obtains an image to be processed, wherein the terminal 110 may be a terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a car computer, a wearable device, etc. The terminal 110 may download and apply various types of image resources from the server 120 as images to be processed. Among them, the server 120 may be a server or a server cluster. In an embodiment of the present application, the image display method may be applied to the terminal 110, and the terminal 110 directly executes the image display method in each embodiment to generate a display image with high color depth and natural color gradient.

[0038] Figure 2 is a flowchart of an image display method according to an embodiment, referring to Figure 2 , the method includes steps 202 to 206.

[0039] Step 202: Acquire an image to be processed with a first color depth.

[0040] Color depth is used to represent the number of colors in an image. The greater the color depth, the more colors the image can display. For example, a 1-bit image can display 2 grayscales. 1 =2, which means it can display two colors: black and white. A 2-bit image can display 2 grayscales. 2 =4, that is, in addition to black and white, two gray tones between black and white can also be expressed. Figure 3is a schematic diagram of an image to be processed according to an embodiment, Figure 3 The image to be processed shown contains 4 different grayscale values, and the 4 grayscales can be defined as grayscale 0, grayscale 1, grayscale 2, and grayscale 3 from low to high brightness. Figure 3 It can be found that the mutation phenomenon between grayscale 0 and grayscale 1 is the most obvious, which will greatly affect the user's viewing experience.

[0041] It should be noted that the image to be processed may be any image. For example, the image to be processed may be an image captured by a camera on a terminal. Of course, in a possible implementation, the image to be processed may not be an image captured by a camera on a terminal, but an image or a screenshot acquired in real time from a network, and this embodiment does not limit this.

[0042] Step 204 : determining a grayscale transition region in the image to be processed, wherein the difference between the grayscale values ​​of at least two adjacent pixels in the grayscale transition region is greater than a first threshold.

[0043] The grayscale transition region can be understood as a region where there are grayscale mutation pixels. It is understandable that the grayscale transition region can be a regular region, such as a rectangular region, or an irregular region, which can be determined specifically according to the result of image recognition.

[0044] In an exemplary manner, the image can be identified by an edge recognition algorithm, and the grayscale transition region can be extracted based on the identified edge. For example, edge pixels in the image to be processed can be extracted by edge features, and then the detected edge pixels are connected as the grayscale transition region. In another exemplary manner, edge recognition of the image can also be performed by detecting adjacent pixel values ​​or brightness values ​​of the pixels of the image row by row and column by column, determining the pixels whose pixel values ​​or brightness values ​​change dramatically as edge pixels, and connecting the edge pixels as the grayscale transition region. In another exemplary manner, the image can also be calculated based on but not limited to the use of Roberts edge operator, Sobel edge detection operator or Laplacan edge operator to determine the grayscale transition region. It can be understood that the above examples are only for illustration and are not used to limit the scope of protection of this embodiment.

[0045] Step 206 , interpolating the grayscale values ​​of a plurality of pixels in the grayscale transition region respectively to obtain a display image with a second color depth, where the second color depth is greater than the first color depth.

[0046] in, Figure 4 is a schematic diagram of a display image according to an embodiment, Figure 4 The image to be processed shown contains 5 different grayscale values. Figure 3 and Figure 4 , by interpolating the grayscale values ​​of multiple pixels, Figure 3 In the embodiment, a transition grayscale is inserted between grayscale 0 and grayscale 1, which effectively improves the grayscale transition effect in the image. From the user's point of view, the sudden change boundary in the image is weakened, thereby improving the user's viewing experience.

[0047] Specifically, the second color depth can be determined by the hardware performance of the terminal, for example, it can be determined by the display capability of the display panel of the terminal, the data processing capability of the processor, etc. Exemplarily, the first color depth can be 8 bits. In terms of color transition, the fault phenomenon of the 8-bit image to be processed is more serious, which is manifested as a fuzzy image and an unnatural transition. Taking the example that the terminal can support the display of up to 10 bits of images, the second color depth can be one of 9 bits and 10 bits, and the corresponding second color depth can be selected according to the instruction input by the user. For example, if the second color depth corresponding to the instruction input by the user is 9 bits, the display quality of the displayed image is better, better than the image to be processed before processing, but not as natural as the color transition of the image with a second color depth of 10 bits. If the second color depth corresponding to the instruction input by the user is 10 bits, the display quality of the image is the best, but the amount of data processing required by the processor is large, and the terminal may experience heating and other phenomena.

[0048] In this embodiment, by determining the grayscale transition area and interpolating the grayscale values ​​of the pixels in the grayscale transition area, some transition grayscales can be added, thereby effectively improving the transition effect of the image color, making the part with a larger grayscale transition jump more natural, improving the transition effect of the color gradient, optimizing the striping problem caused by the color gradient transition, and thus improving the clarity of the image display.

[0049] Figure 5 The steps of an embodiment are sub-flow charts for interpolating the grayscale values ​​of multiple pixels in the grayscale transition area, referring to Figure 5 In this embodiment, the above steps include steps 502 to 504.

[0050] Step 502: Determine the number of grayscales added during interpolation processing according to the first color depth and the second color depth.

[0051] Specifically, if the first color depth is m and the second color depth is n, where m and n are both positive integers, the total number of newly added grayscales is 2 n -2 m. Exemplarily, take the example of inserting a transition grayscale between grayscale 0 and grayscale 1. If the first color depth is 8 bits and the second color depth is 10 bits, the difference between the two color depths is 2 bits, and the number of newly added grayscales is 768, or it can be understood that 3 transition grayscales can be inserted into any two adjacent original grayscales. Therefore, the three newly added grayscales inserted between grayscale 0 and grayscale 1 can be defined as 0.25 grayscale, 0.5 grayscale and 0.75 grayscale respectively. If the first color depth is 8 bits and the second color depth is 9 bits, the difference between the two color depths is 1 bit, and the number of newly added grayscales is 256, or it can be understood that 1 transition grayscale can be inserted into any two adjacent original grayscales. Therefore, the newly added grayscales inserted between grayscale 0 and grayscale 1 can be defined as 0.5 grayscale respectively.

[0052] Step 504 : interpolating the grayscale values ​​of a plurality of pixels in the grayscale transition area according to the newly added grayscale quantity.

[0053] Among them, the interpolation processing of the grayscale value of the pixel can be performed based on the grayscale values ​​of the four pixels above, below, left and right of the pixel. Taking the average value interpolation processing method as an example, if the grayscale values ​​of the four pixels above, below, left and right of the pixel are 0, 0, 0 and 1 respectively, the grayscale value of the pixel should be set to (0+0+0+1) / 4, that is, 0.25 grayscale. Based on the number of newly added grayscales obtained in step 502, if the difference between the two color depths is 2 bits, 0.25 grayscale can be inserted. If the difference between the two color depths is 1 bit, there is no 0.25 grayscale, and it is necessary to process the calculated grayscale value and set the grayscale value of the area to 0 grayscale or 0.5 grayscale, which can be set according to preset rules.

[0054] In this embodiment, the number of newly added grayscales that can be inserted can be accurately obtained according to the first color depth and the second color depth, so that it is convenient to process the grayscale data in the interpolation processing stage to obtain an accurate display image.

[0055] Figure 6 The steps of an embodiment are a sub-flow chart of interpolating the grayscale values ​​of multiple pixels in the grayscale transition area according to the newly added grayscale quantity, referring to Figure 6 In this embodiment, the above steps include steps 602 to 606.

[0056] Step 602, determining a target pixel in the grayscale transition region, wherein the difference between the grayscale value of the target pixel and the grayscale value of at least one adjacent pixel is greater than a second threshold, and the second threshold is less than or equal to the first threshold. The target pixel can be determined based on the data obtained in the grayscale transition region identification step, for example, the determined edge contour point can be used as the target pixel, thereby reducing the amount of data calculation in this embodiment, thereby improving the processing speed of the image display method.

[0057] Step 604 , obtaining the grayscale gradient of the target pixel according to the grayscale values ​​of a plurality of pixels adjacent to the target pixel.

[0058] Among them, the grayscale gradient can be used to characterize the grayscale changes around the pixel, and further, the grayscale gradient direction can be understood as the direction in which the grayscale changes fastest. Specifically, for most pixels, the grayscale gradient direction is usually not the row direction or the column direction. That is, the speed of change of the grayscale value of the pixel in the row direction and the speed of change in the column direction are not exactly the same. Accordingly, if the grayscale value of the pixel is simply obtained by the average value interpolation method, the result of the interpolation processing will be insufficiently accurate. Therefore, by obtaining the grayscale gradient of the target pixel to be interpolated, a more accurate interpolation processing can be achieved. It can be understood that this embodiment does not limit the method for obtaining the grayscale gradient, and any method that can obtain the grayscale gradient can be applied to this embodiment.

[0059] Step 606: Perform weighted interpolation processing according to the grayscale gradient of the target pixel and the grayscale value of at least one adjacent pixel.

[0060] Among them, weighted interpolation processing can be performed according to the grayscale values ​​of multiple pixels around the target pixel. Furthermore, the number of adjacent pixels used when obtaining the grayscale gradient can be different from the number of adjacent pixels used when performing weighted interpolation processing. For example, the grayscale gradient can be obtained using the grayscale values ​​of a larger number of adjacent pixels, and the weighted interpolation processing can be performed using the grayscale values ​​of a smaller number of adjacent pixels. The grayscale ladder has a relatively large impact on the accuracy of the interpolation processing. Therefore, by obtaining a more accurate grayscale gradient and performing weighted interpolation processing more quickly, a more efficient interpolation processing process can be achieved.

[0061] Figure 7 The steps of an embodiment are a sub-flow chart of interpolating the grayscale values ​​of multiple pixels in the grayscale transition area according to the newly added grayscale quantity, referring to Figure 7 In this embodiment, the above steps include steps 702 to 706.

[0062] Step 702: The grayscale transition area is used as the first layer, and the remaining area in the image to be processed is used as the second layer. Figure 3The image to be processed in the embodiment can be obtained Figure 8 The first layer shown in the embodiment, and Fig. 9 The second layer shown in the embodiment.

[0063] Step 704, interpolation processing is performed on the grayscale values ​​of multiple pixels in the first layer according to the newly added grayscale number, wherein the number of grayscale values ​​in the first layer after interpolation processing is greater than the number of grayscale values ​​in the image to be processed. Specifically, the area in the second layer can be understood as a non-grayscale transition area, that is, an area where the transition of pixel grayscale is relatively natural. Therefore, even if the grayscale values ​​of the pixels in the second layer are not interpolated, the display quality of the displayed image will not be affected, but the data processing amount of the processor can be greatly reduced.

[0064] Step 706: Fusing the second layer with the first layer after interpolation. Specifically, by fusing the second layer with the first layer after interpolation, Figure 4 Display image shown in the embodiment.

[0065] In this embodiment, the graphics processing unit (GPU) can extract the grayscale transition area with a separate layer, and finally the processing module responsible for image integration in the DPU (Data Processing Unit) merges the two layers to output a complete display image. This embodiment can reduce the processing pressure of the processor to a large extent by performing different processing on different areas in the image to be processed, thereby improving the processing speed of the image display method.

[0066] Fig.10 This is a second flowchart of an image display method according to an embodiment, referring to Fig.10 , in this embodiment, includes steps 1002 to 1014.

[0067] Step 1002: Acquire an image to be processed with a first color depth.

[0068] Step 1004 : determining a grayscale transition region in the image to be processed, wherein the difference between the grayscale values ​​of at least two adjacent pixels in the grayscale transition region is greater than a first threshold.

[0069] Step 1006: Use the grayscale transition area as the first layer, and use the remaining area in the image to be processed as the second layer.

[0070] The specific implementation of steps 1002 to 1004 may refer to steps 202 and 204 in the aforementioned embodiment respectively, and the specific implementation of step 1006 may refer to step 702 in the aforementioned embodiment, which will not be described in detail in this embodiment.

[0071] Step 1008: perform super-resolution processing on the first layer and the second layer respectively.

[0072] It is understandable that when the relevant technology processes pictures or video images, it will directly stretch or reduce the content source to the resolution corresponding to the screen on the display link, and then output it to the screen for display. After a simple stretching process, it will be found that the originally clear picture has blurred edges after being enlarged. This stretching display affects the viewing effect of users and distorts the image of the content source. Some scenes are processed by adding black images around the content source, only displaying the area of ​​the corresponding resolution size, and displaying other areas in black. Although this will not distort the data of the content source, it will have a greater impact on the user experience when only a small part is displayed. It is equivalent to using a relatively high-end display terminal, but it is indeed no different from a low-end display terminal. Only a small area can be displayed, which affects the experience effect.

[0073] The super-resolution can be understood as increasing the resolution of an image. For example, the resolution of an image before super-resolution processing may be 1920×1080, and the resolution of an image before super-resolution processing may be 3840×2160.

[0074] Optionally, super-resolution processing can adopt traditional algorithms, neural network algorithms and dictionary methods, etc. Among them, traditional algorithms can be, for example, directional interpolation, principal component analysis, etc. Neural network algorithms can be, for example, SRCNN (Image Super-resolution Using Deep Convolutional Networks), EDVR (Video Restoration with Enhanced Deformable Convolutional Networks), VDSR (Very Deep network for Super-Resolution), etc. Dictionary methods can be, for example, RAISR (Rapid and Accurate Super Image Resolution), etc. It should be noted that the above processing method is only used for exemplary description and is not used to limit the scope of protection of this embodiment.

[0075] Step 1010: Determine the number of additional grayscales during interpolation processing according to the first color depth and the second color depth.

[0076] Step 1012, interpolating the grayscale values ​​of multiple pixels in the first layer after super-resolution processing according to the newly added grayscale number, wherein the number of grayscale values ​​in the first layer after interpolation processing is greater than the number of grayscale values ​​in the image to be processed.

[0077] Step 1014: Fusing the second layer after super-resolution processing and the first layer after interpolation processing to obtain a display image with a second color depth.

[0078] Among them, steps 1010 to 1014 are steps of interpolating the grayscale values ​​of multiple pixels in the first layer according to the newly added grayscale quantity. The specific implementation methods can be referred to in a one-to-one correspondence with steps 502, 504 and 706 in the aforementioned embodiment, and will not be described in detail in this embodiment. This embodiment can make the picture more delicate by increasing the resolution, thereby improving the user's viewing experience.

[0079] Fig.11 This is a flowchart of an image display method according to an embodiment of the present invention. Fig.11 , in this embodiment, includes steps 1102 to 1114.

[0080] Step 1102, obtaining an image to be processed with a first color depth. The specific implementation of step 1102 may refer to step 202 in the above embodiment, and will not be described in detail in this embodiment.

[0081] Step 1104 , determining a grayscale transition region in the image to be processed, wherein the difference between the grayscale values ​​of at least two adjacent pixels in the grayscale transition region is greater than a first threshold.

[0082] Wherein, the grayscale value of each pixel includes a red grayscale value, a green grayscale value and a blue grayscale value. Accordingly, step 1104 may include: respectively obtaining the average grayscale value of each pixel in the image to be processed, the average grayscale value being the average of the red grayscale value, the green grayscale value and the blue grayscale value; determining the grayscale transition area in the image to be processed according to the average grayscale value of each pixel, wherein the difference between the average grayscale values ​​of at least two adjacent pixels in the grayscale transition area is greater than the first threshold. This embodiment can effectively improve the accuracy of determining the grayscale transition area by performing comprehensive calculations based on the grayscale values ​​of different colors, thereby improving the processing effect of the subsequent interpolation processing step.

[0083] Step 1106, taking the grayscale transition area as the first layer, and taking the remaining area in the image to be processed as the second layer. The specific implementation of step 1106 can refer to step 702 in the above embodiment, and will not be described in detail in this embodiment.

[0084] Step 1108: Determine the target number of newly added pixels according to the initial resolution and the target resolution, wherein the image to be processed has an initial resolution and the displayed image has a target resolution.

[0085] Step 1110: insert a plurality of new pixels into the first layer and the second layer respectively according to the target quantity.

[0086] Among them, inserting new pixels can be understood as expanding based on the original pixels. The original pixels are Figure 8 and Fig. 9 Specifically, the original pixels can be expanded in all directions, such as upward, downward, left, and right. The expanded pixel range can be customized. The image obtained after expansion contains the corresponding original pixels. When encountering a boundary, the pixel values ​​within the expanded pixel range can be filled with preset pixel values. The filling method can be customized. Figure 8 The first layer shown, and Fig. 9 The second layer shown, by interpolating pixels, can be obtained Fig.12 The first layer shown, and Fig. 9 The second layer shown. Combined with reference Figure 8 and Fig.12 It can be found that by inserting pixels, the number of pixels in the image can be effectively increased, but there will still be a certain amount of jagged edges in the image. Fig.12 and Fig.13 The image shown can be understood as an expansion of one pixel range in the upward direction and the right direction, that is, three pixels are expanded based on each original pixel.

[0087] Step 1112: filter the first layer after the pixel insertion to remove jagged edges in the first layer. Fig.14 This is the first layer after filtering, combined with reference Fig.12 and Fig.14 , the clarity of the image can be further improved through filtering, thereby improving the viewing experience. It can be understood that this embodiment does not specifically limit the filtering method, as long as the method has a smooth edge and anti-aliasing effect can be applied to this embodiment.

[0088] Step 1114, determining the number of newly added grayscales during interpolation processing according to the first color depth and the second color depth. Step 1114 may refer to step 502 in the above embodiment, and will not be described in detail in this embodiment.

[0089] Step 1116, interpolating the grayscale values ​​of the plurality of pixels in the first layer after the super-resolution processing according to the newly added grayscale number, wherein the number of grayscale values ​​in the first layer after the interpolation processing is greater than the number of grayscale values ​​in the image to be processed. Step 1116 may refer to step 504 in the aforementioned embodiment, and will not be described in detail in this embodiment.

[0090] Specifically, the grayscale value of each of the newly added pixels in the first layer after super-resolution processing is interpolated according to the newly added grayscale quantity. Fig.14 This is the first layer after filtering, refer to Fig.14 By interpolating the grayscale values ​​of the newly added pixels, the grayscale gradient effect can be further enhanced, thereby improving the viewing experience.

[0091] Step 1118, the second layer after super-resolution processing and the first layer after interpolation processing are merged to obtain a display image with a second color depth. Step 1118 can refer to step 706 in the above embodiment, and will not be described in detail in this embodiment.

[0092] It should be understood that, although the steps in each flowchart are shown in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in each flowchart may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0093] Fig.16 FIG. 1 is a structural block diagram of an image display device according to an embodiment. Fig.16 As shown, the image display device includes an image acquisition module 1602 , a region determination module 1604 and an interpolation processing module 1606 .

[0094] The image acquisition module 1602 is used to acquire an image to be processed with a first color depth. The region determination module 1604 is used to determine a grayscale transition region in the image to be processed, wherein the difference between the grayscale values ​​of at least two adjacent pixels in the grayscale transition region is greater than a first threshold. The interpolation processing module 1606 is used to perform interpolation processing on the grayscale values ​​of multiple pixels in the grayscale transition region, respectively, to acquire a display image with a second color depth, wherein the second color depth is greater than the first color depth.

[0095] The division of the modules in the above-mentioned image display device is only for illustration. In other embodiments, the image display device may be divided into different modules as required to complete all or part of the functions of the above-mentioned image display device.

[0096] For the specific definition of the image display device, please refer to the definition of the image display method above, which will not be repeated here. Each module in the above-mentioned image display device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0097] Fig.17 FIG. 1 is a schematic diagram of the internal structure of an electronic device in one embodiment. Fig.17 As shown, the electronic device includes a processor and a memory connected via a system bus. The processor is used to provide computing and control capabilities to support the operation of the entire electronic device. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement an image display method provided in each of the following embodiments. The internal memory provides a cached operating environment for the operating system computer program in the non-volatile storage medium. The electronic device can be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, etc.

[0098] The implementation of each module in the image display device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. The program module constituted by the computer program may be stored in a memory of an electronic device. When the computer program is executed by a processor, the steps of the method described in the embodiment of the present application are implemented.

[0099] The embodiment of the present application also provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, the processors execute the steps of the image display method.

[0100] A computer program product comprising instructions, when the computer program product is run on a computer, causes the computer to execute an image display method.

[0101] Any reference to memory, storage, database or other medium used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM), which is used as an 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 (DDR SDRAM), 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).

[0102] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0103] The above-described embodiments only express several implementation methods of the embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the embodiments of the present application, and these all belong to the protection scope of the embodiments of the present application. Therefore, the protection scope of the patent of the embodiments of the present application shall be subject to the attached claims.

Claims

1. An image display method, characterized in that: The method comprises: Acquire an image to be processed with a first color depth; Determine a grayscale transition region in the image to be processed, wherein a difference between grayscale values ​​of at least two adjacent pixels in the grayscale transition region is greater than a first threshold; Determining the number of newly added grayscales during interpolation processing according to the first color depth and the second color depth; the second color depth is greater than the first color depth, and the second color depth is determined according to the hardware performance of the terminal; The grayscale values ​​of a plurality of pixels in the grayscale transition region are interpolated according to the newly added grayscale quantity to obtain a display image with a second color depth.

2. The image display method according to claim 1, characterized in that: The interpolation process of the grayscale values ​​of the plurality of pixels in the grayscale transition area according to the newly added grayscale quantity includes: Determine a target pixel in the grayscale transition area, wherein a difference between a grayscale value of the target pixel and a grayscale value of at least one adjacent pixel is greater than a second threshold, and the second threshold is less than or equal to the first threshold; Acquire the grayscale gradient of the target pixel according to the grayscale values ​​of a plurality of pixels adjacent to the target pixel; A weighted interpolation process is performed according to the grayscale gradient of the target pixel and the grayscale value of at least one adjacent pixel.

3. The image display method according to claim 1, characterized in that: The interpolation process of the grayscale values ​​of the plurality of pixels in the grayscale transition area according to the newly added grayscale quantity includes: Using the grayscale transition area as the first layer, and using the remaining area in the image to be processed as the second layer; interpolating the grayscale values ​​of the plurality of pixels in the first layer according to the newly added grayscale quantity, wherein the number of grayscale values ​​in the first layer after the interpolation processing is greater than the number of grayscale values ​​in the image to be processed; The second layer and the first layer after interpolation processing are fused.

4. The image display method according to claim 3, characterized in that: Before interpolating the grayscale values ​​of the plurality of pixels in the first layer according to the newly added grayscale quantity, the method further includes: Performing super-resolution processing on the first layer and the second layer respectively; The fusing the second layer and the first layer after interpolation processing includes: The second layer after the super-resolution processing and the first layer after the interpolation processing are fused.

5. The image display method according to claim 4, characterized in that: The image to be processed has an initial resolution, the displayed image has a target resolution, and the super-resolution processing is performed on the first layer and the second layer respectively, including: Determining a target number of newly added pixels according to the initial resolution and the target resolution; inserting a plurality of newly added pixels into the first layer and the second layer respectively according to the target quantity; The interpolating grayscale values ​​of a plurality of pixels in the first layer according to the newly added grayscale quantity includes: The grayscale value of each of the newly added pixels in the first layer after super-resolution processing is interpolated according to the number of newly added grayscales.

6. The image display method according to claim 5, characterized in that: Before interpolating the grayscale value of each of the newly added pixels in the first layer after super-resolution processing according to the newly added grayscale quantity, the method further includes: The first layer after the pixel insertion is filtered to remove edge jaggedness in the first layer.

7. The image display method according to claim 1, characterized in that: The grayscale value of each pixel includes a red grayscale value, a green grayscale value and a blue grayscale value, respectively, and the step of determining a grayscale transition area in the image to be processed, wherein a difference between grayscale values ​​of at least two adjacent pixels in the grayscale transition area is greater than a first threshold, comprises: Obtaining the average grayscale value of each pixel in the image to be processed respectively, wherein the average grayscale value is the average of the red grayscale value, the green grayscale value and the blue grayscale value; A grayscale transition region in the image to be processed is determined according to the average grayscale value of each pixel, and a difference between the average grayscale values ​​of at least two adjacent pixels in the grayscale transition region is greater than the first threshold.

8. An image display device, characterized in that: include: An image acquisition module, used for acquiring an image to be processed having a first color depth; A region determination module, used for determining a grayscale transition region in the image to be processed, wherein the difference between the grayscale values ​​of at least two adjacent pixels in the grayscale transition region is greater than a first threshold; An interpolation processing module is used to determine the number of additional grayscales during interpolation processing according to a first color depth and a second color depth; the second color depth is greater than the first color depth, and the second color depth is determined according to the hardware performance of the terminal; and interpolation processing is performed on the grayscale values ​​of multiple pixels in the grayscale transition area according to the number of additional grayscales to obtain a display image with a second color depth.

9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the image display method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the image display method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Scanning projection method and scanning projection device

    CN108810498A