Summary of the invention
The problem that invention will solve
But the defective part of above-mentioned existing special efficacy device is: must pre-determine various lighting patterns, and must determine the combination with the corresponding optimal illumination pattern of effect face.And, when increasing special effective function newly, can't in mounted lighting pattern, search out best of breed sometimes.
Utilize mathematical expression 1 to calculate the inner product of viewing vector V, thus, can calculate the reflectivity on the viewpoint direction.The counting circuit of above-mentioned mathematical expression 1 is easily mounted to field programmable gate array (the Field-Programmable Gate Array that is equipped with a large amount of multipliers, FPGA) in the device, the illuminating effect that plane and curved surface is made up and obtain links up and is smooth, but for example, when the effect face of supposition as the combination by plane and curved surface has the books of a plurality of pages, there is following situation: if page turn over operation is very fast, the observability of illuminating effect is not good enough so, thereby causes not having the special efficacy image of acutance.
And, among Figure 20, the calculating formula of the normal vector when being illustrated in the effect of stirring the page in the display frame from right to left.Figure 20 is the figure of the normal vector in the existing image special effect device of expression.According to Figure 20, the normal vector of lower flat portion 215, lower surface camber portion 216, top-surface camber portion 211 and last planar portions 212 is shown below.
[formula 2]
(lower flat portion 215) normal vector N=(0,0,1)
(lower surface camber portion 216) normal vector
(top-surface camber portion 211) normal vector
(going up planar portions 212) normal vector N=(0,0,1)
In the case, as shown in figure 21, in the display frame horizontal direction component 206 of normal vector, last planar portions 212 becomes discontinuous with the variable quantity of the coupling part of top-surface camber portion 211; In the display frame horizontal direction component 206 of normal vector, lower flat portion 215 becomes discontinuous with the variable quantity of the coupling part of lower surface camber portion 216.Therefore have following situation: the illuminating effect that obtains according to mathematical expression 1 also can become discontinuous at the joint of planar portions and curved face part, thereby causes not nature of illuminating effect.
For example, the upper surface normal vector horizontal direction component 206 of last planar portions 212 is 0, and the upper surface normal vector horizontal direction component 206 of top-surface camber portion 211 is x/r (sin θ z).In addition, the lower surface normal vector horizontal direction component 217 of lower flat portion 215 is 0, and the lower surface normal vector horizontal direction component 217 of lower surface camber portion 216 is-and x/r (sin θ z).Figure 21 is the figure of the display frame horizontal direction component characteristics of the normal vector in the existing image special effect device of expression.
The present invention In view of the foregoing finishes, purpose is the image special effect device and the image special effect method that provide following, even when the shape of pattern that does not pre-determine illuminating effect and effect face changes rapidly, still can realize and the corresponding illuminating effect of various image special effects.And, the object of the present invention is to provide the illuminating effect that can realize nature and the image special effect device that can realize miniaturization and image special effect method.
The method of dealing with problems
To achieve these goals, in the first image special effect device of the present invention, in the image information relevant, add illuminating effect with the image of being imported, and output is gone up the signal of video signal that obtains by making image information be mapped to described, described illuminating effect is when any viewpoint is observed, by having the illuminating effect that produces on described of curved surface from the light of light source, the structure of described image special effect device is to have: the normal vector generating unit, it is according to the rectangular coordinate data of the position of described horizontal direction coordinate of expression and vertical direction coordinate, and described shape, the normal vector of the vector of the normal direction of the position that the generation expression is described; The illuminating effect generating unit, it produces the described reflection of light rate towards described viewpoint direction by according to the viewing vector V of the vector on the light source direction unit vector of having used described normal vector, the unit vector of expression on the described light source direction, the described viewpoint direction of expression, and the calculating carried out of mathematical expression A (2 (LN) N-2L) V of arbitrary value A; And image information makes portion, and it makes described image information according to described image and described reflectivity.
According to this structure,, still can realize and the corresponding illuminating effect of various image special effects even when the shape of pattern that does not pre-determine illuminating effect and effect face changes fast.
And, in the structure of the second image special effect device of the present invention, have the arbitrary value changing unit that can change described arbitrary value A.
According to this structure, can adjust illumination (lighting), shade (shading) that the specific part of page turning is implemented and handle pairing illuminating effect, even do not increase large-scale new counting circuit, also the illuminating effect that observability is good can be realized, thereby the image special effect equipment miniaturization can be made.
And the structure of the 3rd image special effect device of the present invention is as follows: described illuminating effect generating unit has candidate's reflectivity of a plurality of described reflectivity that produce, and produces a reflectivity from described a plurality of candidate's reflectivity.
According to this structure, changeable multiple illuminating effect data computation formula also can calculate except page-turning effect generally, as the illuminating effect in other image special effects such as spherical effect, thereby can make the image special effect equipment miniaturization.
And, in the 4th image special effect device of the present invention, in the image information relevant, add illuminating effect with the image of being imported, and output is by making described image information be mapped to the signal of video signal that obtains on the face, described illuminating effect is when any viewpoint is observed, by having the illuminating effect that produces on plane and curved surface described from the light of light source, described image special effect device has: cosine value calculating part, its viewpoint direction vector that calculates vector on the described viewpoint direction of expression and cosine value based on the normal vector angulation of described position of the position of described horizontal direction coordinate and vertical direction coordinate and described 's shape; The normal vector calculating part, it calculates following vector and is used as calculating and uses the normal direction vector, and described vector is the component of viewpoint direction with described cosine value, and is the component of described horizontal direction coordinate with (the 1-cosine value) or (1+ cosine value) of described angle; And the illuminating effect calculating part, it calculates described illuminating effect according to described calculating with the normal direction vector.
According to this structure, can realize the illuminating effect of nature, and can make equipment miniaturization.For example, result of calculation according to the viewpoint direction component, obtain the variable quantity of the horizontal direction component in the normal vector of coupling part of the planar portions of page turning and curved face part, thus, even do not increase large-scale new counting circuit, still can make described variable quantity continuous, therefore can realize the illuminating effect of nature, and can make equipment miniaturization.
And, the structure of the 5th image special effect device of the present invention is: when described when being shaped as the page turning shape with upper surface and lower surface, described normal vector calculating part calculates the component of described calculating with the described vertical direction coordinate of normal direction vector according to the position of the cosine value that is calculated by described cosine value calculating part, described vertical direction coordinate and based on the upper surface amount of movement of the location variation on the described vertical direction of described upper surface and lower surface.
According to this structure, with the cosine value that normal vector calculates that is used for that has calculated, be used for the calculating of the vertical coordinate direction of page turning, thus, in the change of shape of page turning from right to left, upper surface is not overlapping with lower surface, even do not increase large-scale new counting circuit, also can obtain the page-turning effect of nature, and can make equipment miniaturization.
And the structure of the 6th image special effect device of the present invention is to have: the sine value calculating part, and it calculates the sine value of described viewpoint direction vector and described normal vector angulation; And selection portion, it selects the sine value that is calculated by described sine value calculating part, (1-cosine value), any in (1+ cosine value) that reaches the described angle that is calculated by described normal vector calculating part, as the component of described calculating with the described horizontal direction coordinate of normal direction vector, described calculating can be used for described illuminating effect calculating part with the normal direction vector and comes the compute illumination effect.
According to this structure, the horizontal direction component of the changeable normal vector line output of going forward side by side, thus, under the situation that does not increase large-scale new counting circuit, also can calculate except page-turning effect, the general illuminating effect that spherical effect is used, and can make equipment miniaturization.
And, in the first image special effect method of the present invention, in the image information relevant, add illuminating effect with the image of being imported, and output is by making described image information be mapped to the signal of video signal that obtains on the face, described illuminating effect is when any viewpoint is observed, by having the illuminating effect that produces on described of curved surface from the light of light source, described image special effect method has following step: according to the rectangular coordinate data of the position of described horizontal direction coordinate of expression and vertical direction coordinate, and described shape, the step of the normal vector of the vector of the normal direction of the position that the generation expression is described; By according to the viewing vector V of the vector on the light source direction unit vector of having used described normal vector, the unit vector of expression on the described light source direction, the described viewpoint direction of expression, and mathematical expression A (2 (LN) N-2L) V of arbitrary value A calculate, produce step towards the described reflection of light rate of described viewpoint direction; And the step of making described image information according to described image and described reflectivity.
According to this method,, still can realize and the corresponding illuminating effect of various image special effects even when the shape of pattern that does not pre-determine illuminating effect and effect face changes rapidly.
And, in the second image special effect method of the present invention, in the image information relevant, add illuminating effect with the image of being imported, and output is by making described image information be mapped to the signal of video signal that obtains on the face, described illuminating effect is when any viewpoint is observed, by having the illuminating effect that produces on plane and curved surface described from the light of light source, described image special effect method has following step: viewpoint direction vector that calculates vector on the described viewpoint direction of expression and step based on the cosine value of the normal vector angulation of described position of the position of described horizontal direction coordinate and vertical direction coordinate and described 's shape; Calculate following vector and be used as calculating step with the normal direction vector, described vector is the component of viewpoint direction with described cosine value, and is the step of the component of described horizontal direction coordinate with (the 1-cosine value) or (1+ cosine value) of described angle; And calculate described illuminating effect step with the normal direction vector according to described calculating.
According to this method, can realize the illuminating effect of nature, and can make equipment miniaturization.For example, result of calculation according to the viewpoint direction component, obtain the variable quantity of the horizontal direction component in the normal vector of coupling part of the planar portions of page turning and curved face part, thus, even do not increase large-scale new counting circuit, still can make described variable quantity continuous, therefore, can in the illuminating effect of realizing nature, make equipment miniaturization.
The invention effect
For the present invention, even when the shape of pattern that does not pre-determine illuminating effect and effect face changes rapidly, still can realize and the corresponding illuminating effect of various image special effects.
And, in the illuminating effect in the page turning image special effect that adds to as stirring the page, can cancel illuminating effect according to the page turning shape, can only add the good illuminating effect of observability, and can make equipment miniaturization curved surface at last plane and lower plane.
In addition, the arbitrary constant A in the illuminating effect data is changed, thus, can be respectively obtain best illuminating effect at shade, lighting effect according to page turning face.
And, will in order to the formula of compute illumination effect data for example " A (2 (LN) N-2L) V " switch to " 2 (LN) N-L) V ", thus, can calculate common illuminating effect data, thus can be widely corresponding to the illuminating effect of various image special effects.
And, for example in image special effect with the effect face that connects plane and curved surface as the page turning, normal vector according to the display frame plane composition that calculates according to (1-cosine value) or (cosine value-1), under the comparatively smooth state in the coupling part of plane and curved surface, utilize mathematical expression 1 to carry out simple computation, the illuminating effect of nature can be realized thus, and equipment miniaturization can be made.And, can realize nature and smooth hatching effect equally.
And, shape is changed as from right to left, the page turning from left to right, from the top down or from bottom to top, reuse (the 1-cosine value), the result of calculation of (cosine value-1) that in illumination process, calculate, itself and constant are multiplied each other, make that the upper surface of page turning shape can be not overlapping with lower surface, mobile upper surface position can make the upper surface in the page-turning effect not overlapping with lower surface thus, and can make equipment miniaturization.
In addition, (1-cosine value) or (cosine value-1) switched to sine value, can calculate common normal vector thus, thus can be widely corresponding to the illuminating effect of various image special effects.
Description of drawings
Fig. 1 is the functional block diagram of the structure of the image special effect device in the expression first embodiment of the invention.
Fig. 2 is the explanation figure of title of the page turning face of the image special effect device in the first embodiment of the invention.
Fig. 3 is the further explanatory drawings of the normal vector in the normal vector generating unit of the image special effect device in the first embodiment of the invention.
Fig. 4 is the figure of expression by the characteristic of the illuminating effect data of the illuminating effect data computation formula generation of the image special effect device in the first embodiment of the invention.
Fig. 5 is the figure of expression by the characteristic of the illuminating effect data of the illuminating effect data computation formula generation of the image special effect device in the first embodiment of the invention.
Fig. 6 is the functional block diagram of the structure of the image special effect device in the expression second embodiment of the invention.
Fig. 7 is the functional block diagram of structure of the illuminating effect data computation portion of the image special effect device of expression in the third embodiment of the invention.
Fig. 8 is the block diagram of the structure of the image special effect device in the expression four embodiment of the invention.
Fig. 9 is the further explanatory drawings of the normal vector in the four embodiment of the invention.
Figure 10 is the figure of the horizontal direction component characteristics of the normal vector in the expression four embodiment of the invention.
Figure 11 is the block diagram of the structure of the second image special effect device in the expression four embodiment of the invention.
Figure 12 is the further explanatory drawings of second normal vector in the four embodiment of the invention.
Figure 13 is the figure of the horizontal direction component characteristics of second normal vector in the expression four embodiment of the invention.
Figure 14 is the block diagram of the structure of the image special effect device in the expression fifth embodiment of the invention.
Figure 15 is the figure in order to the page-turning effect vertical direction coordinate Calculation method in the explanation fifth embodiment of the invention.
Figure 16 is the block diagram of the structure of the image special effect device in the expression sixth embodiment of the invention.
Figure 17 is the block diagram of the structure of expression conventional images special efficacy device.
Figure 18 is the figure in order to the horizontal direction coordinate Calculation method in the explanation conventional images special efficacy device.
Figure 19 is the figure in order to the vertical direction coordinate Calculation method in the explanation conventional images special efficacy device.
Figure 20 is the figure of the normal vector in the expression conventional images special efficacy device.
Figure 21 is the figure of the display frame horizontal direction component characteristics of the normal vector in the expression conventional images special efficacy device.
Description of symbols
10 Xeffect
11 Yeffect
100,600,800,800B, 1400,1600 image effect special devices
101 rectangular coordinates
102 effect radius r
103 normal vector N
104 light source direction unit vector L
105 viewing vector V
106 arbitrary constant A
108 mode select signals
109 illuminating effect data I
110 normal vector generating units
111,111B illuminating effect data computation portion
112 display frame horizontal directions (x axle)
113 display frame vertical direction (y axle)
114 viewpoint direction (z axle)
Planar portions on 120
121 top-surface camber portions
122 lower flat portion
123 lower surface camber portions
The normal vector N on plane on 130
The normal vector N of 131 top-surface cambers
The normal vector N of 132 lower planes
The normal vector N of 133 lower surface cambers
135 eyes
The illuminating effect data I of planar portions on 140
The illuminating effect data I of 141 top-surface camber portions
142 illuminating effect amplification data IA
The illuminating effect data I of 150 lower flat portion
The illuminating effect data I of 151 lower surface camber portions
X201 horizontal direction coordinate
R202 effect radius
203 cosine values
204,204B cosine value calculating part
205 normal vector viewpoint direction components
206 normal vector horizontal direction components
207,207B normal vector calculating part
211 top-surface camber portions
Planar portions on 212
X213 display frame horizontal direction
The Z214 viewpoint direction
215 lower flat portion
216 lower surface camber portions
217 lower surface normal vector horizontal direction components
218 normal vector calculating parts
219 page turning vertical direction coordinate Calculation portions
Y220 vertical direction coordinate
Y222 display frame vertical direction
223 sine values
224 mode select signals
225 selector switchs
A231 upper surface amount of movement
θ z240 viewpoint direction and normal vector angulation
250 sine value calculating parts
601 arbitrary constant A switch control portion
701 first multipliers
702 the one 2bit left shifter
703 the 2nd 2bit left shifter
704 selector switchs
705 second multipliers
706 subtracters
707 the 3rd multipliers
708 the 4th multipliers
1701 input pictures
1702 frame memories
1703 output images
1705 continuous write addresses
1708 image special effects are with reading the address
1709 read address arithmetic portion
Embodiment
Below, use accompanying drawing to come the image special effect device in the embodiments of the present invention is illustrated.
(first embodiment)
At first, the image special effect device in the first embodiment of the invention is illustrated.
Fig. 1 is the figure of the structure of the image special effect device 100 in the expression first embodiment of the invention.Image special effect device 100 is made of with illuminating effect data computation portion 111 normal vector generating unit 110.
Use Fig. 2 to come normal vector generating unit 110 is illustrated.Input rectangular coordinate 101 and effect radius r 102, the horizontal direction coordinate of the image that wherein above-mentioned rectangular coordinate 101 expressions are imported and the position of vertical direction coordinate, the size of the effect of the flip portion of above-mentioned effect radius r 102 decision page turnings, according to continuous display frame horizontal direction (x axle) 112 or display frame vertical direction (y axle) 113, obtain normal vector N103 with corresponding each page turning face in position of horizontal direction coordinate x112.
As shown in Figure 3, produce above-mentioned normal vector N103 in such a way: the normal vector N103 that goes up planar portions 120 is the normal vector N130=(0,0,1) on last plane; The normal vector N103 of top-surface camber portion 121 part of an expression (among the Fig. 2 by) is the normal vector N131 of top-surface camber; The normal vector N103 of lower flat portion 122 is the normal vector N132=(0,0,1) of lower plane; The normal vector N103 of lower surface camber portion 123 (part of being represented by oblique line among Fig. 2) is the normal vector N133 of lower surface camber.
Moreover, in Fig. 1, Xeffect10 is that these display frame horizontal direction data are to be calculated by the data of normal vector generating unit 110 according to the continuous display frame horizontal direction X112 of rectangular coordinate 101 in order to the display frame horizontal direction data of various video effects such as generation page-turning effect, spherical effect.
Yeffect11 is that this display frame vertical orientation data is to be calculated by the data of normal vector generating unit 110 according to the continuous display frame vertical direction Y113 of rectangular coordinate 101 in order to the display frame vertical orientation data of various video effects such as generation page-turning effect, spherical effect.
Like this, for image special effect, the address of reading according to the Xeffect10 that calculates based on normal vector generating unit 110, Yeffect11, from frame memory, read according to continuous write address and be written to input image data in the frame memory successively, thus, various video effects such as page-turning effect, spherical effect can be added in the input picture.
Illuminating effect data computation portion 111 produces reflection direction vector R107 according to the normal vector N103 that produces in the normal vector generating unit 110, by light source direction unit vector L104, viewing vector V105 and the arbitrary constant A106 of inputs such as microcomputer.
After producing reflection direction vector R107, this illuminating effect data computation portion 111 uses illuminating effect data computation formula (following mathematical expression 2) to come compute illumination effect data I109.In following content, will be to being narrated in order to the contents processing that calculates illuminating effect data I 109.Herein, viewing vector V105 is made as V, and light source direction unit vector L104 is made as L, and reflection direction vector R107 is made as R, and normal vector N103 is made as N, and arbitrary constant A106 is made as A.
Illuminating effect data I 109=(RV) * A=((2 (NL) N-2L) V) A
Mathematical expression 2
When using mathematical expression 1, even the normal vector on plane be (0,0,1), the illuminating effect data I also has residual value, and therefore, illuminating effect can be added on the positive planar portions 120 and last planar portions 121 among Fig. 2, thereby causes illuminating effect not have acutance.
Therefore, the illuminating effect data I for the plane time is made as zero and import mathematical expression 2, and this mathematical expression 2 can realize by inserting coefficient " 2 " before the L in mathematical expression 1.Cancel the illuminating effect of planar portions thus.Moreover, because the illuminating effect data I of curved face part can die down, so can be by adding the magnification that arbitrary constant A adjust the illuminating effect data I.
With regard to mathematical expression 2, at first, the viewing vector V105 of people's eyes 135 is made as (0 in will be corresponding to Fig. 3,0,1), normal vector N103 is made as (Nx, Ny, Nz), light source direction unit vector L104 is made as (Lx, Ly, Lz), arbitrary constant A106 is made as 1 when obtaining illuminating effect data I 109, and viewing vector V105 is as described below.Moreover z direction of principal axis components such as Nz, Lz are the components of viewpoint direction (z axle) 1 14.
At first, with becoming " 2NxLx+2NyLy+2NzLz " after " 2 (NL) " in the mathematical expression 2 expansion, it is made as " Q ".At this moment, if Q is updated in the mathematical expression 2, reflection vector R=(QN-2L) so.When the inner product of obtaining reflection direction vector R and viewing vector V105 (0,0,1) was used as illuminating effect data I 109, illuminating effect data I 109 became mathematical expression as follows 3.
Illuminating effect data I 109=RV=R (0,0,1)=QNz-2Lz
Mathematical expression 3
As mentioned above, use Fig. 4, Fig. 5 to come the illuminating effect data I 109 of each shape of page-turning effect is illustrated.
With regard to last planar portions 120 and lower flat portion 122, according to the above-mentioned normal vector N130 that goes up the plane, and the normal vector N132 of lower plane, the normal vector N103 on expression plane becomes (0,0,1), the Q in the mathematical expression 3 becomes 2Lz, Nz is 1, thereby illuminating effect data I 109 becomes " 0 ".As the illuminating effect data I 140 of the last planar portions among Fig. 4, and Fig. 5 in the illuminating effect data I 150 of lower flat portion shown in because illuminating effect data I 109 is 0, so illuminating effect is cancelled.
With regard to top-surface camber portion 121, according to the normal vector N131 of Fig. 3, illuminating effect data I 109 becomes the value shown in the illuminating effect data I 141 of the top-surface camber portion among Fig. 4.This illuminating effect data I 109 is greater than 0, therefore, top situation portion 121 added this illuminating effect of illumination.Illuminating effect data I local above this 141 is multiplied each other with arbitrary constant A106, thus, produce the illuminating effect data I 109 shown in the illuminating effect amplification data IA142 among Fig. 4, thereby can further add this illuminating effect of intense light irradiation.
And, with regard to lower surface camber portion 123, obtain the illuminating effect data I 151 of lower surface camber portion shown in Figure 5 according to the normal vector N133 of Fig. 3, as illuminating effect data I 109.Because this illuminating effect data I 109 is less than 0, so lower surface camber portion 123 has been added this illuminating effect of shade.And, can further add this illuminating effect of strong shadow by arbitrary constant A106.
In addition, last planar portions 120, top-surface camber portion 121, lower flat portion 122, and lower surface camber portion 123 when adding illuminating effect respectively when not wishing page turning can be made as arbitrary constant A106 " 0 (zero) ".
Its result can not add illuminating effect to last planar portions 120 and lower flat portion 122, but top-surface camber portion 121 is added this illuminating effect of illumination, and lower surface camber portion 123 is added this illuminating effect of shade corresponding to the shape of the page turning among Fig. 2.
Like this, in this image special effect device 100, as long as revise the part of illuminating effect data computation formula, make it possible to cancel the illuminating effect on the plane of page-turning effect, and only curved surface is added illuminating effect, even do not increase large-scale new computing circuit so, can realize the illuminating effect that observability is good yet, and can make equipment miniaturization.
Moreover in the present embodiment, being the theme with the effect of stirring the page from right to left is illustrated, but also can be the page-turning effect towards any direction, and also can be the special efficacy that plane and curved surface are combined beyond the page-turning effect.
And, in the present embodiment, viewing vector V105 is made as (0,0,1) is illustrated, but also can be direction in addition.
According to the image special effect device 100 in this first embodiment of the invention, in the image information relevant, add illuminating effect with the image of being imported, and the signal of video signal that obtains on the face by image information is mapped to of output, above-mentioned illuminating effect is when any viewpoint is observed, has the illuminating effect that produces on the face of curved surface by light from light source, the structure of above-mentioned image special effect device 100 is to have: normal vector generating unit 110, it is according to the rectangular coordinate data of the position of the horizontal direction coordinate of presentation surface and vertical direction coordinate, and the shape of face, the normal vector of the vector of the normal direction of the position of generation presentation surface; Illuminating effect data computation portion 111, viewing vector V of its light source direction unit vector by using the unit vector on normal vector, the expression light source direction, the vector on the expression viewpoint direction, and the calculating carried out of mathematical expression A (2 (LN) N-2L) V of arbitrary value A produce the reflection of light rate towards viewpoint direction; And image information makes portion, and it makes image information according to image and reflectivity, and thus, even ought not pre-determine the pattern of illuminating effect, and the shape of effect face still can realize and the corresponding illuminating effect of various image special effects when changing rapidly.And, for example in the illuminating effect in the page turning image special effect that adds to as stirring the page, can cancel illuminating effect according to the page turning shape, can only add the good illuminating effect of observability, and can make equipment miniaturization curved surface at last plane and lower plane.
(second embodiment)
Then, the image special effect device in the second embodiment of the invention is illustrated.
Fig. 6 is the figure of the structure of the image special effect device 600 in the expression second embodiment of the invention.Image special effect device 600 has normal vector generating unit 110, illuminating effect data computation portion 111 and arbitrary constant switch control portion 601.Arbitrary constant switch control portion 601 is switched the value of arbitrary constant A106 according to the shape of page turning face, and output in the illuminating effect data computation portion 111, the shape of above-mentioned page turning face is corresponding to the position based on the horizontal direction coordinate x112 among Fig. 2 of rectangular coordinate 101.Moreover, about normal vector generating unit 110 and illuminating effect data computation portion 111, since identical with illustrated structure and function in first embodiment, therefore be marked with same tag and omit explanation.
For example, when rectangular coordinate 101 during corresponding to the top-surface camber portion 121 among Fig. 2, if setting the value of arbitrary constant A106 for, arbitrary constant switch control portion 601 make illuminating effect data I 109 increase coefficient doubly, illuminating effect data computation portion 111 can at random adjust this illuminating effect of illumination so, to produce illuminating effect data I 109.
On the contrary, when rectangular coordinate 101 during corresponding to the lower surface camber portion 123 among Fig. 2, if setting the value of arbitrary constant A106 for, arbitrary constant switch control portion 601 make illuminating effect data I 109 less than 0 coefficient, illuminating effect data computation portion 111 can at random adjust this illuminating effect of shade so, to produce illuminating effect data I 109.
Has the arbitrary constant switch control portion 601 that can change arbitrary constant A in the structure of the image special effect device 600 in the invention described above second embodiment, thus, can adjust the pairing illuminating effect of illumination, Shadows Processing that the specific part of page turning is implemented, even do not increase large-scale new counting circuit, also the illuminating effect that observability is good can be realized, and the image special effect equipment miniaturization can be made.
(the 3rd embodiment)
Secondly, the image special effect device in the third embodiment of the invention is illustrated.
In the image special effect device 700 in third embodiment of the invention, and the structured flowchart of not shown whole device, and 600 identical in image special effect device 100 in the structure beyond the illuminating effect data computation portion 111 and the second embodiment of the invention or the first embodiment of the invention.In the present embodiment, image special effect device 700 has the illuminating effect data computation 111B of portion, has replaced illuminating effect data computation portion 111 with this.The never illustrated control part receiving mode of the illuminating effect data computation 111B of portion is selected signal, and selects an illuminating effect data operation formula I, the formula of above-mentioned mode select signal in order to select to carry out computing from a plurality of illuminating effect data I arithmetic expressions.Fig. 7 is the figure of structure of the illuminating effect data computation formula 111B of the special efficacy device of expression in the third embodiment of the invention.
The illuminating effect data computation 111B of portion has first multiplier 701, a 1bit left shifter 702, the 2nd 1bit left shifter 703, selector switch 704, second multiplier 705, subtracter 706, the 3rd multiplier 707 and the 4th multiplier 708.
In first multiplier 701, import light source direction unit vector L104 and normal vector N103, and operation result is outputed in the 1bit left shifter 702.In the one 1bit left shifter 702, import the operation result of first multiplier 701, and operation result is outputed in second multiplier 705.In the 2nd 1bit left shifter 703, import light source direction unit vector L104, and operation result is outputed in the selector switch 704.
In the selector switch 704, input pattern is selected signal 108, light source direction unit vector L104, is reached the operation result of the 2nd 1bit left shifter 703, and according to mode select signal 108, the result is outputed in the subtracter 706.
In second multiplier 705, import the operation result of a 1bit left shifter 702, and operation result is outputed in the subtracter 706.In the subtracter 706, the operation result of the operation result of input selector 704 and second multiplier 705, and operation result outputed in the 3rd multiplier 707.In the 3rd multiplier 707, import the operation result and the viewing vector V105 of subtracter 706, and operation result is outputed in the 4th multiplier 708.In the 4th multiplier 708, import the operation result and the arbitrary constant A106 of the 3rd multiplier 707, and output illuminating effect data I 109.
Among Fig. 7, according to light source direction unit vector L104 whether through the 2nd 1bit left shifter 703, can draw two kinds of illuminating effect data I arithmetic expressions, under the situation of light source direction unit vector L104 through the 2nd 1bit left shifter 703, illuminating effect data I arithmetic expression is identical with the situation of existing mathematical expression 1 and arbitrary constant A106=1, and as light source direction unit vector L104 during without the 2nd 1bit left shifter 703, mathematical expression 2 illustrated in illuminating effect data I arithmetic expression and the first embodiment of the invention is identical.
That is to say, in the structure that realizes the illuminating effect data I calculating formula shown in the existing mathematical expression 1, newly-increased the 2nd 1bit left shifter 703 and selector switch 704, by selector switch 704 according to mode select signal 108, switch the existing illuminating effect data I calculating formula shown in the mathematical expression 1, and mathematical expression 2 shown in first embodiment described in the illuminating effect data I calculating formula of image special effect device 100.
And, in the present embodiment, used Fig. 7 that the structure that is used to switch two illuminating effect data I arithmetic expressions is introduced, but arithmetic expression is not limited to two, also can have the structure that can realize plural arithmetic expression.
The structure of the image special effect device 700 in the invention described above the 3rd embodiment is as follows: the illuminating effect data computation 111B of portion has candidate's reflectivity of a plurality of reflectivity that produce, and from a plurality of candidate's reflectivity, produce a reflectivity, thus, even do not increase large-scale new counting circuit, only increase the circuit that combines simply by the 2nd 1bit left shifter 703 and selector switch 704, just can switch multiple illuminating effect data I calculating formula, except page-turning effect, also can calculate the illuminating effect in other image special effects such as spherical effect generally, and can make the image special effect equipment miniaturization.
(the 4th embodiment)
Secondly, the illuminating effect to the upper surface in the page-turning effect is illustrated.
Fig. 8 is the figure of the structure of the image special effect device 800 in the expression four embodiment of the invention.Image special effect device 800 has cosine value calculating part 204 and normal vector calculating part 207.In the cosine value calculating part 204, input level direction coordinate 201 (x) (X201 among Fig. 8) and effect radius 202 (r) (R202 among Fig. 8), and obtain cosine value 203 (cos θ z) according to following formula.
[formula 3]
In the normal vector calculating part 207, the result of calculation of input cosine value calculating part 204 is cosine value 203 (cos θ z), and the horizontal direction component 206 of output normal vector and the viewpoint direction component 205 of normal vector.
Here, when will being made as n_vector_x in order to the horizontal direction component 206 of the normal vector of the illuminating effect of realizing the upper surface in the page-turning effect, when the viewpoint direction component 205 of normal vector is made as n_vector_z, normal vector N=(n_vector_x, 0, n_vector_z).The cosine value 203 (cos θ z) that is calculated by cosine value calculating part 204 that normal vector calculating part 207 output is identical with input value is as n_vector_z.And normal vector calculating part 207 utilizes the result of calculation of n_vector_z to calculate n_vector_x, as n_vector_x=1-cos θ z.
At this moment, the normal vector N of top-surface camber portion 211 becomes following formula.
[formula 4]
And the normal vector N of last planar portions 212 is
N=(0,0,1),
The characteristic of n_vector_x as shown in figure 10, in top-surface camber portion 211 coupling part with last planar portions 212, it is continuous that variable quantity becomes.
Here, Fig. 9 is the further explanatory drawings of the normal vector in the four embodiment of the invention, the direction of the direction indication normal vector of the thick-line arrow in last planar portions 212 and the lower surface camber portion 211.And Figure 10 is the figure of the horizontal direction component characteristics of the normal vector in the expression four embodiment of the invention.
Its result, the illuminating effect of the last planar portions 212 of the page-turning effect as Fig. 9, the connecting portion office of top-surface camber portion 211 can change continuously, visually can obtain the illuminating effect of nature.
Secondly, the illuminating effect to the lower surface in the page-turning effect is illustrated.
Figure 11 is the figure of the structure of the second image special effect device 800B in the expression four embodiment of the invention.The structure of this image special effect device 800B image special effect device 800 with shown in Figure 8 basically is identical, but image special effect device 800B has normal vector calculating part 207B, has replaced normal vector calculating part 207 with this.
Normal vector calculating part 207B obtains n_vector_z in the mode identical with Fig. 8.Then, utilize the result of calculation of n_vector_z to calculate the n_vector_x of lower surface camber portion 216, as n_vector_x=cos θ z-1.
At this moment, the normal vector N of lower surface camber portion 216 becomes following formula.
[formula 5]
And the normal vector N of lower flat portion 215 is
N=(0,0,1),
The characteristic of n_vector_x as shown in figure 13, in lower surface camber portion 216 coupling part with lower flat portion 215, it is continuous that variable quantity becomes.
Here, Figure 12 is the second normal vector further explanatory drawings in the four embodiment of the invention, the direction of the direction indication normal vector of the thick-line arrow in lower flat portion 215 and the lower surface camber portion 216.And Figure 13 is the figure of the horizontal direction component characteristics of second normal vector in the expression four embodiment of the invention.
Its result, the illuminating effect of the lower flat portion 215 of the page-turning effect as Figure 12, the connecting portion office of lower surface camber portion 216 can change continuously, visually can obtain the illuminating effect of nature.
According to the image special effect device 800 in the 4th embodiment of the invention described above, in the image information relevant, add illuminating effect with the image of being imported, and the signal of video signal that obtains on the face by image information is mapped to of output, this illuminating effect is when any viewpoint is observed, the illuminating effect that on face, produces by light with plane and curved surface from light source, the structure of this image special effect device 800 is to have: cosine value calculating part 204, its viewpoint direction vector that calculates vector on expression viewpoint direction and cosine value based on the normal vector angulation of the position of the face of the shape of the position of the horizontal direction coordinate of face and vertical direction coordinate and face; Normal vector calculating part 207, it calculates following vector and is used as calculating that to use normal direction vector, above-mentioned vector be the component of viewpoint direction with the cosine value, and is the component of horizontal direction coordinate with (the 1-cosine value) or (1+ cosine value) of angle; And illuminating effect calculating part, it comes the compute illumination effect according to calculating with the normal direction vector, thus, for example according to the result of calculation of viewpoint direction component, obtain the variable quantity of the horizontal direction component among the normal vector N of coupling part of the planar portions of page turning and curved face part, thereby, still can make above-mentioned variable quantity continuous even do not increase large-scale new counting circuit, therefore the illuminating effect of nature can be realized, equipment miniaturization can be made simultaneously.
Moreover, in the present embodiment, be illustrated, but also can be to carry out page turning to direction in addition for the page-turning effect on the horizontal direction, at this moment, can consider the vertical direction component of normal vector with the same mode of horizontal direction component.
And, in the present embodiment, be illustrated, but also can be the image special effect that connects plane and curved surface or curved surface and curved surface around page-turning effect.
(the 5th embodiment)
Then, the image special effect device 1400 in the fifth embodiment of the invention is illustrated.
Figure 14 is the figure of the structure of the image special effect device 1400 in the expression fifth embodiment of the invention.Image special effect device 1400 has cosine value calculating part 204, normal vector calculating part 218, reaches page turning vertical direction coordinate Calculation portion 219.Moreover page turning vertical direction coordinate Calculation portion 219 is examples of the part of normal vector calculating part.
Illustrated identical in cosine value calculating part 204 and the 4th embodiment.Normal vector calculating part 218 have with the 4th embodiment in normal vector calculating part 207 or normal vector calculating part 207B identical functions.
In order to calculate illumination process normal direction vector, page turning vertical direction coordinate Calculation portion 219 uses upper surface amount of movement 231 (a) (A31 among Figure 14), and the vertical direction coordinate 220 (y) (Y20 among Figure 14) of the location variation of the cosine value 203 (cos θ z), expression upper surface and the lower surface that are calculated by cosine value calculating part 204, carries out in order to obtain the calculating of Yeffect.In order to the calculating that calculates Yeffect, the calculating of just being undertaken, at lower flat portion 215, lower surface camber portion 216, top-surface camber portion 211, and go up planar portions 212 and be shown below and carry out by page turning vertical direction coordinate Calculation portion 219.Figure 15 is the figure in order to the page-turning effect vertical direction coordinate Calculation method in the explanation fifth embodiment of the invention.
(lower flat portion 215) Yeffect=y
(lower surface camber portion 216) Yeffect=y-a{1-cos θ z}
(top-surface camber portion 211) Yeffect=y-a{1+cos θ z}
(going up planar portions 212) Yeffect=y-2a
According to the image special effect device 1400 in the invention described above the 5th embodiment, when being shaped as page turning shape with upper surface and lower surface, described page turning vertical direction coordinate Calculation portion 219 is according to the cosine value that is calculated by cosine value calculating part 204, the position of vertical direction coordinate, and based on the upper surface amount of movement of the location variation on the vertical direction of upper surface and lower surface, calculate the component that calculates with the vertical direction coordinate of normal direction vector, thus, with the cos θ z that normal vector calculates that is used for that has calculated, be used for the calculating of the vertical coordinate direction of page turning, thereby, for example in the change of shape of page turning from right to left, upper surface is not overlapping with lower surface, even do not increase large-scale new counting circuit, still can obtain the page-turning effect of nature, can make equipment miniaturization simultaneously.
Moreover, in the present embodiment, utilize the effect of page turning from right to left to be illustrated, but in addition, also can be from left to right, from the top down, direction from bottom to top.
(the 6th embodiment)
Then, the image special effect device 1600 in the sixth embodiment of the invention is illustrated.
Figure 16 is the figure of the structure of the image special effect device 1600 in the expression sixth embodiment of the invention.Image special effect device 1600 has sine value calculating part 250, cosine value calculating part 204B, normal vector calculating part 218, reaches selector switch 225.Moreover selector switch 225 is examples of selection portion.
In the sine value calculating part 250, input level direction coordinate 201 (x) (X201 among Figure 16) and effect radius 202 (r) (R202 among Figure 16) calculate sine value 223 (sin θ z)=x/r.Among the cosine value calculating part 204B, input sine value 223 (sin θ z), the cosine value that carries out following formula calculates, and output cosine value 203 (cos θ z).
[formula 6]
Illustrated identical in normal vector calculating part 218 and the 5th embodiment.
In the selector switch 225, the sine value 223 that input is calculated by sine value calculating part 250 (sin θ z)=x/r, and the result of calculation that calculates by normal vector calculating part 218, select any value according to mode switching signal 224, and to export this value be n_vector_x as normal vector horizontal direction component 206.The horizontal direction component of the normal vector of using by selector switch 225 changeable page-turning effects from right to left, and the horizontal direction component of the normal vector used of spherical effect, and exportable as normal vector horizontal direction component 206.
Have in the structure of the image special effect device 1600 in the invention described above the 6th embodiment: sine value calculating part 250, it calculates the sine value of viewpoint direction vector and normal vector angulation; And selector switch 225, the sine value that its selection is calculated by sine value calculating part 250, reach (the 1-cosine value) of the angle that calculates by normal vector calculating part 218, in (1+ cosine value) any, as the component of the calculating of in the calculating of the illuminating effect that is undertaken by the illuminating effect calculating part, using with the horizontal direction coordinate of normal direction vector, thus, the horizontal direction component of the changeable normal vector line output of going forward side by side, thereby under the state that does not increase large-scale new counting circuit, also can calculate except page-turning effect, the general illuminating effect that spherical effect is used, and can make equipment miniaturization.
Moreover, in the present embodiment, the situation that utilization is switched to from right to left page-turning effect, with the illuminating effect of spherical effect is illustrated, but also can be the connection plane and the image special effect of curved surface or curved surface and curved surface beyond the page-turning effect, to other image special effect switching.
More than, with reference to detailed or specific embodiment, describe the present invention, but those skilled in the art understand: can under the prerequisite that does not break away from spirit of the present invention and scope, carry out various changes and correction.
The application incorporates its content into the application as a reference based on the Japanese patent application No.2006-178445 of on June 28th, 2006 application, and the Japanese patent application No.2006-210103 of application on August 1st, 2006.
The industrial utilization possibility
The present invention handle in real time as the structure that can utilize miniaturization various image special effects illuminating effect image special effect device etc. and for example be widely used in to image, image make, in each field of editor etc.And the present invention be effectively as can utilizing the structure of miniaturization to handle the illuminating effect of various image special effects in real time, and can be widely used in to image, image make, image special effect device in each field of editor etc.