CN104715454A - Anti-aliasing graph overlapping algorithm - Google Patents

Anti-aliasing graph overlapping algorithm Download PDF

Info

Publication number
CN104715454A
CN104715454A CN201310688469.4A CN201310688469A CN104715454A CN 104715454 A CN104715454 A CN 104715454A CN 201310688469 A CN201310688469 A CN 201310688469A CN 104715454 A CN104715454 A CN 104715454A
Authority
CN
China
Prior art keywords
antialiasing
represent
former
formula
value
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
CN201310688469.4A
Other languages
Chinese (zh)
Other versions
CN104715454B (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.)
AVIC No 631 Research Institute
Original Assignee
AVIC No 631 Research Institute
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 AVIC No 631 Research Institute filed Critical AVIC No 631 Research Institute
Priority to CN201310688469.4A priority Critical patent/CN104715454B/en
Publication of CN104715454A publication Critical patent/CN104715454A/en
Application granted granted Critical
Publication of CN104715454B publication Critical patent/CN104715454B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Generation (AREA)

Abstract

The invention provides an anti-aliasing graph overlapping algorithm. The anti-aliasing graph overlapping algorithm is characterized by including the following steps that a graph anti-aliasing coefficient is obtained; pixels are processed one by one, for the ith pixel in a graph, a formula (1) that Si=Fi*alphai+Mi*(1-alphai) can be obtained based on the anti-aliasing pixel mixing principle, Si is the anti-aliasing graph color (known), Fi is the original graph color (known), Mi is the original background color (known), and alphai is the anti-aliasing mixing coefficient (unknown). The anti-aliasing graph overlapping algorithm resolves the 'fringe effect' generated in the anti-aliasing graph overlapping process, and improves the graph quality and visual effect.

Description

