CN114049272A - Screen image processing method, screen assembly and computer storage medium - Google Patents

Screen image processing method, screen assembly and computer storage medium Download PDF

Info

Publication number
CN114049272A
CN114049272A CN202111335702.1A CN202111335702A CN114049272A CN 114049272 A CN114049272 A CN 114049272A CN 202111335702 A CN202111335702 A CN 202111335702A CN 114049272 A CN114049272 A CN 114049272A
Authority
CN
China
Prior art keywords
intersection point
target pixel
horizontal axis
pixel grid
area
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.)
Granted
Application number
CN202111335702.1A
Other languages
Chinese (zh)
Other versions
CN114049272B (en
Inventor
孙林举
姜宁宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Aoxian Technology Co ltd
Original Assignee
Shanghai Aoxian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Aoxian Technology Co ltd filed Critical Shanghai Aoxian Technology Co ltd
Priority to CN202111335702.1A priority Critical patent/CN114049272B/en
Publication of CN114049272A publication Critical patent/CN114049272A/en
Application granted granted Critical
Publication of CN114049272B publication Critical patent/CN114049272B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0007Image acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/64Analysis of geometric attributes of convexity or concavity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Image Processing (AREA)

Abstract

The application provides a screen image processing method at curve angle, which is characterized in that a curve center is used as a coordinate system origin, a curve arc of the curve angle is arranged in a plane coordinate system, a pixel grid intersected with the curve arc is a target pixel grid, and the method comprises the following steps: in response to the acquisition of the first intersection point coordinate and the second intersection point coordinate of the curve arc and each row or each column of target pixel grids, calculating the gray coefficient of each target pixel grid according to the first intersection point coordinate and the second intersection point coordinate of each row or each column of target pixel grids; and processing the image data according to the gray coefficient of the target pixel grid. The screen image processing method, the screen assembly and the computer storage medium can rapidly acquire the gray coefficient of each target pixel grid so as to eliminate sawtooth and color cast phenomena of curve angles and improve the display effect.

Description

Screen image processing method, screen assembly and computer storage medium
Technical Field
The application relates to the technical field of curve angle screen processing, in particular to a curve angle screen image processing method, a screen assembly and a computer storage medium.
Background
In the field of mobile phones, mobile phones are developing towards full-screen, in order to improve the screen duty ratio of the mobile phones, prevent the edges of the mobile phones from being fragile and improve the visual aesthetic quality of the mobile phones, the mobile phones have R corners, Notch and the like, but the physical sub-pixels of the mobile phone screen can be cut by the method, so that the cut edges can have sawtooth and color cast phenomena, and the data of the cut edges are lost.
With the diversified development of mobile phone screen applications, when an arc line cut at the edge of a screen is in a curve shape, an image processing algorithm for coping with a curve angle screen becomes an urgent problem to be solved in the industry.
Disclosure of Invention
The application provides a screen image processing method of a curve angle, a screen assembly and a computer storage medium, which are used for relieving the problems of sawteeth and color cast after cutting on the curve angle edge of a mobile phone screen so as to improve the display effect.
In one aspect, the present application provides a method for processing a screen image of a curve angle, optionally, with a curve center as an origin of a coordinate system, placing a curve arc of the curve angle in a planar coordinate system, and taking a pixel cell intersected with the curve arc as a target pixel cell, the method including: in response to the acquisition of the first intersection point coordinate and the second intersection point coordinate of the curve arc and each row or each column of target pixel grids, calculating the gray coefficient of each target pixel grid according to the first intersection point coordinate and the second intersection point coordinate of each row or each column of target pixel grids; and processing the image data according to the gray coefficient of the target pixel grid.
Optionally, the step of calculating the gamma of each target pixel cell according to the first intersection point coordinate and the second intersection point coordinate of each row or each column of target pixel cells includes:
performing straight line connection from a first intersection point to a second intersection point of each row or each column of target pixel grid area to obtain a fitting line segment;
calculating a first area of each pixel grid not cut by the fitted line segment;
and calculating the ratio of the first area to the total area of each pixel grid to obtain the gray coefficient of the target pixel grid.
Optionally, when calculating a target pixel grid of an nth row in the first quadrant, setting the side length of each pixel grid region to be 1, where N is a positive integer, the first intersection point is an upper intersection point, and the second intersection point is a lower intersection point; the step of calculating a first area of each pixel cell not cut by the fitted line segment comprises:
when the horizontal axis coordinates of the curve arc and the upper intersection point and the horizontal axis coordinates of the lower intersection point of the Nth row are integers, calculating the first area of each pixel grid of the Nth row according to the similarity of the triangles;
and/or when the curve arc and the horizontal axis coordinate of the upper intersection point of the Nth row are integers, and the horizontal axis coordinate of the lower intersection point is not an integer, acquiring a decimal part of the horizontal axis coordinate of the lower intersection point, and calculating the first area of each pixel grid of the Nth row according to the similarity between the decimal part of the horizontal axis coordinate of the lower intersection point and a triangle;
and/or when the horizontal axis coordinates of the upper intersection point of the curve arc and the Nth row are not integers, and the horizontal axis coordinates of the lower intersection point are integers, acquiring the decimal part of the horizontal axis coordinates of the upper intersection point, and calculating the first area of each pixel grid of the Nth row according to a rectangular area formula, the decimal part of the horizontal axis coordinates of the upper intersection point and the similarity of a triangle;
and/or when the intersection point horizontal axis coordinate and the intersection point horizontal axis coordinate of the curve arc and the Nth row are not integers, acquiring a decimal part of the intersection point horizontal axis coordinate and a decimal part of the intersection point horizontal axis coordinate, and then calculating the first area of each pixel grid of the Nth row according to a rectangular area formula, the decimal part of the intersection point horizontal axis coordinate and the similarity of the triangle.
Optionally, the step of processing the image data according to the gamma of the target pixel grid comprises:
and rounding the product of multiplying each gray coefficient by the smoothing order to obtain a coefficient storage number, and writing the coefficient storage number into a memory.
Optionally, the step of writing to the memory comprises:
in response to acquiring the coefficient storage number, allocating a storage field for each row or column of the target pixel grid;
respectively writing the number A of target pixel grids in the Nth row or the Nth column and the coefficient storage number of the A target pixel grids in the Nth row or the Nth column from the first zone bit of the storage field in the Nth row or the Nth column to the A +1 zone bit of the A +1 zone bit in the Nth row or the Nth column;
wherein N is a positive integer and A is a positive integer.
In another aspect, the present application also provides a curved-angle screen assembly, specifically, comprising an image driver, an image processor, and a curved-angle screen; the image driver is used for sending image data to the image processor so that the image processor controls the curve angle screen to display the image data; the image processor is configured to: and taking the center of a curve as the origin of a coordinate system, placing the curve arc of the curve angle in a plane coordinate system, taking a pixel grid intersected with the curve arc as a target pixel grid, responding to the acquisition of a first intersection point coordinate and a second intersection point coordinate of the curve arc and each row or each column of target pixel grids, calculating the gray coefficient of each target pixel grid according to the first intersection point coordinate and the second intersection point coordinate of each row or each column of target pixel grids, and processing the image data according to the gray coefficient of the target pixel grid.
Optionally, the image processor is further configured to:
performing straight line connection from a first intersection point to a second intersection point of each row or each column of target pixel grid area to obtain a fitting line segment;
calculating a first area of each pixel grid not cut by the fitted line segment;
and calculating the ratio of the first area to the total area of each pixel grid to obtain the gray coefficient of the target pixel grid.
Optionally, the image processor is further configured to: when calculating a target pixel grid of an Nth row in a first quadrant, setting the side length of each pixel grid region as 1, wherein N is a positive integer, the first intersection point is an upper intersection point, and the second intersection point is a lower intersection point; the step of calculating a first area of each pixel cell not cut by the fitted line segment comprises:
when the horizontal axis coordinates of the curve arc and the upper intersection point and the horizontal axis coordinates of the lower intersection point of the Nth row are integers, calculating the first area of each pixel grid of the Nth row according to the similarity of the triangles;
and/or when the curve arc and the horizontal axis coordinate of the upper intersection point of the Nth row are integers, and the horizontal axis coordinate of the lower intersection point is not an integer, acquiring a decimal part of the horizontal axis coordinate of the lower intersection point, and calculating the first area of each pixel grid of the Nth row according to the similarity between the decimal part of the horizontal axis coordinate of the lower intersection point and a triangle;
and/or when the horizontal axis coordinates of the upper intersection point of the curve arc and the Nth row are not integers, and the horizontal axis coordinates of the lower intersection point are integers, acquiring the decimal part of the horizontal axis coordinates of the upper intersection point, and calculating the first area of each pixel grid of the Nth row according to a rectangular area formula, the decimal part of the horizontal axis coordinates of the upper intersection point and the similarity of a triangle;
and/or when the curve arc and the upper intersection point horizontal axis coordinate and the lower intersection point horizontal axis coordinate of the Nth row are not integers, acquiring a decimal part of the upper intersection point horizontal axis coordinate and a decimal part of the lower intersection point horizontal axis coordinate, and calculating the first area of each pixel grid of the Nth row according to a rectangular area formula, the decimal part of the upper intersection point horizontal axis coordinate, the decimal part of the lower intersection point horizontal axis coordinate and the similarity of the triangle.
Optionally, the curved-angle screen assembly further comprises a memory coupled to the image processor, the image processor further configured to allocate a memory field for each row or column of the target pixel grid in response to obtaining the coefficient memory count; respectively writing the number A of target pixel grids in the Nth row or the Nth column and the coefficient storage number of the A target pixel grids in the Nth row or the Nth column from the first zone bit of the storage field in the Nth row or the Nth column to the A +1 zone bit of the A +1 zone bit in the Nth row or the Nth column; wherein N is a positive integer and A is a positive integer.
On the other hand, the present application also provides a computer storage medium, in particular, a computer program stored on the computer storage medium, wherein the computer program can realize the screen image processing method according to any one of the above items when the computer program is executed by a computer.
As described above, the screen image processing method of the curve angle, the screen component of the curve angle and the computer storage medium provided by the application can not only quickly obtain the gray scale coefficient of each target pixel grid, so as to eliminate the problems of sawteeth and color cast after the cut edge of the curve angle of the mobile phone screen, thereby effectively improving the display effect.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a diagram of an elliptical corner screen and an edge pixel grid according to an embodiment of the present application.
Fig. 2 is a flowchart of a screen image processing method according to a first embodiment of the present application.
FIG. 3 is a flowchart illustrating a method for calculating a gamma of a target pixel grid according to the embodiment of FIG. 2.
FIG. 4 is a schematic diagram illustrating a first area of each target pixel cell calculated according to the embodiment of FIG. 3.
Fig. 5 is a structural diagram of a screen assembly in a second embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings. With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the recitation of an element by the phrase "comprising an … …" does not exclude the presence of additional like elements in the process, method, article, or apparatus that comprises the element, and further, where similarly-named elements, features, or elements in different embodiments of the disclosure may have the same meaning, or may have different meanings, that particular meaning should be determined by their interpretation in the embodiment or further by context with the embodiment.
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that, the method for processing the screen image of the curve angle is applied to the curve angle screen assembly, the center of the curve is used as the origin of the coordinate system, the curve arc of the curve angle can be placed in the first quadrant of the plane coordinate system for convenience of illustration, and the pixel grid intersected with the curve arc is the target pixel grid, but the application is not limited to performing similar processing in other quadrants.
It will be appreciated that on a cut line of a curved arc, there will be two intersections per row or column for the target pixel grid to be cut on an elliptical screen. Alternatively, in each row of the target pixel cell of the first quadrant, the first intersection point may be an upper intersection point, and the second intersection point may be a lower intersection point. Similarly, in each column of the target pixel grid of the first quadrant, the first intersection point may be a left intersection point, and the second intersection point may be a right intersection point.
The curve can be a rounded corner curve, an elliptic curve, a perfect curve, a Fermat curve and other various curve types which conform to the definition of a mathematical function. For convenience of explaining the technical solution of the present application, the following embodiments are explained and illustrated based on a convex elliptic curve angle screen as an example, and each row of target pixel cells in an elliptic cutting line of a first quadrant is taken as a calculation object. For concave curve screens, other types of curves, or calculation targets of each column of target pixel grids, the following processing scheme principles of the embodiments may be referred to. In other embodiments, the processing idea of the present application can also be applied to other quadrants and to each column of the target pixel grid as the processing object. It is within the scope of the present application to refer to the following embodiments and to make simple adjustments or changes to the corresponding technical solutions.
Based on the mathematical principle, an elliptical arc corresponds to an ellipse, i.e. the major and minor axes and the center of the ellipse can be determined from the elliptical arc, and therefore, based on the elliptical arc cut line, the major and minor axes and the center of the ellipse in which the elliptical arc cut line is located can be determined. Wherein, the central coordinate is the coordinate of the ellipse center where the ellipse arc cutting line is positioned. The oval arc cutting line is the contour line of the oval fillet of the display screen, is located at the oval arc edge of the display screen and is used for defining the oval arc edge of the display area of the display screen. Before chamfering or grooving the display screen, the shape of the cutting line can be designed in advance, and if the chamfering is required to be an elliptic arc-shaped chamfering or grooving is required to be an elliptic arc-shaped, the used elliptic arc-shaped cutting line can be designed.
First embodiment
The application firstly provides a screen image processing method of a curve angle.
In one embodiment, the method for processing the screen image includes the steps of, with a center of a curve as an origin of a coordinate system, placing a curve arc of a curve angle in a plane coordinate system, and with a pixel cell intersected with the curve arc as a target pixel cell:
in response to the first intersection point coordinate and the second intersection point coordinate of the acquired curve arc and each row or each column of target pixel grids, calculating the gray coefficient of each target pixel grid according to the first intersection point coordinate and the second intersection point coordinate of each row or each column of target pixel grids; and processing the image data according to the gray coefficient of the target pixel grid.
FIG. 1 is a diagram of an elliptical corner screen and an edge pixel grid according to an embodiment of the present application.
Referring to fig. 1, in an embodiment, the o point is a coordinate system origin, x and y correspond to an x axis and a y axis of a plane coordinate axis, respectively, and a first quadrant includes a plurality of pixel grids with equal size in a coordinate system formed by the origin o, the x axis and the y axis. The method selects an elliptical fillet with a major axis of 16 pixel units and a minor axis of 11 pixel units as an example, the elliptical fillet is placed in a first quadrant, the center of the ellipse is coincided with a point o, and an elliptical arc r placed in the elliptical fillet of the first quadrant is obtained. The area formed by the elliptic arc r and the coordinate axis in the first quadrant is the light-emitting area of the screen, and the pixel grid intersected with the elliptic arc r is the target pixel grid and represents the cutting edge. In other embodiments, the ellipse angles may be placed in other quadrants as well.
With continued reference to fig. 1, in an embodiment, a1, a2, a3, a4, a5, a6, a7, b1, b2, b3, b4, c1, c2, d1, d2, d3, e1, e2, f1, f2, g1, h1, h2, i1, j1, and k1 are target pixels.
It is to be understood that, when each line of the target pixel grid is the processing object, the upper intersection point coordinates and the lower intersection point coordinates may be selected. When each column of target pixel grids is taken as a processing object, the right intersection point coordinate and the left intersection point coordinate can be selected.
Fig. 2 is a flowchart of a screen image processing method according to a first embodiment of the present application.
Referring to fig. 2, an exemplary screen image processing method includes:
s10: responsive to acquiring the upper and lower intersection abscissa coordinates of the curved arc and each row of the target pixel grid.
And calculating the horizontal axis coordinate of the upper intersection point and the horizontal axis coordinate of the lower intersection point of each line of target pixel grids according to a formula of a curve equation.
S20: and calculating the gray coefficient of each target pixel grid according to the upper intersection point horizontal axis coordinate and the lower intersection point horizontal axis coordinate of each line of target pixel grid.
The gamma, which may also be called a gradient coefficient, may be the ratio of the area of each target pixel grid that is not cut to the total area. The degree of color gradient after the target pixel grid, namely the image is cut can be clearly represented. The ratio of the uncut area to the total area in each pixel grid can be calculated by the upper intersection point horizontal axis coordinate and the lower intersection point horizontal axis coordinate of the intersection of the arc line of the curve and each row of target pixel grids.
S30: and processing the image data according to the gray coefficient of the target pixel grid.
The display brightness of each pixel grid on the screen is adjusted and controlled by the magnitude of the driving current, and the driving current is the current output to each pixel grid by the driving component of the pixel grid. At the edge of the screen, in order to smooth the brightness and eliminate the color cast phenomenon, each edge pixel grid respectively corresponds to a gray coefficient for optimizing the brightness. Generally, the gray scale factor for optimizing luminance is different when the area ratio is different.
In the embodiment, the gray coefficient of each target pixel grid is calculated through the first intersection point coordinate and the second intersection point coordinate of the target pixel grid, so that the gray coefficient of each target pixel grid can be quickly obtained, the phenomena of sawtooth and color cast generated after curve angle cutting are eliminated, and the purpose of saving cost is achieved.
In an embodiment, the step of calculating the gamma of each target pixel cell according to the first intersection point coordinate and the second intersection point coordinate of each row or each column of the target pixel cell may include:
performing straight line connection from a first intersection point to a second intersection point of each row or each column of target pixel grid area to obtain a fitting line segment; calculating a first area of each pixel grid which is not cut by the fitted line segment; and calculating the ratio of the first area to the total area of each pixel grid to obtain the gray coefficient of the target pixel grid.
FIG. 3 is a flowchart illustrating a method for calculating a gamma of a target pixel grid according to the embodiment of FIG. 2.
Referring to fig. 3, the screen image processing method illustratively executes S20: the step of calculating the gray coefficient of each target pixel grid according to the upper intersection point horizontal axis coordinate and the lower intersection point horizontal axis coordinate of each line of target pixel grids comprises the following steps:
s21: and (3) performing linear connection from the upper intersection point to the lower intersection point of each line of target pixel grid area to obtain a fitting line segment.
S22: a first area of each pixel grid not cut by the fitted line segment is calculated.
S23: and calculating the ratio of the first area to the total area of each pixel grid to obtain the gray coefficient of the target pixel grid.
Referring to fig. 1, in an embodiment, the upper intersection point B of the first row of target pixel cells a 1-a 7 is connected to the lower intersection point a by a straight line to obtain a fitting line segment AB. The lower left corner of the target pixel grid area in the first row is point C. And forming a triangle ABC by the fitting line segment AB and the target pixel grid area on the side close to the origin of coordinates, and calculating the first area of the triangle ABC not cut in each target pixel grid. Exemplarily, in the target pixel cell a7, assuming that the side length of each pixel cell is 1, the first area which is not cut can be calculated to be 0.033 in combination with the similar property of the triangle, and since the total area of each pixel cell is 1, the gamma of the target pixel cell a7 is 0.033. According to the similarity principle of triangles, the gray coefficients of the target pixel grids from a1 to a6 can be calculated.
In this embodiment, the side length of each target pixel grid is set to 1, but the side length of the target pixel grid is not limited to 1 unit, and may be 2 units, 3 units, or other random values greater than 0, and at this time, the total area of each target pixel grid may be calculated according to a square area formula. As can be understood, for a convex curve, the area that is not cut is on the side of the parting line near the origin of the coordinate system; and for the concave curve, the area which is not cut is positioned at the side of the parting line far away from the origin of the coordinate system.
FIG. 4 is a schematic diagram illustrating a first area of each target pixel cell calculated according to the embodiment of FIG. 3.
Referring to fig. 4, in an embodiment, the screen image processing method performs step S22: the step of calculating the first area of each pixel cell not cut by the fitted line segment includes a plurality of combination cases. In the target pixel grid of the nth row, the side length of each pixel grid region is set to be 1, wherein N is a positive integer.
Referring to combination 1 in fig. 4, when the horizontal axis coordinates of the upper intersection point and the lower intersection point of the curved arc and the nth row are both integers, the uncut first area of each target pixel grid in the nth row is calculated according to the similarity of the triangles.
Referring to combination 2 in fig. 4, when the horizontal axis coordinate of the upper intersection point of the curve arc and the nth row is an integer and the horizontal axis coordinate of the lower intersection point is not an integer, a decimal part of the horizontal axis coordinate of the lower intersection point is obtained, and a first area of each target pixel lattice in the nth row that is not cut is calculated according to the similarity between the decimal part of the horizontal axis coordinate of the lower intersection point and the triangle.
Illustratively, referring to fig. 1, in the target pixel grid of the 11 th row, when the abscissa x1 of the upper intersection point B is an integer when 0 is calculated according to the ellipse formula, and the abscissa x2 of the lower intersection point a is not an integer when 6.666, the two legs of the right triangle ABC are 1 and 6.666 respectively, and then the total area of the right triangle ABC can be calculated according to the right triangle area formula. The similarity of the triangle and the fractional part of the horizontal axis coordinate of the lower intersection point a is acquired to calculate the first area of each pixel lattice of 11 rows.
Referring to combination 3 in fig. 4, when the horizontal axis coordinate of the upper intersection point of the curve arc and the nth row is not an integer and the horizontal axis coordinate of the lower intersection point is an integer, the decimal part of the horizontal axis coordinate of the upper intersection point is obtained, and the uncut first area of each target pixel lattice of the nth row is calculated according to the rectangular area formula, the decimal part of the horizontal axis coordinate of the upper intersection point, and the similarity of the triangle.
Referring to combination 4 in fig. 4, when the curve arc and the horizontal axis coordinate of the upper intersection point and the horizontal axis coordinate of the lower intersection point of the nth row are not integers, a decimal part of the horizontal axis coordinate of the upper intersection point and a decimal part of the horizontal axis coordinate of the lower intersection point are obtained, and then a first area of each target pixel lattice of the nth row, which is not cut, is calculated according to a rectangular area formula, the decimal part of the horizontal axis coordinate of the upper intersection point, the decimal part of the horizontal axis coordinate of the lower intersection point and the similarity of the triangle.
For example, referring to fig. 1, when the horizontal axis coordinate x1 of the upper intersection point of the elliptical arc and the target pixel grid in the 10 th row is not an integer 6.666 and the horizontal axis coordinate x2 of the lower intersection point is not an integer 9.199, a decimal part rem (x1) of the horizontal axis coordinate of the upper intersection point is 0.666 and a decimal part rem (x2) of the horizontal axis coordinate of the lower intersection point is 0.199 are obtained, a rectangular area 0.666 in the target pixel grid of b1 is obtained according to the decimal part of the horizontal axis coordinate of the upper intersection point and a rectangular area formula, a trapezoidal area 0.246 in the target pixel grid of b1 is obtained according to the similarity between the decimal part of the horizontal axis coordinate of the lower intersection point and a triangle, the last two areas are added to obtain a first area 0.912 of the target pixel grid of b1, and a first area of each pixel grid of the 10 th row which is not cut is obtained according to the similarity of the triangle.
For cutting of each line, the fitted straight line segment and each line of cut target pixel grids are combined into three shapes of a triangle, a trapezoid and a rectangle by adopting a fitting mode of replacing a curve with the straight line segment, and then a mathematical formula is combined to accurately combine and calculate a first area of each target pixel grid which is not cut, so that the gray coefficient of each target pixel grid is obtained.
In one embodiment, the screen image processing method performs S30: the step of processing the image data according to the gamma of the target pixel grid comprises:
and rounding the product of multiplying each gray coefficient by the smoothing order to obtain a coefficient storage number and writing the coefficient storage number into a memory. The rounding may be upward rounding, upward rounding with a fraction discarded, or rounded.
The smoothing order represents the smoothness level of screen edge lighting, and all gamma values are normalized to 4 bits for the convenience of hardware storage, so that the smoothness can be divided into 16 levels at most.
In the round-down embodiment, the gamma of each target pixel bin is multiplied by 16, the resulting product-discarded decimal is rounded down and the selected integer is stored in memory so that the processed gamma value is in the middle of [0, 15 ].
Illustratively, when the gamma of a target pixel cell a7 is 0.033, multiplying 0.033 by 16 yields a product of 0.528, rounding down to 0, which can be converted to 1 st binary data 0000 for storage in memory. When the system calls the gamma of a7, binary data 0000, that is, 0 in decimal, is read, and 0 is divided by 16 to obtain a quotient 0, that is, 0 is used as the actual gamma of the target pixel cell a7 to perform display driving.
Illustratively, when the gamma of a target pixel cell a1 is 0.9, 0.9 is multiplied by 16 to obtain a product 14.4, and the product is rounded down to obtain 14, which can be converted into the 15 th binary data 1110 to be stored in the memory. When the system calls the gamma of a1, binary data 1110, i.e., 14 in decimal, is read, and 14 is divided by 16 to obtain a quotient 0.875, i.e., 0.875 is used as the actual gamma of the target pixel cell a1 for display driving.
In the rounded-up embodiment, the gamma of each target pixel cell is multiplied by 16, and the resulting product is rounded up and then the integer is selected and stored in memory so that the processed gamma value is in the middle of [1, 16 ].
Illustratively, when the gamma of a target pixel cell a7 is 0.033, multiplying 0.033 by 16 yields a product of 0.528, rounding up to 1, which can be converted to 1 st binary data 0000 for storage in memory. When the system calls the gamma of a7, binary data 0000, i.e., 0 in decimal, is read, 1 is added to obtain 1, and 1 is divided by 16 to obtain quotient 0.0625, i.e., display driving is performed with 0.0625 as the actual gamma of target pixel cell a 7.
Illustratively, when the gamma of a target pixel cell a1 is 0.9, 0.9 is multiplied by 16 to obtain a product 14.4, and rounded up to obtain 15, which can be converted into the 15 th binary data 1110 to be stored in the memory. When the system calls the gamma of a1, binary data 1110 is read, i.e., 14 in decimal, and 1 is added to obtain 15, and 15 is divided by 16 to obtain a quotient 0.9375, i.e., 0.9375 is used as the actual gamma of the target pixel cell a1 for display driving.
In a round-robin embodiment, the gamma of each target pixel bin is multiplied by 15, and the resulting product is rounded and then selected as a whole and stored in memory so that the processed gamma value is in the middle of [0, 15 ].
Illustratively, when the gamma of one target pixel grid a8 is 0.39, 0.39 is multiplied by 15 to obtain a product of 5.85, rounded to 6, which can be converted into 7 th binary data 0110 to be stored in the memory. When the system calls the gamma of a7, binary data 0110, that is, decimal 6 is read, and 6 is divided by 15 to obtain a quotient 0.4, that is, display driving is performed with 0.4 as the actual gamma of the target pixel cell a 8.
Illustratively, when the gamma of one target pixel cell a9 is 0.87, 0.87 is multiplied by 15 to obtain a product 13.05, rounded to obtain 13, which can be converted into 14 th binary data 1101 to be stored in the memory. When the system calls the gamma of a9, binary data 1101, i.e., 13 in decimal, is read, and 13 is divided by 15 to obtain a quotient 0.867, i.e., display driving is performed with 0.867 as the actual gamma of the target pixel cell a 9.
In another embodiment, all gamma values can also be normalized to 5 bits, and the smoothness can be divided up to 32 levels. It should be noted that the normalization of the gamma may be 4 bits, or may be any bit data such as 5 bits, 6 bits, etc., which is not limited in this application. The smoothing order may represent a smoothness level of the screen edge lighting. The larger the smoothing order, the more accurate the stored data, and the better the light smoothing effect. The smaller the smoothing order is, the more effective the storage space can be saved.
In one embodiment, the screen image processing method includes, in performing the writing to the memory, the steps of:
in response to obtaining the coefficient storage count, a storage field is allocated for each row of the target pixel grid. Correspondingly, in the A target pixel grids in the Nth row, the number A of the target pixel grids in the Nth row and the coefficient storage number of the A target pixel grids in the Nth row are respectively written in the A +1 zone bits from the first zone bit of the storage field in the Nth row to the A +1 zone bit. Wherein N is a positive integer and A is a positive integer.
Referring to fig. 1 and table one, a storage manner of the gamma of each target pixel cell is shown in table one, and in one embodiment, a storage field is allocated to each row of target pixel cells in table one; in the 7 target pixel cells in the first row, from 8 positions from the 1 st position to the 8 th position of the storage field in the first row, the number of the target pixel cells in the first row, which is 7, and the stored coefficient numbers of the 7 target pixel cells in the first row, which are a1, a2, a3, a4, a5, a6, a7, are written, and so on for the target pixel cells in the other rows. In the process of displaying the curve angle screen, the system can directly read the number of the target pixel grids of each line, of which the gray coefficients need to be adjusted, according to the storage field of the target pixel grid of each line. The system can also quickly position the storage position of the corresponding gray coefficient according to the storage field of each row of target pixel grids, and the reading speed is increased.
Watch 1
7 a1 a2 a3 a4 a5 a6 a7
4 b1 b2 b3 b4 2 c1 c2
3 d1 d2 d3 2 e1 e2 2
f1 f2 1 g1 2 h1 h2 1
l1 1 j1 1 k1
Second embodiment
On the other hand, on the basis of the first embodiment, the present application further provides a screen assembly with a curved corner, and fig. 5 is a structural diagram of the screen assembly in the second embodiment of the present application.
Referring to fig. 5, a screen assembly of a curve angle illustratively includes an image driver 10, an image processor 20, and a curve angle screen 30. The image driver 10 is used to send image data to the image processor 20 so that the image processor 20 controls the curve angle screen 30 to display the image data.
In one embodiment, the image processor 20 is configured to: taking the center of a curve as the origin of a coordinate system, placing the curve arc of a curve angle in a plane coordinate system, taking a pixel grid intersected with the curve arc as a target pixel grid, responding to the first intersection point coordinate and the second intersection point coordinate of the curve arc and each row or each column of target pixel grids, calculating the gray coefficient of each target pixel grid according to the first intersection point coordinate and the second intersection point coordinate of each row or each column of target pixel grids, and processing image data according to the gray coefficient of the target pixel grid; the curve angle screen 30 is controlled to display the processed image data.
For example, the image processor 20 may calculate the coordinates of the horizontal axis of the upper intersection point and the horizontal axis of the lower intersection point of each line of the target pixel grid according to the formula of the ellipse equation. The gamma, which may also be called a gradient coefficient, may be the ratio of the area of each target pixel grid that is not cut to the total area. The degree of color gradient after the target pixel grid, namely the image is cut can be clearly represented. The ratio of the uncut area to the total area in each pixel grid can be calculated through the upper intersection point horizontal axis coordinate and the lower intersection point horizontal axis coordinate of the intersection of the arc line of the elliptic arc and each row of target pixel grids.
The display brightness of each pixel grid on the screen is adjusted and controlled by the magnitude of the driving current, and the driving current is the current output to each pixel grid by the driving component of the pixel grid. At the edge of the screen, in order to smooth the brightness and eliminate the color cast phenomenon, each edge pixel grid respectively corresponds to a gray coefficient for optimizing the brightness. Generally, the gray scale factor for optimizing luminance is different when the area ratio is different.
The image processor 20 determines to obtain the gamma of each target pixel grid by calculating the first intersection point coordinate and the second intersection point coordinate of each row or each column of target pixel grid to control the curve angle screen 30 to display the processed image data, so as to quickly obtain the gamma of each target pixel grid, eliminate the phenomena of sawtooth and color cast generated after the curve angle is cut, and achieve the purpose of saving cost.
In one embodiment, the image processor 20 is further configured to:
performing straight line connection from a first intersection point to a second intersection point of each row or each column of target pixel grid area to obtain a fitting line segment;
calculating a first area of each pixel grid which is not cut by the fitted line segment;
and calculating the ratio of the first area to the total area of each pixel grid to obtain the gray coefficient of the target pixel grid.
Illustratively, the image processor 20 in the elliptical angular screen assembly may also be configured to: carrying out linear connection from an upper intersection point to a lower intersection point of each line of target pixel grid area to obtain a fitting line segment; calculating a first area of each pixel grid which is not cut by the fitted line segment; and calculating the ratio of the first area to the total area of each pixel grid to obtain the gray coefficient of the target pixel grid.
Referring to fig. 1, for example, the upper intersection B to the lower intersection a in the first row of target pixel cells a 1-a 7 are connected by a straight line to obtain a fitting line segment AB. The lower left corner of the target pixel grid area in the first row is point C. And forming a triangle ABC by the fitting line segment AB and the target pixel grid area on the side close to the origin of coordinates, and calculating the first area of the triangle ABC not cut in each target pixel grid. Exemplarily, in the target pixel cell a7, assuming that the side length of each pixel cell is 1, the first area which is not cut can be calculated to be 0.033 in combination with the similar property of the triangle, and since the total area of each pixel cell is 1, the gamma of the target pixel cell a7 is 0.033. According to the similarity principle of triangles, the gray coefficients of the target pixel grids from a1 to a6 can be calculated.
In this embodiment, the side length of each target pixel grid is set to 1, but the side length of the target pixel grid is not limited to 1 unit, and may be 2 units, 3 units, or other random values greater than 0, and at this time, the total area of each target pixel grid may be calculated according to a square area formula.
In one embodiment, the image processor 20 in the curve angle screen assembly is further configured to: in the target pixel grid of the Nth row, the side length of each pixel grid region is set to be 1, wherein N is a positive integer; the step of calculating a first area of each pixel grid not cut by the fitted line segment comprises:
referring to combination 1 in fig. 4, when the horizontal axis coordinates of the upper intersection point and the lower intersection point of the curved arc and the nth row are both integers, the uncut first area of each target pixel grid in the nth row is calculated according to the similarity of the triangles.
Referring to combination 2 in fig. 4, when the horizontal axis coordinate of the upper intersection point of the curve arc and the nth row is an integer and the horizontal axis coordinate of the lower intersection point is not an integer, a decimal part of the horizontal axis coordinate of the lower intersection point is obtained, and a first area of each target pixel lattice in the nth row that is not cut is calculated according to the similarity between the decimal part of the horizontal axis coordinate of the lower intersection point and the triangle.
Illustratively, referring to fig. 1, in the target pixel grid of the 11 th row, when the abscissa x1 of the upper intersection point B is an integer when 0 is calculated according to the ellipse formula, and the abscissa x2 of the lower intersection point a is not an integer when 6.666, the two legs of the right triangle ABC are 1 and 6.666 respectively, and then the total area of the right triangle ABC can be calculated according to the right triangle area formula. The decimal part rem (x2) of the abscissa of the lower intersection a is obtained as 0.666, and the first area of each pixel lattice of 11 lines can be calculated from the similarity between the decimal part of the abscissa of the lower intersection and the triangle.
Referring to combination 3 in fig. 4, when the horizontal axis coordinate of the upper intersection point of the curve arc and the nth row is not an integer and the horizontal axis coordinate of the lower intersection point is an integer, the decimal part of the horizontal axis coordinate of the upper intersection point is obtained, and the uncut first area of each target pixel lattice of the nth row is calculated according to the rectangular area formula, the decimal part of the horizontal axis coordinate of the upper intersection point, and the similarity of the triangle.
Referring to combination 4 in fig. 4, when the curve arc and the horizontal axis coordinate of the upper intersection point and the horizontal axis coordinate of the lower intersection point of the nth row are not both integers, a decimal part of the horizontal axis coordinate of the upper intersection point and a decimal part of the horizontal axis coordinate of the lower intersection point are obtained, and then a first area of each target pixel lattice of the nth row, which is not cut, is calculated according to a rectangular area formula, the decimal part of the horizontal axis coordinate of the upper intersection point, the decimal part of the horizontal axis coordinate of the lower intersection point, and the similarity of the triangle.
For example, referring to fig. 1, when the upper intersection horizontal axis coordinate x1 and the lower intersection horizontal axis coordinate x2 and 9.199 of the elliptical arc and the 10 th row are not integers, the decimal part rem (x1) of the upper intersection horizontal axis coordinate is 0.666 and the decimal part rem (x2) of the lower intersection horizontal axis coordinate is 0.199. The rectangular area 0.666 in the b1 target pixel grid can be obtained according to the decimal part of the horizontal axis coordinate of the upper intersection point and a rectangular area formula. The trapezoidal area of the b1 target pixel grid is 0.246 according to the similarity of the decimal part of the horizontal axis coordinate of the lower intersection point and the triangle, and the last two areas are added to obtain the first area of the b1 target pixel grid, namely 0.912. According to the similarity of the triangles, the first area of each target pixel grid of the 10 th row which is not cut can be further obtained.
For cutting of each line, target pixel lattices formed by the cut straight line segments and screen body pixel points are combined into three shapes of a triangle, a trapezoid, a rectangle and the like in a fitting mode that a straight line segment replaces a curve, and a first area of each target pixel lattice which is not cut can be accurately combined and calculated by combining a mathematical formula, so that the gray coefficient of each target pixel lattice is obtained.
With continued reference to fig. 5, in one embodiment, the screen assembly further includes a memory 40 connected to the image processor 20, and the image processor 20 is further configured to multiply each gamma by the integral of the smoothing order to obtain a coefficient storage number and write the coefficient storage number into the memory 40.
The smoothing order represents the level of smoothness of the screen edge lighting, and for the convenience of hardware storage, the image processor 20 may normalize all gamma values to 4 bits, and the smoothness may be divided into 16 levels at the maximum.
In the rounded-down embodiment, the gamma of each target pixel bin is multiplied by 16, the resulting product-discarded decimal is rounded down and the selected integer is stored in memory 40 such that the processed gamma value is in the middle of [0, 15 ].
Illustratively, when the gamma of a target pixel cell a7 is 0.033, multiplying 0.033 by 16 yields a product of 0.528, rounding down to 0, and the image processor 20 may convert to the 1 st binary data 0000 for storage in the memory 40. When the image processor 20 calls the gamma of a7, binary data 0000, i.e., 0 in decimal, is read, and 0 is divided by 16 to obtain a quotient 0, i.e., 0 is used as the actual gamma of the target pixel cell a7 for display driving.
Illustratively, when the gamma of a target pixel cell a1 is 0.9, 0.9 is multiplied by 16 to obtain a product 14.4, and rounded down to obtain 14, the image processor 20 may convert the data into the 15 th binary data 1110 for storage in the memory 40. When the image processor 20 calls the gamma of a1, binary data 1110, i.e., decimal 14, is read, and the quotient 0.875 is obtained by dividing 14 by 16, i.e., display driving is performed with 0.875 as the actual gamma of the target pixel cell a 1.
In the rounded-up embodiment, image processor 20 multiplies the gamma of each target pixel bin by 16, and the resulting product is rounded up and then the integer is selected and stored in memory 40 so that the processed gamma value is in the middle of [1, 16 ].
Illustratively, when the gamma of a target pixel cell a7 is 0.033, the image processor 20 multiplies 0.033 by 16 to obtain a product 0.528, rounds up to obtain 1, which may be converted to the 1 st binary data 0000 for storage in the memory 40. When the image processor 20 calls the gamma of a7, binary data 0000, i.e., 0 in decimal, is read, 1 is obtained by adding 1, and 1 is divided by 16 to obtain quotient 0.0625, i.e., display driving is performed with 0.0625 as the actual gamma of the target pixel cell a 7.
Illustratively, when the gamma of a target pixel cell a1 is 0.9, image processor 20 multiplies 0.9 by 16 to obtain a product 14.4, rounds up to 15, which may be converted to a 15 th binary data 1110 for storage in memory 40. When the image processor 20 calls the gamma of a1, the binary data 1110 is read, i.e., 14 in decimal, and then 1 is added to obtain 15, and the quotient 0.9375 is obtained by dividing 15 by 16, i.e., the actual gamma of the target pixel cell a1 is 0.9375 for display driving.
In a round-robin embodiment, image processor 20 multiplies the gamma of each target pixel bin by 15, rounds the resulting product to an integer and stores the integer in memory 40 so that the processed gamma value is in the middle of [0, 15 ].
Illustratively, when the gamma of a target pixel grid a8 is 0.39, image processor 20 multiplies 0.39 by 15 to obtain a product of 5.85, rounded to 6, which may be converted to 7 th binary data 0110 for storage in memory 40. When the image processor 20 calls the gamma of a7, binary data 0110, i.e., decimal 6, is read, and 6 is divided by 15 to obtain a quotient 0.4, i.e., display driving is performed with 0.4 as the actual gamma of the target pixel cell a 8.
Illustratively, when the gamma of one target pixel cell a9 is 0.87, 0.87 is multiplied by 15 to obtain a product 13.05, rounded to obtain 13, which can be converted into 14 th binary data 1101 to be stored in the memory. When the system calls the gamma of a9, binary data 1101, i.e., 13 in decimal, is read, and 13 is divided by 15 to obtain a quotient 0.867, i.e., display driving is performed with 0.867 as the actual gamma of the target pixel cell a 9.
In another embodiment, the image processor 20 may normalize all gamma values to 5 bits, and the smoothness may be divided up to 32 levels. It should be noted that the normalization of the gamma may be 4 bits, or may be any bit data such as 5 bits, 6 bits, etc., which is not limited in this application. The smoothing order may represent a smoothness level of the screen edge lighting. The larger the smoothing order, the more accurate the stored data, and the better the light smoothing effect. The smaller the smoothing order is, the more effective the storage space can be saved.
In one embodiment, the image processor 20 is further configured to:
in response to obtaining the coefficient storage count, a storage field is allocated for each row of the target pixel grid. Correspondingly, in the A target pixel grids in the Nth row, the number A of the target pixel grids in the Nth row and the coefficient storage number of the A target pixel grids in the Nth row are respectively written in the A +1 zone bits from the first zone bit of the storage field in the Nth row to the A +1 zone bit. Wherein N is a positive integer and A is a positive integer.
Referring to fig. 1 and table one, table one is a storage manner of the gamma of each target pixel cell. In one embodiment, the image processor 20 in table one allocates a storage field for each row of the target pixel grid; in the 7 target pixel cells in the first row, from 8 positions from the 1 st position to the 8 th position of the storage field in the first row, the number of the target pixel cells in the first row, which is 7, and the stored coefficient numbers of the 7 target pixel cells in the first row, which are a1, a2, a3, a4, a5, a6, a7, are written, and so on for the target pixel cells in the other rows. During the process of displaying the curved-angle screen, the image processor 20 may directly read the number of target pixel cells of each row whose gray scale coefficients need to be adjusted according to the storage field of the target pixel cell. The image processor 20 may also quickly locate the storage location of the corresponding gamma according to the storage field of each row of target pixel grid, so as to increase the reading speed.
Third embodiment
On the other hand, the application also provides a computer storage medium, in particular a computer program stored on the computer storage medium, wherein when the computer program is executed by a computer, the screen image processing method can be realized.
Illustratively, the steps of a computer program on a computer storage medium implementing the screen image processing method and applied to fig. 1 are as follows:
s1: and setting the side length of each pixel grid region as 1, and acquiring the horizontal axis coordinates of upper intersection points and the horizontal axis coordinates of lower intersection points of the elliptic arc r and each line of target pixel grids according to an elliptic equation and a first quadrant of a coordinate system.
S2: carrying out straight line connection from an upper intersection point to a lower intersection point of each row of target pixel grid area to obtain a fitted line segment, and calculating a first area of each pixel grid which is not cut by the fitted line segment, wherein the following four conditions exist:
when the horizontal axis coordinate of the upper intersection point and the horizontal axis coordinate of the lower intersection point of the Nth row are both integers, calculating the first area of each pixel grid of the Nth row according to the similarity of the triangles;
when the horizontal axis coordinate of the upper intersection point of the Nth row is an integer and the horizontal axis coordinate of the lower intersection point is not an integer, acquiring the decimal part of the horizontal axis coordinate of the lower intersection point, and calculating the first area of each pixel grid of the Nth row according to the similarity of the decimal part of the horizontal axis coordinate of the lower intersection point and the triangle;
when the horizontal axis coordinate of the upper intersection point of the Nth row is not an integer and the horizontal axis coordinate of the lower intersection point is an integer, acquiring the decimal part of the horizontal axis coordinate of the upper intersection point, and calculating the first area of each pixel grid of the Nth row according to a rectangular area formula, the decimal part of the horizontal axis coordinate of the upper intersection point and the similarity of a triangle;
and when the horizontal axis coordinate of the upper intersection point and the horizontal axis coordinate of the lower intersection point of the Nth row are not integers, acquiring the decimal part of the horizontal axis coordinate of the upper intersection point and the decimal part of the horizontal axis coordinate of the lower intersection point, and calculating the first area of each pixel grid of the Nth row according to a rectangular area formula, the decimal part of the horizontal axis coordinate of the upper intersection point, the decimal part of the horizontal axis coordinate of the lower intersection point and the similarity of the triangle.
S3: and calculating the ratio of the first area to the total area of each pixel grid to obtain the gray coefficient of the target pixel grid. And processing the image data according to the gray coefficient of each target pixel grid.
When the gray scale coefficients need to be stored, the integral of multiplying each gray scale coefficient by the smoothing order can be obtained, a storage field is distributed to each row of target pixel grids, and the obtained coefficient storage number is written into the memory according to the arrangement mode of 'the number of the coefficients + the number of the coefficient storage numbers'.
In the process of implementing the screen image processing method by the computer program, reference may be made to the above embodiments for related technical details, which are not described herein again.
It should be noted that the above embodiment has been explained and exemplified with each row of target pixel grids in the elliptical cut line of the first quadrant as the calculation object, and therefore, the intersection point coordinate data used is the horizontal axis coordinate of the first intersection point and the horizontal axis coordinate of the second intersection point. For other quadrants or each column of target pixel grids as the calculation object, the calculation method is actually based on the similar shape of each row of target pixel grids of the first quadrant after rotation, so the calculation method using each column of target pixel grids as the calculation object can refer to the explanation principle of the above embodiments, and when intersection point coordinate data is used, the first intersection point longitudinal axis coordinate and the second intersection point longitudinal axis coordinate can be selected for calculation, which is not described herein again.
As described above, the curve angle screen image processing method, the screen assembly and the computer storage medium provided by the application can achieve fast obtaining of the gray scale coefficient of each target pixel grid, so as to eliminate the problem of sawteeth and color cast after cutting the curve angle edge of the mobile phone screen, and effectively improve the display effect.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (10)

1. A method for processing a screen image of a curve angle, which is characterized in that a curve center is taken as a coordinate system origin, a curve arc of the curve angle is placed in a plane coordinate system, and a pixel grid intersected with the curve arc is taken as a target pixel grid, wherein the method comprises the following steps:
in response to the acquisition of the first intersection point coordinate and the second intersection point coordinate of the curve arc and each row or each column of target pixel grids, calculating the gray coefficient of each target pixel grid according to the first intersection point coordinate and the second intersection point coordinate of each row or each column of target pixel grids; and processing the image data according to the gray coefficient of the target pixel grid.
2. The screen image processing method of claim 1, wherein the step of calculating the gamma of each target pixel cell based on the first intersection coordinates and the second intersection coordinates of each row or each column of the target pixel cell comprises:
performing straight line connection from a first intersection point to a second intersection point of each row or each column of target pixel grid area to obtain a fitting line segment;
calculating a first area of each pixel grid not cut by the fitted line segment;
and calculating the ratio of the first area to the total area of each pixel grid to obtain the gray coefficient of the target pixel grid.
3. The screen image processing method of claim 2, wherein in calculating the target pixel cell of the nth row in the first quadrant, the side length of each pixel cell region is set to 1, where N is a positive integer, the first intersection point is an upper intersection point, and the second intersection point is a lower intersection point; the step of calculating a first area of each pixel cell not cut by the fitted line segment comprises:
when the horizontal axis coordinates of the curve arc and the upper intersection point and the horizontal axis coordinates of the lower intersection point of the Nth row are integers, calculating the first area of each pixel grid of the Nth row according to the similarity of the triangles;
and/or when the curve arc and the horizontal axis coordinate of the upper intersection point of the Nth row are integers, and the horizontal axis coordinate of the lower intersection point is not an integer, acquiring a decimal part of the horizontal axis coordinate of the lower intersection point, and calculating the first area of each pixel grid of the Nth row according to the similarity between the decimal part of the horizontal axis coordinate of the lower intersection point and a triangle;
and/or when the horizontal axis coordinates of the upper intersection point of the curve arc and the Nth row are not integers, and the horizontal axis coordinates of the lower intersection point are integers, acquiring the decimal part of the horizontal axis coordinates of the upper intersection point, and calculating the first area of each pixel grid of the Nth row according to a rectangular area formula, the decimal part of the horizontal axis coordinates of the upper intersection point and the similarity of a triangle;
and/or when the intersection point horizontal axis coordinate and the intersection point horizontal axis coordinate of the curve arc and the Nth row are not integers, acquiring a decimal part of the intersection point horizontal axis coordinate and a decimal part of the intersection point horizontal axis coordinate, and then calculating the first area of each pixel grid of the Nth row according to a rectangular area formula, the decimal part of the intersection point horizontal axis coordinate and the similarity of the triangle.
4. The screen image processing method of claim 1, wherein the step of processing the image data according to the gamma of the target pixel grid is preceded by:
and rounding the product of multiplying each gray coefficient by the smoothing order to obtain a coefficient storage number, and writing the coefficient storage number into a memory.
5. The screen image processing method of claim 4, wherein the writing to memory step comprises:
in response to acquiring the coefficient storage number, allocating a storage field for each row or column of the target pixel grid;
respectively writing the number A of target pixel grids in the Nth row or the Nth column and the coefficient storage number of the A target pixel grids in the Nth row or the Nth column from the first zone bit of the storage field in the Nth row or the Nth column to the A +1 zone bit of the A +1 zone bit in the Nth row or the Nth column;
wherein N is a positive integer and A is a positive integer.
6. A curved-angle screen assembly comprising an image driver, an image processor, and a curved-angle screen;
the image driver is used for sending image data to the image processor so that the image processor controls the curve angle screen to display the image data;
the image processor is configured to: and taking the center of a curve as the origin of a coordinate system, placing the curve arc of the curve angle in a plane coordinate system, taking a pixel grid intersected with the curve arc as a target pixel grid, responding to the acquisition of a first intersection point coordinate and a second intersection point coordinate of the curve arc and each row or each column of target pixel grids, calculating the gray coefficient of each target pixel grid according to the first intersection point coordinate and the second intersection point coordinate of each row or each column of target pixel grids, and processing the image data according to the gray coefficient of the target pixel grid.
7. The screen assembly of claim 6, wherein the image processor is further configured to:
performing straight line connection from a first intersection point to a second intersection point of each row or each column of target pixel grid area to obtain a fitting line segment;
calculating a first area of each pixel grid not cut by the fitted line segment;
and calculating the ratio of the first area to the total area of each pixel grid to obtain the gray coefficient of the target pixel grid.
8. The screen assembly of claim 7, wherein the image processor is further configured to: when calculating a target pixel grid of an Nth row in a first quadrant, setting the side length of each pixel grid region as 1, wherein N is a positive integer, the first intersection point is an upper intersection point, and the second intersection point is a lower intersection point; the step of calculating a first area of each pixel cell not cut by the fitted line segment comprises:
when the horizontal axis coordinates of the curve arc and the upper intersection point and the horizontal axis coordinates of the lower intersection point of the Nth row are integers, calculating the first area of each pixel grid of the Nth row according to the similarity of the triangles;
and/or when the curve arc and the horizontal axis coordinate of the upper intersection point of the Nth row are integers, and the horizontal axis coordinate of the lower intersection point is not an integer, acquiring a decimal part of the horizontal axis coordinate of the lower intersection point, and calculating the first area of each pixel grid of the Nth row according to the similarity between the decimal part of the horizontal axis coordinate of the lower intersection point and a triangle;
and/or when the horizontal axis coordinates of the upper intersection point of the curve arc and the Nth row are not integers, and the horizontal axis coordinates of the lower intersection point are integers, acquiring the decimal part of the horizontal axis coordinates of the upper intersection point, and calculating the first area of each pixel grid of the Nth row according to a rectangular area formula, the decimal part of the horizontal axis coordinates of the upper intersection point and the similarity of a triangle;
and/or when the curve arc and the upper intersection point horizontal axis coordinate and the lower intersection point horizontal axis coordinate of the Nth row are not integers, acquiring a decimal part of the upper intersection point horizontal axis coordinate and a decimal part of the lower intersection point horizontal axis coordinate, and calculating the first area of each pixel grid of the Nth row according to a rectangular area formula, the decimal part of the upper intersection point horizontal axis coordinate, the decimal part of the lower intersection point horizontal axis coordinate and the similarity of the triangle.
9. A screen assembly as recited in claim 6, wherein the curve angle screen assembly further comprises a memory coupled to the image processor, the image processor further configured to assign a memory field for each row or column of the target pixel grid in response to obtaining the coefficient memory count; respectively writing the number A of target pixel grids in the Nth row or the Nth column and the coefficient storage number of the A target pixel grids in the Nth row or the Nth column from the first zone bit of the storage field in the Nth row or the Nth column to the A +1 zone bit of the A +1 zone bit in the Nth row or the Nth column; wherein N is a positive integer and A is a positive integer.
10. A computer storage medium, characterized in that a computer program is stored thereon, which when executed by a computer, can implement the screen image processing method according to any one of claims 1 to 5.
CN202111335702.1A 2021-11-11 2021-11-11 Screen image processing method, screen assembly and computer storage medium Active CN114049272B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111335702.1A CN114049272B (en) 2021-11-11 2021-11-11 Screen image processing method, screen assembly and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111335702.1A CN114049272B (en) 2021-11-11 2021-11-11 Screen image processing method, screen assembly and computer storage medium

Publications (2)

Publication Number Publication Date
CN114049272A true CN114049272A (en) 2022-02-15
CN114049272B CN114049272B (en) 2023-06-09

Family

ID=80208509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111335702.1A Active CN114049272B (en) 2021-11-11 2021-11-11 Screen image processing method, screen assembly and computer storage medium

Country Status (1)

Country Link
CN (1) CN114049272B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360514A (en) * 2014-11-10 2015-02-18 深圳市华星光电技术有限公司 Liquid crystal display panel for curve-shaped screen
CN107526201A (en) * 2017-09-19 2017-12-29 厦门天马微电子有限公司 A kind of driving method of display panel, display device and display panel
CN107678720A (en) * 2017-09-30 2018-02-09 广东欧珀移动通信有限公司 The method that terminal, display screen and control display screen are shown
CN108665842A (en) * 2018-05-14 2018-10-16 昆山国显光电有限公司 Show platen edge display control method, control device and display device
CN109685142A (en) * 2018-12-25 2019-04-26 国信优易数据有限公司 A kind of image matching method and device
CN111903132A (en) * 2018-03-29 2020-11-06 华为技术有限公司 Image processing apparatus and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360514A (en) * 2014-11-10 2015-02-18 深圳市华星光电技术有限公司 Liquid crystal display panel for curve-shaped screen
CN107526201A (en) * 2017-09-19 2017-12-29 厦门天马微电子有限公司 A kind of driving method of display panel, display device and display panel
CN107678720A (en) * 2017-09-30 2018-02-09 广东欧珀移动通信有限公司 The method that terminal, display screen and control display screen are shown
CN111903132A (en) * 2018-03-29 2020-11-06 华为技术有限公司 Image processing apparatus and method
CN108665842A (en) * 2018-05-14 2018-10-16 昆山国显光电有限公司 Show platen edge display control method, control device and display device
CN109685142A (en) * 2018-12-25 2019-04-26 国信优易数据有限公司 A kind of image matching method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
来航曼等: "曲面显示技术及标准化", 《信息技术与标准化》, no. 12, pages 19 - 22 *

Also Published As

Publication number Publication date
CN114049272B (en) 2023-06-09

Similar Documents

Publication Publication Date Title
US10504400B2 (en) Method and apparatus for performing correction processing on grayscale of a pixel in an image
CN107221306B (en) The method, apparatus and display equipment of brightness of image in correction splicing device screen
CN107608145B (en) Special-shaped display panel and display device
CN108615499B (en) Display optimization and display driving method and device, display device and storage medium
CN107919087B (en) Display panel, driving method thereof and display device
CN109243384B (en) Display device, driving method thereof, driving apparatus thereof, and computer readable medium
CN105869579A (en) Backlight brightness adjusting method and device and display terminal
US9336567B2 (en) Content-aware weighted image manipulations
JPH11167378A (en) Method of scaling image
US20060119614A1 (en) Three dimensional graphics processing apparatus, image display apparatus, three dimensional graphics processing method, control program and computer-readable recording medium
CN110875020B (en) Driving method, driving device and display device
JP4938761B2 (en) How to convert signals for multi-primary displays
CN109493814A (en) Frame compensation method, apparatus, display device and computer readable storage medium
US20210097945A1 (en) Display device and driving method therefor
US20190354247A1 (en) Pixel-aligned layout grids
WO2020020076A1 (en) Gray scale setting method, display substrate and display device
CN106920475A (en) The driving method of display panel, display device and display panel
CN114049273B (en) Round corner screen image processing method, round corner screen assembly and computer storage medium
CN102567948B (en) Method and device for processing pixel color
CN109636751B (en) Edge processing method of special-shaped display panel, display panel and display device
CN114049272A (en) Screen image processing method, screen assembly and computer storage medium
CN111081149B (en) Display method and display device
CN102339469B (en) Image processing method and device
US20200279542A1 (en) Display Driver
CN110675735B (en) Special-shaped display panel and special-shaped display device

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