CN101673409A - Image rendering method applied to computer screen - Google Patents

Image rendering method applied to computer screen Download PDF

Info

Publication number
CN101673409A
CN101673409A CN200910192228A CN200910192228A CN101673409A CN 101673409 A CN101673409 A CN 101673409A CN 200910192228 A CN200910192228 A CN 200910192228A CN 200910192228 A CN200910192228 A CN 200910192228A CN 101673409 A CN101673409 A CN 101673409A
Authority
CN
China
Prior art keywords
image
color
desktop
dimensional
rendering method
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
CN200910192228A
Other languages
Chinese (zh)
Other versions
CN101673409B (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.)
Guangzhou Huaduo Network Technology Co Ltd
Original Assignee
GUANGZHOU BADING ANIME NETWORK 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 GUANGZHOU BADING ANIME NETWORK TECHNOLOGY Co Ltd filed Critical GUANGZHOU BADING ANIME NETWORK TECHNOLOGY Co Ltd
Priority to CN2009101922284A priority Critical patent/CN101673409B/en
Publication of CN101673409A publication Critical patent/CN101673409A/en
Application granted granted Critical
Publication of CN101673409B publication Critical patent/CN101673409B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses an image rendering method applied to a computer screen, comprising the following steps: (1) a window for supporting a transparent channel is created; (2) display coordinates ofeach pixel in the image are computed, a three-dimensional accelerated graphics port is used for amplifying the image and rendering the image to a local video memory mapping, and background color is set into black ARGB; (3) chromatic values of a plurality of adjacent points in the image are averaged, and the rendered mapping is zoomed into output size; (4) the mapping in the local video memory isexchanged to an internal memory mapping by the operation of the three-dimensional accelerated graphics port:; (5) a two-dimensional Alpha mixed function is used for leading the internal memory mappingto be drawn on a desktop, so as to lead the image to be displayed on the desktop. The method can realize that three-dimensional cartoon images can be rendered out clearly and smoothly in a real-timemanner on any desktop background, thereby achieving good expressive form, eliminating sawtooth form at the edge part of the three-dimensional image, leading the image display to be real and achievingsmooth transition effect.

Description

A kind of image rendering method that is applied to computer desktop
Technical field
The present invention relates to the computer image processing technology field, particularly a kind of image rendering method that is applied to computer desktop.
Background technology
The desktop of computing machine is different and present the color of numerous and complicated along with background or the window opened, and a three-dimensional cartoon image is wanted to be independent of window and shown, just must can adapt to different background colors.Traditional 3D rendering model rendering method is to use three-dimensional picture accelerating interface (as Direct3D), directly image is rendered on the screen.Because this method only supports rectangle to play up, and be directly video memory to be operated, do not play up flow process, so be not suitable for playing up polygonal desktop picture through two dimension.
General method, for example create the method for supporting the transparent channel window: (1) is set as a window of supporting transparent channel to window when creating the use window, this window is by being provided with the transparent channel value of different pixels point, the Alpha that this pixel and the same position pixel color of bottom background are done in various degree mixes, thereby supports translucent playing up; (2) use the three-dimensional picture accelerating interface by the conventional method rending model, the background color of playing up is set to black; (3) paint on the window with the two-dimensional graphics interface, again the background color of window is arranged to transparent black, at this moment, all black parts will hollow out, reaches the purpose of drawing polygonal window.
The defective of said method is, because in the time of three-dimensional rendering, the three-dimensional picture accelerating interface is not supported translucent, even and the whole figure that causes exporting is having under the situation of supporting the transparent channel window, still can not just mix with background colour, particularly the part at edge has tangible sawtooth sense.Simultaneously, because sawtooth can appear in the person model that utilizes the three-dimensional picture accelerating interface directly to play up out, visual effect is not ideal, and relatively poor with the fusion of background on the table, makes sawtooth show more obviously.
Summary of the invention
Based on the defective that exists in the prior art, the object of the present invention is to provide a kind of 3-D view rendering intent that can effectively merge display image and desktop background, to eliminate the crenellated phenomena of display image marginal portion.
The technical solution adopted in the present invention: a kind of image rendering method that is applied to computer desktop may further comprise the steps:
(1) creates a window of supporting transparent channel;
(2) calculate the displaing coordinate of each pixel in the image, this image is amplified and play up to the video memory pinup picture with the three-dimensional picture accelerating interface, background colour be made as into black ARGB (Alpha, Red, Green, Blue);
(3) to the color-values calculating mean value of plurality of adjacent points in the image (adjacent selection of counting is associated with enlargement factor in the above-mentioned steps (2)), and the pinup picture after will playing up zooms to the output size;
(4) by the operation of three-dimensional picture accelerating interface the pinup picture in the video memory is exchanged on the internal memory pinup picture;
(5) use two-dimentional Alpha mixed function that the internal memory pinup picture is painted on the desktop, image is shown on the desktop.
Image magnification ratio in the above-mentioned steps (2) is 2 times, the length of the image after promptly amplifying and the length that width is original image and the twice of width.
Background colour in the above-mentioned steps (2) is black ARGB (255,255,255,255).
The color-values of image is with adjacent 4 calculating mean values in the above-mentioned steps (3), and its account form is:
p a=(s1 a+s2 a+s3 a+s4 a)/4
p r=(s1 r+s2 r+s3 r+s4 r)/4
p g=(s1 g+s2 g+s3 g+s4 g)/4
p b=(s1 b+s2 b+s3 b+s4 b)/4
Pv=ARGB(p a,p r,p g,p b)
Wherein: s represents the source color, and p represents color of object.
Two-dimentional Alpha mixed function in the above-mentioned steps (5) is:
d r=b r(1-s a)+s rs a
d g=b g(1-s g)+s gs a
d b=b b(1-s b)+s bs a
d v=RGB(d r,d g,d b)
Wherein: d represents screen color, and b represents background color, and color is played up in the s representative.
The present invention can realize with the three-dimensional cartoon image no matter can be clear under any desktop background, mellow and full ground real-time rendering comes out, reach a good form of expression, eliminated the zigzag fashion of 3-D view marginal portion, it is truer to make that image shows, reaches the effect that seamlessly transits.
Description of drawings
Fig. 1 is the simple and easy process flow diagram of image rendering method of the present invention;
Fig. 2 is the particular flow sheet of image rendering method of the present invention;
Fig. 3 is the convergent-divergent pinup picture synoptic diagram in the image rendering method step of the present invention (3).
Embodiment
Below in conjunction with accompanying drawing concrete structure of the present invention is further described.
As shown in Figure 1, 2, the method played up of image of the present invention realizes by following steps:
(1) creates window: create a window of supporting transparent channel, can be Alpha with desktop and mix.
(2) rendering image: calculate the displaing coordinate of each pixel in the image, this image is amplified and play up to the video memory pinup picture with the three-dimensional picture accelerating interface, background colour is made as into black ARGB (255,255,255,255); The length of the image after the amplification and width are the length of original image and the twice of width, that is:
H=2h
W=2w
Wherein: H, W are length (highly) and the width of playing up pinup picture; H, w are original length (highly) and width.
(3) convergent-divergent pinup picture: the pinup picture after will playing up zooms to the output size, reach anti-sawtooth effect, in this process by with the effect that transparent channel is arranged, by to color-values calculating mean value adjacent 4 in the image, the every bit that convergent-divergent comes out all can correspondingly have a transparent value, as shown in Figure 3.
The account form of average color value is:
p a=(s1 a+s2 a+s3 a+s4 a)/4
p r=(s1 r+s2 r+s3 r+s4 r)/4
p g=(s1 g+s2 g+s3 g+s4 g)/4
p b=(s1 b+s2 b+s3 b+s4 b)/4
Pv=ARGB(p a,p r,p g,p b)
Wherein: s represents the source color, and p represents color of object.
(4) exchange pinup picture: the pinup picture in the video memory is exchanged on the internal memory pinup picture by the operation of three-dimensional picture accelerating interface;
(5) screen is played up: use two-dimentional Alpha mixed function that the internal memory pinup picture is painted on the desktop, image is shown on the desktop.The transparent value of image is exactly by doing hybrid operation with background, the translucent effect that reaches, and wherein, two-dimentional Alpha mixed function is:
d r=b r(1-s a)+s rs a
d g=b g(1-s g)+s gs a
d b=b b(1-s b)+s bs a
d v=RGB(d r,d g,d b)
Wherein: d represents screen color, and b represents background color, and color is played up in the s representative.
By above-mentioned rendering intent, the present invention can realize the three-dimensional cartoon image no matter can be clear under any desktop background, mellow and full ground real-time rendering comes out, reach a good form of expression, eliminated the zigzag fashion of 3-D view marginal portion, it is truer to make that image shows, reaches the effect that seamlessly transits.

Claims (5)

1. an image rendering method that is applied to computer desktop is characterized in that, may further comprise the steps:
(1) creates a window of supporting transparent channel;
(2) calculate the displaing coordinate of each pixel in the image, this image is amplified and play up to the video memory pinup picture with the three-dimensional picture accelerating interface, background colour is made as into black ARGB;
(3) to the color-values calculating mean value of plurality of adjacent points in the image, and the pinup picture after will playing up zooms to the output size;
(4) by the operation of three-dimensional picture accelerating interface the pinup picture in the video memory is exchanged on the internal memory pinup picture;
(5) use two-dimentional Alpha mixed function that the internal memory pinup picture is painted on the desktop, image is shown on the desktop.
2. according to the described image rendering method that is applied to computer desktop of claim 1, it is characterized in that the image magnification ratio in the described step (2) is 2 times, the length of the image after promptly amplifying and the length that width is original image and the twice of width.
3. according to the described image rendering method that is applied to computer desktop of claim 1, it is characterized in that the background colour in the described step (2) is black ARGB (255,255,255,255).
4. according to the described image rendering method that is applied to computer desktop of claim 1, it is characterized in that the color-values of image is with adjacent 4 calculating mean values in the described step (3), its account form is:
p a=(s1 a+s2 a+s3 a+s4 a)/4
p r=(s1 r+s2 r+s3 r+s4 r)/4
p g=(s1 g+s2 g+s3 g+s4 g)/4
p b=(s1 b+s2 b+s3 b+s4 b)/4
Pv=ARGB(p a,p r,p g,p b)
Wherein: s represents the source color, and p represents color of object.
5. according to the described image rendering method that is applied to computer desktop of claim 1, it is characterized in that the two-dimentional Alpha mixed function in the described step (5) is:
d r=b r(1-s a)+s rs a
d g=b g(1-s g)+s gs a
d b=b b(1-s b)+s bs a
d v=RGB(d r,d g,d b)
Wherein: d represents screen color, and b represents background color, and color is played up in the s representative.
CN2009101922284A 2009-09-11 2009-09-11 Image rendering method applied to computer screen Active CN101673409B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101922284A CN101673409B (en) 2009-09-11 2009-09-11 Image rendering method applied to computer screen

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101922284A CN101673409B (en) 2009-09-11 2009-09-11 Image rendering method applied to computer screen

Publications (2)

Publication Number Publication Date
CN101673409A true CN101673409A (en) 2010-03-17
CN101673409B CN101673409B (en) 2011-09-21

Family

ID=42020618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101922284A Active CN101673409B (en) 2009-09-11 2009-09-11 Image rendering method applied to computer screen

Country Status (1)

Country Link
CN (1) CN101673409B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102087750A (en) * 2010-06-13 2011-06-08 湖南宏梦信息科技有限公司 Method for manufacturing cartoon special effect
CN102737402A (en) * 2011-05-11 2012-10-17 新奥特(北京)视频技术有限公司 Method for multilayer rendering in programmable phase in graphic rendering
CN103218847A (en) * 2012-01-19 2013-07-24 联想(北京)有限公司 Method and device of image processing
CN104240276A (en) * 2014-09-04 2014-12-24 无锡梵天信息技术股份有限公司 Screen-space-based method for simulating real skin of figure through sub-surface scattering
CN104715454A (en) * 2013-12-14 2015-06-17 中国航空工业集团公司第六三一研究所 Anti-aliasing graph overlapping algorithm
CN105701858A (en) * 2016-01-07 2016-06-22 网易(杭州)网络有限公司 Map processing method and device based on alpha fusion
CN107347116A (en) * 2017-06-30 2017-11-14 北京金山安全软件有限公司 Desktop effect generation method and device and electronic equipment
CN109065001A (en) * 2018-06-20 2018-12-21 腾讯科技(深圳)有限公司 A kind of down-sampled method, apparatus, terminal device and the medium of image

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100493165B1 (en) * 2002-12-17 2005-06-02 삼성전자주식회사 Method and apparatus for rendering image signal
CN1930588A (en) * 2004-03-12 2007-03-14 皇家飞利浦电子股份有限公司 Adaptive sampling along edges for surface rendering
CN101354793B (en) * 2008-09-10 2010-09-22 汕头市超声仪器研究所有限公司 Real time three-dimensional image smoothing process method based on pattern processor

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102087750A (en) * 2010-06-13 2011-06-08 湖南宏梦信息科技有限公司 Method for manufacturing cartoon special effect
CN102737402A (en) * 2011-05-11 2012-10-17 新奥特(北京)视频技术有限公司 Method for multilayer rendering in programmable phase in graphic rendering
CN103218847B (en) * 2012-01-19 2016-08-10 联想(北京)有限公司 Image processing method and device
CN103218847A (en) * 2012-01-19 2013-07-24 联想(北京)有限公司 Method and device of image processing
CN104715454A (en) * 2013-12-14 2015-06-17 中国航空工业集团公司第六三一研究所 Anti-aliasing graph overlapping algorithm
CN104715454B (en) * 2013-12-14 2017-10-24 中国航空工业集团公司第六三一研究所 A kind of antialiasing figure stacking method
CN104240276A (en) * 2014-09-04 2014-12-24 无锡梵天信息技术股份有限公司 Screen-space-based method for simulating real skin of figure through sub-surface scattering
CN105701858A (en) * 2016-01-07 2016-06-22 网易(杭州)网络有限公司 Map processing method and device based on alpha fusion
CN105701858B (en) * 2016-01-07 2018-09-14 网易(杭州)网络有限公司 A kind of stick picture disposing method and device based on alpha fusions
CN107347116A (en) * 2017-06-30 2017-11-14 北京金山安全软件有限公司 Desktop effect generation method and device and electronic equipment
CN107347116B (en) * 2017-06-30 2019-11-26 北京金山安全软件有限公司 Desktop effect generation method and device and electronic equipment
CN109065001A (en) * 2018-06-20 2018-12-21 腾讯科技(深圳)有限公司 A kind of down-sampled method, apparatus, terminal device and the medium of image
CN109065001B (en) * 2018-06-20 2021-06-25 腾讯科技(深圳)有限公司 Image down-sampling method and device, terminal equipment and medium