A kind of antialiasing figure superposition algorithm
Technical field
The invention belongs to graph and image processing field, particularly relate to edge antialiasing disposal route during a kind of antialiasing Graphics overlay.
Background technology
Along with the development of graphics technology, the application of digital picture is more and more extensive.Digital picture take pixel as elementary cell, by all target object in pixel composing images.Due to the rectangular element that pixel is very little one by one, time with these rectangular elements composition object, more or less can present zigzag fashion at object edge, and antialiasing just refers to and carries out soften handled to image border, image border is made to seem more level and smooth, closer to the object of reality.Antialiasing improves a kind of conventional method of image quality.
In daily use, the antialiasing figure by generating often can be needed superimposed with other graph images.Antialiasing figure is when generation, and the pixel color of pattern edge can be transformed into the mixed gradient look of graphic color and background color, makes the transition of two kinds of colors look more natural.By antialiasing figure and other imaging importing, if improper to pattern edge processes pixel, these edge pixels will seem very inharmonious (we are referred to as " edge effect ") in newly-generated superimposed image, greatly reduce picture quality, so these edge pixels and new background must be re-started mixing antialiasing.Traditional disposal route mainly deposits shortcoming both ways: one be process effect undesirable; Two is need a large amount of calculating or extra information (as " degree of depth " information).So, in order to better solve " edge effect " problem of antialiasing Graphics overlay, process careful more fast must be carried out to the image of superposition.
Summary of the invention
In order to solve technical matters existing in background technology, the present invention proposes a kind of method of antialiasing Graphics overlay, " edge effect " that produce when solving antialiasing Graphics overlay, improving picture quality and strengthening visual effect.
Technical solution of the present invention is: a kind of antialiasing figure stacking method, is characterized in that: said method comprising the steps of:
1) figure antialiasing coefficient is obtained: pixel is processed one by one, for the pixel of i-th in image, according to the pixel mixing principle of antialiasing, formula (1) can be obtained: S i=F iα i+ M i(1-α i) ... ... ... ... ... (1)
S iantialiasing graphic color (known), F iformer graphic color (known), M iformer background color (known), α iantialiasing mixing constant (the unknown);
2) antialiasing factor alpha is drawn according to formula (1) icomputing formula:
α i = ( S i - M i ) ( F i - M i ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 2 )
Each pixel comprises red (R), green (G), blue (B) three color components, antialiasing factor alpha iequal the antialiasing coefficient value of one-component max (R, G, B) maximum in R, G, B tri-components;
3) the antialiasing factor alpha will calculated i, be updated in formula (6), (7), (8), calculate the carrying out superposition of antialiasing figure and new background and R, G, B tri-value of colouring component of i-th pixel after antialiasing again; T i (R)=F i (R)α i+ N i (R)(1-α i) ... ... ... ... ... (6) T i (G)=F i (G)α i+ N i (G)(1-α i) ... ... ... ... ... (7) T i (B)=F i (B)α i+ N i (B)(1-α i) ... ... ... ... ... (8)
T i (R), T i (G), T i (B)the value (the unknown) of red, green, blue three colouring component of synthetic image after final superposition respectively, N i (R), N i (G), N i (B)the value (known) of red, green, blue three colouring component of new background image respectively.
Above-mentioned steps 2) antialiasing factor alpha iconcrete acquisition pattern be:
2.1) as max (R, G, B)=R, factor alpha icalculated by formula (3), S i (R)represent the red color component value of antialiasing figure, F i (R)represent the red color component value of former figure, M i (R)represent the red color component value of former background;
α i = ( S i ( R ) - M i ( R ) ) ( F i ( R ) - M i ( R ) ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 3 )
2.2) as max (R, G, B)=G, factor alpha icalculated by formula (4), S i (G)represent the green component values of antialiasing figure, F i (G)represent the green component values of former figure, M i (G)represent the green component values of former background;
α i = ( S i ( G ) - M i ( G ) ) ( F i ( G ) - M i ( G ) ) . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 4 )
2.3) as max (R, G, B)=B, factor alpha icalculated by formula (5), S i (B)represent the blue color component value of antialiasing figure, F i (B)represent the blue color component value of former figure, M i (B)represent the blue color component value of former background.
α i = ( S i ( B ) - M i ( B ) ) ( F i ( B ) - M i ( B ) ) . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 5 )
The present invention fundamentally solves " edge effect " that antialiasing Graphics overlay brings, and improves picture quality, enhances visual effect.Be applied to certain type helicopter display and control board, the figure drawn for video card in integrated display system and the superposition of other video datas, result of use is good.
Accompanying drawing explanation
Fig. 1 is method flow diagram of the present invention;
Embodiment
See Fig. 1, " edge effect " that produce when the present invention is directed to antialiasing Graphics overlay, proposes a kind of antialiasing figure stacking method.Due to the hybrid processing that antialiasing process and overlap-add procedure are all to pixel color in itself, therefore, antialiasing principle is applied in overlap-add procedure by the core concept of this method exactly, the mixing superposition of figure and former background is regarded in antialiasing process as, antialiasing mixing constant is applied to the mixing overlap-add procedure of figure and new background.For each pixel in figure, calculating at the blend of colors coefficient of former figure when carrying out antialiasing process, then when overlap-add procedure, utilizing this coefficient to re-start antialiasing, being divided into following two steps to carry out:
1) figure antialiasing coefficient is derived: process one by one pixel, for the pixel of i-th in image, according to the pixel mixing principle of antialiasing, can obtain formula (1): S i=F iα i+ M i(1-α i) ... ... ... ... ... (1)
S iantialiasing graphic color (known), F iformer graphic color (known), M iformer background color (known), α iantialiasing mixing constant (the unknown).
According to formula (1), antialiasing factor alpha can be derived icomputing formula:
α i = ( S i - M i ) ( F i - M i ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 2 )
Each pixel comprises red (R), green (G), blue (B) three color components, and cause the dominant hue of pixel color to change in order to avoid three look increase and decrease ratio disunities, therefore, this algorithm all processes three looks according to same ratio.Antialiasing factor alpha iequal the antialiasing coefficient value of one-component max (R, G, B) maximum in R, G, B tri-components.
As max (R, G, B)=R, factor alpha icalculated by formula (3), S i (R)represent the red color component value of antialiasing figure, F i (R)represent the red color component value of former figure, M i (R)represent the red color component value of former background.
α i = ( S i ( R ) - M i ( R ) ) ( F i ( R ) - M i ( R ) ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 3 )
As max (R, G, B)=G, factor alpha icalculated by formula (4), S i (G)represent the green component values of antialiasing figure, F i (G)represent the green component values of former figure, M i (G)represent the green component values of former background.
α i = ( S i ( G ) - M i ( G ) ) ( F i ( G ) - M i ( G ) ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 4 )
As max (R, G, B)=B, factor alpha icalculated by formula (5), S i (B)represent the blue color component value of antialiasing figure, F i (B)represent the blue color component value of former figure, M i (B)represent the blue color component value of former background.
α i = ( S i ( B ) - M i ( B ) ) ( F i ( B ) - M i ( B ) ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 5 )
2) antialiasing is again superposed also with new background
The antialiasing factor alpha that previous step is calculated i, be updated in formula (6), (7), (8), the carrying out superposition of antialiasing figure and new background can be calculated and R, G, B tri-value of colouring component of i-th pixel after antialiasing again.T i(R)=F i(R)·α i+N i(R)·(1-α i)..............................(6)T i(G)=F i(G)·α i+N i(G)·(1-α i)..............................(7)T i(B)=F i(B)·α i+N i(B)·(1-α i)..............................(8)
T i (R), T i (G), T i (B)the value (the unknown) of red, green, blue three colouring component of synthetic image after final superposition respectively, N i (R), N i (G), N i (B)the value (known) of red, green, blue three colouring component of new background image respectively.

Claims (2)

1. an antialiasing figure stacking method, is characterized in that: said method comprising the steps of:
1) figure antialiasing coefficient is obtained: pixel is processed one by one, for the pixel of i-th in image, according to the pixel mixing principle of antialiasing, formula (1) can be obtained: S i=F iα i+ M i(1-α i) ... ... ... ... ... (1)
S iantialiasing graphic color (known), F iformer graphic color (known), M iformer background color (known), α iantialiasing mixing constant (the unknown);
2) antialiasing factor alpha is drawn according to formula (1) icomputing formula:
α i = ( S i - M i ) ( F i - M i ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 2 )
Each pixel comprises red (R), green (G), blue (B) three color components, antialiasing factor alpha iequal the antialiasing coefficient value of one-component max (R, G, B) maximum in R, G, B tri-components;
3) the antialiasing factor alpha will calculated i, be updated in formula (6), (7), (8), calculate the carrying out superposition of antialiasing figure and new background and R, G, B tri-value of colouring component of i-th pixel after antialiasing again; T i(R)=F i (R)α i+ N i (R)(1-α i) ... ... ... ... ... (6) T i (G)=F i (G)α i+ N i (G)(1-α i) ... ... ... ... ... (7) T i (B)=F i (B)α i+ N i (B)(1-α i) ... ... ... ... ... (8)
T i (R), T i (G), T i (B)the value (the unknown) of red, green, blue three colouring component of synthetic image after final superposition respectively, N i (R), N i (G), N i (B)the value (known) of red, green, blue three colouring component of new background image respectively.
2. antialiasing figure stacking method according to claim 1, is characterized in that: described step 2) antialiasing factor alpha iconcrete acquisition pattern be:
2.1) as max (R, G, B)=R, factor alpha icalculated by formula (3), S i (R)represent the red color component value of antialiasing figure, F i (R)represent the red color component value of former figure, M i (R)represent the red color component value of former background;
α i = ( S i ( R ) - M i ( R ) ) ( F i ( R ) - M i ( R ) ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 3 )
2.2) as max (R, G, B)=G, factor alpha icalculated by formula (4), S i (G)represent the green component values of antialiasing figure, F i (G)represent the green component values of former figure, M i (G)represent the green component values of former background;
α i = ( S i ( G ) - M i ( G ) ) ( F i ( G ) - M i ( G ) ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 4 )
2.3) as max (R, G, B)=B, factor alpha icalculated by formula (5), S i (B)represent the blue color component value of antialiasing figure, F i (B)represent the blue color component value of former figure, M i (B)represent the blue color component value of former background
α i = ( S i ( B ) - M i ( B ) ) ( F i ( B ) - M i ( B ) ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 5 ) .
CN201310688469.4A 2013-12-14 2013-12-14 A kind of antialiasing figure stacking method Active CN104715454B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310688469.4A CN104715454B (en) 2013-12-14 2013-12-14 A kind of antialiasing figure stacking method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310688469.4A CN104715454B (en) 2013-12-14 2013-12-14 A kind of antialiasing figure stacking method

Publications (2)

Publication Number Publication Date
CN104715454A true CN104715454A (en) 2015-06-17
CN104715454B CN104715454B (en) 2017-10-24

Family

ID=53414749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310688469.4A Active CN104715454B (en) 2013-12-14 2013-12-14 A kind of antialiasing figure stacking method

Country Status (1)

