[go: up one dir, main page]

CN116153224B - Gray scale compensation method of pixel unit - Google Patents

Gray scale compensation method of pixel unit Download PDF

Info

Publication number
CN116153224B
CN116153224B CN202310173007.2A CN202310173007A CN116153224B CN 116153224 B CN116153224 B CN 116153224B CN 202310173007 A CN202310173007 A CN 202310173007A CN 116153224 B CN116153224 B CN 116153224B
Authority
CN
China
Prior art keywords
pixel
compensation
gray
panel
scale
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310173007.2A
Other languages
Chinese (zh)
Other versions
CN116153224A (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.)
Beijing Empyrean Technology Co Ltd
Original Assignee
Beijing Empyrean 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 Beijing Empyrean Technology Co Ltd filed Critical Beijing Empyrean Technology Co Ltd
Priority to CN202310173007.2A priority Critical patent/CN116153224B/en
Publication of CN116153224A publication Critical patent/CN116153224A/en
Application granted granted Critical
Publication of CN116153224B publication Critical patent/CN116153224B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2300/00Aspects of the constitution of display devices
    • G09G2300/04Structural and physical details of display devices
    • G09G2300/0439Pixel structures
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2320/00Control of display operating conditions
    • G09G2320/02Improving the quality of display appearance
    • G09G2320/0271Adjustment of the gradation levels within the range of the gradation scale, e.g. by redistribution or clipping
    • 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 Hardware Design (AREA)
  • Geometry (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Processing (AREA)

Abstract

A gray level compensation method of a pixel unit comprises the following steps: determining a pixel unit needing gray level compensation; selecting a panel contour line in a drawing area, and determining an actual frame of the panel; importing a gray level rule definition file and determining gray level rule definition; designating a layout layer involved in gray level compensation calculation; determining gray level compensation algorithm parameters; searching pixel units intersected with the panel outline graph; performing gray-scale compensation on the pixel units by using a gray-scale compensation algorithm to generate a compensation graph; and outputting the panel pixel gray level value report file to generate a pixel gray level vector diagram of the panel. When designing a layout with an R angle or the like, the gray-scale compensation graph is generated in an automatic mode and is compensated to a corresponding position in the layout; and calculating the gray scale value of each pixel in the panel layout, deriving a text containing the gray scale value information of each pixel, and simultaneously converting the gray scale value into a pixel gray scale vector diagram in an automatic mode, so that the whole gray scale information of the panel is intuitively displayed.

Description

Gray scale compensation method of pixel unit
Technical Field
The invention relates to the technical field of layout design, in particular to a gray level compensation method of a pixel unit.
Background
In the field of special-shaped mobile phone panel design, a rounded rectangular screen corner (R angle) design scheme leads to that partial pixels in the area are not completely in an effective light-emitting area, and gray level compensation needs to be carried out on pixels cut by a frame of an AA area (ACTIVE AREA, called AA area for short, synonymous with the effective light-emitting area). The gray scale values are numbers of 0-255, and reports are usually generated in the format of a csv table for each pixel gray scale value in the layout. At present, when designing the corners of the screen of the rounded rectangle, a design engineer manually draws the gray-scale compensation units one by one, which generates great workload, and because the number of pixels in the panel is great, the pixels are expressed in a digital form, and the design engineer often cannot obtain visual display of the whole gray-scale information of the panel.
Disclosure of Invention
In order to solve the defects of the prior art, the invention aims to provide a gray level compensation method of a pixel unit, which can rapidly perform gray level compensation on an R-angle pixel unit and generate a pixel gray level vector diagram, thereby improving the design speed of a special-shaped layout.
In order to achieve the above object, the method for automatically performing gray-scale compensation and generating a pixel gray-scale vector diagram according to the present invention includes the following steps:
determining a pixel unit needing gray level compensation;
Selecting a panel contour line in a drawing area, and determining an actual frame of the panel;
importing a definition file of a determined gray level rule, and determining the definition of the gray level rule;
designating a layout layer involved in gray level compensation calculation;
determining gray level compensation algorithm parameters;
searching pixel units intersected with the panel outline graph;
performing gray-scale compensation on the pixel units by using a gray-scale compensation algorithm to generate a compensation graph;
And outputting the panel pixel gray level value report file to generate a pixel gray level vector diagram of the panel.
Further, the step of determining the pixel unit needing gray-scale compensation further includes: designating a layout design unit name needing gray level compensation in a panel layout, and determining a pixel unit needing gray level compensation, wherein the layout design unit name comprises the following components: store name, unit name, and graph name.
Further, the gray level compensation rule definition file includes: a gray scale definition interval divided from 0 to 100, an area ratio value corresponding to the gray scale definition interval, and a gray scale number corresponding to the gray scale definition interval.
Further, the layout layer includes: an outer pixel block layer, an opening area layer, a calculation layer and a black matrix layer, wherein,
The pixel outer block layer is used for determining the boundary of each pixel unit and judging whether the pixel unit intersects with the outline frame of the panel;
the open area layer is used for assisting in generating a final BM layer compensation graph;
The calculating layer is used for calculating the overlapping area of the pixel units and the panel outline;
the black matrix layer is used for designating the layer used by the generated compensation graph.
Further, the gray-scale compensation algorithm parameters include: y-axis center coordinate value, low gray-scale threshold, area calculation accuracy, compensation angle, BM overlapping critical dimension, wherein,
The Y-axis center coordinate value is used for dividing the panel layout into an upper half area and a lower half area;
the low gray level threshold is used for judging the mode of generating gray level compensation;
the area calculation precision is used for specifying the precision of the area of the generated BM pattern;
The compensation angle is used for specifying the cutting direction of gray level compensation on the pattern of the opening area;
The BM overlapping critical dimension is used for performing dimension compensation on the BM layer graph boundary;
And the boundary threshold compensation is used for compensating the graph boundary of the image layer in the opening area of the pixel unit.
Further, the step of performing gray-scale compensation on the pixel unit by using a gray-scale compensation algorithm to generate a compensation pattern further includes:
Calculating the proportion of the overlapping area of the calculated layer graph and the panel contour in the pixel unit to the total area of the calculated layer graph, and searching the corresponding compensated opening ratio and gray scale value in a gray scale rule definition file;
And cutting the pattern of the opening area according to the compensated opening ratio, the compensated angle and the upper and lower half areas of the pixel area to generate a compensated pattern.
Further, the method further comprises the following steps:
when the compensation angle is not oblique cutting, calculating the area ratio of the cut pixel opening area graph to the original pixel opening area graph, when the area ratio is smaller than the low gray level threshold value ratio, abandoning cutting, and generating a new opening area graph at the upper and lower boundaries or the center of the original opening pattern according to the corresponding compensated opening ratio, the distribution of the upper and lower half areas of the pixel and whether the boundary threshold value compensation is selected;
When the compensation angle is oblique cutting, or the area ratio of the cut pixel opening area pattern to the original pixel opening area pattern is larger than a low gray level threshold value, cutting the opening area pattern to obtain a new second opening area pattern, performing logic non-calculation on the original pixel opening area pattern and the second opening area pattern, taking the obtained new pattern as a BM (BM) pattern layer compensation pattern, and adding the compensation pattern to a corresponding position in the panel layout;
when the compensation angle is oblique cutting and the BM overlapping critical dimension is set, expanding the width and the height of the BM compensation pattern according to the BM overlapping critical dimension;
And generating gray-scale compensation patterns which are the same as the patterns of the opening areas in shape and the same position for pixel units which are in the polygon formed by the long rays, the wide rays and the panel contour lines of the panel layout and do not overlap with the panel contour lines.
Further, the step of outputting the panel pixel gray level value report file and generating the pixel gray level vector diagram of the panel further includes:
Generating data in a form of a table according to the number of rows and columns of pixels in the panel layout, wherein the data represents the gray scale value of the pixel at the position;
Writing the data in the form of a csv file into the data in the form of a table;
and automatically generating a pixel gray level vector picture according to the gray level value of the pixel.
Further, the step of automatically generating a pixel gray vector picture according to the gray value of the pixel further includes:
reading the width and the height of pixel units in the layout, and scaling the width and the height to a required range in equal proportion;
Calculating the width and the height of a panel in the pixel gray-scale vector diagram according to the number of rows and the number of columns of the table data, expanding the width and the height of the panel by preset proportions to obtain the size of the pixel gray-scale vector diagram, and setting the background to be black;
Calculating polygons formed by all pixels with gray scale values of 255 in the table data, and writing the polygons into a pixel gray scale vector diagram;
calculating the positions of pixels with gray scale values not being 255 and not being 0 in the table data, and writing the positions into a pixel gray scale vector diagram according to the gray scale values;
And generating a panel pixel gray-scale vector diagram with black as a background.
In order to achieve the above object, the present invention further provides an electronic device including a memory, a processor, and a program stored in the memory, wherein the program is executed by the processor, and the processor executes the steps of the gray-scale compensation method of the pixel unit.
In order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the gray-scale compensation method of a pixel unit as described above.
Compared with the prior art, the gray level compensation method of the pixel unit has the following beneficial effects:
When designing a layout with an R angle or the like, generating a gray level compensation graph in an automatic mode, and compensating the gray level compensation graph to a corresponding position in the layout; calculating the gray scale value of each pixel in the panel layout, deriving a text containing the gray scale value information of each pixel, and simultaneously converting the gray scale value into a pixel gray scale vector diagram in an automatic mode to intuitively display the whole gray scale information of the panel;
the method is applied to the field of special-shaped mobile phone panel design, simulates the rule of drawing gray-scale compensation by a layout engineer, can completely replace the process of manually drawing gray-scale compensation units, and improves the design speed of the special-shaped layout.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, and do not constitute a limitation to the invention. In the drawings:
FIG. 1 is a flowchart of a gray scale compensation method of a pixel unit according to the present invention;
FIG. 2 is a schematic diagram of a gray-scale compensation command interface according to the present invention;
FIG. 3 is a schematic diagram of a gray level rule file according to the present invention;
FIG. 4 is a schematic tangential diagram according to the present invention;
FIG. 5 is a schematic view of a chamfer in accordance with the present invention;
FIG. 6 is a schematic view tangential to the contour of a panel in accordance with the present invention;
FIG. 7 is an example of a manner of low threshold compensation along a boundary in accordance with the present invention;
FIG. 8 is an example of a manner of low threshold compensation at the center in accordance with the present invention;
FIG. 9 is a schematic diagram of gray scale compensation for the upper left R corner region of a panel layout according to the present invention;
Fig. 10 is a schematic view of an electronic device according to the present invention.
Detailed Description
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings, it being understood that the preferred embodiments described herein are for illustration and explanation of the present invention only, and are not intended to limit the present invention.
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While the invention is susceptible of embodiment in the drawings, it is to be understood that the invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided to provide a more thorough and complete understanding of the invention. It should be understood that the drawings and embodiments of the invention are for illustration purposes only and are not intended to limit the scope of the present invention.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the concepts of "first," "second," etc. may be referred to herein merely as distinguishing between different devices, components, or parts and not as defining a sequential or interdependent relationship of the operations performed by the devices, components, or parts.
It should be noted that the modifications of "a" and "an" as may be mentioned in the present disclosure are illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" should be understood to mean "one or more" unless the context clearly indicates otherwise. "plurality" is understood to mean two or more.
Example 1
Fig. 1 is a flowchart of a gray level compensation method of a pixel unit according to the present invention, and the gray level compensation method of the pixel unit according to the present invention will be described in detail with reference to fig. 1.
First, in step S1, a pixel unit that needs gray-scale compensation is determined.
In the embodiment of the invention, the pixel units needing gray-scale compensation in the design layout are determined by designating the names of the layout design units needing gray-scale compensation, namely designating the design layout containing the pixel units in the panel board. The layout design unit name comprises: a library name (lib), a cell name (cell), and a view name (view).
Fig. 2 is a schematic diagram of an operation interface of a gray-scale compensation command according to the present invention, as shown in fig. 2, in the operation interface, if a current panel layout includes a design layout of a plurality of Pixel units, the Pixel units required to perform gray-scale compensation calculation may be increased or decreased by adding or subtracting number keys. The appointed unit name is taken as an implementation object of the method, and the gray level compensation method of the pixel unit only acts on the design layout of the appointed pixel unit.
In step S2, a panel contour is selected in the drawing area, and the actual frame of the panel is determined.
In the embodiment of the invention, the actual frame of the panel is designated in the drawing area by selecting the contour line of the panel. In the subsequent gray-scale compensation calculation process, gray-scale compensation calculation is carried out on the graph intersected with the actual frame of the panel contour or outside the contour line.
In step S3, a gray scale rule definition file is imported to determine a gray scale rule definition.
In the embodiment of the invention, the definition of the gray scale rule is determined by designating the custom gray scale rule file and importing the gray scale rule file. Referring to fig. 2, a gray-scale rule file is designated through a part of GRAYSCALE FILE in the operation interface. The steps of gray scale compensation calculation and generation of a pixel gray scale vector map will be performed based on the gray scale rule definition of the gray scale rule file.
In the embodiment of the invention, the gray scale rule file is a csv format file of three columns, and the three columns are respectively a gray scale definition interval divided from 0 to 100, an area ratio value corresponding to the gray scale definition interval and a gray scale number corresponding to the gray scale definition interval. Referring to fig. 3, fig. 3 is a schematic diagram of a gray scale rule file according to the present invention, and as shown in fig. 3, the first column of data is a segment of an open area (0, 100) as an area dividing the overlapping area percentage of the open area of the pixel unit and the AA contour; the second column of data is the compensated opening proportion defined by the overlapping area percentage of the pixel unit opening area and the AA outline in the corresponding interval, and is used for calculating a gray-scale compensation graph; and the third column is defined gray scale values of which the overlapping area percentage of the pixel unit opening area and the AA outline is in a corresponding interval, and the gray scale values are used for generating a gray scale csv table report file and a pixel gray scale vector diagram. Referring to fig. 9, the arc shown in fig. 9 is the AA profile.
In step S4, a layout layer involved in the gray-scale compensation calculation is specified.
In the embodiment of the invention, the panel layout layer involved in the gray level compensation calculation is designated, which comprises the following steps:
The extra-pixel block diagram layer, referring to fig. 2, is designated in the operator interface Pixel Outline Layer. The layer is used for determining the boundary of each pixel unit and judging whether the pixel unit intersects with the outline frame of the panel;
Open area Layer, referring to fig. 2, an Aperture Layer designation in the operation interface. In the gray level compensation algorithm, the open area layer in the pixel unit is cut to assist in generating a final BM layer compensation graph;
The calculation Layer, referring to fig. 2, is specified by the Calculate Layer in the operator interface. When calculating the overlapping area of the pixel unit and the panel outline, calculating by using a calculation layer graph;
Black matrix Layer, referring to fig. 2, BM Layer designates in the operation interface. The layer is used to specify the layer used by the last generated compensation pattern.
In step S5, parameters of a gray-scale compensation algorithm are determined.
In the embodiment of the invention, the calculation rule of the gray-scale compensation algorithm is determined by inputting the parameters involved in the gray-scale compensation algorithm. The parameters of the gray-scale compensation algorithm include: the Y-axis central coordinate value, the low gray level threshold value, the area calculation precision, the compensation angle, the BM overlapping critical dimension and the boundary threshold value compensation are included.
And the Y-axis center coordinate value is used for dividing the panel layout into an upper half area and a lower half area. Referring to fig. 2, a Y-axis center coordinate value is input in the operation interface Y Coord Of Center.
And the low gray level threshold is used for judging the mode of generating gray level compensation, when the area ratio of the cut open area graph to the original open area graph obtained by a gray level compensation algorithm is smaller than or equal to the low gray level threshold, the center or the upper and lower boundaries of the open area are compensated, and when the area ratio is larger than the low gray level threshold, the cutting method is adopted, and when the compensation angle is oblique cutting, the parameter is unavailable. Referring to fig. 2, a low gray level threshold is partially input in the operation interface Threshold Area Ratio.
And the area calculation precision is used for specifying the precision of the generated BM graphic area. Referring to fig. 2, the area calculation accuracy is partially inputted in the operation area interface Area Calculate Accuracy.
The compensation angle is used for specifying the cutting direction of gray level compensation to the pattern of the opening area, and the selectable compensation angle comprises: flat cut (0 degrees), beveled cut (45 degrees or 135 degrees), tangent to the panel contour. Referring to fig. 2, a compensation angle is selected under the Compensate Degree title in the operation area interface.
In the embodiment of the present invention, the three cutting modes refer to fig. 4,5 and 6, respectively. FIG. 4 is a schematic diagram of tangent of the cut pattern of the opening area and the original pattern of the opening area, as shown in FIG. 4, when the area ratio of the cut pattern of the opening area to the original pattern of the opening area is larger than the low gray level threshold, the compensation angle is the upper half of the pixels of the cut. Fig. 5 is a schematic view of beveling according to the present invention, and as shown in fig. 5, when the area ratio of the cut open area pattern to the original open area pattern is greater than the low gray level threshold, the compensation angle is the upper half pixel of the beveling. Fig. 6 is a schematic view tangential to the contour line of the panel according to the present invention, and as shown in fig. 6, when the area ratio of the cut pattern of the opening area to the original pattern of the opening area is greater than the low gray level threshold, the compensation angle is the upper half pixel tangential to the contour line of the panel.
BM overlapping critical dimensions, which is only available when the compensation angle is chosen for beveling, is used to expand the width and height of the resulting pixel compensation unit, which compensates for the errors created by the beveling mode, and the effect created by this parameter is referred to in fig. 5. And performing size compensation on the boundary of the BM layer pattern according to the designated BM overlapping critical dimension value when the compensation algorithm generates the BM compensation pattern. Referring to fig. 2, BM overlap CD portion determines BM overlap critical dimensions in the operator interface.
When the area ratio of the cut pattern of the opening area to the original pattern of the opening area is smaller than the low gray level threshold value, generating a rectangular hole exposure opening area along the lower boundary (the upper half area of the panel layout of the pixel unit) or the upper boundary (the upper half area of the panel layout of the pixel unit) of the BM compensation when the boundary threshold value compensation is selected, wherein the pixel is positioned at the upper boundary of the pattern of the opening layer for compensation, and the pixel is positioned at the lower half area for compensation along the lower boundary of the pattern of the opening layer; when no boundary threshold compensation is selected, a rectangular hole is generated in the center of the BM compensation pattern. When the compensation angle is selected to be a chamfer, the boundary threshold compensation cannot be selected. Referring to FIG. 2, boundary threshold compensation is selected in part Threshold Compensated By Edge in the operator interface.
In the embodiment of the invention, referring to fig. 7 in a mode of performing low-threshold compensation along a boundary, as shown in fig. 7, when the area ratio of the cut pattern of the open area to the original pattern of the open area is smaller than or equal to the low-gray-scale threshold, pixels located in the upper half area compensate along the boundary of the pattern of the open area, and the pixel units are located in the upper half area of the panel; in the mode of compensating the low threshold value in the center, referring to fig. 8, as shown in fig. 8, when the area ratio of the cut pattern of the open area to the original pattern of the open area is less than or equal to the low gray-scale threshold value, the compensation is performed along the center of the pattern of the open area.
In step S6, a pixel unit intersecting the panel contour pattern is found.
In the embodiment of the invention, the pixel units intersected with the panel outline in the layout are searched, and gray-scale compensation calculation is carried out on the pixel units one by adopting a gray-scale compensation algorithm.
In step S7, gray-scale compensation is performed on the pixel unit by using a gray-scale compensation algorithm, so as to generate a compensation pattern.
In the embodiment of the invention, gray-scale compensation is carried out on the pixel units by using a gray-scale compensation algorithm, and the generation of the compensation graph specifically comprises the following steps:
Step S71, calculating the ratio of the overlapped area of the calculated area graph and the panel outline to the total area of the calculated area graph in the current pixel unit, and searching the compensated opening ratio and the gray scale value corresponding to the ratio in the gray scale rule definition file.
And S72, cutting the pattern of the opening area according to the compensated opening ratio, the selected compensation angle and the distribution condition of the pixels in the upper half area and the lower half area.
Step S73, if the specified compensation angle is a chamfer, skip this step, otherwise execute: and calculating the area ratio of the cut pixel opening area pattern to the original pixel opening area pattern. And when the area ratio is smaller than a low gray level threshold value, cutting is abandoned, and a new first opening area graph is generated at the upper and lower boundaries or the center of the original opening area graph according to the corresponding compensated opening removal ratio, pixel upper and lower half area distribution and boundary threshold value compensation or not in the gray level rule file, wherein the first opening area graph layer graph is obtained by calculating the rectangular area according to the compensated opening area ratio.
And S74, if the compensation angle is oblique cutting, or the area ratio of the cut pixel opening area pattern to the original pixel opening area pattern is larger than a low gray level threshold value, cutting the opening area pattern is reserved, and a new second opening area pattern is obtained. And performing logic non-calculation on the original pixel opening area graph and the second opening area graph, taking the obtained new graph as a BM layer compensation graph, and adding the compensation graph to a corresponding position in the panel layout.
In step S75, if the compensation angle is a bias angle and the BM overlap critical dimension is set, the width and height of the BM compensation pattern are extended according to the BM overlap critical dimension, and the expansion effect is referred to fig. 5.
Step S76, generating gray-scale compensation patterns with the same shape and the same position as those of the patterns of the opening area for pixel units which are in the polygon formed by the panel layout contour lines, the long rays and the wide rays and the panel contour lines and are not overlapped with the panel contour lines. Fig. 9 is a schematic diagram of gray-scale compensation for an upper left R corner region of a panel layout according to the present invention, and as shown in fig. 9, in a shadow region obtained by using a wide and high ray and a panel contour of the panel layout, a BM region layer compensation pattern having exactly the same shape and position as those of the pattern of the opening region is generated in a pixel unit which does not intersect with the panel contour.
In step S8, a panel pixel gray-scale value report file is output, and a pixel gray-scale vector diagram of the panel is generated.
In the embodiment of the invention, the generation of the pixel gray-scale vector diagram of the panel specifically comprises the following steps:
In step S81, data in the form of a table is generated according to the number of rows and columns of pixels in the panel layout, and the data represents the gray-scale value of the pixel at the position. If there are no pixels at the positions corresponding to the rows and columns, it is marked as 0; if the pixel frames at the positions corresponding to the rows and the columns are positioned in the contour line of the panel, marking 255; if the pixel frames at the positions corresponding to the rows and the columns are intersected with the contour line of the panel, reading gray-scale values according to a gray-scale rule file; if the pixel frames at the positions corresponding to the rows and the columns are positioned in the polygon formed by the long rays, the wide rays and the panel contour lines of the panel layout and do not overlap with the panel contour lines, the pixel frames are marked as 0.
Step S82, writing the table data generated in step S81 in the form of a csv file. Referring to fig. 2, the generation Report is checked in the operation interface, and the file name of the derived Report is filled in, and the generated form data is written in the form of a csv file.
Step S83, generating a pixel gray-scale vector diagram. Referring to fig. 2, in the operation interface GRAYSCALE IMAGE, the file name of the picture is filled in, and the generation of the pixel gray level vector diagram is started; if not, the step S8 is ended.
And S84, reading the width and the height of the pixel units in the layout, scaling the width and the height of the pixel units in the layout in equal proportion to a required range, taking the width and the height as the width and the height of each pixel unit in the pixel gray-scale vector diagram, calculating the width and the height of a panel in the pixel gray-scale vector diagram according to the number of lines and the number of columns of table data, expanding the width and the height of the panel in certain proportion, taking the width and the height of the panel as the size of the pixel gray-scale vector diagram, and setting the background to be black.
In the embodiment of the invention, the width and the height of the panel are respectively expanded by 20 percent to be used as the size of the pixel gray level vector diagram. In other embodiments, the expansion ratio may be varied.
Step S85, calculating polygons composed of all pixels with the gray scale value of 255 in the table data, and writing the polygons into the pixel gray scale vector diagram.
In step S86, for pixels whose gray-scale values are not 255 or 0 in other table data, the positions of the pixels are calculated, and the pixels are written in the pixel gray-scale vector diagram according to the gray-scale values.
The embodiment of the invention provides a method for automatically carrying out gray level compensation and generating a pixel gray level vector diagram, which is applied to the field of special-shaped mobile phone panel design and can completely replace the process of manually drawing a gray level compensation unit according to the rule of drawing gray level compensation by a layout engineer. The vector diagram has the advantage that scaling does not generate image quality loss, the gray-scale vector diagram automatically generated by the invention keeps the original length-width ratio of pixels and a panel, and the local gray-scale effect of the panel can be clearly seen through amplification, and referring to fig. 8, fig. 8 is a partial schematic diagram of the result of gray-scale compensation of the upper left corner of the panel layout and the corresponding pixel gray-scale vector diagram according to the invention; the overall gray scale effect can also be observed by shrinking the panel size to the real panel size, and referring to fig. 7, fig. 7 is a global schematic diagram of a pixel gray scale vector diagram generated after performing gray scale compensation on the panel layout according to the present invention. Compared with a table file for storing gray scale values, the invention provides an intuitive result display method for a layout designer.
Example 2
In an embodiment of the present invention, there is further provided an electronic device, fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 10, the electronic device of the present invention includes a processor 1001, and a memory 1002, where,
The memory 1002 stores a computer program which, when read by the processor 1001, performs the steps in the method embodiments described above for automatically performing gray-scale compensation and generating a pixel gray-scale vector map.
Example 3
In an embodiment of the invention, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to, when run, perform the steps of the method embodiment of automatically performing gray scale compensation and generating a pixel gray scale vector map as described above.
In the present embodiment, the above-described computer-readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Those of ordinary skill in the art will appreciate that: the foregoing description is only a preferred embodiment of the present invention, and the present invention is not limited thereto, but it is to be understood that modifications and equivalents of some of the technical features described in the foregoing embodiments may be made by those skilled in the art, although the present invention has been described in detail with reference to the foregoing embodiments. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. The gray level compensation method of the pixel unit is characterized by comprising the following steps of:
determining a pixel unit needing gray level compensation;
Selecting a panel contour line in a drawing area, and determining an actual frame of the panel;
Importing a gray level rule definition file and determining gray level rule definition;
designating a layout layer involved in gray level compensation calculation;
determining gray level compensation algorithm parameters;
searching pixel units intersected with the panel outline graph;
performing gray-scale compensation on the pixel units by using a gray-scale compensation algorithm to generate a compensation graph;
Outputting a panel pixel gray level value report file to generate a pixel gray level vector diagram of the panel;
the step of generating a compensation pattern by performing gray-scale compensation on the pixel unit by using a gray-scale compensation algorithm further comprises:
Calculating the proportion of the overlapping area of the calculation region graph and the panel contour in the pixel unit to the total area of the calculation region graph, and finding out the corresponding compensated opening ratio and gray scale value in a gray scale rule definition file;
Cutting the pattern of the opening area according to the compensated opening ratio, the compensated angle and the upper and lower half areas of the pixel area to generate a compensated pattern;
when the compensation angle is not oblique cutting, calculating the area ratio of the cut pixel opening area graph to the original pixel opening area graph, when the area ratio is smaller than the low gray level threshold value ratio, abandoning cutting, and generating a new opening area graph at the upper and lower boundaries or the center of the original opening pattern according to the corresponding compensated opening ratio, the distribution of the upper and lower half areas of the pixel and whether the boundary threshold value compensation is selected;
When the compensation angle is oblique cutting, or the area ratio of the cut pixel opening area pattern to the original pixel opening area pattern is larger than a low gray level threshold value, cutting the opening area pattern to obtain a new second opening area pattern, performing logic non-calculation on the original pixel opening area pattern and the second opening area pattern, taking the obtained new pattern as a BM (BM) pattern layer compensation pattern, and adding the compensation pattern to a corresponding position in the panel layout;
when the compensation angle is oblique cutting and the BM overlapping critical dimension is set, expanding the width and the height of the BM compensation pattern according to the BM overlapping critical dimension;
And generating gray-scale compensation patterns which are the same as the patterns of the opening areas in shape and the same position for pixel units which are in the polygon formed by the long rays, the wide rays and the panel contour lines of the panel layout and do not overlap with the panel contour lines.
2. The gray scale compensation method of a pixel unit according to claim 1, wherein the step of determining the pixel unit to be gray scale compensated further comprises: designating a layout design unit name needing gray level compensation in a panel layout, and determining a pixel unit needing gray level compensation, wherein the layout design unit name comprises the following components: store name, unit name, and graph name.
3. The gray scale compensation method of a pixel unit according to claim 1, wherein the gray scale compensation rule definition file comprises: a gray scale definition interval divided from 0 to 100, an area ratio value corresponding to the gray scale definition interval, and a gray scale number corresponding to the gray scale definition interval.
4. The gray scale compensation method of a pixel unit according to claim 1, wherein the layout layer comprises: an outer pixel block layer, an opening area layer, a calculation layer and a black matrix layer, wherein,
The pixel outer block layer is used for determining the boundary of each pixel unit and judging whether the pixel unit intersects with the outline frame of the panel;
the open area layer is used for assisting in generating a final BM layer compensation graph;
The calculating layer is used for calculating the overlapping area of the pixel units and the panel outline;
the black matrix layer is used for designating the layer used by the generated compensation graph.
5. The method of gray scale compensation of a pixel unit according to claim 1, wherein the gray scale compensation algorithm parameters comprise: the Y-axis central coordinate value, the low gray level threshold value, the area calculation precision, the compensation angle, the BM overlapping critical dimension, and the compensation along the boundary threshold value, wherein,
The Y-axis center coordinate value is used for dividing the panel layout into an upper half area and a lower half area;
the low gray level threshold is used for judging the mode of generating gray level compensation;
the area calculation precision is used for specifying the precision of the area of the generated BM pattern;
The compensation angle is used for specifying the cutting direction of gray level compensation on the pattern of the opening area;
The BM overlapping critical dimension is used for performing dimension compensation on the BM layer graph boundary;
And the boundary threshold compensation is used for compensating the graph boundary of the image layer in the opening area of the pixel unit.
6. The method for gray-scale compensation of a pixel unit according to claim 1, wherein the step of outputting a panel pixel gray-scale value report file and generating a panel pixel gray-scale vector map further comprises:
Generating data in a form of a table according to the number of rows and columns of pixels in the panel layout, wherein the data represents the gray scale value of the pixel at the position;
Writing the data in the form of a csv file into the data in the form of a table;
and automatically generating a pixel gray level vector picture according to the gray level value of the pixel.
7. The gray scale compensation method of a pixel unit according to claim 6, wherein said step of automatically generating a pixel gray scale vector picture according to the gray scale value of said pixel further comprises:
reading the width and the height of pixel units in the layout, and scaling the width and the height to a required range in equal proportion;
Calculating the width and the height of a panel in the pixel gray-scale vector diagram according to the number of rows and the number of columns of the table data, expanding the width and the height of the panel by preset proportions to obtain the size of the pixel gray-scale vector diagram, and setting the background to be black;
Calculating polygons formed by all pixels with gray scale values of 255 in the table data, and writing the polygons into a pixel gray scale vector diagram;
calculating the positions of pixels with gray scale values not being 255 and not being 0 in the table data, and writing the positions into a pixel gray scale vector diagram according to the gray scale values;
And generating a panel pixel gray-scale vector diagram with black as a background.
8. An electronic device comprising a memory, a processor, the memory having stored thereon a program running on the processor, the processor executing the steps of the gray level compensation method of a pixel cell of any of claims 1-7 when the program is run.
9. A computer readable storage medium having stored thereon a computer program, wherein the program when executed by a processor implements the gray scale compensation method of a pixel cell according to any of claims 1-7.
CN202310173007.2A 2023-02-28 2023-02-28 Gray scale compensation method of pixel unit Active CN116153224B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310173007.2A CN116153224B (en) 2023-02-28 2023-02-28 Gray scale compensation method of pixel unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310173007.2A CN116153224B (en) 2023-02-28 2023-02-28 Gray scale compensation method of pixel unit

Publications (2)

Publication Number Publication Date
CN116153224A CN116153224A (en) 2023-05-23
CN116153224B true CN116153224B (en) 2024-08-16

Family

ID=86354228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310173007.2A Active CN116153224B (en) 2023-02-28 2023-02-28 Gray scale compensation method of pixel unit

Country Status (1)

Country Link
CN (1) CN116153224B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107577078A (en) * 2017-09-19 2018-01-12 厦门天马微电子有限公司 A kind of display panel and display device
CN108398826A (en) * 2018-03-20 2018-08-14 上海天马微电子有限公司 special-shaped display panel and display device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150136339A (en) * 2014-05-27 2015-12-07 엘지디스플레이 주식회사 Array substrate and liquid crystal display device inluding the same
CN108732834B (en) * 2018-05-25 2021-06-18 上海中航光电子有限公司 Display panels and display devices
CN108828851B (en) * 2018-06-28 2020-10-16 厦门天马微电子有限公司 Display panel and display device
CN108615499B (en) * 2018-07-23 2020-12-15 京东方科技集团股份有限公司 Display optimization and display driving method and device, display device, storage medium
CN108682308A (en) * 2018-07-27 2018-10-19 京东方科技集团股份有限公司 Display panel and its display methods, display device
CN110459129A (en) * 2019-06-26 2019-11-15 福建华佳彩有限公司 A kind of black matrix" compensation method that middle size display screen is shown and storage equipment
CN112906340B (en) * 2021-02-24 2022-07-26 北京华大九天科技股份有限公司 Capacitance compensation wiring method, device, server and storage medium
CN114967262B (en) * 2022-06-22 2023-11-10 京东方科技集团股份有限公司 Display panels and display devices

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107577078A (en) * 2017-09-19 2018-01-12 厦门天马微电子有限公司 A kind of display panel and display device
CN108398826A (en) * 2018-03-20 2018-08-14 上海天马微电子有限公司 special-shaped display panel and display device

Also Published As

Publication number Publication date
CN116153224A (en) 2023-05-23

Similar Documents

Publication Publication Date Title
US6996790B2 (en) System and method for generating a two-dimensional yield map for a full layout
WO2023134309A1 (en) Mask layout correction method
US6920620B2 (en) Method and system for creating test component layouts
CN111090969A (en) EDA tool-based flat panel display layout generation method
US20230195424A1 (en) Method and apparatus for generating applications
CN116153224B (en) Gray scale compensation method of pixel unit
CN114491720A (en) Method and device for generating detailed diagram of steel structure, electronic equipment and storage medium
CN117421089B (en) Step geographic information element processing method and device
CN113538623A (en) Method and device for determining target image, electronic equipment and storage medium
CN116630555A (en) Terrain height map generation method and device and electronic equipment
CN114078131B (en) Method, device, computer equipment and storage medium for identifying pore-throat connection relation
CN112364615A (en) Automatic Excel connection end point alignment method and device
JPH0723997B2 (en) Character / graphic drawing device
CN113763554B (en) Updating method and updating processing unit for irregular area topography height points
CN119202109B (en) A method and device for processing game map data
US8432393B2 (en) Meshing device
CN120705241A (en) Method for generating map, electronic device and storage medium
US20240126938A1 (en) System and Methods for Automatic Repair of Missing Mate References
JP2001159809A (en) Mask pattern designing device, mask pattern designing method and computer-readable recording medium storing mask pattern design program
JP2007193640A (en) Drawing element retrieval method and program
JP3721763B2 (en) How to create a 3D model
JP2005332183A (en) Mesh correction device, mesh correction method and program
JPH06259507A (en) Figure dividing device
CN116301747A (en) User interface design method and device and electronic equipment
KR20250002489A (en) Method, apparatus, device and storage medium for generating a recipe file of a measuring point

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