CN109064483A - Picture antialiasing method, apparatus, single-chip microcontroller and the storage medium of LCD screen - Google Patents

Picture antialiasing method, apparatus, single-chip microcontroller and the storage medium of LCD screen Download PDF

Info

Publication number
CN109064483A
CN109064483A CN201810994902.XA CN201810994902A CN109064483A CN 109064483 A CN109064483 A CN 109064483A CN 201810994902 A CN201810994902 A CN 201810994902A CN 109064483 A CN109064483 A CN 109064483A
Authority
CN
China
Prior art keywords
pixel
jagged edges
primary colors
parameter
lcd screen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810994902.XA
Other languages
Chinese (zh)
Other versions
CN109064483B (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.)
Guangdong Baolun Electronics Co ltd
Original Assignee
Guangzhou Baolun Electronics 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 Guangzhou Baolun Electronics Co Ltd filed Critical Guangzhou Baolun Electronics Co Ltd
Priority to CN201810994902.XA priority Critical patent/CN109064483B/en
Publication of CN109064483A publication Critical patent/CN109064483A/en
Application granted granted Critical
Publication of CN109064483B publication Critical patent/CN109064483B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4007Interpolation-based scaling, e.g. bilinear interpolation

Abstract

The invention discloses a kind of picture antialiasing methods of LCD screen comprising: load image step: load image data parse described image data into LCD screen;It detects jagged edges step: obtaining the jagged edges of whole image data;It obtains sawtooth parameter step: obtaining the primary colors parameter of two end pixel of jagged edges from image data;Vectored calculations step: vectorization calculation is carried out to jagged edges vertically and horizontally respectively from origin position;Data write step: the image after operation is shown in LCD screen.The invention also discloses picture antialiasing device, single-chip microcontroller and the computer readable storage mediums of LCD screen.The present invention realizes the simplification of sawtooth processing, drives LCD screen suitable for low cost monolithic machine acquisition jagged edges and by way of carrying out vectored calculations to jagged edges.

Description