Country Link
CN (1) CN104715454B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106657813A (en) * 2016-12-08 2017-05-10 苏州长风航空电子有限公司 Implementation method for video superposition algorithm
CN107481200A (en) * 2017-07-31 2017-12-15 腾讯科技(深圳)有限公司 Image processing method and device
CN109064483A (en) * 2018-08-29 2018-12-21 广州市保伦电子有限公司 Picture antialiasing method, apparatus, single-chip microcontroller and the storage medium of LCD screen
CN112785511A (en) * 2020-06-30 2021-05-11 青岛经济技术开发区海尔热水器有限公司 Image anti-aliasing processing method and electrical equipment
WO2022041548A1 (en) * 2020-08-26 2022-03-03 完美世界(北京)软件科技发展有限公司 Model rendering method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101061517A (en) * 2004-09-20 2007-10-24 艾利森电话股份有限公司 Method and system for anti-aliasing by pixel sampling
CN101673409A (en) * 2009-09-11 2010-03-17 广州市八丁动漫网络科技有限公司 Image rendering method applied to computer screen

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101061517A (en) * 2004-09-20 2007-10-24 艾利森电话股份有限公司 Method and system for anti-aliasing by pixel sampling
CN101673409A (en) * 2009-09-11 2010-03-17 广州市八丁动漫网络科技有限公司 Image rendering method applied to computer screen

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
WILHELMBURGER,MARKJ.BURGE著: "《数字图像处理Java语言算法描述》", 28 February 2010 *
郑利平 等: "基于分布式渲染架构的远程可视化研究", 《计算机研究与发展》 *
郭潇蔚 等: "图像缩放中抗锯齿单元的设计", 《电脑知识与技术》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106657813A (en) * 2016-12-08 2017-05-10 苏州长风航空电子有限公司 Implementation method for video superposition algorithm
CN106657813B (en) * 2016-12-08 2019-08-02 苏州长风航空电子有限公司 A kind of implementation method of video superposition algorithm
CN107481200A (en) * 2017-07-31 2017-12-15 腾讯科技(深圳)有限公司 Image processing method and device
CN109064483A (en) * 2018-08-29 2018-12-21 广州市保伦电子有限公司 Picture antialiasing method, apparatus, single-chip microcontroller and the storage medium of LCD screen
CN109064483B (en) * 2018-08-29 2022-10-11 广州市保伦电子有限公司 Picture anti-aliasing method and device for LCD screen, single chip microcomputer and storage medium
CN112785511A (en) * 2020-06-30 2021-05-11 青岛经济技术开发区海尔热水器有限公司 Image anti-aliasing processing method and electrical equipment
WO2022041548A1 (en) * 2020-08-26 2022-03-03 完美世界(北京)软件科技发展有限公司 Model rendering method and device

Also Published As

Publication number Publication date
CN104715454B (en) 2017-10-24

Similar Documents

Publication Publication Date Title
CN103021002B (en) Colored sketch image generating method
CN103093437B (en) Generate the method and device of pencil drawing style image
CN104715454A (en) Anti-aliasing graph overlapping algorithm
CN102332170B (en) Method and system for generating computer sketch images
CN104079914B (en) Based on the multi-view image ultra-resolution method of depth information
CN103248793B (en) The colour of skin optimization method of gamut conversion system and device
CN100556070C (en) Be used to handle the method and apparatus of stitching image
CN112862943B (en) Virtual model rendering method and device, storage medium and electronic equipment
CN103617596A (en) Image color style transformation method based on flow pattern transition
CN104915975A (en) Image processing method and system for simulating crayon colored drawing
CN109903347A (en) A kind of colour-mixed method, system, computer equipment and storage medium
CN105118076A (en) Image colorization method based on over-segmentation and local and global consistency
CN102663806A (en) Artistic-vision-based cartoon stylized rendering method of image
CN105096358A (en) Line enhanced simulation method for pyrography artistic effect
CN113436284A (en) Image processing method and device, computer equipment and storage medium
Northam et al. Consistent stylization and painterly rendering of stereoscopic 3D images
CN104077792A (en) Image processing method with cartoon effect
CN103093417B (en) Generate method and the device of watercolor style image
CN105118016A (en) Graphics and text information hiding method based on visual interference
CN104796682A (en) Image signal color enhancement method and image signal color enhancement device
CN103116898A (en) Method and device for generating images in ink and wash painting style
CN106327458A (en) Method for layered rendering based on image
CN103366343B (en) A kind of bitmap Zoom method and system
CN115170921A (en) Binocular stereo matching method based on bilateral grid learning and edge loss
Xie et al. A colored pencil-drawing generating method based on interactive colorization

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant