CN111292383B - Image display method and device, and computer-readable storage medium - Google Patents
Image display method and device, and computer-readable storage medium Download PDFInfo
- Publication number
- CN111292383B CN111292383B CN201910142189.0A CN201910142189A CN111292383B CN 111292383 B CN111292383 B CN 111292383B CN 201910142189 A CN201910142189 A CN 201910142189A CN 111292383 B CN111292383 B CN 111292383B
- Authority
- CN
- China
- Prior art keywords
- boundary
- parameter
- pixels
- block
- ith
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Controls And Circuits For Display Device (AREA)
- Control Of Indicators Other Than Cathode Ray Tubes (AREA)
Abstract
An image display method and device, and a computer-readable storage medium, the image display method comprising: reading a first parameter list for displaying a non-full-screen image, wherein the image to be displayed comprises a plurality of blocks, and the blocks are sequentially provided with N parameters in the first parameter list in a one-to-one correspondence manner; acquiring configuration information of boundary pixels of a non-full-screen image display area from the first parameter list, wherein the configuration information of the boundary pixels comprises: the position of the boundary pixel, the gain of the boundary pixel; and adjusting the color configuration parameters of the corresponding boundary pixels and the color configuration parameters of the pixels of the non-display image area according to the positions of the boundary pixels and the gains of the boundary pixels. By adopting the scheme, the occupied memory in the image display process can be reduced.
Description
Technical Field
Embodiments of the present invention relate to the field of image processing technologies, and in particular, to an image display method and apparatus, and a computer-readable storage medium.
Background
Conventional mobile devices typically employ a rectangular screen display screen. When the content is displayed on the rectangular screen, each frame of image is processed in a matrix mode according to a certain width and height.
Along with the constantly changing of user's demand, the display screen shape of mobile device is more and more diversified, and the display screen no longer restricts to the rectangle screen, has appeared some non-rectangle screens such as fillet screen, bang screen, water droplet screen.
At present, in order to achieve a better non-rectangular display effect on a rectangular screen, software is generally adopted to perform shape filtering on each frame of rectangular image to be displayed, an area of content which does not need to be displayed is set to be black, and anti-aliasing processing is performed between the black area and a display area.
However, processing the display image by software to adapt to the display of the non-rectangular screen requires a large memory to store the information of the area with the modified shape.
Disclosure of Invention
The technical problem solved by the embodiment of the invention is how to reduce the occupied memory in the image display process.
To solve the foregoing technical problem, an embodiment of the present invention provides an image display method, including: reading a first parameter list for displaying a non-full-screen image, wherein the image to be displayed comprises a plurality of blocks, and the plurality of blocks correspond to N parameters in the first parameter list in sequence one by one; acquiring configuration information of boundary pixels of a non-full-screen image display area from the first parameter list, wherein the configuration information of the boundary pixels comprises: the position of the boundary pixel, the gain of the boundary pixel; and adjusting the color configuration parameters of the corresponding boundary pixels and the color configuration parameters of the pixels of the non-display image area according to the positions of the boundary pixels and the gains of the boundary pixels.
Optionally, the obtaining configuration information of the boundary pixels of the non-full-screen image display area from the first parameter list includes: the first parameter list is formed by compressing a plurality of parameter blocks, the parameter blocks in the first parameter list are decompressed one by one, configuration information of all boundary pixels in the parameter blocks is obtained, and each parameter block corresponds to a block of the image to be displayed one by one.
Optionally, the adjusting, according to the position of the boundary pixel and the gain of the boundary pixel, the color configuration parameter of the corresponding boundary pixel and the color configuration parameter of the pixel that does not display the image area includes: when the ith block of the image is processed, reading the ith parameter block corresponding to the ith block in the first parameter list; acquiring configuration information of boundary pixels of the ith sub-block from the ith parameter block; acquiring the position of the first boundary pixel of the ith block and the number of the boundary pixels from the configuration information of the boundary pixels of the ith block; configuring a color of a pixel not displaying an image area in the ith block to black; and performing product operation on the gain of each boundary pixel and the color configuration parameter of the corresponding boundary pixel to obtain the color configuration parameter of the boundary pixel.
Optionally, the first parameter list is generated as follows: acquiring boundary shape information of a non-full-screen image display area; reading a second parameter list of video streaming hardware, the second parameter list comprising at least one of: the method comprises the following steps of (1) the width of a display screen of the mobile terminal, the height of the display screen of the mobile terminal, the size of pixels, the row number of the pixels and the column number of the pixels; calculating the position of a pixel through which the boundary line of the full-screen image display area passes according to the second parameter list and the boundary shape information of the non-full-screen image display area to obtain the position of the boundary pixel; calculating a gain for each boundary pixel; dividing the boundary pixels according to an image data processing mode to obtain a plurality of blocks; and compressing the parameter blocks respectively corresponding to the plurality of blocks to generate the first parameter list, wherein the first parameter list comprises configuration information of all boundary pixels.
Optionally, the compressing the parameter blocks corresponding to the plurality of blocks respectively to generate the first parameter list includes: compressing the position and the number of the boundary pixels in the ith parameter block and the gain of the boundary pixels in the ith parameter block to obtain N parameters; and integrating the N parameters respectively corresponding to each parameter block in sequence to generate the first parameter list.
Optionally, the compressing the position and the number of the boundary pixels in the ith parameter block and the gain of the boundary pixels in the ith parameter block to obtain N parameters includes: reading the position of a first boundary pixel in the ith parameter block and the number of the boundary pixels, and performing polynomial fitting on the gains of all the boundary pixels in the ith parameter block to obtain a polynomial parameter; and performing fixed-point operation and shift operation on the polynomial parameters, the position of the first boundary pixel and the number of the boundary pixels corresponding to the ith parameter block, and integrating the polynomial parameters, the position of the first boundary pixel and the number of the boundary pixels corresponding to the ith parameter block to obtain N parameters, wherein the N parameters have fixed bit width.
Optionally, the calculating the gain of each boundary pixel includes: and calculating the area proportion of a pixel region which is positioned on one side of the boundary line and needs to display an image in the boundary pixels to the total pixels of the boundary pixels.
Optionally, the boundary shape information of the non-full-screen image display area includes at least one of: the radius of the boundary, the length of the boundary, and the angle of the boundary.
An embodiment of the present invention further provides an image display device, including: the reading unit is suitable for reading a first parameter list for displaying a non-full-screen image, the image to be displayed comprises a plurality of blocks, and the plurality of blocks correspond to N parameters in the first parameter list in sequence; an obtaining unit, adapted to obtain configuration information of a boundary pixel of a non-full screen image display area from the first parameter list, where the configuration information of the boundary pixel includes: the position of the boundary pixel, the gain of the boundary pixel; and the adjusting unit is suitable for adjusting the color configuration parameters of the corresponding boundary pixels and the color configuration parameters of the pixels of the non-display image area according to the positions of the boundary pixels and the gains of the boundary pixels.
Optionally, the obtaining unit is adapted to decompress the parameter blocks in the first parameter list one by one to obtain configuration information of all boundary pixels in the parameter blocks, where the first parameter list is formed by compressing a plurality of parameter blocks, and each parameter block corresponds to a block of the image to be displayed.
Optionally, the adjusting unit is adapted to, when an ith block of the image is processed, read an ith parameter block corresponding to the ith block in the first parameter list; acquiring configuration information of boundary pixels of the ith sub-block from the ith parameter block; acquiring the position of the first boundary pixel of the ith block and the number of the boundary pixels from the configuration information of the boundary pixels of the ith block; configuring a color of a pixel not displaying an image area in the ith block to black; and performing product operation on the gain of each boundary pixel and the color configuration parameter of the corresponding boundary pixel to obtain the color configuration parameter of the boundary pixel.
An embodiment of the present invention further provides another image display device, including: the image display device comprises a memory and a processor, wherein the memory stores computer instructions capable of running on the processor, and the processor executes the computer instructions to execute the steps of any one of the image display methods provided by the embodiment of the invention.
The embodiment of the present invention further provides a computer-readable storage medium, which is a non-volatile storage medium or a non-transitory storage medium, and on which computer instructions are stored, and when the computer instructions are executed, the steps of any one of the image display methods provided in the embodiment of the present invention are executed.
Compared with the prior art, the technical scheme of the embodiment of the invention has the following beneficial effects:
and acquiring configuration information of the boundary pixels from a first parameter list displayed by the non-full-screen image, and adjusting the color configuration parameters of the boundary pixels and the color configuration parameters of the pixels in the non-display image area according to the position and the gain of each boundary pixel. The image to be displayed comprises a plurality of blocks, each block corresponds to N parameters in the first parameter list in sequence, and the N parameters comprise configuration information of boundary pixels in the corresponding block. Configuration information of all boundary pixels can be acquired from the first parameter list, and an image to be displayed can be processed into a shape matched with a non-full-screen display area according to the configuration information of the boundary pixels in the image display process. When the non-full-screen image is displayed, the hardware for processing the non-full-screen image display can obtain the parameters corresponding to the non-full-screen image display area through the first parameter list, and only the first parameter list occupies the corresponding memory.
Drawings
FIG. 1 is a flow chart of an image display method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a first parameter list generation according to an embodiment of the present invention;
FIG. 3 is a schematic view of a bang screen in an embodiment of the present invention;
FIG. 4 is a schematic view of a radiused screen in an embodiment of the present invention;
FIG. 5 is a partial schematic view of a radiused screen in an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an image display device according to an embodiment of the present invention.
Detailed Description
As described above, at present, to achieve a better non-rectangular display effect on a rectangular screen, software is generally used to perform shape filtering on each frame of rectangular image to be displayed, set the region where the display content is not needed to be displayed to black, and perform anti-aliasing processing between the black region and the image display region. However, processing the image to be displayed by software to adapt to the display of a non-rectangular screen requires a relatively large memory to store information of the area with the modified shape.
In the embodiment of the invention, the configuration information of the boundary pixels is obtained from the first parameter list of the non-full-screen image display area, and the color configuration parameters of the boundary pixels and the color configuration parameters of the pixels of the non-display image area are adjusted according to the position and the gain of each boundary pixel. The image to be displayed comprises a plurality of blocks, each block corresponds to N parameters in the first parameter list in sequence, and the N parameters comprise configuration information of boundary pixels in the corresponding block. Configuration information of all boundary pixels can be acquired from the first parameter list, and an image to be displayed can be processed into a shape matched with a non-full-screen display area according to the configuration information of the boundary pixels in the image display process. When the non-full-screen image is displayed, the hardware for processing the non-full-screen image display can obtain the parameters corresponding to the non-full-screen image display area through the first parameter list, and only the first parameter list occupies the corresponding memory.
In order to make the aforementioned objects, features and advantages of the embodiments of the present invention more comprehensible, embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of an image display method according to an embodiment of the present invention is shown, which may include the following steps.
And 11, reading a first parameter list for displaying the non-full screen image.
In a specific implementation, the hardware for image display processing in the mobile terminal generally performs block processing on an image to be displayed in an image display process. The image to be displayed may be divided into a plurality of blocks according to an image data processing manner, may be divided into blocks according to rows, and may also be divided into blocks according to other dividing conditions.
The plurality of blocks are respectively provided with N parameters in the first parameter list in sequence in a one-to-one correspondence mode, wherein the value of N can be 1, 2 or other values. For example, the value of N is 1, each partition corresponds to 1 parameter in the first parameter list, the 1 st partition corresponds to the 1 st parameter in the first parameter list, the 2 nd partition corresponds to the 2 nd parameter in the first parameter list, … …, and the ith partition corresponds to the ith parameter in the first parameter list. For another example, the value of N is 2, each partition corresponds to 2 parameters in the first parameter list, that is, the 1 st partition corresponds to the 1 st parameter and the 2 nd parameter in the first parameter list, the 2 nd partition corresponds to the 3 rd parameter and the 4 th parameter in the first parameter list, and … …, the ith partition corresponds to the 2i-1 st parameter and the 2i th parameter in the first parameter list.
In a specific implementation, the parameters in the first parameter list may include configuration information of the boundary pixels. The configuration information of the boundary pixels may include positions of the boundary pixels and gains of the boundary pixels.
In the embodiment of the present invention, in order to save a storage space, the first parameter list is compressed by a plurality of parameter blocks, and when the configuration information of the boundary pixel is obtained, the parameter blocks are decompressed one by one to obtain the configuration information of the boundary pixel in each parameter block.
In a specific implementation, a first parameter list of a non-full screen image display of the mobile device may be calculated offline. The non-full screen image display means that an image is displayed in a partial area of the display screen. For example, a non-rectangular image is displayed in a part of a non-rectangular area on a rectangular display screen. The screen shape corresponding to the non-rectangular image display area may be referred to as a non-rectangular screen for short. The non-rectangular screen can be a bang screen, a water drop screen, a round angle screen or the like.
The different types of non-full screen images display different corresponding first parameter lists. And configuring the calculated first parameter list as configuration information to hardware or a chip for image display processing in the mobile equipment, so that the hardware or the chip for image display processing can be used in image processing.
The first parameter list may be read when the hardware or chip for image display processing is performing image display processing.
In specific implementation, referring to fig. 2, a flowchart of a method for generating a first parameter list in the embodiment of the present invention is shown, and specifically may include steps 21 to 26.
And step 21, acquiring boundary shape information of the non-full screen image display area.
In a specific implementation, the boundary shape information of the non-full-screen image display area may include: a radius of the boundary, a length of the boundary, an angle of the boundary, and the like. The boundary shape information included in the non-full-screen image display area may be set according to an actual shape of the non-full-screen image display area.
In a specific implementation, the second parameter list includes at least one of: the display screen of the mobile terminal comprises the width of the display screen of the mobile terminal, the height of the display screen of the mobile terminal, the size of pixels, the number of rows of the pixels and the number of columns of the pixels.
And step 23, calculating the positions of the pixels through which the boundary line of the non-full-screen image display area passes according to the second parameter list and the boundary shape information of the non-full-screen image display area to obtain the positions of the boundary pixels.
In a specific implementation, a boundary pixel refers to a pixel that is crossed by a boundary line of a non-full screen image display area.
In a specific implementation, the gain of a boundary pixel refers to the proportion of the area of the region of the boundary pixel where the image needs to be displayed to the area of the boundary pixel.
And 25, dividing the boundary pixels according to an image data processing mode to obtain a plurality of blocks.
In a specific implementation, the image data processing manner is generally a block processing. The blocks may be divided into rows, or may be divided into blocks according to other set conditions, such as 2 × 2 blocks, or 3 × 3 blocks.
In specific implementation, the boundary pixels are divided according to the graphic data processing mode of image display processing hardware in the mobile terminal to obtain a plurality of blocks. Each block corresponds to a parameter block, and information of corresponding boundary pixels, such as the position and gain of each boundary pixel, is stored in the parameter block.
And 26, compressing the parameter blocks corresponding to the plurality of blocks respectively to generate the first parameter list.
In a specific implementation, data compression may be performed on the parameter block corresponding to each partition, so as to generate a first parameter list. The first parameter list stores configuration information of all boundary pixels.
In an embodiment of the present invention, the position and the number of the boundary pixels in the ith parameter block, and the gain of the boundary pixels in the ith parameter block are compressed to obtain N parameters, where the N parameters may have a fixed bit width, so as to facilitate reading by image display processing hardware. And integrating the N parameters respectively corresponding to each parameter block in sequence to generate the first parameter list.
In the embodiment of the present invention, the position of the first boundary pixel in the ith parameter block, the number of boundary pixels, and the gain of the boundary pixel in the ith parameter block are compressed as follows to obtain N parameters. Reading the position of a first boundary pixel in the ith parameter block and the number of the boundary pixels, and performing polynomial fitting on the gain of the boundary pixel in the ith parameter block to obtain polynomial parameters; and carrying out fixed-point operation and shift operation on the polynomial parameters corresponding to the ith parameter block, the position of the first boundary pixel and the number of the boundary pixels, and integrating the polynomial parameters corresponding to the ith parameter block, the position of the first boundary pixel and the number of the boundary pixels to obtain N parameters, wherein each parameter has a fixed bit width parameter. The value of N may be 1, 2, or another value, and when the value of N is determined, the position of the parameter corresponding to each parameter block in the first parameter list is also determined, and in the process of image display processing, the hardware or the chip for image display processing may sequentially read the parameter corresponding to each parameter block from the first parameter list according to the set format. The N parameters corresponding to each parameter block are integrated into a uniform format and configured to the mobile terminal in a first parameter list mode, so that hardware or chips used for image display processing in the mobile terminal can be conveniently read, the hardware friendliness is improved, and the energy consumption and the operation complexity of the hardware or chips used for image display processing can be reduced.
And step 13, adjusting the color configuration parameters of the corresponding boundary pixels and the color configuration parameters of the pixels of the non-display image area according to the positions of the boundary pixels and the gains of the boundary pixels.
In a specific implementation, after the configuration information of the boundary pixel is obtained from the first parameter list, the color configuration parameter of the boundary pixel and the color configuration parameter of the pixel in the non-display image area may be adjusted according to the position of the boundary pixel and the gain of the boundary pixel.
Referring to fig. 3, a schematic diagram of a bang screen in an embodiment of the present invention is shown. Fig. 4 is a schematic diagram of a circular corner screen in an embodiment of the invention. Figure 5 provides a partial schematic view of a radiused screen in an embodiment of the present invention. And an image display area D and an image non-display area C are respectively arranged on two sides of a boundary line L of the non-full-screen image display area, and color configuration parameters of an image display area P and an image non-display area of the boundary pixels are adjusted. In addition, the color arrangement parameters of other pixels not displaying the image area need to be adjusted.
In an embodiment of the present invention, the color of the non-display image area may be adjusted to black, the product of the color configuration parameter of the image display area of the boundary pixel and the gain of the boundary pixel is obtained, and the obtained product is used as the adjusted color configuration parameter of the boundary pixel.
In an embodiment of the present invention, the color allocation parameters of the boundary pixels and the color allocation parameters of the pixels in the non-display image area may be adjusted as follows: and when the ith block of the image is processed, reading the ith parameter corresponding to the ith block in the first parameter list. And acquiring the configuration information of the boundary pixel of the ith block from the ith parameter. And acquiring the position of the first boundary pixel of the ith block and the number of the boundary pixels from the configuration information of the boundary pixels of the ith block. Configuring the color of the other pixels of the non-display image area before the first boundary pixel as black. And performing multiplication operation on the gain of each boundary pixel and the color configuration parameter of the corresponding boundary pixel to obtain the color configuration parameter of the boundary pixel of the non-full-screen image display area, namely taking the obtained multiplication value as the color configuration parameter of the adjusted boundary pixel, so that the shape of the image display is the same as the shape of the non-full-screen image display area.
As can be seen from the above, the configuration information of the boundary pixels is obtained from the first parameter list of the non-full-screen image display area, and the color configuration parameters of the boundary pixels and the color configuration parameters of the pixels in the non-display image area are adjusted according to the position and the gain of each boundary pixel. The image to be displayed comprises a plurality of blocks, each block corresponds to N parameters in the first parameter list in sequence, and the N parameters comprise configuration information of boundary pixels in the corresponding block. Configuration information of all boundary pixels can be acquired from the first parameter list, and an image to be displayed can be processed into a shape matched with a non-full-screen display area according to the configuration information of the boundary pixels in the image display process. When the non-full-screen image is displayed, the hardware for processing the non-full-screen image display can obtain the parameters corresponding to the non-full-screen image display area through the first parameter list, and only the first parameter list occupies the corresponding memory.
By adopting the embodiment of the invention, for a display screen with any shape, the configuration parameters of the boundary pixels corresponding to the non-full screen image display area can be configured to the image display processing hardware of the mobile equipment in the mode of the first parameter list. The first parameter list for carrying the configuration parameters of the boundary pixels can be obtained by calculation outside the mobile device and configured to the mobile device, so that image display processing hardware of the mobile device does not need to perform a large amount of calculation, memory can be saved, the size of a corresponding chip in the mobile device can be reduced, and cost is reduced.
In order to facilitate better understanding and implementation of the present invention for those skilled in the art, the non-full-screen image display method is described below with reference to fig. 4 and 5 by taking the shape of the non-full-screen image display area presented on the display screen as a rounded screen as an example.
With reference to fig. 4 and 5, the boundary line L of the circular bead screen includes four corners, each of which is a quarter circular arc L1 with a radius R, the left upper region C of the circular arc L1 does not display an image, the color configuration parameters of the pixels in the region C are set to be black, the right lower region D of the circular arc L1 needs to normally display an image, and the color configuration parameters of the pixels in the region D are not adjusted. A certain transition region between the arc L1 and the image display region D needs to be anti-jagged, that is, a certain processing needs to be performed on the image display region of the boundary pixel. For example, a certain transition region between the circular arc L1 and the image display region D is processed by anti-aliasing to adjust the color configuration parameters of the boundary pixels according to the gains of the boundary pixels. Due to the fact that the pixels are rectangular, transition of an image display area and a non-image display area can be smooth and gentle through anti-aliasing processing of boundary pixels.
In one embodiment of the present invention, the image data is processed line by line, and the image is RGB three-channel, wherein R, G, B refers to the three primary colors of the image, R stands for red, G stands for green, and B stands for blue.
Since the pixel is a rectangle, the coordinate of the upper left corner of the pixel is taken as the pixel coordinate. Due to the symmetry of the rounded screen, the arc of the top left corner 1/4 is illustrated in conjunction with FIG. 5.
The boundary shape is 1/4 circular arcs with (R, R) as the center and R as the radius. The pixel (i, j) is the jth pixel on the ith row of the image, and the pixel (i +1, j +1) is the jth +1 pixel on the ith +1 row of the image, wherein the pixel (0, 0) is the coordinate of the starting point pixel.
Whether the pixel (i, j) is crossed by the boundary line is judged by the following formula (1) and formula (2). When the pixel (i, j) satisfies the following equations (1) and (2), the pixel (i, j) is crossed by the boundary line.
(R-i) 2 +(R-j) 2 >R 2 ; (1)
(R-i-1) 2 +(R-j-1) 2 <R 2 ; (2)
The gain of the pixel (i, j) is the area ratio of the region p to the lower right of the circular arc line in the pixel to the total pixel.
And traversing the 0 th to the R-1 th lines of the image, and finding out the positions of all boundary pixels and corresponding gain values.
In the embodiment of the invention, the image data processing adopts line-by-line processing, and all boundary pixels are partitioned into blocks according to lines. As can be seen from the geometrical relationship, the boundary pixels of the same row are necessarily adjacent.
For example, the boundary pixels of the ith row are Xi pixels from the Mi pixel, and the corresponding Gain values are (Gain1, Gain2, …, Gain Xi). Using a quadratic polynomial ax 2 + bx + c gains Gain1, Gain2, … for each boundary pixelGainxi was fitted. The binomial fit may be achieved by a least squares method. Only three parameters (a, b and c) of the quadratic polynomial, the first pixel position Mi and 5 parameters in total of the number Xi of the boundary pixels are needed to contain the configuration information of all the boundary pixels in the ith row.
Through the fix-point and shift operations, fixed bit widths are respectively given to the 5 parameters, the 5 parameters can be integrated into one fixed bit width parameter, and the obtained fixed bit width parameter is also the parameter block corresponding to the ith row. And sequentially compressing 5 parameters corresponding to each line to obtain a parameter block corresponding to each line, and obtaining R parameter blocks in total from 0 to R-1, thereby obtaining a first parameter list. The first parameter list includes configuration information of all boundary pixels of a non-full screen image display area. This first parameter list may be configured as configuration information to hardware for image display processing. The first parameter list is generated according to a fixed format, so that hardware reading and implementation are facilitated, and the friendliness of hardware for image display processing can be improved.
In the calculation process of the hardware of the image display processing, when the ith row of the image is processed, the ith parameter of the parameter list is read, and then the parameters (a, b, c, Mi, Xi) of the ith row can be obtained through bit operation. If R, G, B values of 0 to Mi-1 th pixels are set to 0 for 0 to Mi-1 th pixels in the ith row, the colors of all the 0 to Mi-1 th pixels are black, and no image content is displayed. For Mi-Mi + Xi-1 boundary pixels in the boundary line L1 area, gains of corresponding boundary pixels are obtained through quadratic polynomials respectively, and product operation is carried out on the gains of the boundary pixels and R, G, B values of the corresponding boundary pixels respectively to obtain R, G, B values of the adjusted boundary pixels. After the R, G, B value of the boundary pixel is adjusted, the boundary pixel will generate a smooth transition zone from black to normal display. The R, G, B for the pixels in the other image display region D are not adjusted, and the image content can be displayed normally.
It will be appreciated that the color of the image may also be adjusted by adjusting the brightness as well as the color of the image using LAB as color configuration parameters for the pixels. In practical applications, other color configuration parameters may also be adopted, which are not described herein again.
According to the embodiment of the invention, a large amount of calculation can be finished under the condition of leaving outside the mobile equipment, and the first parameter list is obtained. The hardware needing image display processing is very simple in calculation, after the configured first parameter list is read, each pixel can be completed only by a plurality of multipliers, adders and bits, the hardware needing image display processing is simple in calculation, and the hardware needing image display processing is high in friendliness. For example, in some embodiments, only one or more parameters set for each row are required, and a row memory buffer (buffer) is not required, so that less memory resources are occupied.
At present, the capacity of some irregular non-rectangular screens is low, the screen shapes required by different manufacturers are different, and the cost for customizing the non-rectangular screens is high.
In order to facilitate better understanding and implementation of the embodiments of the present invention for those skilled in the art, the embodiments of the present invention also provide an image display device.
Referring to fig. 6, a schematic diagram of a structure of an image display device according to an embodiment of the present invention is shown, where the image display device 60 may include: reading unit 61, obtaining unit 62 and adjusting unit 63, wherein:
the reading unit 61 is adapted to read a first parameter list for displaying a non-full-screen image, the image to be displayed includes a plurality of blocks, and the plurality of blocks correspond to N parameters in the first parameter list in sequence;
the obtaining unit 62 is adapted to obtain configuration information of a boundary pixel of a non-full-screen image display area from the first parameter list, where the configuration information of the boundary pixel includes: the position of the boundary pixel, the gain of the boundary pixel;
the adjusting unit 63 is adapted to adjust the color allocation parameters of the corresponding boundary pixels and the color allocation parameters of the pixels not displaying the image area according to the positions of the boundary pixels and the gains of the boundary pixels.
In a specific implementation, the obtaining unit 62 is adapted to decompress the parameter blocks in the first parameter list one by one to obtain configuration information of all boundary pixels in the parameter blocks, where the first parameter list is formed by compressing a plurality of parameter blocks, and each parameter block corresponds to a block of the image to be displayed.
In a specific implementation, the adjusting unit 63 is adapted to, when an ith block of the image is processed, read an ith parameter block corresponding to the ith block in the first parameter list; acquiring configuration information of boundary pixels of the ith block from the ith parameter block; acquiring the position of the first boundary pixel of the ith block and the number of the boundary pixels from the configuration information of the boundary pixels of the ith block; configuring a color of a pixel not displaying an image area in the ith block to black; and multiplying the gain of each boundary pixel with the color configuration parameter of the corresponding boundary pixel to obtain the color configuration parameter of the boundary pixel.
In a specific implementation, the first parameter list may be generated as follows. Acquiring boundary shape information of the non-full-screen image display area; reading a second parameter list of video streaming hardware, the second parameter list comprising at least one of: the method comprises the following steps of (1) the width of a display screen of the mobile terminal, the height of the display screen of the mobile terminal, the size of a pixel, the number of rows of the pixel and the number of columns of the pixel; calculating the position of a pixel through which a boundary line passes according to the second parameter list and the boundary shape information of the full-screen image display area to obtain the position of the boundary pixel, wherein the boundary shape information of the non-full-screen image display area comprises at least one of the following: the radius of the boundary, the length of the boundary, and the angle of the boundary; calculating a gain for each boundary pixel; dividing the boundary pixels according to an image data processing mode to obtain a plurality of blocks; and compressing the parameter blocks respectively corresponding to the plurality of blocks to generate the first parameter list, wherein the first parameter list comprises configuration information of all boundary pixels.
In a specific implementation, when compressing the parameter blocks corresponding to the plurality of blocks to generate the first parameter list, the following may be specifically performed: compressing the position and the number of the boundary pixels in the ith parameter block and the gain of the boundary pixels in the ith parameter block to obtain N parameters; and integrating the N parameters respectively corresponding to each parameter block in sequence to generate the first parameter list.
In an embodiment of the present invention, the position of the first boundary pixel in the ith parameter block, the number of boundary pixels, and the gain of the boundary pixel in the ith parameter block are compressed as follows to obtain N parameters. Reading the position of a first boundary pixel in the ith parameter block and the number of the boundary pixels, and performing polynomial fitting on the gains of all the boundary pixels in the ith parameter block to obtain polynomial parameters; and carrying out fixed-point operation and shift operation on the polynomial parameters corresponding to the ith parameter block, the position of the first boundary pixel and the number of the boundary pixels, and integrating the polynomial parameters corresponding to the ith parameter block, the position of the first boundary pixel and the number of the boundary pixels to obtain N parameters, wherein the N parameters have fixed bit width.
In a specific implementation, the gain of a boundary pixel refers to an area ratio of a pixel region, which is located on one side of the boundary line and is required to display an image, to the total pixels of the boundary pixel.
The embodiment of the present invention further provides another image display apparatus, which includes a memory and a processor, where the memory stores computer instructions executable on the processor, and the processor executes the steps of any one of the image display methods provided in the embodiment of the present invention when executing the computer instructions.
The embodiment of the present invention further provides a computer-readable storage medium, which is a non-volatile storage medium or a non-transitory storage medium, and on which computer instructions are stored, and when the computer instructions are executed, the steps of any one of the image display methods provided in the embodiment of the present invention are executed.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by instructing the relevant hardware through a program, which may be stored in a computer-readable storage medium, and the storage medium may include: ROM, RAM, magnetic or optical disks, and the like.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (11)
1. An image display method, comprising:
reading a first parameter list for displaying a non-full-screen image, wherein the image to be displayed comprises a plurality of blocks, and the blocks are sequentially provided with N parameters in the first parameter list in a one-to-one correspondence manner;
acquiring configuration information of boundary pixels of a non-full-screen image display area from the first parameter list, wherein the configuration information of the boundary pixels comprises: the position of the boundary pixel, the gain of the boundary pixel;
according to the position of the boundary pixel and the gain of the boundary pixel, adjusting the color configuration parameter of the corresponding boundary pixel and the color configuration parameter of the pixel of the non-display image area;
wherein the obtaining configuration information of the boundary pixels of the non-full-screen image display area from the first parameter list includes:
the first parameter list is formed by compressing a plurality of parameter blocks, the parameter blocks in the first parameter list are decompressed one by one, configuration information of all boundary pixels in the parameter blocks is obtained, and each parameter block corresponds to a block of the image to be displayed one by one.
2. The method according to claim 1, wherein the adjusting the color profile of the corresponding boundary pixel and the color profile of the pixel not displaying the image region according to the position of the boundary pixel and the gain of the boundary pixel comprises:
when the ith block of the image is processed, reading the ith parameter block corresponding to the ith block in the first parameter list;
acquiring configuration information of boundary pixels of the ith block from the ith parameter block;
acquiring the position of the first boundary pixel of the ith block and the number of the boundary pixels from the configuration information of the boundary pixels of the ith block;
configuring a color of a pixel not displaying an image area in the ith block to black;
and performing product operation on the gain of each boundary pixel and the color configuration parameter of the corresponding boundary pixel to obtain the color configuration parameter of the boundary pixel.
3. The image display method according to claim 2, wherein the first parameter list is generated as follows:
acquiring boundary shape information of a non-full-screen image display area;
reading a second parameter list of the video streaming hardware, the second parameter list comprising at least one of: the method comprises the following steps of (1) the width of a display screen of the mobile terminal, the height of the display screen of the mobile terminal, the size of pixels, the row number of the pixels and the column number of the pixels;
calculating the positions of pixels through which the boundary line of the non-full-screen image display area passes according to the second parameter list and the boundary shape information of the non-full-screen image display area to obtain the positions of the boundary pixels;
calculating a gain for each boundary pixel;
dividing the boundary pixels according to an image data processing mode to obtain a plurality of blocks;
and compressing the parameter blocks respectively corresponding to the plurality of blocks to generate the first parameter list, wherein the first parameter list comprises configuration information of all boundary pixels.
4. The method according to claim 3, wherein compressing the parameter blocks corresponding to the blocks to generate the first parameter list comprises:
compressing the position and the number of the boundary pixels in the ith parameter block and the gain of the boundary pixels in the ith parameter block to obtain N parameters;
and integrating the N parameters respectively corresponding to each parameter block in sequence to generate the first parameter list.
5. The image display method according to claim 4, wherein the compressing the position of the first boundary pixel in the ith parameter block, the number of boundary pixels, and the gain of the boundary pixel in the ith parameter block to obtain N parameters comprises:
reading the position of a first boundary pixel in the ith parameter block and the number of the boundary pixels, and performing polynomial fitting on the gains of all the boundary pixels in the ith parameter block to obtain polynomial parameters;
and carrying out fixed-point operation and shift operation on the polynomial parameters corresponding to the ith parameter block, the position of the first boundary pixel and the number of the boundary pixels, and integrating the polynomial parameters corresponding to the ith parameter block, the position of the first boundary pixel and the number of the boundary pixels to obtain N parameters, wherein the N parameters have fixed bit width.
6. The image display method according to claim 3, wherein the calculating the gain of each boundary pixel comprises:
and calculating the area proportion of a pixel region which is positioned on one side of the boundary line and needs to display an image in the boundary pixels to the total pixels of the boundary pixels.
7. The image display method according to claim 3, wherein the boundary shape information of the full-screen image display area includes at least one of: the radius of the boundary, the length of the boundary, and the angle of the boundary.
8. An image display apparatus, comprising:
the reading unit is suitable for reading a first parameter list for displaying a non-full-screen image, the image to be displayed comprises a plurality of blocks, and the plurality of blocks correspond to N parameters in the first parameter list in sequence;
an obtaining unit, adapted to obtain configuration information of a boundary pixel of a non-full screen image display area from the first parameter list, where the configuration information of the boundary pixel includes: the position of the boundary pixel, the gain of the boundary pixel;
the adjusting unit is suitable for adjusting the color configuration parameters of the corresponding boundary pixels and the color configuration parameters of the pixels of the non-display image area according to the positions of the boundary pixels and the gains of the boundary pixels;
the obtaining unit is adapted to decompress the parameter blocks in the first parameter list one by one to obtain the configuration information of all boundary pixels in the parameter blocks, wherein the first parameter list is formed by compressing a plurality of parameter blocks, and each parameter block corresponds to a block of the image to be displayed one by one.
9. The image display apparatus according to claim 8, wherein the adjusting unit is adapted to, when an ith block of the image is processed, read an ith parameter block corresponding to the ith block in the first parameter list; acquiring configuration information of boundary pixels of the ith sub-block from the ith parameter block; acquiring the position of the first boundary pixel of the ith block and the number of the boundary pixels from the configuration information of the boundary pixels of the ith block; configuring the color of pixels not displaying an image area in the ith block to black; and performing product operation on the gain of each boundary pixel and the color configuration parameter of the corresponding boundary pixel to obtain the color configuration parameter of the boundary pixel.
10. An image display apparatus comprising a memory and a processor, the memory having stored thereon computer instructions executable on the processor, wherein the processor, when executing the computer instructions, performs the steps of the image display method of any one of claims 1 to 7.
11. A computer readable storage medium, being a non-volatile storage medium or a non-transitory storage medium, having stored thereon computer instructions, characterized in that the computer instructions, when executed by a processor, perform the steps of the image display method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910142189.0A CN111292383B (en) | 2019-02-26 | 2019-02-26 | Image display method and device, and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910142189.0A CN111292383B (en) | 2019-02-26 | 2019-02-26 | Image display method and device, and computer-readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111292383A CN111292383A (en) | 2020-06-16 |
CN111292383B true CN111292383B (en) | 2022-09-30 |
Family
ID=71030638
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910142189.0A Active CN111292383B (en) | 2019-02-26 | 2019-02-26 | Image display method and device, and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111292383B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107526201A (en) * | 2017-09-19 | 2017-12-29 | 厦门天马微电子有限公司 | A kind of driving method of display panel, display device and display panel |
CN108682308A (en) * | 2018-07-27 | 2018-10-19 | 京东方科技集团股份有限公司 | Display panel and its display methods, display device |
-
2019
- 2019-02-26 CN CN201910142189.0A patent/CN111292383B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107526201A (en) * | 2017-09-19 | 2017-12-29 | 厦门天马微电子有限公司 | A kind of driving method of display panel, display device and display panel |
CN108682308A (en) * | 2018-07-27 | 2018-10-19 | 京东方科技集团股份有限公司 | Display panel and its display methods, display device |
Also Published As
Publication number | Publication date |
---|---|
CN111292383A (en) | 2020-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9240033B2 (en) | Image super-resolution reconstruction system and method | |
CN104461440B (en) | Rendering intent, rendering device and display device | |
US10504419B2 (en) | Data converting method and apparatus, and computer-readable storage medium | |
JP6633134B2 (en) | Display device and image processing method thereof | |
US11030715B2 (en) | Image processing method and apparatus | |
US8913080B2 (en) | Partitioning high resolution images into sub-images for display | |
CN105489177B (en) | Sub-pixel rendering intent and rendering device | |
KR102224742B1 (en) | Image display method | |
CN112929672B (en) | Video compression method, device, equipment and computer readable storage medium | |
JP6418010B2 (en) | Image processing apparatus, image processing method, and display apparatus | |
US20210012459A1 (en) | Image processing method and apparatus | |
CN114495812A (en) | Display panel brightness compensation method and device, electronic equipment and readable storage medium | |
CN111292383B (en) | Image display method and device, and computer-readable storage medium | |
JP2001338288A (en) | Method and system for processing image, and image display controller | |
US20200226822A1 (en) | Content Based Anti-Aliasing for Image Downscale | |
CN110858389B (en) | Method, device, terminal and transcoding equipment for enhancing video image quality | |
JP6661339B2 (en) | Display control device, multi-display system, and display method of multi-display system | |
WO2024087088A1 (en) | Image processing method based on dithering algorithm, and display device | |
US9898831B2 (en) | Macropixel processing system, method and article | |
US10540747B2 (en) | Digital image scaling | |
JP2004215141A (en) | Moire elimination device, moire elimination method and program | |
CN113497964B (en) | Display method of local light control, storage medium and intelligent television | |
WO2017084038A1 (en) | Image display method and apparatus, electronic device and storage medium | |
WO2022113910A1 (en) | Image processing device, image processing method, and program | |
US9811920B2 (en) | Macropixel processing system, method and article |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |