The present disclosure relates to a structural color drawing device, a structural color drawing system, a structural color drawing method and a structural color drawing program.
There has been proposed a method that realizes real-time structural color rendering by expressing structural color occurring due to an optical phenomenon caused by microscopic structure smaller than or equal to the wavelength of light by texture expression by using computer graphics (CG) (see Non-patent References 1 and 2, for example). In the method proposed by the Non-patent References 1 and 2, the surface of an object is regarded as a diffraction grating having uneven structure and the structural color rendering is performed based on optical path differences calculated from an incidence angle and a reflection angle of light.
Non-patent Reference 1: Masahiko Saeki and four others, “Rendering of Structural Color Using Texture Expression of Optical Path differences”, IPSJ SIG Technical Report, pages 85-90, Nov. 19, 2005.
Non-patent Reference 2: Masahiko Saeki, Master's Thesis, “Generic Rendering Method of Structural Color Objects”, Nara Institute of Science and Technology, Graduate School of Information Science, Information Processing Department, NAIST-IS-MT0451061, Feb. 2, 2006.
However, on a processing surface or the like of an actual object, repeated uneven structure is not uniform and there is variation in the height of a convex part, and thus the optical path difference is dependent not only on the incidence angle and the reflection angle of light but also on other information. Therefore, the conventional method has a problem in that the accuracy of reproduction of the structural color (i.e., drawing of the structural color) by the structural color rendering is low.
An object of the present disclosure is to increase the accuracy of the drawing of the structural color on the surface of an object.
A structural color drawing device in the present disclosure is a device that reproduces structural color of an object. The structural color drawing device includes processing circuitry to acquire surface information, including height differences of a plurality of peaks in uneven structure on a surface of the object and interval distances between adjacent peaks among the plurality of peaks, from a captured image obtained by a camera or measurement information obtained by a measuring instrument; to map the surface information on a drawing object corresponding to the object; to calculate an optical path difference at each position on the drawing object by using the mapped surface information and to output optical path difference calculation values; to import a reference table storing values of a second term of a calculation formula of a stimulus value in an XYZ color model having a first term independent of the optical path difference and the second term dependent on the optical path difference while associating the values with the optical path differences; to acquire values corresponding to the optical path difference calculation values from the imported reference table and to calculate three stimulus values in the XYZ color model by using the calculation formula and the values; and to convert the three stimulus values to RGB values.
A structural color drawing method in the present disclosure is a method to be executed by a structural color drawing device that reproduces structural color of an object. The structural color drawing method includes acquiring surface information, including height differences of a plurality of peaks in uneven structure on a surface of the object and interval distances between adjacent peaks among the plurality of peaks, from a captured image obtained by a camera or measurement information obtained by a measuring instrument, mapping the surface information on a drawing object corresponding to the object, calculating an optical path difference at each position on the drawing object by using the mapped surface information and outputting optical path difference calculation values, importing a reference table storing values of a second term of a calculation formula of a stimulus value in an XYZ color model having a first term independent of the optical path difference and the second term dependent on the optical path difference while associating the values with the optical path differences, acquiring values corresponding to the optical path difference calculation values from the imported reference table and calculating three stimulus values in the XYZ color model by using the calculation formula and the values, and converting the three stimulus values to RGB values.
According to the present disclosure, the accuracy of the drawing of the structural color on the surface of an object can be increased.
The present invention will become more fully understood from the detailed description given hereinbelow and the accompanying drawings which are given by way of illustration only, and thus are not limitative of the present invention, and wherein:
A structural color drawing device, a structural color drawing system, a structural color drawing method and a structural color drawing program according to an embodiment will be described below with reference to the drawings. The following embodiment is just an example and appropriate modifications are possible within the scope of the present disclosure.
A structural color drawing system according to the embodiment includes an input device (e.g., camera, measuring instrument or the like) as a device for photographing microscopic structure (or structural color caused by the microscopic structure) on a surface of an object such as a processing surface of the object, a structural color drawing device that generates a reproduction image, expressing the structural color based on a camera image or measurement information by texture expression, by means of real-time structural color rendering by using CG, and a display device that displays the reproduction image.
The structural color drawing device according to the embodiment is, for example, a computer that executes a structural color drawing program. The structural color drawing device is a device that reproduces an image of a rainbow pattern caused by the uneven structure (i.e., reflective diffraction grating) on the surface of the object by using CG.
A structural color drawing method according to the embodiment is a method to be executed by a computer, for example. The structural color drawing is referred to also as structural color rendering or texture mapping.
First, a structural color drawing method in a comparative example will be described below. In the comparative example, a description will be given of a case where the height of the peak of a convex part in the uneven structure on the surface of the object is uniform. In general, the following expressions (1) to (3) are used for calculating color information:
Here, λ represents the wavelength of light and R(λ) represents spectral distribution of a light source. Further, x(λ), y(λ) and z(λ) represent color matching functions in the XYZ color model. I(λ) represents intensity of an interference wave, which is calculated according to the following expression (4). The values 380 nm and 780 nm represent a wavelength range of a definite integral.
In the expression (4), A (i.e., Ai, Aj) represents amplitude. The character n represents the number (i.e., integer greater than or equal to 2) of interfering waves, i represents an integer from 1 to n, and j represents an integer from i+1 to n. Further, each of Δi and Δj represents an optical path difference. Furthermore, a conversion formula between the three stimulus values (X, Y, Z) in the XYZ color model and the (R, G, B) values in the RGB color model is generally represented by the following expression (5). The expression (5) is shown in the Non-patent Reference 1, for example.
In
Here, Δin represents the optical path difference between the two incident rays represented by the incident ray vectors L1 and L2, and Δout represents the optical path difference between the two reflected rays represented by the reflected ray vectors E1 and E2. In the expression (7), (L1·T) represents the inner product of the incident ray vector L1 and the tangent vector T, and (E1·T) represents the inner product of the reflected ray vector E1 and the tangent vector T. By totalizing the optical path difference in the incident light and the optical path difference in the reflected light, the total optical path difference (δ1−δ2) between the ray #1 and the ray #2 can be obtained.
As shown in
In the example of
In general, in order to represent a model in which the optical path difference is dependent on a variable other than the incidence angle and the reflection angle (e.g., processing surface of an object that has been cut) by structural colors that develop, it is necessary to calculate the stimulus value X in the XYZ color model by using the following expression (10). Here, K represents a proportionality coefficient.
By substituting the intensity I(Δ) of the interference wave represented by the expression (4) into the expression (10), the following expression (11) is obtained. Further, the optical path differences in the expression (11) are represented by expressions (12) and (13).
Also for the stimulus values Y and Z in the XYZ color model, calculation is executed similarly to the above-described calculation for the stimulus value X. Further, with the increase in the number of interfering waves, the number of integral calculations also increases. Since the number of calculations in the second term on the right side of the expression (11) is large, it is unrealistic to execute these calculations during simulation. While the first term of the calculation formula for calculating the color is independent of the optical path difference, the second term is dependent on the optical path difference. That is, only the second term on the right side of the expression (11) is dependent on the optical path differences Δi and Δj. Therefore, in regard to the following part in the second term on the right side, a conversion table (referred to also as a “reference table”) regarding all combinations of the optical path differences Δi and Δj (i.e., all combinations of i=1, 2, . . . , n and j=2, . . . , n+1) is previously prepared and stored in the storage device as the color storage table (21 in
In other words, the expressions (12) and (13) are calculated in regard to all combinations of the optical path differences Δi and Δj, namely, all combinations of all optical path differences Δi from Δimin to Δimax and all optical path differences Δj from Δjmin to Δjmax, and the results of the calculation are stored as the color storage table.
In the preparation of the color storage table, influence of the height of the resolution on the RGB values has to be taken into consideration. Therefore, XYZ values not influencing integer parts of the RGB values will be considered below as a step. As explained earlier, the RGB values are calculated by using the expression (5).
In cases where values are rounded off to the nearest integers in the derivation of the RGB values, the integer parts of the RGB values are not influenced if a combination of X, Y and Z satisfying the following inequalities (14), (15) and (16) is selected.
However, in cases where digits after the decimal point are ignored in the derivation of the RGB values, “0.5” on the right sides of the expressions (14) to (16) is replaced with “1”. That is, in order to eliminate the influence of the height of the resolution on the RGB values, XYZ differences calculated from the optical path differences Δs+1, Δs, Δt+1, Δt, Δu+1 and Au at a certain resolution need to satisfy all of the aforementioned expressions (14) to (16).
The resolutions ΔX=Δs+1−Δs, ΔY=Δt+1−Δt and ΔZ=Δu+1−Δu of X, Y and Z are set arbitrarily, and are calculated from the minimum optical path difference Δmin to Δmax according to the following expressions (17) to (19). Incidentally, n represents the number of interfering waves.
When one or more of the following expressions (20) to (22) regarding ΔX, ΔY and ΔZ are not satisfied, the resolutions of X, Y and Z are lowered and the calculation is executed again. When all of the expressions (20) to (22) regarding ΔX, ΔY and ΔZ are satisfied, the height of the resolution has no influence on the RGB values, and thus the values of the resolutions of X, Y and Z at that time point can be used.
The information mapping unit 12 maps the surface information acquired by the surface information acquisition unit 11 on a drawing object corresponding to the object.
The import unit 13 imports the reference table storing values of the second term of the expression (11), as the calculation formula of the stimulus value in the XYZ color model having the first term independent of the optical path difference and the second term dependent on the optical path difference, while associating the values with the optical path differences (Δimin−Δimax, Δjmin−Δjmax) (step S3).
The optical path difference calculation unit 14 calculates the optical path differences Δi and Δj at each position on the drawing object according to the aforementioned expressions (12) and (13) by using the mapped surface information and outputs optical path difference calculation values (step S4).
The stimulus value calculation unit 15 acquires values corresponding to the optical path difference calculation values from the imported reference table and calculates the three stimulus values in the XYZ color model by using the expression (11) as the calculation formula and the values of the second term on the right side of the expression (11) (step S5).
The RGB conversion unit 16 converts the three stimulus values to the RGB values by using the aforementioned expression (5) (step S6). The output unit 17 outputs the RGB values to the display device 30 (step S7).
The functions of the structural color drawing device 10 may be implemented by a processing circuit. The processing circuit can be either dedicated hardware or the processor 101 that executes the structural color drawing program stored in the memory 102. The processor 101 can be any one of a processing device, an arithmetic device, a microprocessor, a microcomputer and a DSP (Digital Signal Processor).
In the case where the processing circuit is dedicated hardware, the processing circuit is an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or the like, for example.
Incidentally, it is also possible to implement part of the structural color drawing device 10 by dedicated hardware and other part by software or firmware. As above, the processing circuit is capable of implementing the above-described functions by hardware, software, firmware or a combination of some of these means.
According to the embodiment, by utilizing roughness (height) and interval distance information at each position for the calculation of the optical path difference at each position, the calculation of the color values is made possible and the structural color can be drawn.
Further, the term dependent on the optical path difference in the color value calculation formula is tabularized into the reference table, by which the color value calculation is made realistic and real-time displaying of the structural color is made possible.
Further, in the preparation of the reference table, the influence of the height of the resolution on the calculated RGB values can be eliminated.
1: structural color drawing system, 10: structural color drawing device, 11: surface information acquisition unit, 12: information mapping unit, 14: optical path difference calculation unit, 13: import unit, 15: stimulus value calculation unit, 16: RGB conversion unit, 17: output unit, 20: input device, 30: display device.
This application is a continuation application of International Application No. PCT/JP2022/016734 having an international filing date of Mar. 31, 2022.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP2022/016734 | Mar 2022 | WO |
Child | 18812586 | US |