Picture antialiasing method, apparatus, single-chip microcontroller and the storage medium of LCD screen
Technical field
The present invention relates to the picture antialiasing method, apparatus of technical field of image processing more particularly to a kind of LCD screen, Single-chip microcontroller and medium.
Background technique
It is (fast that SSAA (super sampling anti-aliasing), MSAA (multiple sampling antialiasing), FXAA is used in many equipment at present Fast approximation antialiasing) etc. technologies carry out the picture antialiasing optimization of picture or character image.
SSAA super sampling anti-aliasing (Super Sampling Anti-Aliasing) principle is that present image is shown Content resolution improves more times, and then picture is scaled on display again.This method is actually in display ruler Very little constant situation improves resolution ratio, allows single pixel to become minimum, this makes it possible to the sawtooth senses for substantially mitigating picture.No Cross is since to the entire amplification for showing picture, the display resource that it is consumed is also very big.
MSAA multiple sampling antialiasing (MultiSampling Anti-Aliasing, abbreviation MSAA) is a kind of special SSAA.It is anti-that MSAA only carries out super sampling to the data in Z buffer (Z-Buffer) and template caching (Stencil Buffer) The processing of sawtooth.It simply can be understood as only carrying out antialiasing processing to the edge of polygon.
FXAA quickly approximate antialiasing (Fast Approximate Anti-Aliasing) it be that traditional MSAA is (multiple to adopt Sample antialiasing) effect a kind of high-performance approximation.It is that a kind of one way pixel coloring device runs on target trip as MLAA The later processing stage of play rendering pipeline.
The algorithm introduction of mainstream shown for image above, these algorithms depend on mostly the sampling of equipment GPU with And operational capability, to carry out more and complicated image procossing (such as: game, cartoon making), but single-chip microcontroller for image and The display of text is simple, it is apparent that scheme of these technologies for low cost monolithic machine driving screen is unrealistic 's.
Summary of the invention
For overcome the deficiencies in the prior art, one of the objects of the present invention is to provide a kind of anti-saws of the picture of LCD screen Tooth method realizes the letter of sawtooth processing by way of acquisition jagged edges and carrying out vectored calculations to jagged edges Dan Hua drives LCD screen suitable for low cost monolithic machine.
The second object of the present invention is to provide a kind of picture antialiasing device of LCD screen, by acquiring toothed edge Edge and the mode that jagged edges are carried out with vectored calculations, realize the simplification of sawtooth processing, are suitable for low cost monolithic machine To drive LCD screen.
The third object of the present invention is to provide a kind of single-chip microcontroller of picture antialiasing method for realizing above-mentioned LCD screen.
The fourth object of the present invention is that the computer for providing a kind of picture antialiasing method for storing above-mentioned LCD screen can Read storage medium.
An object of the present invention adopts the following technical scheme that realization:
A kind of picture antialiasing method of LCD screen comprising following steps:
Load image step: load image data parse described image data, obtain described image number into LCD screen According to the position shown in LCD screen;
Detect jagged edges step: for each pixel (x0, y0) in image data, when the pixel (x0, y0) with The pixel primary colors parameter of its adjacent pixel (x0-1, y0) or adjacent pixel (x0, y0-1) is different, then pixel (x0, y0) with Become jagged edges between its adjacent pixel (x0-1, y0) or adjacent pixel (x0, y0-1);Whole image number is obtained according to this According to jagged edges;
It obtains sawtooth parameter step: obtaining the primary colors parameter of two end pixel of jagged edges from image data;
Vectored calculations step: vector quantization is carried out to jagged edges vertically and horizontally respectively from origin position It calculates, the vector quantization is sampled using bilinearity, and uses bilinear interpolation to jagged edges according to pixel primary colors parameter Parameter carries out operation;
Data write step: the image after operation is shown in LCD screen.
Further, jagged edges step is detected, further includes:
The two neighboring or above jagged edges are combined, jagged edges combination is formed, the jagged edges combination Shape is any one of Z-shaped, U-shaped and L shape;
Wherein, Z-shaped jagged edges are combined comprising first while, second while and third side, wherein the first side and the Three at the both ends being respectively perpendicular when being connected to second, and first while and to be located at the second side not ipsilateral when third;
U-shaped jagged edges are combined comprising the 4th while, the 5th while and the 6th side, wherein the 4th while and the 6th while divide Be not vertically connected at the both ends on the 5th side, and the 4th while and the 6th while be located at the 5th side same side;
L shape jagged edges are combined comprising the 7th while and when the 8th, described 7th wherein one end while with the 8th Portion vertically connects.
Further, the primary colors parameter of two end pixel of jagged edges is obtained from image data, comprising:
The pixel of jagged edges combined covering is obtained, the pixel of covering is known as overlay area;
Obtain the primary colors parameter of the pixel of four Angle Positions in overlay area;
For the overlay area of Z-shaped jagged edges combination, the firstth area of composition is scanned including the second side of the first edge Domain and the second side of third edge are scanned the second area of composition;
For the overlay area of U-shaped jagged edges combination, including third region and the fourth region, the third region is U The region that surrounds of three line segments of shape jagged edges combination, the fourth region be the 4th while and the 6th while it is adjacent far from the 5th The region that the pixel on side is constituted;
For the overlay area of L shape jagged edges combination, including the 5th region and the 6th region, the 5th region are the The region that the scanning of the 8th side of seven edges is constituted, the 6th region and the 5th region are axisymmetricly distributed using the 8th side as axis.
Further, the vector quantization is sampled using bilinearity, and uses bilinear interpolation according to pixel primary colors parameter Operation is carried out to the parameter of jagged edges, comprising:
It selectes to operating region, and obtains the primary colors parameter to operating region;
The pixel for setting four Angle Positions in overlay area is respectively Q11, Q12, Q21, Q22, the coordinate in LCD screen Respectively (x1, y1), (x1, y2), (x2, y1) and (x2, y2), primary colors parameter be respectively f (Q11), f (Q12), f (Q21) and f(Q22);
First the x-axis direction in overlay area carries out linear interpolation, wherein is inserted into R1 on the connecting line between Q11 and Q21 Point is inserted into R2 point on the connecting line between Q12 and Q22, and then the y-axis dimension linear in overlay area is inserted into P point, R1 point, R2 point, P point coordinate be respectively (x, y1), (x, y2), (x, y), then R1 point, R2 point, P point primary colors parameter be respectively as follows:
The primary colors parameter of P point and the primary colors parameter to operating region are overlapped, the operation color to operating region is formed It is parameter;
For the combination of Z-shaped jagged edges to operating region, including first at midpoint and second, line is worn between midpoint The region and the third region that line passes through between midpoint at midpoint and second crossed;
For the combination of U-shaped jagged edges to operating region, for the 4th, at midpoint and the 5th, line is passed through between midpoint Region and the 6th line passes through between midpoint at midpoint and the 5th region;
For the combination of L shape jagged edges to operating region, be the described 7th at midpoint and the 8th line between midpoint The region passed through.
Further, the primary colors parameter of P point and the primary colors parameter to operating region are overlapped, are formed to operating region Operation colour system parameter, comprising:
The each pixel treated in operating region is overlapped, if the primary colors parameter of P point is greater than the primary colors of object pixel Parameter, then the operation colour system parameter of object pixel is that the primary colors parameter of P point subtracts the primary colors parameter of object pixel;If P point Primary colors parameter is less than the primary colors parameter of object pixel, then the operation colour system parameter of object pixel is that the primary colors parameter of object pixel subtracts Go the primary colors parameter of P point;The object pixel is to the pixel for needing to obtain operation colour system parameter in operating region.
Further, the image after operation is shown in LCD screen, comprising:
Corresponding jagged edges group in the operation colour system parameter write-in memory to operating region each of will be obtained after operation The Data Position of conjunction;
After all operation colour system parameters to operating region calculate, by image data on the lcd screen into Row display.
The second object of the present invention adopts the following technical scheme that realization:
Load image module parses described image data, obtains the figure for load image data into LCD screen Position as shown in data in LCD screen;
Detect jagged edges module, for for each pixel (x0, y0) in image data, when the pixel (x0, Y0) the pixel primary colors parameter of pixel adjacent thereto (x0-1, y0) or adjacent pixel (x0, y0-1) is different, then pixel (x0, Y0) become jagged edges between pixel adjacent thereto (x0-1, y0) or adjacent pixel (x0, y0-1);It obtains according to this entire The jagged edges of image data;
Sawtooth parameter module is obtained, for obtaining the primary colors parameter of two end pixel of jagged edges from image data;
Vectored calculations module, for being sweared respectively to jagged edges vertically and horizontally from origin position Quantum chemical method, the vector quantization are sampled using bilinearity, and use bilinear interpolation to toothed edge according to pixel primary colors parameter The parameter of edge carries out operation;
Data write. module, for showing the image after operation in LCD screen.
The third object of the present invention adopts the following technical scheme that realization:
A kind of single-chip microcontroller, comprising: processor;Storage device, for storing one or more programs, when one or more A program is executed by the processor, so that the processor realizes the picture antialiasing of the LCD screen of one of the object of the invention Method.
The fourth object of the present invention adopts the following technical scheme that realization:
A kind of computer readable storage medium, is stored thereon with computer program, realization when which is executed by processor The picture antialiasing method of the LCD screen of one of the object of the invention.
Compared with prior art, the beneficial effects of the present invention are:
The present invention realizes sawtooth processing acquisition jagged edges and by way of carrying out vectored calculations to jagged edges Simplification, drive LCD screen suitable for low cost monolithic machine.
Detailed description of the invention
Fig. 1 is the flow chart of the picture antialiasing method of the LCD screen of the embodiment of the present invention one;
Fig. 2 is the schematic diagram of the overlay area of Z-shaped jagged edges combination;
Fig. 3 is the schematic diagram of the overlay area of U-shaped jagged edges combination;
Fig. 4 is the schematic diagram of the overlay area of L shape jagged edges combination;
Fig. 5 is the schematic diagram to operating region of Z-shaped jagged edges combination;
Fig. 6 is the schematic diagram to operating region of U-shaped jagged edges combination;
Fig. 7 is the schematic diagram to operating region of L shape jagged edges combination;
Fig. 8 is the schematic diagram of bilinear interpolation;
Fig. 9 is the display renderings for not carrying out the image data of antialiasing processing;
Figure 10 is the display renderings for carrying out the image data of antialiasing processing;
Figure 11 is the structural schematic diagram of the picture antialiasing device of the LCD screen of the embodiment of the present invention two;
Figure 12 is the structural schematic diagram of the single-chip microcontroller of the embodiment of the present invention three.
Specific embodiment
In the following, being described further in conjunction with attached drawing and specific embodiment to the present invention, it should be noted that not Under the premise of conflicting, new implementation can be formed between various embodiments described below or between each technical characteristic in any combination Example.
Embodiment one
The embodiment of the present invention one discloses a kind of picture antialiasing method of LCD screen, this method can by hardware or/and Software executes, and please refers to shown in Fig. 1 comprising following steps:
110, load image step: load image data parse described image data, obtain the figure into LCD screen Position as shown in data in LCD screen.
Load image data can realize that processor can be single-chip microcontroller, FPGA, ARM into LCD screen by processor Deng.Image data is, for example, the word lattice data (Figure 10 is illustrated with " saw " word) of 64*64, and word lattice data pass through two Binary data performance, other image datas also can be converted binary data, parse binary data by program, can obtain The position of word lattice data is shown in LCD screen out.But because word lattice data between color it is excessive, in bevel edge or turn It will cause sawtooth at angle.
120, detect jagged edges step: the step needs detection level and vertical two sides.Each pixel (x0, y0) has 4 adjacent pixels (x0-1, y0), (x0+1, y0), (x0, y0+1), (x0, y0-1), which is respectively pixel The pixel of left and right, upper and lower four adjacent positions (x0, y0), theoretically needs to carry out four jagged edges inspections.But due to picture There are common edges between element and pixel, as long as so being detected to the adjacent pixel of (x0-1, y0) and (x0, y0-1).Detection Method is to compare the pixel colour system parameter (i.e. primary colors parameter) of pixel (x0, y0) and pixel (x0-1, y0) or (x0, y0-1), when When pixel (x0, y0) and the pixel colour system difference of pixel (x0-1, y0) or (x0, y0-1), the pixel pixel (x0, y0) is recorded It is known as " jagged edges " between pixel (x0-1, y0) or (x0, y0-1).
After the detection for completing jagged edges, the two neighboring or above jagged edges are combined, form jagged edges group It closes, carries out calculating operation further according to the shape of jagged edges combination.Since pixel to be processed, searched respectively towards two sides along toothed edge Rope, finding the location of span and pixel of clipping edge (crossing edge) toothed edge can be by Left-right Searching distance Dleft and dright is determined.The shape of jagged edges combination of the invention then by preferably implementing depending on the case where the clipping edge of two sides In example, the shape of jagged edges combination is any one of Z-shaped, U-shaped and L shape.
Z-shaped jagged edges are combined comprising first while, second while and third side, wherein first while and when third divide Be not vertically connected at the both ends on the second side, and first while and to be located at the second side not ipsilateral when third.For U-shaped jagged edges group Close comprising the 4th while, the 5th while and the 6th side, wherein the 4th while and the 6th while be respectively perpendicular and be connected to the both ends on the 5th side, And the 4th while and the 6th while be located at the 5th side same side.L shape jagged edges are combined comprising the 7th while and when the 8th, institute State that the 7th wherein one end while with the 8th is vertical to be connect.
130, it obtains sawtooth parameter step: obtaining the primary colors parameter of two end pixel of jagged edges from image data.
Each pixel is by R (red), G (green), and three kinds of primary colors of B (blue) form, and every kind of primary colors all uses 1 byte (8bit, 0~255) composition, obtains the primary colors parameter of " jagged edges " two end pixel from the image that processor memory loads.
Specifically, obtaining the pixel of jagged edges combined covering, the pixel of covering is known as overlay area;
Obtain the primary colors parameter of the pixel of four Angle Positions in overlay area.
Shown in referring to figure 2., for the overlay area of Z-shaped jagged edges combination, including first when A1 is along second A2 into First area (a1, a2, a3) and the third A2 when A3 is along second that row scanning is constituted are scanned the second area of composition (a4,a5,a6);Overlay area described herein refers to pixel, similarly, the combination of U-shaped jagged edges and the combination of L shape jagged edges Overlay area is also similar.
Shown in referring to figure 3., for the overlay area of U-shaped jagged edges combination, including third region and the fourth region, institute The region (a7, a8, a9) that three line segments that third region is the combination of U-shaped jagged edges surround is stated, the fourth region is the 4th The region (a10, a11) that the pixel of the adjacent separate 5th side A5 of A6 is constituted in A4 and the 6th;
Shown in referring to figure 4., for the overlay area of L shape jagged edges combination, including the 5th region and the 6th region, institute Stating the 5th region is the 7th region (a12, a13) that A8 scanning is constituted when A7 is along the 8th, the 6th region (a14, a15) and 5th region is axisymmetricly distributed using the 8th side A8 as axis.
140, vectored calculations step: jagged edges vertically and horizontally are sweared respectively from origin position Quantum chemical method, the vector quantization are sampled using bilinearity, and use bilinear interpolation to toothed edge according to pixel primary colors parameter The parameter of edge carries out operation.
It is specific:
It first selectes to operating region, and obtains the primary colors parameter to operating region.
The selected method to operating region is:
Shown in referring to figure 5., for the combination of Z-shaped jagged edges to operating region, including the first side midpoint A1 and second Between the midpoint A2 line across region (b1, b2) and when third the midpoint A3 and the second side midpoint A2 line passes through Region (b3, b4);The region that line described herein passes through refers to pixel, i.e., across which pixel, which pixel is exactly to be shipped The a part in region is calculated, similarly, the combination of U-shaped jagged edges is combined also similar to operating region with L shape jagged edges.
It please refers to shown in Fig. 6, is the 4th at the midpoint A4 and the 5th for the combination of U-shaped jagged edges to operating region Between the midpoint A5 line across region (b5, b6) and the 6th line passes through the midpoint A5 at the midpoint A6 and the 5th area Domain (b6, b7);
It please refers to shown in Fig. 7, is the 7th side midpoint A7 and for the combination of L shape jagged edges to operating region The region (b8, b9) that line passes through between the eight sides midpoint A8.
Then interpolation is being carried out by overlay area, is obtaining the primary color pixels of interpolation point:
It please referring to shown in Fig. 8 institute, the pixel of setting four Angle Positions in overlay area is respectively Q11, Q12, Q21, Q22, Coordinate in LCD screen is respectively (x1, y1), (x1, y2), (x2, y1) and (x2, y2), and primary colors parameter is respectively f (Q11), f (Q12), f (Q21) and f (Q22), it will be assumed that the primary colors parameter between them is linear change.Then it is covering The x-axis direction in region carries out linear interpolation, wherein R1 point is inserted on the connecting line between Q11 and Q21, Q12 and Q22 it Between connecting line on be inserted into R2 point, then overlay area y-axis dimension linear be inserted into P point, R1 point, R2 point, P point coordinate minute Not Wei (x, y1), (x, y2), (x, y), then R1 point, R2 point, the primary colors parameter f (R1) of P point, f (R2), f (P) are respectively as follows:
The primary colors parameter of P point is desired as a result, the primary colors parameter of P point and the primary colors parameter to operating region are carried out Superposition forms operation colour system parameter to operating region, the operation colour system parameter to operating region be to operating region most The color shown eventually by LCD screen.
Treating the method that each pixel in operating region is overlapped is: if the primary colors parameter of P point is greater than target picture The primary colors parameter of element, then the operation colour system parameter of object pixel is that the primary colors parameter of P point subtracts the primary colors parameter of object pixel;Such as The primary colors parameter of fruit P point is less than the primary colors parameter of object pixel, then the operation colour system parameter of object pixel is the original of object pixel Color parameter subtracts the primary colors parameter of P point;The object pixel is to the picture for needing to obtain operation colour system parameter in operating region Element.
150, data write step: the image after operation is shown in LCD screen.
Corresponding toothed edge in the operation colour system parameter write-in memory to operating region each of will be obtained after operation first The Data Position of edge combination;After all operation colour system parameters to operating region calculate, by image data in LCD Shown on screen, the final display of LCD screen is: to shown in operating region it is above-mentioned be calculated to operating region Operation colour system parameter, the primary colors parameter of other region display image datas, Fig. 9 and Figure 10 do not carry out respectively antialiasing processing with And carry out the display result schematic diagram of antialiasing treated " saw " word.
Embodiment two
Embodiment two discloses a kind of picture antialiasing device of the LCD screen of corresponding above-described embodiment, please refers to Figure 11 It is shown comprising:
Load image module 210 parses described image data for load image data into LCD screen, obtains described The position that image data is shown in LCD screen;
Jagged edges module 220 is detected, each pixel (x0, y0) for being directed in image data, when the pixel The pixel primary colors parameter of pixel (x0-1, y0) or adjacent pixel (x0, y0-1) (x0, y0) adjacent thereto is different, then pixel Become jagged edges between pixel (x0-1, y0) or adjacent pixel (x0, y0-1) (x0, y0) adjacent thereto;It obtains according to this The jagged edges of whole image data;
Sawtooth parameter module 230 is obtained, for obtaining the primary colors parameter of two end pixel of jagged edges from image data;
Vectored calculations module 240, for from origin position respectively to jagged edges vertically and horizontally into Row vectorization calculation, the vector quantization are sampled using bilinearity, and use bilinear interpolation to saw according to pixel primary colors parameter The parameter of tooth edge carries out operation;
Data write. module 250, for showing the image after operation in LCD screen.
Embodiment three
Figure 12 is a kind of structural schematic diagram for single-chip microcontroller that the embodiment of the present invention three provides, as shown in figure 12, the single-chip microcontroller Including processor 310, memory 320, input unit 330 and output device 340;The quantity of processor 310 is one;Single-chip microcontroller In processor 310, memory 320, input unit 330 can be connected by bus or other modes with output device 340, scheme In 12 for being connected by bus.
Memory 320 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer Sequence and module, as the LCD screen in the embodiment of the present invention the corresponding program instruction/module of picture antialiasing method (for example, Load image module 210, detection jagged edges module 220 in the picture antialiasing device of LCD screen, acquisition sawtooth parameter mould Block 230, vectored calculations module 240 and Data write. module 250).Processor 310 is stored in memory 320 by operation Software program, instruction and module realized above-mentioned thereby executing the various function application and data processing of single-chip microcontroller The picture antialiasing method of LCD screen.
Memory 320 can mainly include storing program area and storage data area, wherein storing program area can store operation system Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal.This Outside, memory 320 may include high-speed random access memory, can also include nonvolatile memory, for example, at least one Disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, memory 320 can be into one Step includes the memory remotely located relative to processor 310, these remote memories can pass through network connection to single-chip microcontroller. The example of above-mentioned network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Input unit 330 can be used for receiving the subscriber identity information of input.Output device 340 may include the display such as display screen Equipment.
Example IV
The embodiment of the present invention four also provides a kind of storage medium comprising computer executable instructions, and the computer can be held Row is instructed when being executed by computer processor for executing a kind of picture antialiasing method of LCD screen, this method comprises:
Load image data parse described image data, obtain described image data in LCD screen into LCD screen The position of display;
For each pixel (x0, y0) in image data, when the pixel (x0, y0) pixel adjacent thereto (x0-1, Y0) or the pixel primary colors parameter of adjacent pixel (x0, y0-1) is different, then pixel (x0, y0) pixel adjacent thereto (x0-1, Y0) or between adjacent pixel (x0, y0-1) become jagged edges;The jagged edges of whole image data are obtained according to this;
The primary colors parameter of two end pixel of jagged edges is obtained from image data;
Vectorization calculation, the vector quantization are carried out to jagged edges vertically and horizontally respectively from origin position It is sampled using bilinearity, and operation is carried out using parameter of the bilinear interpolation to jagged edges according to pixel primary colors parameter;
Image after operation is shown in LCD screen.
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present invention The method operation that executable instruction is not limited to the described above, can also be performed LCD screen provided by any embodiment of the invention Picture antialiasing method in relevant operation.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art Part can be embodied in the form of software products, which can store in computer readable storage medium In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions use so that a single-chip microcontroller (can To be mobile phone, personal computer, server or the network equipment etc.) execute method described in each embodiment of the present invention.
It is worth noting that, in the embodiment of the picture antialiasing device of above-mentioned LCD screen, included each unit and Module is only divided according to the functional logic, but is not limited to the above division, as long as corresponding functions can be realized ?;In addition, the specific name of each functional unit is also only for convenience of distinguishing each other, the protection being not intended to restrict the invention Range.
The above embodiment is only the preferred embodiment of the present invention, and the scope of protection of the present invention is not limited thereto, The variation and replacement for any unsubstantiality that those skilled in the art is done on the basis of the present invention belong to institute of the present invention Claimed range.

Claims (9)

1. a kind of picture antialiasing method of LCD screen, which comprises the following steps:
Load image step: load image data parse described image data, obtain described image data and exist into LCD screen The position shown in LCD screen;
Detect jagged edges step: for each pixel (x0, y0) in image data, when the pixel (x0, y0) and its phase The pixel primary colors parameter of adjacent pixel (x0-1, y0) or adjacent pixel (x0, y0-1) is different, then pixel (x0, y0) and its phase Become jagged edges between adjacent pixel (x0-1, y0) or adjacent pixel (x0, y0-1);Whole image data are obtained according to this Jagged edges;
It obtains sawtooth parameter step: obtaining the primary colors parameter of two end pixel of jagged edges from image data;
Vectored calculations step: vector quantization meter is carried out to jagged edges vertically and horizontally respectively from origin position It calculates, the vector quantization is sampled using bilinearity, and uses bilinear interpolation to the ginseng of jagged edges according to pixel primary colors parameter Number carries out operation;
Data write step: the image after operation is shown in LCD screen.
2. the picture antialiasing method of LCD screen as described in claim 1, which is characterized in that detection jagged edges step, also Include:
The two neighboring or above jagged edges are combined, jagged edges combination, the shape of the jagged edges combination are formed For any one of Z-shaped, U-shaped and L shape;
Wherein, Z-shaped jagged edges are combined comprising first while, second while and third side, wherein first while and when third Be respectively perpendicular the both ends for being connected to the second side, and first while and to be located at the second side not ipsilateral when third;
U-shaped jagged edges are combined comprising the 4th while, the 5th while and the 6th side, wherein the 4th while and the 6th while hang down respectively The direct-connected both ends for being connected to the 5th side, and the 4th while and the 6th while be located at the 5th side same side;
L shape jagged edges are combined comprising the 7th while and when the 8th, the 7th wherein one end while with the 8th is vertical It is direct-connected to connect.
3. the picture antialiasing method of LCD screen as claimed in claim 2, which is characterized in that obtain saw from image data The primary colors parameter of two end pixel of tooth edge, comprising:
The pixel of jagged edges combined covering is obtained, the pixel of covering is known as overlay area;
Obtain the primary colors parameter of the pixel of four Angle Positions in overlay area;
For Z-shaped jagged edges combination overlay area, including the second side of the first edge be scanned the first area of composition with And the second side of third edge is scanned the second area of composition;
For the overlay area of U-shaped jagged edges combination, including third region and the fourth region, the third region is U-shaped saw The region that surrounds of three line segments of tooth edge combination, the fourth region be the 4th while and the 6th while adjacent separate 5th side The region that pixel is constituted;
For the overlay area of L shape jagged edges combination, including the 5th region and the 6th region, the 5th region is the 7th side The region that scanning is constituted along the 8th side, the 6th region and the 5th region are axisymmetricly distributed using the 8th side as axis.
4. the picture antialiasing method of LCD screen as claimed in claim 3, which is characterized in that the vector quantization uses two-wire Property sampling, and operation is carried out to the parameters of jagged edges using bilinear interpolation according to pixel primary colors parameter, comprising:
It selectes to operating region, and obtains the primary colors parameter to operating region;
The pixel of setting four Angle Positions in overlay area is respectively Q11, Q12, Q21, Q22, the coordinate difference in LCD screen For (x1, y1), (x1, y2), (x2, y1) and (x2, y2), primary colors parameter is respectively f (Q11), f (Q12), f (Q21) and f (Q22);
First the x-axis direction in overlay area carries out linear interpolation, wherein R1 point is inserted on the connecting line between Q11 and Q21, R2 point is inserted on connecting line between Q12 and Q22, then the y-axis dimension linear in overlay area is inserted into P point, R1 point, R2 Point, P point coordinate be respectively (x, y1), (x, y2), (x, y), then R1 point, R2 point, P point primary colors parameter be respectively as follows:
The primary colors parameter of P point and the primary colors parameter to operating region are overlapped, is formed and is joined to the operation colour system of operating region Number;
For the combination of Z-shaped jagged edges to operating region, including first, at midpoint and second, line is passed through between midpoint Region and the third region that line passes through between midpoint at midpoint and second;
It is the 4th area that line passes through between midpoint at midpoint and the 5th for the combination of U-shaped jagged edges to operating region Domain and the 6th line passes through between midpoint at midpoint and the 5th region;
For the combination of L shape jagged edges to operating region, for the described 7th, at midpoint and the 8th, line is passed through between midpoint Region.
5. the picture antialiasing method of LCD screen as claimed in claim 4, which is characterized in that by the primary colors parameter of P point with to The primary colors parameter of operating region is overlapped, and forms the operation colour system parameter to operating region, comprising:
The each pixel treated in operating region is overlapped, if the primary colors parameter of P point is greater than the primary colors parameter of object pixel, Then the operation colour system parameter of object pixel is that the primary colors parameter of P point subtracts the primary colors parameter of object pixel;If the primary colors of P point is joined Number is less than the primary colors parameter of object pixel, then the operation colour system parameter of object pixel is that the primary colors parameter of object pixel subtracts P point Primary colors parameter;The object pixel is to the pixel for needing to obtain operation colour system parameter in operating region.
6. the picture antialiasing method of LCD screen as described in claim 1, which is characterized in that by the image after operation in LCD It is shown in screen, comprising:
Corresponding jagged edges combination in the operation colour system parameter write-in memory to operating region each of will be obtained after operation Data Position;
After all operation colour system parameters to operating region calculate, image data is shown on the lcd screen Show.
7. a kind of picture antialiasing device of LCD screen characterized by comprising
Load image module parses described image data, obtains described image number for load image data into LCD screen According to the position shown in LCD screen;
Detect jagged edges module, for for each pixel (x0, y0) in image data, when the pixel (x0, y0) with The pixel primary colors parameter of its adjacent pixel (x0-1, y0) or adjacent pixel (x0, y0-1) is different, then pixel (x0, y0) with Become jagged edges between its adjacent pixel (x0-1, y0) or adjacent pixel (x0, y0-1);Whole image number is obtained according to this According to jagged edges;
Sawtooth parameter module is obtained, for obtaining the primary colors parameter of two end pixel of jagged edges from image data;
Vectored calculations module, for carrying out vector quantization to jagged edges vertically and horizontally respectively from origin position It calculates, the vector quantization is sampled using bilinearity, and uses bilinear interpolation to jagged edges according to pixel primary colors parameter Parameter carries out operation;
Data write. module, for showing the image after operation in LCD screen.
8. a kind of single-chip microcontroller characterized by comprising
Processor;
Storage device, for storing one or more programs,
When one or more of programs are executed by the processor, so that the processor is realized as appointed in claim 1-6 The picture antialiasing method of LCD screen described in one.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor The picture antialiasing method such as LCD screen as claimed in any one of claims 1 to 6 is realized when row.
CN201810994902.XA 2018-08-29 2018-08-29 Picture anti-aliasing method and device for LCD screen, single chip microcomputer and storage medium Active CN109064483B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810994902.XA CN109064483B (en) 2018-08-29 2018-08-29 Picture anti-aliasing method and device for LCD screen, single chip microcomputer and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810994902.XA CN109064483B (en) 2018-08-29 2018-08-29 Picture anti-aliasing method and device for LCD screen, single chip microcomputer and storage medium