Also Published As

Publication number Publication date
CN101673409B (en) 2011-09-21

Similar Documents

Publication Publication Date Title
CN101673409B (en) Image rendering method applied to computer screen
CN104268922B (en) A kind of image rendering method and image rendering device
TWI272014B (en) Color compression using an edge data bitmask in a multi-sample anti-aliasing scheme
Raskar et al. Table-top spatially-augmented realty: bringing physical models to life with projected imagery
CN104809994B (en) A kind of RGBW types four primary display GTG Combination conversion method
US6897879B2 (en) Hardware-enhanced graphics acceleration of pixel sub-component-oriented images
CN103093437A (en) Method and device for generating pencil drawing style image
JP2002527775A5 (en)
CN102663766A (en) Non-photorealistic based art illustration effect drawing method
JP3529759B2 (en) Image processing program, computer-readable recording medium storing image processing program, program execution device, image processing device, and image processing method
CN102521820A (en) Object picture display method with dynamic fusion of background and display method thereof
US20110012911A1 (en) Image processing apparatus and method
CN105954726B (en) More radar station radar video method for drafting of electrodeless scaling based on GPU
KR20200054299A (en) Color gamut mapping method and color gamut mapping device
CN105243684A (en) Method of displaying image in game interface and device
CN104680518A (en) Blue screen image matting method based on chroma overflowing processing
CN102096576B (en) Quick tiled display method for light-emitting diode (LED) screens with different dot pitches and different dot matrixes
TW201312502A (en) Image resolution enhancing device and method for display panel
CN106898291A (en) The driving method and drive device of display panel
CN104318509B (en) A kind of high-volume targeted cache drawing method based on GPU
CN102254337A (en) Method for changing colours of 2D (Two-Dimensional) animation chartlet
CN204680250U (en) A kind of naval vessel simulated training simulating scenes device
CN103295260A (en) Real-time volumetric three-dimensional data generation method based on rotator three-dimensional display
CN102073468A (en) Method for realizing image edge blending based on window system
KR100580264B1 (en) Automatic image processing method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: GUANGZHOU HUADUO NETWORK TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: GUANGZHOU BADING ANIME NETWORK TECHNOLOGY CO., LTD.

Effective date: 20100715

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 510405 1/F,GYMNASIUM, NO.248, GUANGYUAN MIDDLE ROAD, GUANGZHOU CITY, GUANGDONG PROVINCE TO: 510665 BUILDING 4, NO.44, JIANZHONG ROAD, TIANHE DISTRICT, GUANGZHOU CITY

TA01 Transfer of patent application right

Effective date of registration: 20100715

Address after: 510665, building 44, 4 middle road, Guangzhou, Tianhe District

Applicant after: Guangzhou Huaduo Network Technology Co., Ltd.

Address before: Guangzhou City, Guangdong Province, Guangyuan Road 510405 No. 248 stadium building

Applicant before: Guangzhou Bading Anime Network Technology Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP02 Change in the address of a patent holder

Address after: 511446 Guangzhou City, Guangdong Province, Panyu District, South Village, Huambo Business District Wanda Plaza, block B1, floor 28

Patentee after: Guangzhou Huaduo Network Technology Co., Ltd.

Address before: 4 building, No. 44, Jianzhong Road, Guangzhou, Guangdong, Tianhe District 510000, China

Patentee before: Guangzhou Huaduo Network Technology Co., Ltd.