A method and apparatus for displaying images

Abstract: A method and apparatus for displaying an image wherein when all or part of an image is generated as an aggregation of very small regions (102) and displaying the same, a random number (103) is assigned to each very small region so as to change the color or brightness of each very small region, in which case when uniform random numbers are generated, the range within which the unfiorm random numbers are generated is specified by the operator, and when the random numbers are generated in accordance with a distributed function (103), the average value and dispersion value are similarly specified by the operator, so that the image can be more realistically displayed (104 - 106).

Description: The invention is generally concerned with the displaying of images in computer graphics and particularly relates to an image displaying method for generating and displaying all or part of a three-dimensional object as an aggregation of three-dimensional parts of said object as defined in the preamble of the claim 1 and to an image displaying apparatus for generating a three-dimensional object as an aggregation of three-dimensional parts of the object as all or part of an image and displaying said three-dimensional object on a display as defined in the preamble of the claim 5. An essential aspect of the invention is to provide a method and an apparatus suitable to display an image formed of an aggregation of fine regions, for example fine lines such as human hairs. The image processing technique using computer graphics has been rapidly developed to enable various different objects to be displayed. There is an unsolved problem, however, that the images of objects having anisotropic reflective properties such as human hair and fur cannot be realistically expressed yet. A computer display system which is destined to generate shaded renderings of a scene for a 3D display is described in IBM Technical Disclosure Bulletin, vol. 15, No. 10, pages 3285-86. That system employs randomly generated values for determining the brightness of a line segment of a surface to be displayed in a kind of dither method to display the object with a small number of colours. A display method like that, however, provides only poor gray scale. if, e.g. that method is used for displaying hairs as the object, the displayed hairs as a whole are a blur in plain gray scale without any reality. A computer algorithm to express anisotropic reflective properties is disclosed in Proc. Graphics Interface '88, pages 138-145. By means of that algorithm, however, it is possible to render models of furry animals with short straight hair only. In another publication in Proceedings of Computer Graphics International '89, pages 691-700, human hair is represented as straight hair, and further, a method of processing the surface of an object concerning the two-dimensional representation of a three-dimensional object is disclosed in JP-A-64-79889. With the known technique body hairs or head hairs are approximated by aggregations of short straight hairs, but the actual feeling of the 'gloss' which appears when respective lustrous hairs are equal in their direction cannot be represented yet, and thus there is no impression of reality. Moreover, the computing time required is too great to match the practical use. The problems outlined above are assumed to have been caused by the following facts. The development of computer graphics has so far been made chiefly on the anisotropic reflective model itself which has diffused reflection light in macroscopic but aligned reflection light in microscopic, and therefore the investigation has been centered on the development of theoretical expressions and precise or simple analysis of models according to the optical laws. In other words, the prior art does not effectively specify the colour tone and brightness for each very small region or each hair as a unit to be displayed and does not consider that upon displaying, the outline of an object image should be displayed at high speed for practical purposes even though the display is not a physically strict simulation. It is an object of the present invention to provide a method and apparatus for displaying images which is capable of fast specifying colour and brightness for each very small region when an aggregation of very small regions having anisotropic reflective properties is displayed differently for each very small region and is capable of changing the representation of an aggregation of very small regions for realistic displaying images. According to the present invention the said object can be achieved by employing an image displaying method defined in the claim 1 and by using an image displaying apparatus defined in the claim 5, respectively; advantageous further developments both of the said method and of the said apparatus are defined in respective subclaims. An essential feature of the present invention consists in that a random number is used for computing the brightness at each point of each three-dimensional part of the object to be displayed with an ambient light component and directly reflected light components. Thus, with the present invention, the brightness at very small regions on the object surface can be determined easily and fast by using the random number so as to obtain the imaging of the object, in particular hairs, with reality. With the present invention a random number is assigned to each very small region so as to display each with different colour and brightness when all or part of an image is generated as an aggregation of very small regions. Additionally, there is performed operator's changing and specifying the range of uniform random numbers to be generated or the average and dispersion of random numbers to be generated according to a distribution function. When a colour and brightness are specified for each very small region, it takes a long time for an operator to specify for each region. With the present invention, however, there is performed automatic specifying for each region by using random numbers from a probability point of view, and thus high-speed designation and displaying is obtained. Moreover, by changing the range of random numbers to be generated and so on, it is possible to change the deviation of the colour and brightness of each very small region and hence to change the feeling of quality of a rendered aggregation of very small regions on a display. Other objects and constructions of the invention will be understood from the following description with reference to the accompanying drawings. Fig. 1 is a flowchart for the processing steps of one embodiment of a method of displaying images of this invention; Fig. 2 is a block diagram of one embodiment of an apparatus for displaying images of the invention; Fig. 3 is a diagram to which reference is made in explaining the vectors necessary for computing of brightness; Fig. 4 is a diagram to which reference is made in explaining the vectors necessary for computing of brightness at points on a curve; Fig. 5 is a conceptional diagram for defining a curved surface as a bundle of curves; Fig. 6 is a flowchart for the processing steps of another embodiment of a method of displaying images of this invention; and Fig. 7 shows a female's hair style as an anisotropic reflective model for displaying images according to the embodiments of the invention. One embodiment of this invention will be described with reference to the drawings. This invention can be applied to the display of the general image all or part of which is an aggregation of very small regions. For convenience of explanation, description will be made of the display of a female's hair style as a typical example of the anisotropic reflective model as shown in Fig. 7. Fig. 7 shows a model of a hair style, in which each hair is drawn and gaps are left between the respective hairs for separation of each hair. The gaps between hairs lose the reality of the representation of hair. Thus, in order to realistically display the hair by computer graphics, it is necessary to render the hair without gap. If the gaps between hairs are merely removed, however, the head of hair becomes black over all area like the so-called all-over painting. The respective hairs have differently lustrous and also each bundle of hair has a gloss. However, if the gloss which each bundle of hair has is intended to be represented, the reality cannot be achieved by only painting the hair all over and providing uniform luster over all the area. In practice, when all head of hair is looked at, the tangential component of the reflected light from each hair is a substantially parallel light ray, but the perpendicular component is near diffused reflection, with the result that the hair is perceived as bundles of many lines having luster. It takes a tremendously much long time and is thus impractical to actually simulate this situation by use of the optical theoretical equations. Thus, in this embodiment, the brightness of each hair is changed upon displaying so that the viewer can perceive the hair as bundles of many hairs. Fig. 2 is a block diagram of one embodiment of an image displaying apparatus of the invention. This image displaying apparatus comprises a display 201 for displaying an image, a controller 202 for controlling the display, an input editing unit 203 capable of interactive processing while watching the image on the display 201, a computer processing unit 204 and a data file 205. Fig. 1 is a flowchart for processing steps at the computer processing unit shown in Fig. 2. First, the human head is defined (step 101), the hair style is defined (step 102), and then the color of hair is defined (step 103). The operator specifies at each of these steps as described below. The computer processing unit 204 computes the brightness of each hair, or each unit of very small region (step 104), and then computes the brightness of each picture element or pixel constituting very small regions (step 105). Finally, the generated image is displayed on the display 201 (step 106). The definition of the head at step 101 can be made by various different methods. In this embodiment, a polygonal model is generated on the basis of data of shape of human head which is designated from a three-dimensional digitizer, and this model is defined as a surface model of head. The definition of the hair (hair style) at step 102 in this embodiment is made by designating each hair as a curve model and defining the hair style as an aggregation of the curve models. In other words, the definition of hair style is nothing but the control of the aggregation of curves, or the bundle of curves. For example, a vector field is designated at each point of the head on which the hair is depicted, and each curve is generated as a locus of a parabola having the initial velocity at that point. Interference check is made for the curves not to enter into the head as a matter of course, and the loci of the curves are corrected. The curves and the method of generating the curves are not limited to the two-dimensional parabola, but of course may be other curves and other methods of generating the curves. The parameter of the longitudinal direction of each curve is denoted by "u", and the index of each curve by "v", for representing each curve. If, now, the two-dimensional region is indicated by "Ω", the three-dimensional space denoted by "R 3 ", and a mapping f defined by "Ω → R 3 ", then f(u, v) ∈ R 3 is satisfied for (u, v) ∈ Ω. Here, if the actual value functions f 1 (u, v), f 2 (u, v), f 3 (u, v) on Ω are used to express the function f(u, v) as f(u, v) = (f 1 (u, v), f 2 (u, v), f 3 (u, v)), each curve can be expressed as F v (u) = (f 1 (u, v), f 2 (u, v), f 3 (u, v)) by fixing each index v in the mapping f(u, v). Thus, the bundle of curves is expressed by {F v } v In this embodiment, each curve F v defined as above is displayed with different brightness. Thus, at step 103, the color of each hair (curve) is defined. Generally, the brightness I P at a point P on a certain object is defined as the sum of an ambient light component Ia, a diffused light component Id and a directly reflected light component Is: I P = Ia + Id + Is If the brightness is expressed by primary colors of red(R), green(G) and blue(B), each term on both sides of Eq. (1) for expressing a curve is allotted with an actual value for each component of R, G, B. In other words, each term of Eq. (3) can be expressed by a three-dimensional vector. The diffused light component Id, as shown in Fig. 3, is determined as the function of the orientation (specified by unit vector L) of a light source 301 as viewed from a certain point P on the object surface, and of the orientation of a normal vector N at the point P. In other words, the following equation can be satisfied: Id = hp (L, N, ...) Moreover, the directly reflected light Is is determined as the function of operator's eye direction vector e in addition to the orientation (unit vector L) of the light source and the orientation of the normal vector N. That is, Is = gp (e, L, N, ...) For example, the model of Phong is given as hp (L, N. ...) = Mp x ip x (L, N) Mp: the color of the object at point P ip: the color of a particular light source for illuminating the object (L, N): scalar product of vectors L and N gp (e, L, N, ...) = wp x ip x (J, e) n wp: the reflection coefficient (scalar) J : the unit vector determined so that the vector N and vector L + J are parallel n : natural number In this embodiment, particularly the function gp is the simplified one of Blinn model for curve representation. As shown in Fig. 4, in the Blinn model, the function gp is determined depending on the unit vector H in the intermediate direction of vector L and vector e, and the unit vector T in the tangential direction of the hair curve model, that is, Is = gp (H, T, ...) The diffused light component Id and the directly reflected light component Is are found from Eqs. (4), (8), and the brightness Ip at the point p is determined by adding the sum of these and the ambient light component Ia from Eq. (3). The curve model of continuous points and the brightness of each point of one very small region unit in this embodiment are calculated and displayed as one curve. On the other hand, the ambient light component Ia in Eq. (3) is determined only by the color of the object and the color of uniformly diffused light. It takes a long time to designate this for each curve and thus it is impractical to represent the bundle of several hundreds or several thousands of curves. Thus, in this embodiment, the ambient light component Ia is calculated from the following equation (9): (Ia)v = ma + σa x (r)v where "r" is the distribution function, for example, random numbers according to a normal distribution, "ma" is the average value, and "σa" is the dispersion. When the average value ma and the dispersion value σa are inputted by the operator, the computer processing unit generates the random number r according to the input. If a bundle of 2000 curves is represented, 2000 (v = 1 to 2000) random numbers are generated, and the random numbers are assigned to the curves, respectively, and the ambient light component (Ia)v in the index v curve is computed from Eq. (9). The brightness Ip to be found is defined within the range of 0.0 ≦ Ip ≦ 1.0 (this condition means that the R, G, B components of Ip are larger than 0 and less than 1). When the components Id, Is, Ia at the respective points of each curve are computed from Eqs. (4), (8) and (9), the brightness Ip at each point can be found from Eq. (3). Then, correction is made as Ip = min (1, max (0, Ip)) This means that the R, G, B components are corrected as in Eq. (10). This brightness computation is processed for each picture element of an image to be generated, as follows. At each pixel, the area ratio at which the curve model occcupies the pixel is determined and denoted by Δp. Then, the color Ipx 1 of each pixel is found from the following equation (12) for the brightness Ip determined by Eq. (3): In this equation, the sum on the right side is for all points p on the bundle of curves projected on this pixel. The color Ipxn for each pixel is calculated from Eq. (12), and displayed, so that the hair can be represented by a bundle of many curves and thus displayed as a realistic image. In the above embodiment, particularly the ambient light component Ia of each curve is found on the basis of the random numbers from Eq. (9), or the ambient light component Ia of each curve is determined from a probability point of view without specifying each component Ia by the operator. Thus, since the color of each curve constituting a bundle of curves is changed delicately (in this embodiment, since the brightness is expressed by three primary colors, R, G, B, the color is changed by the change of the brightness), the feeling of quality such as gloss is displayed. However, by changing the brightness (color) of the directly reflected light component Is from a probability point of view, not by the ambient light component, it is possible to achieve the same effect. Moreover, while in this embodiment the random numbers according to a distribution function are used, the brightness (color) of each curve may be changed by use of uniform random numbers. When the feeling of quality of bundles of curves is desired to change, the deviation of the brightness of each curve of bundles of curves is changed. This deviation can be changed by changing the dispersion value σ as far as the random numbers according to a distribution function are concerned. Also, when uniform random numbers are used, the deviation can be changed by the fact that, for example, 2000 random numbers are generated within the range of 0 to 2000 or within the range of 0 to 10000. Another embodiment of the invention will be described. This embodiment is for the hair line finishing in the mechanical system CAD. In this embodiment, it is also assumed that curves are given in the form of Eqs. (1), (2) as in the first embodiment. Also, as shown in Fig. 5, each curve F v is assumed to extend in the hair line direction. While in the first embodiment random numbers are used for the computation of ambient light component Ia, in this embodiment a random number row {rv} is used for the computation of directly reflected light Is. The computation procedure is shown in Fig. 6. Since the processing in this embodiment is local, the description is limited to one curved surface patch as shown in Fig. 5, but this embodiment can be similarly applied to the general curved surface. In this embodiment, first the representation of bundles of curves of the curved surface (Eqs. (1) and (2) is given (step 601)). Then, the average value m and dispersion σ of the random number row to be generated are specified (step 602), and the ambient light component Ia is specified (step 603). The ambient light component Ia, in this embodiment, is inputted under the assumption that it is constant over all the curved surface. At step 604, the brightness I p is calculated from the following equation: I p = Ia + Is * In this embodiment, the computation time is reduced by omitting the diffused light component Id (even in Eq. (3) in the first embodiment, the diffused light component Id may be omitted). Here, the directly reflected light component Is is found from Eq. (8), and this value Is, the average value m and dispersion σ at step 602, and the random number row {rv} are used for the calculation of Is* which is the addition of fluctuation due to random numbers to the directly reflected light component Is, from the following equation: Is* = Is x (m + σ x rv) The brightness I p thus obtained is used for the calculation of the brightness of each pixel (step 605), and each pixel is displayed (step 606). In this embodiment, the ambient light is uniform at each point on the curved surface. Thus, the anisotropic situation around the directly reflected light is emphatically depicted. This invention is also effective for the displaying of the result of the numerical analysis. So far, an image of a set of arrow vectors is displayed in the form of discrete streamline vector field. This is satisfactory for observing the outline, but the result of computation is not precisely displayed. Thus, for example, the result of the analysis of a fluid is represented as a streamline bundle, and the brightness of each streamline is calculated and displayed as in the above described embodiment, so that the result of numerical analysis can be displayed precisely as streamlines. In this case, as in the first embodiment, the ambient light component Ia is controlled by random number row, thereby enabling the relation between the respective streamlines to be precisely displayed. The computation of the directly reflected light Is may be omitted because it has no physical meaning when streamlines are displayed. However, where the curvature is suddenly changed, the hightlighting light (directly reflected light) becomes intense. Thus, when such area is desired to know, it is effective to display images considering the directly reflected light component Is. Although in the above embodiment, the ambient light component is computed from Ia = m + σ x r, this shows that the ambient light Ia is randomly changed around the value m. This invention is not limited to this equation, but may be applied to the case in which at least one of the ambient light component and the directly reflected light component is randomly changed in each very small region. For example, the brightness may be computed from the function Y which randomly changes with the index v of (I p ) v = Y(v) as a parameter. In this case, it is necessary for the operator to specify the function Y itself. Also, the function of (I p )v = Y(s(a), v) can be used for the computation of the brightness I p by designating a reference value of the variable s(a) (this is generally a vector value) by the operator and by determining the value of the variable s(a) random around this reference value by the computer. In the above embodiment, the average value m and the dispersion σ correspond to this reference value. According to this invention, when an image of an aggregation of very small regions is displayed, the brightness and color of each very small region can be simply and easily changed, thus enabling the image of the aggregation of very small regions to be displayed realistically and at high speed. Moreover, since the deviation of random umbers used can be changed, the operator can select the degree of the feeling of quality such as gloss upon displaying.

Claims: An image displaying method for generating and displaying all or part of a three-dimensional object as an aggregation of three-dimensional parts of said object using random numbers, comprising the steps of computing (104, 105) a brightness Ip for each point of a three-dimensional part as at least the sum of an ambient light component Ia and a directly reflected light component Is and displaying (106) the computed brightness Ip at each point of each three-dimensional part as the three-dimensional object, characterised in that said step of computing the brightness Ip includes the steps of assigning (103) a random number sequence {r v } v to each of the three-dimensional parts and computing (103) at least one of said ambient light component Ia (Ia v = m a + σ a *r v ) and said directly reflected light components Is by applying the random number sequence to at least one of the ambient light components Ia and the directly reflected light component Is. A method according to claim 1, characterised in that in said step (103, 604) of computing the brightness Ip said brightness Ip is computed on the basis of said directly reflected light components Is and said ambient light components Ia obtained by the following equations Ia = m + σ*r or Is = m + σ *r where r is a random number of the random number sequence, m is an average value of the random number sequence and σ is a dispersion value. A method according to claim 2, characterised in that a characteristic of the three-dimensional parts is changed by varying the dispersion σ. A method according to claim 1, characterised in that in said step of assigning a random number sequence said random number sequence is calculated by a random function (103, 602) indicated by an operator. An image displaying apparatus for generating a three-dimensional object as an aggregation of three-dimensional parts of the object as all or part of an image and displaying said three-dimensional object on a display, comprising means (204) for computing a brightness Ip at each point of each three-dimensional part as at least the sum of an ambient light component Ia and a directly reflected light component Is and means (201) for displaying the computed brightness Ip of the three-dimensional parts as the three-dimensional object, characterised in that said means for computing the brightness Ip comprises means (103) for generating a random number sequence assigned to each of the three-dimensional parts and means (103) for computing (Ia v = m a + σ a *r v ) at least one of said ambient light components Ia and said directly reflected light components Is by applying the random number sequence to at least one of the ambient light components Ia and the directly reflected light components Is. An apparatus according to claim 5, characterised by further provision of means for computing the brightness Ip of each very small region from the following equation Ia = m + σ*r or Is = m + σ*r where said random numbers are those according to a distribution function and the average value and dispersion value of said random row (r) are repectively denoted by m and σ. An apparatus according to claim 6, characterised by further provision of means (204) for specifying (604) said average value m and said dispersion value σ, wherein said random number generation means (204) generates (604) the random numbers on the basis of said specified average m and said dispersion σ.

Inventors: ANJYO KENICHI, KURIHARA TSUNEYA, TAKEUCHI RYOZO, ANJYO, KENICHI, KURIHARA, TSUNEYA, TAKEUCHI, RYOZO
Applicants: HITACHI LTD, HITACHI, LTD.
Application year: 1990
Main classification: G06T15
IPC codes: G06T15