Publications (2)

Publication Number Publication Date
CN109064483A true CN109064483A (en) 2018-12-21
CN109064483B CN109064483B (en) 2022-10-11

Family

ID=64757637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810994902.XA Active CN109064483B (en) 2018-08-29 2018-08-29 Picture anti-aliasing method and device for LCD screen, single chip microcomputer and storage medium

Country Status (1)

Country Link
CN (1) CN109064483B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115049564A (en) * 2022-08-11 2022-09-13 广州市保伦电子有限公司 Picture sharpening processing method and processing terminal
CN116433515A (en) * 2023-03-30 2023-07-14 格兰菲智能科技有限公司 Image rotation antialiasing method, apparatus, computer device, and storage medium
CN116594582A (en) * 2022-06-22 2023-08-15 格兰菲智能科技(北京)有限公司 Image display method, apparatus, computer device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1997008658A1 (en) * 1995-08-22 1997-03-06 Rendition, Inc. A method and apparatus for performing post-process antialiasing of polygon edges
CN101615288A (en) * 2008-06-27 2009-12-30 富士通株式会社 The equipment, method and the computer readable recording medium storing program for performing that are used for pixel interpolating
CN104715454A (en) * 2013-12-14 2015-06-17 中国航空工业集团公司第六三一研究所 Anti-aliasing graph overlapping algorithm
CN105574817A (en) * 2014-10-17 2016-05-11 华为技术有限公司 Image anti-aliasing method and apparatus
CN106600544A (en) * 2016-11-10 2017-04-26 北京暴风魔镜科技有限公司 Anti-aliasing method and anti-aliasing system based on texture mapping

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1997008658A1 (en) * 1995-08-22 1997-03-06 Rendition, Inc. A method and apparatus for performing post-process antialiasing of polygon edges
CN101615288A (en) * 2008-06-27 2009-12-30 富士通株式会社 The equipment, method and the computer readable recording medium storing program for performing that are used for pixel interpolating
CN104715454A (en) * 2013-12-14 2015-06-17 中国航空工业集团公司第六三一研究所 Anti-aliasing graph overlapping algorithm
CN105574817A (en) * 2014-10-17 2016-05-11 华为技术有限公司 Image anti-aliasing method and apparatus
CN106600544A (en) * 2016-11-10 2017-04-26 北京暴风魔镜科技有限公司 Anti-aliasing method and anti-aliasing system based on texture mapping

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ALEXANDER RESHETOV: ""Morphological Antialiasing"", 《RESEARCHGATE》 *
丁文 等: ""一种使用边缘方向图的去马赛克算法"", 《小型微型计算机系统》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116594582A (en) * 2022-06-22 2023-08-15 格兰菲智能科技(北京)有限公司 Image display method, apparatus, computer device and storage medium
CN116594582B (en) * 2022-06-22 2024-03-22 格兰菲智能科技(北京)有限公司 Image display method, apparatus, computer device and storage medium
CN115049564A (en) * 2022-08-11 2022-09-13 广州市保伦电子有限公司 Picture sharpening processing method and processing terminal
CN116433515A (en) * 2023-03-30 2023-07-14 格兰菲智能科技有限公司 Image rotation antialiasing method, apparatus, computer device, and storage medium

Also Published As

Publication number Publication date
CN109064483B (en) 2022-10-11

Similar Documents

Publication Publication Date Title
US9165399B2 (en) System, method, and computer program product for inputting modified coverage data into a pixel shader
US7542049B2 (en) Hardware accelerated anti-aliased primitives using alpha gradients
JP4693660B2 (en) Drawing apparatus, drawing method, and drawing program
US9652882B2 (en) Gradient adjustment for texture mapping for multiple render targets with resolution that varies by screen location
CN109064483A (en) Picture antialiasing method, apparatus, single-chip microcontroller and the storage medium of LCD screen
US7348996B2 (en) Method of and system for pixel sampling
JP2005100177A (en) Image processor and its method
CN103503032A (en) Texturing in graphics hardware
US8743135B2 (en) Graphics processing systems
JP2005100176A (en) Image processor and its method
EP1480171B1 (en) Method and system for supersampling rasterization of image data
US11087511B1 (en) Automated vectorization of a raster image using a gradient mesh with arbitrary topology
US20140184633A1 (en) Conservative bounding region rasterization
US9043238B2 (en) Data visualization system
US7495672B2 (en) Low-cost supersampling rasterization
JP3547250B2 (en) Drawing method
JP4801088B2 (en) Pixel sampling method and apparatus
US9536281B2 (en) Image scaling for images including low resolution text
US10049425B2 (en) Merging filters for a graphic processing unit
JP2008009897A (en) Vector graphic drawing device and program thereof
US20120062585A1 (en) Vector graphic drawing device
US20230082839A1 (en) Rendering scalable raster content
JP3255549B2 (en) Figure processing method
CN117953121A (en) Graphic rendering method and device and electronic equipment
Monteiro Júnior et al. Anti-aliasing method based on rotated spatial filtering

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: No. 56 Nanli East Road, Shiqi Town, Panyu District, Guangzhou City, Guangdong Province, 510000

Patentee after: Guangdong Baolun Electronics Co.,Ltd.

Address before: 511400 Building 1, industrial zone B, Zhongcun street, Zhongcun street, Panyu District, Guangzhou City, Guangdong Province

Patentee before: GUANGZHOU ITC ELECTRONIC TECHNOLOGY Co.,Ltd.