Summary of the invention
In view of this, this specification embodiment provides a kind of image drawing method and device, calculates equipment and storage is situated between
Matter, to solve technological deficiency existing in the prior art.
According to this specification embodiment in a first aspect, providing a kind of image drawing method, comprising:
The real depth to pixel in drawing image is obtained, the location information of each pixel passes through three-dimensional coordinate
It indicates, the depth value of each pixel indicated by the value of the Z axis in three-dimensional coordinate;By the real depth and in advance
If threshold value is compared;
The pixel for being less than preset threshold to the real depth carries out the first projection along Z-direction, and it is deep to obtain the first Z value
Degree, Z value depth of the first Z value depth as the pixel;
The pixel for being greater than preset threshold to the real depth carries out the second projection along Z-direction, and it is deep to obtain the 2nd Z value
Degree, Z value depth of the 2nd Z value depth as the pixel, the pixel that the real depth is greater than preset threshold exist
The nonlinearity of second projection is less than the nonlinearity in first projection;
The pixel is drawn according to the Z value depth of the pixel.
Optionally, the pixel that preset threshold is less than to the real depth carries out the first projection along Z-direction, comprising:
To the real depth be less than preset threshold pixel along Z-direction using perspective projection along Z-direction into
Row first projects.
Optionally, the pixel that preset threshold is greater than to the real depth carries out the second projection along Z-direction, comprising:
To the real depth be greater than preset threshold pixel along Z-direction using linear projection's method along Z-direction into
Row second projects.
Optionally, the pixel that preset threshold is greater than to the real depth carries out the second projection along Z-direction further include:
To the real depth be greater than preset threshold pixel along Z-direction using back mapping method along Z-direction into
Row second projects.
Optionally, the back mapping method includes:
According to the 2nd Z value depth, the 2nd Z value is made into inversion operation and realizes back mapping.
Optionally, the pixel is drawn according to the Z value depth of the pixel, comprising:
Judge wait draw the pixel for whether having drawing image on the position where pixel;
If no, directly drawing the pixel to be drawn;
If so, then by the Z value depth of pixel to be drawn compared with the Z value depth of the pixel of drawing image, if to
The Z value depth for drawing pixel is bigger than the Z value depth of the pixel of drawing image, then without drawing;If pixel to be drawn
The Z value depth of point is smaller than the Z value depth of the pixel of drawing image, then is drawn.
According to the second aspect of this specification embodiment, a kind of image plotting device is provided, comprising:
Pixel obtains module, is configured as obtaining the real depth to pixel in drawing image, each pixel
The location information of point indicates that the depth value of each pixel passes through the value of the Z axis in three-dimensional coordinate by three-dimensional coordinate
To indicate;
Depth comparison module is configured as the real depth and preset threshold being compared;
First projection module, the pixel for being configured as being less than the real depth preset threshold are carried out along Z-direction
First projection, obtains the first Z value depth, Z value depth of the first Z value depth as the pixel;
Second projection module, the pixel for being configured as being greater than the real depth preset threshold are carried out along Z-direction
Second projection, obtains the 2nd Z value depth, Z value depth of the 2nd Z value depth as the pixel, the real depth
It is less than the nonlinearity in first projection in the nonlinearity of second projection greater than the pixel of preset threshold;
Image Rendering module is configured as drawing the pixel according to the Z value depth of the pixel.
Optionally, the pixel that first projection module is less than preset threshold to the real depth is adopted along Z-direction
The first projection is carried out along Z-direction with perspective projection.
Optionally, the pixel that second projection module is greater than preset threshold to the real depth is adopted along Z-direction
The second projection is carried out along Z-direction with linear projection's method.
Optionally, the pixel that second projection module is greater than preset threshold to the real depth is adopted along Z-direction
The second projection is carried out along Z-direction with back mapping method.
Optionally, the back mapping method includes:
According to the 2nd Z value depth, the 2nd Z value is made into inversion operation and realizes back mapping.
Optionally, described image drafting module includes:
Judging submodule is configured as judging wait draw the pixel for whether having drawing image on the position where pixel
Point;
Rendering submodule: it is configured as not having the feelings of the pixel of drawing image on the position where pixel wait draw
Under condition, the pixel to be drawn directly is drawn;Wait draw the pixel for having drawing image on the position where pixel
In the case where, by the Z value depth of pixel to be drawn compared with the Z value depth of the pixel of drawing image, if picture to be drawn
The Z value depth of vegetarian refreshments is bigger than the Z value depth of the pixel of drawing image, then without drawing;If the Z value of pixel to be drawn
Depth is smaller than the Z value depth of the pixel of drawing image, then is drawn.
According to the third aspect of this specification embodiment, a kind of calculating equipment is provided, including memory, processor and deposit
The computer instruction that can be run on a memory and on a processor is stored up, the processor is realized described when executing described instruction
The step of image drawing method.
According to the fourth aspect of this specification embodiment, a kind of computer readable storage medium is provided, is stored with meter
Calculation machine instruction, when described instruction is executed by processor the step of image drawing method described in realization.
In this specification embodiment, the image slices vegetarian refreshments for being less than preset threshold to real depth is had an X-rayed along Z-direction
Projection obtains the first Z value depth, then carries out second along Z-direction to the image slices vegetarian refreshments that real depth is greater than preset threshold and throw
Shadow, obtains the 2nd Z value depth, and the second projection includes two methods of linear projection or back mapping.Real depth is greater than default threshold
The pixel point image of value projects compared in the first projection second, the real depth of the 2nd obtained Z value depth and pixel
Nonlinearity it is lower, Z value precision is higher, so that solving in existing perspective projection technology real depth is greater than preset threshold
Multiple images pixel make system that can not judge the sky between multiple pixels in the 2nd Z value depth that perspective projection obtains
Between positional relationship, and the problem of show the picture for being staggered front to back flashing, improve the precision of Image Rendering.
Specific embodiment
Many details are explained in the following description in order to fully understand this specification.But this specification energy
Enough to be implemented with being much different from other way described herein, those skilled in the art can be without prejudice to this specification intension
In the case where do similar popularization, therefore this specification is not limited by following public specific implementation.
Fig. 2 is to show the structural block diagram of the calculating equipment 200 according to one embodiment of this specification.The calculating equipment 100
Component include but is not limited to memory 210 and processor 220.Processor 220 is connected with memory 210 by bus 230,
Database 250 is used to save the real depth data to pixel in drawing image.
Calculating equipment 200 further includes access device 240, access device 240 enable calculate equipment 200 via one or
Multiple networks 260 communicate.The example of these networks includes public switched telephone network (PSTN), local area network (LAN), wide area network
(WAN), the combination of the communication network of personal area network (PAN) or such as internet.Access device 140 may include wired or wireless
One or more of any kind of network interface (for example, network interface card (NIC)), such as IEEE802.11 wireless local area
Net (WLAN) wireless interface, worldwide interoperability for microwave accesses (Wi-MAX) interface, Ethernet interface, universal serial bus (USB) connect
Mouth, cellular network interface, blue tooth interface, near-field communication (NFC) interface, etc..
In one embodiment of this specification, calculate in above-mentioned and Fig. 2 of equipment 200 that unshowned other component can also be with
It is connected to each other, such as passes through bus.It should be appreciated that calculating device structure block diagram shown in Fig. 2 is merely for the sake of exemplary mesh
, rather than the limitation to this specification range.Those skilled in the art can according to need, and increase or replace other component.
Calculating equipment 200 can be any kind of static or mobile computing device, including mobile computer or mobile meter
Calculate equipment (for example, tablet computer, personal digital assistant, laptop computer, notebook computer, net book etc.), movement
Phone (for example, smart phone), wearable calculating equipment (for example, smartwatch, intelligent glasses etc.) or other kinds of shifting
Dynamic equipment, or the static calculating equipment of such as desktop computer or PC.Calculating equipment 200 can also be mobile or state type
Server.
Wherein, processor 220 can execute the step in method shown in Fig. 3.Fig. 3 is to show according to this specification one in fact
The process for applying the image drawing method of example is schematically schemed, including step 302 is to step 310.
Step 302: obtaining the real depth to pixel in drawing image, the location information of each pixel passes through
Three-dimensional coordinate indicates that the depth value of each pixel indicated by the value of the Z axis in three-dimensional coordinate.
In one embodiment of this specification, the location information of each pixel is indicated by three-dimensional coordinate, Mei Gesuo
The depth value for stating pixel is indicated by the value of the Z axis in three-dimensional coordinate.There is one to pixel each in drawing image
Real depth indicates that the pixel distance of Z-direction apart from screen in three-dimensional system of coordinate, such as a pixel depth are
400, indicate that the pixel distance of Z-direction apart from screen in three-dimensional system of coordinate is 400.
Step 304: the real depth and preset threshold are compared.
In one embodiment of this specification, it is previously provided with a preset threshold, for true with the pixel that gets
Depth is compared, such as preset threshold is set as 500, and pixel is divided into real depth less than 500 by the size of real depth
Pixel and real depth be greater than 500 pixel, for different projecting methods to be respectively adopted to two kinds of pixels.
Step 306: the pixel for being less than preset threshold to the real depth carries out the first projection along Z-direction, obtains
First Z value depth, Z value depth of the first Z value depth as the pixel.
In one embodiment of this specification, the pixel for being less than preset threshold to the real depth carries out the along Z-direction
One projection, comprising:
To the real depth be less than preset threshold pixel along Z-direction using perspective projection along Z-direction into
Row first projects.
The first Z value depth that the pixel that the real depth is less than preset threshold is obtained by perspective projection with really
The nonlinearity of depth is low, is greater than Z value precision lower limit in caching, Image Rendering is used directly for, for example, to drawing image
The real depth 400 of middle pixel is less than preset threshold 500, then uses perspective projection, and the first obtained Z value depth is
0.88, it is greater than Z value precision lower limit, may be used as the Z value depth of the pixel.
Step 308: the pixel for being greater than preset threshold to the real depth carries out the second projection along Z-direction, obtains
2nd Z value depth, Z value depth of the 2nd Z value depth as the pixel, the real depth are greater than preset threshold
Pixel is less than the nonlinearity in first projection in the nonlinearity of second projection.
In one embodiment of this specification, the pixel for being greater than preset threshold to the real depth carries out the along Z-direction
Two projections, comprising:
To the real depth be greater than preset threshold pixel along Z-direction using linear projection's method along Z-direction into
Row second projects.
The 2nd Z value depth obtained with process perspective projection is on the contrary, the real depth is greater than the pixel of preset threshold
The 2nd Z value depth obtained by linear projection's method is low with the nonlinearity of real depth, is greater than under Z value caching in caching
Limit, can be used for Image Rendering, for example, the real depth 800 to pixel in drawing image is greater than preset threshold 500, use
The 2nd Z value depth that linear projection obtains is 0.8, is greater than Z value precision lower limit, may be used as the Z value depth of the pixel.
In one embodiment of this specification, the pixel for being greater than preset threshold to the real depth carries out the along Z-direction
Two projections further include:
To the real depth be greater than preset threshold pixel along Z-direction using back mapping method along Z-direction into
Row second projects.
The 2nd Z value depth obtained with process perspective projection is on the contrary, the real depth is greater than the pixel of preset threshold 500
Point is low with the nonlinearity of real depth by the 2nd Z value depth that back mapping obtains, under being greater than Z value precision in caching
Limit, may be used as the Z value depth of the pixel.
In one embodiment of this specification, the threshold value is determined by drawing precision, draws required precision height, and threshold value is smaller,
Required precision is low, and threshold value is bigger.
In one embodiment of this specification, the back mapping method includes:
According to the 2nd Z value depth, the 2nd Z value is made into inversion operation and realizes that back mapping is carried out along Z-direction
Second projection.
For example, drop shadow spread is 1000, it is 500 according to precision threshold value is drawn, real depth is greater than 500 pixel
The 2nd Z value depth is obtained using back mapping, the back mapping passes through the obtained maximum pixel of depth value and maps to obtain
Z value be 0, the Z value that the smallest pixel of depth value maps be 1, the Z value that the bigger pixel of depth value obtains is smaller.
Step 310: the pixel is drawn according to the Z value depth of the pixel.
In one embodiment of this specification, the pixel is drawn according to the Z value depth of the pixel, comprising:
Judge wait draw the pixel for whether having drawing image on the position where pixel;
If no, directly drawing the pixel to be drawn;
If so, then by the Z value depth of pixel to be drawn compared with the Z value depth of the pixel of drawing image, if to
The Z value depth for drawing pixel is bigger than the Z value depth of the pixel of drawing image, then without drawing;If pixel to be drawn
The Z value depth of point is smaller than the Z value depth of the pixel of drawing image, then is drawn.
For example, for, wait draw the position where pixel, judge on screen it is rendered have Z value depth as 0.7 picture
Vegetarian refreshments, if the Z value depth of pixel to be drawn is 0.6, less than 0.7, then system, which is drawn, is somebody's turn to do pixel to be drawn;If picture to be drawn
The Z value depth of vegetarian refreshments is 0.8, is greater than 0.7, then system does not draw the pixel to be drawn.
By above-mentioned image drawing method, real depth is greater than the picture of preset threshold to effective solution in the prior art
Vegetarian refreshments, because reaching Z value precision lower limit in caching, is buffered in Z value depth that perspective projection obtains as the same Z value depth,
So as to cause system it can not judge the spatial relation between pixel, and the picture that flashing is staggered front to back at display is asked
Topic, improves the precision of Image Rendering.
Fig. 4 is to show the perspective view that linear projection's method is used according to the second of one embodiment of this specification the projection.
In one embodiment of this specification, obtain real depth to pixel in drawing image, each pixel it is true
Depth is any one value between 0 to 1000, for example, the real depth of a certain pixel is 400.
In one embodiment of this specification, setting preset threshold is 500, and by the often real depth of pixel to be drawn and in advance
If threshold value 500 compares, so that pixel to be drawn is divided into the pixel and real depth that real depth is less than preset threshold 500
Greater than the pixel of preset threshold 500.
In one embodiment of this specification, there is different real depths, the projecting method of use for pixel to be drawn
Are as follows:
Wherein, abscissa represents the real depth of pixel to be drawn in projecting method functional arrangement, and ordinate is represented wait draw
The Z value depth that pixel processed obtains after projection.
In one embodiment of this specification, the pixel for being less than preset threshold to the real depth carries out the along Z-direction
One projection is less than preset threshold 500 for example, the real depth to pixel C in drawing image is 300, then uses perspective projection
Method projects pixel C along Z-direction, and the first obtained Z value depth is 0.8, is greater than Z value precision lower limit, may be used as
The Z value depth of the pixel;
In one embodiment of this specification, the pixel for being greater than preset threshold to the real depth carries out the along Z-direction
Two projections are greater than preset threshold for example, the real depth to pixel A, B other in drawing image is respectively 600 and 650
500, then linear projection's method is used, the 2nd obtained Z value depth is respectively 0.6 and 0.65, the obtained with process perspective projection
Two Z value depth are different, are all larger than Z value precision lower limit by the 2nd Z value depth that linear projection obtains, may be used as two pixels
The Z value depth of point.
In one embodiment of this specification, the pixel is drawn according to the Z value depth of the pixel, is first judged wait draw
Whether there is the pixel of drawing image on position where pixel, if not having, directly draws the pixel to be drawn;
If so, then by the Z value depth of pixel to be drawn compared with the Z value depth of the pixel of drawing image, if to
The Z value depth for drawing pixel is bigger than the Z value depth of the pixel of drawing image, then without drawing, for example, if for screen
Wait draw the position where pixel on curtain, judge it is rendered have Z value depth as 0.7 pixel, if pixel to be drawn
Z value depth be 0.6, less than 0.7, then draw should pixel be drawn for system;If the Z value depth of pixel to be drawn is 0.8,
Greater than 0.7, then system does not draw the pixel to be drawn.
By above-mentioned image drawing method, real depth is greater than the picture of preset threshold to effective solution in the prior art
Vegetarian refreshments, because reaching Z value precision lower limit in caching, is buffered in Z value depth that perspective projection obtains as the same Z value depth,
So as to cause system it can not judge the spatial relation between pixel, and the picture that flashing is staggered front to back at display is asked
Topic, improves the precision of Image Rendering.
Fig. 5 is to show the perspective view that back mapping method is used according to the second of one embodiment of this specification the projection.
In one embodiment of this specification, obtain real depth to pixel in drawing image, each pixel it is true
Depth is any one value between 0 to 1000, for example, the real depth of a certain pixel is 400.
In one embodiment of this specification, setting preset threshold is 500, and by by the real depth of often pixel to be drawn
Compared with preset threshold 500, so that pixel to be drawn is divided into real depth less than the pixel of preset threshold 500 and true
Depth is greater than the pixel of preset threshold 500.
In one embodiment of this specification, there is different real depths, the projecting method of use for pixel to be drawn
Are as follows:
Wherein, abscissa represents the real depth of pixel to be drawn in projecting method functional arrangement, and ordinate is represented wait draw
The Z value depth that pixel processed obtains after projection.
In one embodiment of this specification, the pixel for being less than preset threshold to the real depth carries out the along Z-direction
One projection is less than preset threshold 500 for example, the real depth to pixel C in drawing image is 300, then uses perspective projection
Method projects pixel C along Z-direction, and the first obtained Z value depth is 0.8, is greater than Z value precision lower limit, may be used as
The Z value depth of the pixel;
In one embodiment of this specification, the pixel for being greater than preset threshold to the real depth carries out the along Z-direction
Two projections, for example, the real depth to pixel A, B other in drawing image is all larger than preset threshold 500, then using reversed
Reflection method, the 2nd obtained Z value depth is respectively 0.46 and 0.45, different from the 2nd Z value depth obtained by perspective projection,
It is all larger than Z value precision lower limit by the 2nd Z value depth that back mapping obtains, may be used as the Z value depth of two pixels.
In one embodiment of this specification, the pixel is drawn according to the Z value depth of the pixel, is first judged wait draw
Whether there is the pixel of drawing image on position where pixel, if not having, directly draws the pixel to be drawn;
If so, then by the Z value depth of pixel to be drawn compared with the Z value depth of the pixel of drawing image, if to
The Z value depth for drawing pixel is bigger than the Z value depth of the pixel of drawing image, then without drawing, for example, if for screen
Wait draw the position where pixel on curtain, judge it is rendered have Z value depth as 0.7 pixel, if pixel to be drawn
Z value depth be 0.6, less than 0.7, then draw should pixel be drawn for system;If the Z value depth of pixel to be drawn is 0.8,
Greater than 0.7, then system does not draw the pixel to be drawn.
By above-mentioned image drawing method, real depth is greater than the picture of preset threshold to effective solution in the prior art
Vegetarian refreshments, because reaching Z value precision lower limit in caching, is buffered in Z value depth that perspective projection obtains as the same Z value depth,
So as to cause system it can not judge the spatial relation between pixel, and the picture that flashing is staggered front to back at display is asked
Topic, improves the precision of Image Rendering.
Fig. 6 is the schematic diagram for drawing pixel to be drawn shown according to one embodiment of this specification.
In one embodiment of this specification, the location information of each pixel is indicated by three-dimensional coordinate x-y-z, Mei Gesuo
The depth value for stating pixel is indicated by the value of the Z axis in three-dimensional coordinate.Screen plane is x-o-y plane, in three-dimensional coordinate
The B of drawing image in have the pixel B2 that pixel B1 and Z the value depth that Z value depth is 0.5 is 0.7.Image A is three-dimensional sits
In mark to drawing image, gray area indicate to drawing image A and drawing image B along the region that Z-direction is overlapped.
In one embodiment of this specification, the real depth to pixel in drawing image A is obtained, pixel includes wait draw
Pixel in image A in the pixel and the pixel outside gray area, such as drawing image A of gray area outside gray area
The real depth of A1 is 300, and the real depth to the pixel A2 of gray area in drawing image A is 600, to drawing image A
The real depth of the pixel A3 of interior gray area is 650.
In one embodiment of this specification, setting preset threshold be 500, by the real depth of pixel in drawing image with
Preset threshold 500 is made comparisons, and the pixel to be drawn is divided into pixel of the real depth less than preset threshold and true depth
Degree is greater than the pixel of preset threshold.
In one embodiment of this specification, first is carried out along Z-direction to the pixel that real depth is less than preset threshold and is thrown
Shadow obtains for example, the pixel A1 to be drawn for being less than preset threshold 500 to real depth uses perspective projection along Z-direction
The first Z value depth be 0.8, be greater than Z value precision lower limit, may be used as the Z value depth of pixel A1 to be drawn.
In one embodiment of this specification, second is carried out along Z-direction to the pixel that real depth is greater than preset threshold and is thrown
Shadow, for example, pixel A2, A3 to be drawn for being greater than preset threshold 500 to real depth use linear projection's method along Z-direction,
Obtaining corresponding 2nd Z value depth is respectively 0.6 and 0.65, the Z value depth as pixel A2, A3 to be drawn.
In one embodiment of this specification, pixel is drawn according to the Z value depth of the pixel, first judges pixel to be drawn
Whether there is the pixel of drawing image on position where point, if not having, directly draws the pixel to be drawn;
If so, then by the Z value depth of pixel to be drawn compared with the Z value depth of the pixel of drawing image, if to
The Z value depth for drawing pixel is bigger than the Z value depth of the pixel of drawing image, then without drawing.
For example, there is no the pixel of drawing image B on position where pixel A1 to be drawn, then directly draw wait draw
Pixel A1 processed;
There is the pixel B2 of drawing image B on position where pixel A2 to be drawn, then compares pixel to be drawn
A2 and the size for having drawn pixel B2Z value depth, the Z value depth of pixel A2 to be drawn is less than for 0.6 has drawn pixel
The Z value depth 0.7 of B2 is then treated drafting pixel A2 and is drawn, and pixel B2 has been drawn in covering;
Have drawing image B pixel B1 on position where pixel A3 to be drawn, compare pixel A3 to be drawn and
The size of pixel B1Z value depth is drawn, the Z value depth of pixel A3 to be drawn is greater than for 0.65 has drawn pixel B1's
Z value depth 0.5 is then treated and draws pixel A3 without drawing.
In one embodiment of this specification, second is carried out along Z-direction to the pixel that real depth is greater than preset threshold and is thrown
Shadow, for example, pixel A2, A3 to be drawn for being greater than preset threshold 500 to real depth use back mapping method along Z-direction,
Obtain corresponding 2nd Z value depth difference 0.4 and 0.6, the Z value depth as pixel A2, A3 to be drawn.
In one embodiment of this specification, pixel is drawn according to the Z value depth of the pixel, first judges pixel to be drawn
Whether there is the pixel of drawing image on position where point, if not having, directly draws the pixel to be drawn;
If so, then by the Z value depth of pixel to be drawn compared with the Z value depth of the pixel of drawing image, if to
The Z value depth for drawing pixel is bigger than the Z value depth of the pixel of drawing image, then without drawing.
For example, there is no the pixel of drawing image B on position where pixel A1 to be drawn, then directly draw wait draw
Pixel A1 processed;
There is the pixel B2 of drawing image B on position where pixel A2 to be drawn, then compares pixel to be drawn
A2 and the size for having drawn pixel B2Z value depth, the Z value depth of pixel A2 to be drawn is less than for 0.4 has drawn pixel
The Z value depth 0.7 of B2 is then treated drafting pixel A2 and is drawn, and pixel B2 has been drawn in covering;
Have drawing image B pixel B1 on position where pixel A3 to be drawn, compare pixel A3 to be drawn and
The size of pixel B1Z value depth is drawn, the Z value depth of pixel A3 to be drawn is 0.6 greater than the Z for having drawn pixel B1
It is worth depth 0.5, then treats and draw pixel A3 without drawing.
By above-mentioned image drawing method, real depth is greater than the picture of preset threshold to effective solution in the prior art
Vegetarian refreshments, because reaching Z value precision lower limit in caching, is buffered in Z value depth that perspective projection obtains as the same Z value depth,
So as to cause system it can not judge the spatial relation between pixel, and the picture that flashing is staggered front to back at display is asked
Topic, improves the precision of Image Rendering.
It is adapted with above method embodiment, this specification additionally provides image plotting device embodiment.Fig. 7 is to show
According to the module map of the image plotting device of one embodiment of this specification.As described in Figure 7, which includes:
Pixel obtains module 710, is configured as obtaining the real depth to pixel in drawing image;
Depth comparison module 720 is configured as the real depth and preset threshold being compared;
First projection module 730, the pixel for being configured as being less than the real depth preset threshold carry out the first throwing
Shadow obtains the first Z value depth, Z value depth of the first Z value depth as the pixel;
Second projection module 740, the pixel for being configured as being greater than the real depth preset threshold carry out the second throwing
Shadow, obtains the 2nd Z value depth, Z value depth of the 2nd Z value depth as the pixel, and the real depth is greater than pre-
If the pixel of threshold value is less than the nonlinearity in the first projection in the nonlinearity of second projection;
Image Rendering module 750 is configured as drawing the pixel according to the Z value depth of the pixel.
In an optional embodiment, first projection module is less than the pixel of preset threshold to the real depth
The first projection is carried out along Z-direction using perspective projection along Z-direction.
In an optional embodiment, second projection module is greater than the pixel of preset threshold to the real depth
The second projection is carried out along Z-direction using linear projection's method along Z-direction.
In an optional embodiment, second projection module is greater than the pixel of preset threshold to the real depth
The second projection is carried out along Z-direction using back mapping method along Z-direction.
In an optional embodiment, the back mapping method includes:
According to the 2nd Z value depth, the 2nd Z value is made into inversion operation and realizes back mapping.
In an optional embodiment, described image drafting module includes:
Judge wait draw the pixel for whether having drawing image on the screen position where pixel;
Judging submodule: it is configured as judging wait draw the pixel for whether having drawing image on the position where pixel
Point;
Rendering submodule: it is configured as not having the feelings of the pixel of drawing image on the position where pixel wait draw
Under condition, the pixel to be drawn directly is drawn;Wait draw the pixel for having drawing image on the position where pixel
In the case where, by the Z value depth of pixel to be drawn compared with the Z value depth of the pixel of drawing image, if picture to be drawn
The Z value depth of vegetarian refreshments is bigger than the Z value depth of the pixel of drawing image, then without drawing;If the Z value of pixel to be drawn
Depth is smaller than the Z value depth of the pixel of drawing image, then is drawn.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize this specification scheme.Those of ordinary skill in the art are not
In the case where making the creative labor, it can understand and implement.
One embodiment of this specification also provides a kind of calculating equipment, including memory, processor and storage are on a memory
And the computer instruction that can be run on a processor, the processor realize above-mentioned image drawing method when executing described instruction
The step of.
One embodiment of this specification also provides a kind of computer readable storage medium, is stored with computer instruction, described
The step of instruction realizes image drawing method as previously described when being executed by processor.
A kind of exemplary scheme of above-mentioned computer readable storage medium for the present embodiment.It should be noted that this is deposited
The technical solution of storage media and the technical solution of above-mentioned image drawing method belong to same design, the technical solution of storage medium
The detail content being not described in detail may refer to the description of the technical solution of above-mentioned image drawing method.
The computer instruction includes computer program code, the computer program code can for source code form,
Object identification code form, executable file or certain intermediate forms etc..The computer-readable medium may include: that can carry institute
State any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, the computer storage of computer program code
Device, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory),
Electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer-readable medium include it is interior
Increase and decrease appropriate can be carried out according to the requirement made laws in jurisdiction with patent practice by holding, such as in certain jurisdictions of courts
Area does not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, this specification is not limited by the described action sequence, because
For according to this specification, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art also should
Know, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this
Necessary to specification.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiments.
This specification preferred embodiment disclosed above is only intended to help to illustrate this specification.Alternative embodiment is not
All details of detailed descriptionthe, do not limit the invention to the specific embodiments described.Obviously, according in this specification
Hold, can make many modifications and variations.These embodiments are chosen and specifically described to this specification, is in order to preferably explain this theory
The principle and practical application of bright book, so that skilled artisan be enable to better understand and utilize this specification.This
Specification is limited only by the claims and their full scope and equivalents.