CN114089942A - Display processing method and device and storage medium - Google Patents
Display processing method and device and storage medium Download PDFInfo
- Publication number
- CN114089942A CN114089942A CN202111435380.8A CN202111435380A CN114089942A CN 114089942 A CN114089942 A CN 114089942A CN 202111435380 A CN202111435380 A CN 202111435380A CN 114089942 A CN114089942 A CN 114089942A
- Authority
- CN
- China
- Prior art keywords
- display
- pixel unit
- curve
- pixel
- displayed
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/18—Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Data Mining & Analysis (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Algebra (AREA)
- Computing Systems (AREA)
- Human Computer Interaction (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Operations Research (AREA)
- Probability & Statistics with Applications (AREA)
- Control Of Indicators Other Than Cathode Ray Tubes (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The application provides a display processing method, a display processing device and a storage medium, which are applied to an electronic terminal, wherein the method comprises the following steps: obtaining a fitted physical cutting curve of the display screen by utilizing a multi-section arc line fitting mode and a straight line fitting mode according to the physical cutting edge of the display screen of the electronic terminal; acquiring an image to be displayed; determining a display optimization coefficient matrix corresponding to the image to be displayed according to the fitted physical cutting curve; filtering each element in the display optimization coefficient matrix through a target filter to obtain a filtering display coefficient corresponding to each pixel unit in the image to be displayed; for each pixel unit in an image to be displayed, obtaining target display data corresponding to the pixel unit according to original display data corresponding to the pixel unit and a filtering display coefficient; and transmitting target display data corresponding to each pixel unit to the pixel unit so as to present an image to be displayed on the display screen.
Description
Technical Field
The present application relates to the field of display technologies, and in particular, to a display processing method and apparatus, and a storage medium.
Background
Along with the development of electronic equipment, the shape of display device also constantly changes, and the cutting curve of border has irregular curve usually among the current display device, and just comes the fitting irregular curve through the curve of a section orthodrome, and the curve effect of fitting out can not satisfy the demand, therefore how better cutting curve of laminating display screen to optimize the display effect at display device edge is the technological problem that needs to solve urgently.
Disclosure of Invention
In view of the above, an object of the present application is to provide a display processing method, apparatus and storage medium for optimizing an edge display effect of an irregularly shaped display device.
In a first aspect, an embodiment of the present application provides a display processing method, which is applied to an electronic terminal, where a display screen of the electronic terminal has a rounded corner, and the method includes: obtaining a fitted physical cutting curve of the display screen by utilizing a multi-section arc line fitting mode and a straight line fitting mode according to the physical cutting edge of the display screen of the electronic terminal; acquiring an image to be displayed; determining a display optimization coefficient matrix corresponding to the image to be displayed according to the fitted physical cutting curve, wherein each element in the display optimization coefficient matrix is the display optimization coefficient of a corresponding pixel unit in the image to be displayed; filtering each element in the display optimization coefficient matrix through a target filter to obtain a filtering display coefficient corresponding to each pixel unit in the image to be displayed; for each pixel unit in an image to be displayed, obtaining target display data corresponding to the pixel unit according to original display data corresponding to the pixel unit and a filtering display coefficient; and transmitting target display data corresponding to each pixel unit to the pixel unit so as to present an image to be displayed on the display screen.
Preferably, the physical cutting edge of the display screen of the electronic terminal comprises at least one curvilinear edge and at least one rectilinear edge, wherein the fitted physical cutting curve of the display screen is obtained by: fitting the curve edges by a multi-section arc line fitting mode aiming at each curve edge to obtain a multi-section fitting arc line; fitting each straight line edge in a straight line fitting mode to obtain at least one line segment; and connecting the plurality of sections of fitted arc lines obtained by fitting with at least one line segment in sequence, and splicing into a fitted physical cutting curve of the display screen.
Preferably, any one of the plurality of fitted arcs corresponding to each curve edge is obtained by: determining the target position in the edge of the curve as the starting point of a preset conical curve; determining the fitting degree of a preset conical curve and the curve edge line by line in the direction of the ending position of the curve edge by taking the line of the starting point as the starting line of the intercepting frame; if the fitting degree of the preset conical curve and the curve edge does not meet the preset fitting condition, adjusting the axial length of the preset conical curve, and continuously determining the fitting degree of the adjusted preset conical curve and the curve edge; if the fitting degree of the preset conical curve and the edge of the curve meets a preset fitting condition, determining the ending line of the intercepting frame; and determining the line segment of the preset conic curve intercepted between the starting line and the ending line of the intercepting frame as any fitting arc line.
Preferably, the starting point of each fitted arc is determined by: for each curve edge, the starting point of the first section of fitted arc line corresponding to the curve edge is the starting point of the curve edge, and the starting points of the other sections of fitted arc lines except the first section corresponding to the curve edge are the ending points of the previous section of fitted arc line.
Preferably, each element in the display optimization coefficient matrix corresponding to the image to be displayed is determined by: for each pixel unit in the image to be displayed, executing the following processing: determining whether the fitted physical cutting curve crosses the pixel cell; if the fitted physical cutting curve does not cross the pixel unit, determining whether the pixel unit is positioned in the closed area formed by the fitted physical cutting curve; if the pixel unit is located in the closed area, the display optimization coefficient corresponding to the pixel unit is 1; if the pixel unit is positioned outside the closed area, the display optimization coefficient corresponding to the pixel unit is 0; and if the fitted physical cutting curve crosses the pixel unit, determining the effective display area of the pixel unit, and determining a display optimization coefficient corresponding to the pixel unit according to the ratio of the effective display area of the pixel unit to the standard display area.
Preferably, the effective display area of each pixel cell is determined by: determining an area calculation mode of the pixel unit based on the position relation between the fitted physical cutting curve and the pixel unit; and calculating the display area of the pixel unit in the closed area in a determined area calculation mode, and determining the calculated display area as the effective display area of the pixel unit.
Preferably, each pixel unit comprises at least one sub-pixel unit, and the corresponding filtering display coefficient of each pixel unit is determined by the following method: respectively determining a target filter corresponding to each sub-pixel according to the arrangement structure of each sub-pixel in the pixel unit; and for each sub-pixel, filtering the display optimization coefficient corresponding to the pixel unit where the sub-pixel is located through a target filter corresponding to the sub-pixel to obtain a filtering display coefficient corresponding to the sub-pixel, wherein the sum of the element values in the target filter is 256.
Preferably, the target display data corresponding to each sub-pixel is determined by: for each sub-pixel, multiplying the original display data of the sub-pixel with the filtering display coefficient corresponding to the sub-pixel to obtain a target adjusting coefficient; the target adjustment coefficient is quantized to obtain target display data for the sub-pixel.
In a second aspect, an embodiment of the present application further provides a display processing apparatus, which is applied to an electronic terminal, a display screen of the electronic terminal has a rounded corner, and the display processing apparatus includes:
the fitting module is used for obtaining a fitting physical cutting curve of the display screen by utilizing a multi-section arc line fitting mode and a straight line fitting mode according to the physical cutting edge of the display screen of the electronic terminal;
the acquisition module acquires an image to be displayed;
the optimization module is used for determining a display optimization coefficient matrix corresponding to the image to be displayed according to the fitted physical cutting curve, and each element in the display optimization coefficient matrix is the display optimization coefficient of a corresponding pixel unit in the image to be displayed;
the filtering module is used for filtering each element in the display optimization coefficient matrix through a target filter so as to obtain a filtering display coefficient corresponding to each pixel unit in the image to be displayed;
the calculation module is used for acquiring target display data corresponding to each pixel unit in the image to be displayed according to the original display data corresponding to the pixel unit and the filtering display coefficient;
and the output module is used for transmitting the target display data corresponding to each pixel unit to the pixel unit so as to present the image to be displayed on the display screen.
In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the display processing method.
The embodiment of the application provides a display processing method, a display processing device and a storage medium, which are applied to an electronic terminal, wherein a display screen of the electronic terminal is provided with a round angle, namely, a display screen with an irregular curve at the edge is obtained by referring to a physical cutting edge of the display screen of the electronic terminal and utilizing a multi-section arc fitting mode and a straight line fitting mode to obtain a fitted physical cutting curve of the display screen, a display optimization coefficient matrix corresponding to an image to be displayed is determined according to the fitted physical cutting curve, each element in the display optimization coefficient matrix is respectively a display optimization coefficient of a corresponding pixel unit in the image to be displayed, each element in the display optimization coefficient matrix is filtered through a target filter to obtain a filter display coefficient corresponding to each pixel unit in the image to be displayed, and each pixel unit in the image to be displayed is filtered according to original display data and the filter display coefficient corresponding to the pixel unit, and for the pixel units at the edge part of the display screen, the display data of the pixel units are changed by calculating a display optimization coefficient and converting the display optimization coefficient into the final target display data, so that the display effect of the edge part of the display screen on the image to be displayed is optimized.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments are briefly described below, it should be understood that the following drawings are only some embodiments of the present application, and therefore should not be considered as limiting the scope, and it is obvious for those skilled in the art that other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart of a display processing method according to an embodiment of the present disclosure;
fig. 2a is a schematic diagram of a physical cutting edge of a rounded corner display screen according to an embodiment of the present application;
FIG. 2b is a schematic diagram of a physical cutting edge of a rounded notch display provided in an embodiment of the present application;
fig. 2c is a schematic diagram of a physical cutting edge of a rounded water droplet display screen according to an embodiment of the present disclosure;
FIG. 2d is a schematic diagram of a physical cutting edge of a round-corner hole-digging display screen according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a partial image of an image to be displayed, cut by a fitted physical cutting curve according to an embodiment of the present application;
fig. 4 is a schematic diagram of a target filter according to an embodiment of the present disclosure;
FIG. 5 is a flowchart of one step of determining a fitted arc provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of a curved edge on a display screen according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a fitted physical cutting curve provided by an embodiment of the present application;
fig. 8 is a schematic structural diagram of a display processing apparatus according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. Every other embodiment that can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present application falls within the protection scope of the present application.
Along with the development of electronic equipment, the shape of display device also constantly changes, and the cutting curve of border has irregular curve usually among the current display device, and just comes fitting irregular curve effect through the curve of a section orthodrome and does not satisfy the demand, therefore how better cutting curve of laminating display screen to the optimization of the display effect that realizes at the display device edge is the problem that needs to solve.
In view of the foregoing problems, embodiments of the present application provide a display processing method, apparatus, and storage medium, which are used to optimize a display effect of an irregularly-shaped display device.
To facilitate understanding of the present embodiment, a detailed description is provided below of a display processing method, an apparatus, an electronic device, and a storage medium provided in the embodiments of the present application.
Please refer to fig. 1, which is a flowchart illustrating a display processing method according to an embodiment of the present disclosure. The display processing method provided by the embodiment of the application is applied to an electronic terminal, a display screen of the electronic terminal is provided with a fillet, and the method comprises the following steps:
s101, obtaining a fitting physical cutting curve of the display screen by utilizing a multi-section arc line fitting mode and a straight line fitting mode according to the physical cutting edge of the display screen of the electronic terminal.
The electronic terminal here can be an electronic product having a display screen, such as a mobile phone and a computer, and the display screen of the electronic terminal is in an irregular shape, as shown in fig. 2a to 2d, which are schematic diagrams of physical cutting edges of several display screens provided in an embodiment of the present application, wherein fig. 2a is a schematic diagram of a physical cutting edge of a rounded corner display screen, fig. 2b is a schematic diagram of a physical cutting edge of a rounded corner notch display screen, fig. 2c is a schematic diagram of a physical cutting edge of a rounded corner water drop display screen, and fig. 2d is a schematic diagram of a physical cutting edge of a rounded corner hole-digging display screen, wherein black is not a part of a hole-digging area of the display screen. It will be appreciated that the physical cut edges of the display screen are comprised of curved edges and straight edges, where the curved edges are generally irregularly curved.
For the straight line edges, each straight line edge can be fitted through a straight line fitting mode to obtain at least one line segment. For the curve edge, if come the fitting through a section of positive circular arc, the image that the screen display was shown at last through processing probably has blank part, consequently, through multistage arc fitting mode, to every curve edge, fit this curve edge through multistage arc fitting mode to obtain multistage fitting arc, connect the multistage fitting arc and at least one line segment that will fit and obtain in order, splice into the complete fitting physics cutting curve of display screen.
And S102, acquiring an image to be displayed.
The image to be displayed can be any image, so that the image to be displayed is displayed through the display screen, and the image to be displayed fills the whole display screen.
S103, determining a display optimization coefficient matrix corresponding to the image to be displayed according to the fitted physical cutting curve, wherein each element in the display optimization coefficient matrix is the display optimization coefficient of a corresponding pixel unit in the image to be displayed.
The display optimization coefficient here refers to a relationship between all pixels of an image to be displayed and pixels displayed on pixel units of a display screen when the image to be displayed is displayed on the display screen. For each pixel cell in the image to be displayed, the following processing is performed: determining whether the fitted physical cutting curve crosses the pixel unit, and if the fitted physical cutting curve does not cross the pixel unit, determining whether the pixel unit is positioned in the closed area formed by the fitted physical cutting curve; if the pixel unit is located in the closed area, the display optimization coefficient corresponding to the pixel unit is 1; if the pixel unit is positioned outside the closed area, the display optimization coefficient corresponding to the pixel unit is 0; and if the fitted physical cutting curve crosses the pixel unit, determining the effective display area of the pixel unit, and determining the display optimization coefficient corresponding to the pixel unit according to the ratio of the effective display area of the pixel unit to the standard display area.
As shown in fig. 3, a schematic diagram of a partial image of an image to be displayed cut by fitting a physical cutting curve. It will be appreciated that within the 9 x 9 sized region shown in figure 3, each grid represents a pixel in the image to be displayed. In the display process, if the original size of the image to be displayed exceeds the display range of the display screen, part of pixels of the image to be displayed are not displayed or part of pixels are displayed. The following three situations exist for all pixels of a specific image to be displayed:
the first case is that the pixels are completely outside the screen and cannot be displayed by the screen, that is, the whole pixels outside the physical cutting curve area are fitted, and at this time, the display optimization coefficient of the pixel unit corresponding to the pixels is 0, which means that there is no pixel unit for displaying the pixels.
The second case is that the pixels are completely located in the screen and are displayed completely by the screen, that is, the complete pixels in the area of the fitted physical cutting curve are displayed completely, at this time, the display optimization coefficient of the pixel unit corresponding to the pixels of this kind is 1, and at this time, the pixel unit representing this part does not need to be optimized by edge processing.
The third situation is that the pixel part is positioned in the screen and is displayed by the screen part, namely, the incomplete pixels in the physical cutting curve area are fitted, and at the moment, the display optimization coefficient of the incomplete pixels is calculated according to the proportion of the effective display area of the incomplete pixels in the physical cutting curve area to the standard area of the pixels. The standard area of a pixel here refers to the area of a complete pixel, and the size of each pixel is the same.
Specifically, the effective display area of each pixel unit is determined by: determining an area calculation mode of the pixel unit based on the position relation between the fitted physical cutting curve and the pixel unit; and calculating the display area of the pixel unit in the closed area in a determined area calculation mode, and determining the calculated display area as the effective display area of the pixel unit.
It is understood that the approximate area of the incomplete pixel is calculated in an approximate manner, such as the incomplete pixel marked with 1 in fig. 3, which can be approximated as the area of the triangle at the bottom right corner. As in the incomplete pixel labeled 2 in fig. 3, it can be calculated as approximately the area of the lower trapezoid. As in the incomplete pixel labeled 3 in fig. 3, it can be calculated by approximating it to the right half trapezoidal area. As shown in fig. 3, the incomplete pixel labeled with 4 may be obtained by first calculating the approximate area of the triangle at the top left corner, and then subtracting the approximate area of the triangle at the top left corner from the standard area.
And S104, filtering each element in the display optimization coefficient matrix through a target filter to obtain a filtering display coefficient corresponding to each pixel unit in the image to be displayed.
Here, the target filter corresponding to each sub-pixel in each pixel unit needs to be determined according to the arrangement structure of each sub-pixel in each pixel unit of the display screen, so as to adapt to different types of display screens. Fig. 4 is a schematic diagram of a target filter according to an embodiment of the present disclosure. The target filter here may be 3 × 3 or 9 × 9, etc., but the sum of all the coefficients in the target filter is 256.
Specifically, for example, if the first pixel unit includes two sub-pixels of R and G, a first target filter corresponding to the R pixel and a second target filter corresponding to the G pixel need to be determined. The second pixel unit includes two sub-pixels, i.e., G and B, and a third target filter corresponding to the G pixel and a fourth target filter corresponding to the B pixel need to be determined. The second target filter and the third target filter may be the same or different. The first pixel unit and the second pixel unit are two pixel units which are different at will on the display screen.
And filtering the display optimization coefficients of the pixel units in the optimization coefficient matrix through a target filter to obtain the filtering display coefficients corresponding to the pixel units. Illustratively, for a first pixel unit, filtering is performed on an R pixel through a first target filter to obtain a filtering display coefficient corresponding to the R pixel, filtering is performed on a G pixel through a second target filter to obtain a filtering display coefficient corresponding to the G pixel, and the filtering display coefficient corresponding to the R pixel and the filtering display coefficient corresponding to the G pixel together form a filtering display coefficient corresponding to the first pixel unit.
And S105, aiming at each pixel unit in the image to be displayed, obtaining target display data corresponding to the pixel unit according to the original display data corresponding to the pixel unit and the filtering display coefficient.
The original display data refers to original pixel values of an image to be displayed in the pixel unit, wherein the original display data comprises three components of RGB.
Specifically, for one pixel unit, the original display data corresponding to the pixel unit is multiplied by the filtering display coefficient to obtain a corresponding target adjustment coefficient. Since the range of the original display data is 0 to 255 and the range of the filtered display coefficient is 0 to 255, the target adjustment coefficient needs to be quantized and converted into the target display data, so as to ensure that the range of the target display data is 0 to 255. Illustratively, the quantization process may divide the target coefficient by 256 to obtain target display data.
And S106, transmitting the target display data corresponding to each pixel unit to the pixel unit so as to present the image to be displayed on the display screen.
Specifically, for each pixel unit, the output of each sub-pixel is controlled according to the target display data corresponding to all sub-pixels included in the pixel unit, so that the image to be displayed is presented on the display screen.
The display processing method provided by the embodiment of the application obtains a fitted physical cutting curve of a display screen by referring to a physical cutting edge of the display screen of an electronic terminal and utilizing a multi-section arc fitting mode and a straight line fitting mode, determines a display optimization coefficient matrix corresponding to an image to be displayed according to the fitted physical cutting curve, wherein each element in the display optimization coefficient matrix is a display optimization coefficient of a corresponding pixel unit in the image to be displayed, filters each element in the display optimization coefficient matrix through a target filter to obtain a filtering display coefficient corresponding to each pixel unit in the image to be displayed, obtains target display data corresponding to each pixel unit according to original display data and the filtering display coefficient corresponding to the pixel unit for each pixel unit in the image to be displayed, and transmits the target display data corresponding to the pixel unit for each pixel unit, the image to be displayed is presented on the display screen, so that the optimized display effect of the display screen on the image to be displayed is realized.
Fig. 5 is a flowchart of the steps provided in the embodiments of the present application for determining a fitted arc. In an alternative example, in step S101, any one of the multiple fitting arcs corresponding to each curve edge may be obtained by:
s501, determining the target position in the edge of the curve as the starting point of the preset conical curve.
Fig. 6 is a schematic diagram of curved edges on a display screen according to an embodiment of the present application, where each curved frame is a curved edge. It is understood that the physical cutting edge of a display screen includes two parts, namely a curved edge and a straight edge, and the curved edge may include a plurality of curved edges, and one of the curved edges is determined as a target curved edge and represents a curved edge to be currently fitted.
The target position refers to a starting point or an ending point of the curve edge, and the starting point of the preset conical curve is any point on the preset conical curve. Here, a coordinate system may be established with the plane of the display screen, and the positions of the start point and the end point of the edge of the target curve in the coordinate system may be determined based on the coordinates of the adjacent edges of the edge of the target curve. First, a circular curve can be selected as a preset conical curve, and the position of the preset conical curve is determined. Since it is necessary to fit the edge of the target curve by the preset conic section, a point on the preset conic section is the same as the position of the starting point of the edge of the target curve, and the edge of the target curve is fitted by an arc line starting from the point on the preset conic section.
S502, determining the fitting degree of the preset conic curve and the curve edge line by line in the direction of the ending position of the curve edge by taking the line of the starting point as the starting line of the intercepting frame.
The intercepting box is used for intercepting the preset conical curve so as to obtain the current fitting arc line. Specifically, the fitting degree of the current preset conic curve and the edge of the target curve is determined downwards line by line from the action starting line where the starting point of the edge of the target curve is located.
S503, if the fitting degree of the preset conical curve and the curve edge does not meet the preset fitting condition, adjusting the axial length of the preset conical curve, and continuously determining the fitting degree of the adjusted preset conical curve and the curve edge.
Specifically, if the edge of the current circular preset conical curve is completely not attached to the edge of the target curve or the attached part is small, the axial length of the preset conical curve is adjusted, the preset conical curve is adjusted to be elliptical until the length of the attached part of the preset conical curve and the edge of the target curve exceeds a preset value, and then the preset fitting condition is determined to be met. The preset value can be set by splicing several fitting arcs according to the edge of a curve. In general, a curve edge is spliced by three or five fitting arcs to achieve the best splicing effect, so that the preset value can be one third or one fifth of the total length of the target curve edge, and the like.
S504, if the fitting degree of the preset conic curve and the curve edge meets the preset fitting condition, determining the ending line of the intercepting frame.
And S505, determining the line segment of the preset conic curve intercepted between the starting line and the ending line of the intercepting frame as any fitting arc line.
And when the current preset conic curve meets the preset fitting condition, taking the line at the tail end of the edge joint of the preset conic curve and the target curve as the finishing line of the intercepting frame, wherein the intercepted preset conic curve segment in the intercepting frame is the current fitting arc segment.
As shown in fig. 7, an exemplary diagram of a fitted physical cutting curve is provided in the embodiments of the present application. For the target curve edge, illustratively, fitting is performed by splicing five fitting arcs, wherein the dashed rectangle is a truncated box corresponding to each fitting arc. The coordinate system shown in fig. 7 has the abscissa col and the ordinate row. Therefore, the position of the current fitting physical cutting curve can be obtained and used for determining the cutting relation of the fitting physical cutting curve to the pixels in the image to be displayed.
And after the first section of fitting arc line is determined, taking the end point of the first section of arc line as the initial point of the next section of fitting arc line, repeating the steps from S501 to S505, thus obtaining a second section of fitting arc line, a third section of fitting arc line, a fourth section of fitting arc line and a fifth section of fitting arc line in sequence, splicing the first section of fitting arc line, the second section of fitting arc line, the third section of fitting arc line, the fourth section of fitting arc line and the fifth section of fitting arc line in sequence, and finally obtaining a fitting physical cutting curve corresponding to the edge of the target curve. The obtained physical cutting curve can be closer to the physical cutting edge of the display screen, so that the better display effect of the image to be displayed is further ensured.
Based on the same inventive concept, a display processing apparatus corresponding to the display processing method is also provided in the embodiments of the present application, and because the principle of solving the problem of the display processing apparatus in the embodiments of the present application is similar to the display processing method described above in the embodiments of the present application, the implementation of the display processing apparatus may refer to the implementation of the method, and repeated details are not described again.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a display processing device according to an embodiment of the present disclosure. As shown in fig. 8, the display processing apparatus 800 includes:
the fitting module 810 is used for obtaining a fitting physical cutting curve of the display screen by using a multi-section arc line fitting mode and a straight line fitting mode according to the physical cutting edge of the display screen of the electronic terminal;
an obtaining module 820, obtaining an image to be displayed;
the optimization module 830 is configured to determine a display optimization coefficient matrix corresponding to the image to be displayed according to the fitted physical cutting curve, where each element in the display optimization coefficient matrix is a display optimization coefficient of a corresponding pixel unit in the image to be displayed;
the filtering module 840 is configured to filter each element in the display optimization coefficient matrix through a target filter to obtain a filtering display coefficient corresponding to each pixel unit in the image to be displayed;
a calculating module 850, configured to, for each pixel unit in an image to be displayed, obtain target display data corresponding to the pixel unit according to original display data and a filtering display coefficient corresponding to the pixel unit;
and the output module 860 is configured to, for each pixel unit, transmit target display data corresponding to the pixel unit, so as to present an image to be displayed on the display screen.
In a preferred embodiment, the physical cutting edge of the display screen of the electronic terminal includes at least one curved edge and at least one straight edge, wherein the fitting module 810 is specifically configured to: fitting the curve edges by a multi-section arc line fitting mode aiming at each curve edge to obtain a multi-section fitting arc line; fitting each straight line edge in a straight line fitting mode to obtain at least one line segment; and connecting the plurality of sections of fitted arc lines obtained by fitting with at least one line segment in sequence, and splicing into a fitted physical cutting curve of the display screen.
In a preferred embodiment, the fitting module 810 is specifically configured to: determining the target position in the edge of the curve as the starting point of a preset conical curve; determining the fitting degree of a preset conical curve and the curve edge line by line in the direction of the ending position of the curve edge by taking the line of the starting point as the starting line of the intercepting frame; if the fitting degree of the preset conical curve and the curve edge does not meet the preset fitting condition, adjusting the axial length of the preset conical curve, and continuously determining the fitting degree of the adjusted preset conical curve and the curve edge; if the fitting degree of the preset conical curve and the edge of the curve meets a preset fitting condition, determining the ending line of the intercepting frame; and determining the line segment of the preset conic curve intercepted between the starting line and the ending line of the intercepting frame as any fitting arc line.
In a preferred embodiment, the fitting module 810 is further configured to: for each curve edge, the starting point of the first section of fitted arc line corresponding to the curve edge is the starting point of the curve edge, and the starting points of the other sections of fitted arc lines except the first section corresponding to the curve edge are the ending points of the previous section of fitted arc line.
In a preferred embodiment, the optimization module 830 is specifically configured to: for each pixel unit in the image to be displayed, executing the following processing: determining whether the fitted physical cutting curve crosses the pixel cell; if the fitted physical cutting curve does not cross the pixel unit, determining whether the pixel unit is positioned in the closed area formed by the fitted physical cutting curve; if the pixel unit is located in the closed area, the display optimization coefficient corresponding to the pixel unit is 1; if the pixel unit is positioned outside the closed area, the display optimization coefficient corresponding to the pixel unit is 0; and if the fitted physical cutting curve crosses the pixel unit, determining the effective display area of the pixel unit, and determining a display optimization coefficient corresponding to the pixel unit according to the ratio of the effective display area of the pixel unit to the standard display area.
In a preferred embodiment, the optimization module 830 is further configured to: determining an area calculation mode of the pixel unit based on the position relation between the fitted physical cutting curve and the pixel unit; and calculating the display area of the pixel unit in the closed area in a determined area calculation mode, and determining the calculated display area as the effective display area of the pixel unit.
In a preferred embodiment, the filtering module 840 is specifically configured to: respectively determining a target filter corresponding to each sub-pixel according to the arrangement structure of each sub-pixel in the pixel unit; and for each sub-pixel, filtering the display optimization coefficient corresponding to the pixel unit where the sub-pixel is located through a target filter corresponding to the sub-pixel to obtain a filtering display coefficient corresponding to the sub-pixel, wherein the sum of the element values in the target filter is 256.
In a preferred embodiment, the calculation module 850 is specifically configured to: for each sub-pixel, multiplying the original display data of the sub-pixel with the filtering display coefficient corresponding to the sub-pixel to obtain a target adjusting coefficient; the target adjustment coefficient is quantized to obtain target display data for the sub-pixel.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 9, the electronic device 900 includes a processor 910, a memory 920, and a bus 930.
The memory 920 stores machine-readable instructions executable by the processor 910, when the electronic device 900 runs, the processor 910 communicates with the memory 920 through the bus 930, and when the machine-readable instructions are executed by the processor 910, the steps of the display processing method may be performed.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the display processing method may be executed.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable memory executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a memory, and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
1. A display processing method is applied to an electronic terminal, and is characterized in that a display screen of the electronic terminal is provided with a round corner, and the method comprises the following steps:
obtaining a fitted physical cutting curve of a display screen by utilizing a multi-section arc line fitting mode and a straight line fitting mode according to a physical cutting edge of the display screen of the electronic terminal;
acquiring an image to be displayed;
determining a display optimization coefficient matrix corresponding to the image to be displayed according to the fitted physical cutting curve, wherein each element in the display optimization coefficient matrix is the display optimization coefficient of a corresponding pixel unit in the image to be displayed;
filtering each element in the display optimization coefficient matrix through a target filter to obtain a filtering display coefficient corresponding to each pixel unit in the image to be displayed;
aiming at each pixel unit in the image to be displayed, obtaining target display data corresponding to the pixel unit according to original display data corresponding to the pixel unit and a filtering display coefficient;
and transmitting target display data corresponding to each pixel unit to the pixel unit so as to present the image to be displayed on the display screen.
2. The method of claim 1, wherein the physical cutting edges of the display screen of the electronic terminal comprise at least one curvilinear edge and at least one rectilinear edge,
wherein the fitted physical cutting curve of the display screen is obtained by:
aiming at each curve edge, fitting the curve edge in a multi-section arc line fitting mode to obtain a multi-section fitted arc line;
fitting each straight line edge in a straight line fitting mode to obtain at least one line segment;
and connecting the plurality of sections of fitted arc lines obtained by fitting with at least one line segment in sequence, and splicing into a fitted physical cutting curve of the display screen.
3. The method of claim 2, wherein any one of the plurality of fitted arcs to which each curve edge corresponds is obtained by:
determining the target position in the edge of the curve as the starting point of a preset conical curve;
determining the fitting degree of the preset conic curve and the curve edge line by line in the direction of the ending position of the curve edge by taking the line of the starting point as the starting line of the intercepting frame;
if the fitting degree of the preset conical curve and the curve edge does not meet the preset fitting condition, adjusting the axial length of the preset conical curve, and continuously determining the fitting degree of the adjusted preset conical curve and the curve edge;
if the fitting degree of the preset conic curve and the edge of the curve meets a preset fitting condition, determining the ending line of the intercepting frame;
and determining the line segment of the preset conic curve intercepted between the starting line and the ending line of the intercepting frame as any fitting arc line.
4. The method of claim 2, wherein the starting point for each fitted arc is determined by:
for each curve edge, the starting point of the first section of fitted arc line corresponding to the curve edge is the starting point of the curve edge, and the starting points of the other sections of fitted arc lines except the first section corresponding to the curve edge are the ending points of the previous section of fitted arc line.
5. The method according to claim 1, wherein each element in the display optimization coefficient matrix corresponding to the image to be displayed is determined by:
for each pixel unit in the image to be displayed, executing the following processing:
determining whether the fitted physical cutting curve crosses the pixel cell;
if the fitted physical cutting curve does not cross the pixel unit, determining whether the pixel unit is positioned in the closed area formed by the fitted physical cutting curve;
if the pixel unit is located in the closed area, the display optimization coefficient corresponding to the pixel unit is 1;
if the pixel unit is positioned outside the closed area, the display optimization coefficient corresponding to the pixel unit is 0;
and if the fitted physical cutting curve crosses the pixel unit, determining the effective display area of the pixel unit, and determining a display optimization coefficient corresponding to the pixel unit according to the ratio of the effective display area of the pixel unit to the standard display area.
6. The method of claim 5, wherein the effective display area of each pixel cell is determined by:
determining an area calculation mode of the pixel unit based on the position relation between the fitted physical cutting curve and the pixel unit;
and calculating the display area of the pixel unit in the closed area in a determined area calculation mode, and determining the calculated display area as the effective display area of the pixel unit.
7. The method of claim 1, wherein each pixel unit comprises at least one sub-pixel, and wherein the filtered display coefficient corresponding to each pixel unit is determined by:
respectively determining a target filter corresponding to each sub-pixel according to the arrangement structure of each sub-pixel in the pixel unit;
and for each sub-pixel, filtering the display optimization coefficient corresponding to the pixel unit where the sub-pixel is located through a target filter corresponding to the sub-pixel to obtain a filtering display coefficient corresponding to the sub-pixel, wherein the sum of the element values in the target filter is 256.
8. The method of claim 7, wherein the target display data for each sub-pixel is determined by:
for each sub-pixel, multiplying the original display data of the sub-pixel with the filtering display coefficient corresponding to the sub-pixel to obtain a target adjusting coefficient;
and quantizing the target adjusting coefficient to obtain target display data of the sub-pixel.
9. A display processing device applied to an electronic terminal, wherein a display screen of the electronic terminal has a round corner, the device comprises:
the fitting module is used for obtaining a fitting physical cutting curve of the display screen by utilizing a multi-section arc line fitting mode and a straight line fitting mode according to the physical cutting edge of the display screen of the electronic terminal;
the acquisition module acquires an image to be displayed;
the optimization module is used for determining a display optimization coefficient matrix corresponding to the image to be displayed according to the fitted physical cutting curve, wherein each element in the display optimization coefficient matrix is the display optimization coefficient of a corresponding pixel unit in the image to be displayed;
the filtering module is used for filtering each element in the display optimization coefficient matrix through a target filter so as to obtain a filtering display coefficient corresponding to each pixel unit in the image to be displayed;
the calculation module is used for obtaining target display data corresponding to each pixel unit in the image to be displayed according to the original display data corresponding to the pixel unit and the filtering display coefficient;
and the output module is used for transmitting the target display data corresponding to each pixel unit to the pixel unit so as to present the image to be displayed on the display screen.
10. A storage medium, characterized in that the storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the display processing method according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111435380.8A CN114089942A (en) | 2021-11-29 | 2021-11-29 | Display processing method and device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111435380.8A CN114089942A (en) | 2021-11-29 | 2021-11-29 | Display processing method and device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114089942A true CN114089942A (en) | 2022-02-25 |
Family
ID=80305762
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111435380.8A Pending CN114089942A (en) | 2021-11-29 | 2021-11-29 | Display processing method and device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114089942A (en) |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07141508A (en) * | 1993-11-17 | 1995-06-02 | Matsushita Electric Ind Co Ltd | Shape description device |
CN101571774A (en) * | 2009-06-15 | 2009-11-04 | 南京华睿川电子科技有限公司 | Touch screen and manufacturing method thereof |
CN103279319A (en) * | 2013-06-04 | 2013-09-04 | 天津朗合数字科技有限公司 | Fusion belt mathematical model based on fitting approximation algorithm |
CN103813116A (en) * | 2012-11-15 | 2014-05-21 | 深圳市光峰光电技术有限公司 | Adjusting method, adjusting device, light machine and screen splicing wall system |
CN108665842A (en) * | 2018-05-14 | 2018-10-16 | 昆山国显光电有限公司 | Show platen edge display control method, control device and display device |
CN109188762A (en) * | 2018-10-15 | 2019-01-11 | 信利半导体有限公司 | Colored optical filtering substrates and display device |
CN110322401A (en) * | 2018-03-31 | 2019-10-11 | 华为技术有限公司 | Pixel processing method and device |
CN110413183A (en) * | 2019-07-31 | 2019-11-05 | 上海掌门科技有限公司 | A kind of method and apparatus that the page is presented |
WO2019218612A1 (en) * | 2018-05-14 | 2019-11-21 | 昆山国显光电有限公司 | Control method and control device for display screen edge display, and display device |
WO2020024479A1 (en) * | 2018-07-30 | 2020-02-06 | 武汉华星光电半导体显示技术有限公司 | Bright spot compensation method and device for curved screen |
US20200082798A1 (en) * | 2017-10-31 | 2020-03-12 | Kunshan Go-Visionox Opto-Electronics Co., Ltd. | Driving methods and driving devices for pixel units of irregular shaped display screens |
US20200202817A1 (en) * | 2018-07-23 | 2020-06-25 | Ordos Yuansheng Optoelectronics Co., Ltd. | Display optimization method and apparatus, display driving method and apparatus, display apparatus, and storage medium |
CN111796788A (en) * | 2020-07-01 | 2020-10-20 | 芯颖科技有限公司 | Method and system for compressing and accessing edge information of arc-shaped display screen |
CN112991307A (en) * | 2021-03-25 | 2021-06-18 | 中南大学 | Defect circle fitting method and device for drilling blasting and medium |
-
2021
- 2021-11-29 CN CN202111435380.8A patent/CN114089942A/en active Pending
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07141508A (en) * | 1993-11-17 | 1995-06-02 | Matsushita Electric Ind Co Ltd | Shape description device |
CN101571774A (en) * | 2009-06-15 | 2009-11-04 | 南京华睿川电子科技有限公司 | Touch screen and manufacturing method thereof |
CN103813116A (en) * | 2012-11-15 | 2014-05-21 | 深圳市光峰光电技术有限公司 | Adjusting method, adjusting device, light machine and screen splicing wall system |
CN103279319A (en) * | 2013-06-04 | 2013-09-04 | 天津朗合数字科技有限公司 | Fusion belt mathematical model based on fitting approximation algorithm |
US20200082798A1 (en) * | 2017-10-31 | 2020-03-12 | Kunshan Go-Visionox Opto-Electronics Co., Ltd. | Driving methods and driving devices for pixel units of irregular shaped display screens |
CN110322401A (en) * | 2018-03-31 | 2019-10-11 | 华为技术有限公司 | Pixel processing method and device |
WO2019218612A1 (en) * | 2018-05-14 | 2019-11-21 | 昆山国显光电有限公司 | Control method and control device for display screen edge display, and display device |
CN108665842A (en) * | 2018-05-14 | 2018-10-16 | 昆山国显光电有限公司 | Show platen edge display control method, control device and display device |
US20200202817A1 (en) * | 2018-07-23 | 2020-06-25 | Ordos Yuansheng Optoelectronics Co., Ltd. | Display optimization method and apparatus, display driving method and apparatus, display apparatus, and storage medium |
WO2020024479A1 (en) * | 2018-07-30 | 2020-02-06 | 武汉华星光电半导体显示技术有限公司 | Bright spot compensation method and device for curved screen |
CN109188762A (en) * | 2018-10-15 | 2019-01-11 | 信利半导体有限公司 | Colored optical filtering substrates and display device |
CN110413183A (en) * | 2019-07-31 | 2019-11-05 | 上海掌门科技有限公司 | A kind of method and apparatus that the page is presented |
CN111796788A (en) * | 2020-07-01 | 2020-10-20 | 芯颖科技有限公司 | Method and system for compressing and accessing edge information of arc-shaped display screen |
CN112991307A (en) * | 2021-03-25 | 2021-06-18 | 中南大学 | Defect circle fitting method and device for drilling blasting and medium |
Non-Patent Citations (8)
Title |
---|
任重;: "多段线拟合曲线在Por/E产品造型中的应用", 黄河水利职业技术学院学报, no. 02 * |
周永情;李德明;孙军伟;王普;: "自由曲线轮廓数控刀具路径生成及加工", 组合机床与自动化加工技术, no. 01 * |
张习文等: "基于遗传算法的以线段和圆弧为基元的曲线拟合", 计算机辅助设计与图形学学报, vol. 14, no. 2 * |
彭美武;: "基于三点圆弧拟合法的椭圆曲线R参数编程研究", 制造业自动化, no. 04 * |
朱虹;: "基于NURBS曲线拟合的复杂回转体零件加工技术研究", 机械设计与制造, no. 04 * |
李立新, 刘敏, 倪益华: "线切割加工中曲线圆弧拟合的累积误差分析", 电加工与模具, no. 06 * |
肖涤尘, 梁锡昌: "最佳一致逼近及容差平滑圆弧拟合平面点列", 重庆大学学报(自然科学版), no. 03 * |
韩明, 孔亚洲, 俞红, 黄树槐: "STL切片数据的NURBS曲线拟合算法", 华中科技大学学报(自然科学版), no. 01 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108550158B (en) | Image edge processing method, electronic device and computer readable storage medium | |
CN107403421B (en) | Image defogging method, storage medium and terminal equipment | |
CN110930919B (en) | Image processing method and display driving device | |
US8081839B2 (en) | Image processor | |
CN102473293B (en) | Image processing apparatus and image processing method | |
EP3166375A1 (en) | Electroconductive film, display device provided therewith, and method for evaluating electroconductive film | |
CN109345454B (en) | Bitmap image vectorization method, storage medium and system | |
CN112788251B (en) | Image brightness processing method and device, and image processing method and device | |
KR20180021721A (en) | Color gamut mapping using brightness mapping based also on the brightness of the cusp color belonging to different constant- | |
CN109817170A (en) | Pixel compensation method, device and terminal device | |
CN107341763A (en) | Image processing method and device, electronic equipment and storage medium | |
US20140168283A1 (en) | Image processing apparatus, image processing method and storage medium | |
CN113327193A (en) | Image processing method, image processing apparatus, electronic device, and medium | |
EP1895763A2 (en) | Imaging device | |
CN114089942A (en) | Display processing method and device and storage medium | |
US7912308B2 (en) | Image processing device that quickly performs retinex process | |
DE102016200031A1 (en) | Image display system | |
US10664956B2 (en) | Image processing apparatus and program | |
CN104519335A (en) | Method, device and system for resizing original depth frame | |
CN109242750B (en) | Picture signature method, picture matching method, device, equipment and storage medium | |
CN110971837A (en) | ConvNet-based dim light image processing method and terminal equipment | |
US9569872B2 (en) | Method and apparatus for rasterization | |
CN116954771A (en) | Screen backlight adjusting method and device | |
US8064713B2 (en) | Data processing device that executes retinex processing | |
CN109308690A (en) | A kind of brightness of image equalization methods and terminal |
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 |