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

Image rendering method applied to computer screen Download PDF

Info

Publication number
CN101673409B
CN101673409B CN2009101922284A CN200910192228A CN101673409B CN 101673409 B CN101673409 B CN 101673409B CN 2009101922284 A CN2009101922284 A CN 2009101922284A CN 200910192228 A CN200910192228 A CN 200910192228A CN 101673409 B CN101673409 B CN 101673409B
Authority
CN
China
Prior art keywords
image
color
desktop
dimensional
pinup picture
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
CN2009101922284A
Other languages
Chinese (zh)
Other versions
CN101673409A (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 Huaduo 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 Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo 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

Landscapes

  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

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 of each 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 is exchanged 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 mapping to 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-time manner 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 achieving smooth 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 mean value of the color-values of image is to come calculating mean value with adjacent color-values at 4 in the above-mentioned steps (3), and its account form is:
Pv=ARGB(p a,p r,p g,p b)
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
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 v=RGB(d r,d g,d b)
d r=k r(1-i a)+i ri a
d g=k g(1-i g)+i gi a
d b=k b(1-i b)+i bi a
Wherein: d represents screen color, and k represents background color, and color is played up in the i 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:
Pv=ARGB(p a,p r,p g,p b)
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
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 v=RGB(d r,d g,d b)
d r=k r(1-i a)+i ri a
d g=k g(1-i g)+i gi a
d b=k b(1-i b)+i bi a
Wherein: d represents screen color, and k represents background color, and color is played up in the i 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 (3)

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 color-values calculating mean value adjacent 4 in the image, and the pinup picture after will playing up zooms to output size, and the color mean value calculation mode of described image is:
Pv=ARGB(p a,p r,p g,p b)
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
Wherein: s represents the source color, and p represents color of object;
(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, described two-dimentional Alpha mixed function is:
d v=RGB(d r,d g,d b)
d r=k r(1-i a)+i ri a
d g=k g(1-i g)+i gi a
d b=k b(1-i b)+i bi a
Wherein: d represents screen color, and k represents background color, and color is played up in the i representative.
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).
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 CN101673409A (en) 2010-03-17
CN101673409B true 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)

Families Citing this family (7)

* 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
CN103218847B (en) * 2012-01-19 2016-08-10 联想(北京)有限公司 Image processing method and device
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
CN105701858B (en) * 2016-01-07 2018-09-14 网易(杭州)网络有限公司 A kind of stick picture disposing method and device based on alpha fusions
CN107347116B (en) * 2017-06-30 2019-11-26 北京金山安全软件有限公司 Desktop effect generation method and device and electronic equipment
CN109065001B (en) * 2018-06-20 2021-06-25 腾讯科技(深圳)有限公司 Image down-sampling method and device, terminal equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1509083A (en) * 2002-12-17 2004-06-30 ���ǵ�����ʽ���� Method and device for reproducing image signal
CN1930588A (en) * 2004-03-12 2007-03-14 皇家飞利浦电子股份有限公司 Adaptive sampling along edges for surface rendering
CN101354793A (en) * 2008-09-10 2009-01-28 汕头超声仪器研究所 Real-time 3D Image Smoothing Processing Method Based on Graphics Processor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1509083A (en) * 2002-12-17 2004-06-30 ���ǵ�����ʽ���� Method and device for reproducing image signal
CN1930588A (en) * 2004-03-12 2007-03-14 皇家飞利浦电子股份有限公司 Adaptive sampling along edges for surface rendering
CN101354793A (en) * 2008-09-10 2009-01-28 汕头超声仪器研究所 Real-time 3D Image Smoothing Processing Method Based on Graphics Processor

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开2004-15520A 2004.01.15

Also Published As

Publication number Publication date
CN101673409A (en) 2010-03-17

Similar Documents

Publication Publication Date Title
CN101673409B (en) Image rendering method applied to computer screen
CN103534655B (en) For showing the system and method for the control in structure and related data
TWI272014B (en) Color compression using an edge data bitmask in a multi-sample anti-aliasing scheme
CN103093437A (en) Method and device for generating pencil drawing style image
US20030174145A1 (en) Hardware-enhanced graphics acceleration of pixel sub-component-oriented images
CN102663766A (en) Non-photorealistic based art illustration effect drawing method
CN101236485A (en) Method, device and system for multi-screen 3D synchronous display
CN110349261A (en) The method for generating three-dimensional thermodynamic chart based on GIS
CN202363037U (en) Color display screen
WO2017219643A1 (en) 3d effect generation method and system for input text, and 3d display method and system for input text
CN105954726B (en) More radar station radar video method for drafting of electrodeless scaling based on GPU
CN101908216B (en) Method and device for realizing vector fonts
CN102521820A (en) Object picture display method with dynamic fusion of background and display method thereof
CN102243827A (en) Colorful display screen
CN104715454B (en) A kind of antialiasing figure stacking method
TW201312502A (en) Image resolution enhancing device and method for display panel
CN102073468B (en) Method for realizing image edge blending based on window system
WO2012094843A1 (en) Displaying method for splicing light emitting diode screen with different dot pitches and different dot matrixes in quick manner
CN104639924B (en) It is a kind of to reduce the method that color value precision is improved to device pixel degree of dependence
CN104318509B (en) A kind of high-volume targeted cache drawing method based on GPU
TWI527445B (en) Displaying hardware accelerated video on x window systems
CN102254337A (en) Method for changing colours of 2D (Two-Dimensional) animation chartlet
CN204680250U (en) A kind of naval vessel simulated training simulating scenes device
CN115601472B (en) A Method of Drawing Undistorted Black Border Based on Dilation and Corrosion Algorithm
CN101068368B (en) Color conversion device and method for multi-primary color display device

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.