IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND STORAGE MEDIUM

Information

  • Patent Application
  • 20180247393
  • Publication Number
    20180247393
  • Date Filed
    February 14, 2018
    6 years ago
  • Date Published
    August 30, 2018
    6 years ago
Abstract
An apparatus includes a first acquisition unit configured to, with a viewpoint set to a position of an object, acquire a plurality of environment maps for each position of light sources, the environment maps being obtained by imaging a surrounding environment from the viewpoint, a second acquisition unit configured to acquire a plurality of captured images for each position of the light sources, the captured images being obtained by imaging from a plurality of directions the object irradiated with light by the light sources, and a determination unit configured to determine reflection characteristics of the object based on the environment maps and the plurality of captured images.
Description
BACKGROUND OF THE INVENTION
Field of the Invention

The aspect of the embodiments relates to an image processing technique of estimating reflection characteristics of a real object.


Description of the Related Art

A conventional method of estimating surface attributes such as reflection characteristics of a real object is known to measure the Bidirectional Reflectance Distribution Function (BRDF) of the real object by using a goniophotometer.


Japanese Patent Application Laid-Open No. 2003-203220 discusses a technique of estimating the BRDF of a real object by performing a deconvolution operation, based on the luminance distribution of illumination light, on luminance changes in captured images of the real object irradiated with the illumination light from light sources having a two-dimensionally spread luminance distribution.


Japanese Patent Application Laid-Open No. 2005-259009 discusses a technique of estimating, by using Wiener estimation, the BRDF of a real object by generating an estimation matrix for estimating the BRDF of the real object based on pixel value vectors in consideration of the illumination light distribution at the time of measurement.


However, the techniques discussed in Japanese Patent Application Laid-Open No. 2003-203220 and Japanese Patent Application Laid-Open No. 2005-259009 have not taken external light other than illumination light and ambient light into consideration in the reflection characteristic estimation of a real object. More specifically, the technique discussed in Japanese Patent Application Laid-Open No. 2003-203220 represents the luminance distribution of illumination light by using a function of angular deviation from the light source center direction. The technique discussed in Japanese Patent Application Laid-Open No. 2005-259009 takes into consideration the illumination light distribution at the time of measurement by considering that light from a plurality of adjacent point light sources configuring a light source surface has different incident angles. Therefore, there has been a situation that the measurement accuracy of the BRDF degrades in an environment where measurement is affected by external light and reflected light from surrounding frames. More specifically, in measurement with the conventional technique, it has been necessary to provide restrictions on the measurement environment to eliminate the influence of external light and indirect light. Examples of restrictions include measurement in a darkroom and the use of black-painted frames for restricting reflected light.


In the conventional technique, there has been an assumption for simplicity that illumination light from light sources is parallelly radiated to all points on a real object. Therefore, if there are no actual light sources at an infinite point, an error has occurred in the BRDF measurement. Particularly in a case of a three-dimensional real object, the magnitude of an error increases as size of the real object increases relative to the distance to the light sources. Although a certain method repeats light irradiation and imaging while controlling the lighting direction or the viewing direction for each point on the three-dimensional real object so as to reduce error, the method has not been practical since an enormous amount of time is required.


SUMMARY OF THE INVENTION

According to an aspect of the embodiments, an apparatus includes a first acquisition unit configured to, with a viewpoint set to a position of an object, acquire a plurality of environment maps for each position of light sources, the environment maps being obtained by imaging a surrounding environment from the viewpoint, a second acquisition unit configured to acquire a plurality of captured images for each position of the light sources, the captured images being obtained by imaging from a plurality of directions the object irradiated with light by the light sources, and a determination unit configured to determine reflection characteristics of the object based on the environment maps and the plurality of captured images.


Further features of the disclosure will become apparent from the following description of exemplary embodiments with reference to the attached drawings.





BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is a block diagram illustrating an example of a configuration of an image processing apparatus.



FIGS. 2A, 2B, and 2C are conceptual views illustrating examples of configurations of an image input device.



FIGS. 3A and 3B are conceptual views illustrating an example of processing for acquiring environment map information and captured image information.



FIGS. 4A and 4B illustrates a relation between environment map information and captured image information and an example of segmentation solid angles.



FIG. 5 is a flowchart illustrating estimation processing of reflection characteristics of a real object.



FIGS. 6A, 6B, and 6C illustrate an example of automatically determining segmentation solid angles based on the environment map information.



FIGS. 7A and 7B are conceptual views illustrating relations between environment map information and captured image information.



FIG. 8 is a conceptual view illustrating an example of generating virtual environment map information.



FIGS. 9A and 9B illustrate examples of three-dimensional optimal arrangements of a plurality of pieces of environment map information.



FIG. 10 is a flowchart illustrating estimation processing of reflection characteristics of a three-dimensional real object.



FIGS. 11A and 11B are conceptual views illustrating an example of generating a shadowing map.



FIGS. 12A and 12B are conceptual views illustrating a relation between a normal vector and a virtual environment map.



FIGS. 13A, 13B, and 13C are conceptual views illustrating a relation among a normal vector and a virtual environment map, and a shadowing map.



FIGS. 14A, 14B, and 14C are conceptual views illustrating virtual environment maps and virtual line-of-sight maps in consideration of a shadowing map.



FIG. 15 illustrates an example of generating a virtual line-of-sight map.



FIG. 16A and 16B illustrate an example of generating a virtual line-of-sight map.



FIGS. 17A, 17B, and 17C are conceptual views illustrating virtual environment maps and virtual line-of-sight maps in consideration of a shadowing map.



FIG. 18 illustrates a relation between the global coordinate system and the UVW coordinate system.



FIG. 19 is a flowchart illustrating estimation processing of reflection characteristics of a three-dimensional real object.



FIGS. 20A, 20B, and 20C illustrates examples of methods of determining segmentation solid angles in consideration of shadowing.



FIG. 21 is a flowchart illustrating estimation processing of reflection characteristics of a three-dimensional real object in consideration of shadowing.





DESCRIPTION OF THE EMBODIMENTS

Exemplary embodiments of the disclosure will be described in detail below with reference to the accompanying drawings. The following exemplary embodiments in this disclosure are to be considered as illustrative examples, and may be corrected, modified, and combined as required depending on the configuration of an apparatus for which the disclosure is used and other various conditions. The disclosure is not limited to the following exemplary embodiments. Not all of the combinations of the features described in the exemplary embodiments are indispensable to the solutions for the disclosure. In the following descriptions, identical configurations or identical pieces of processing are assigned the same reference numerals.


(Configuration of Image Processing Apparatus)


FIG. 1 is a block diagram illustrating an example of a configuration of an image processing apparatus according to the first exemplary embodiment.


The image processing apparatus includes a central processing unit (CPU) 1, a main memory 2, a Serial AT Attachment (SATA) interface (I/F) 3, a network I/F 4, a hard disk drive (HDD) 5, a graphics accelerator 6, a monitor 7, a serial bus I/F 8, a printer 9, and a serial bus 10. The image processing apparatus further includes a keyboard 11, a mouse 12, an image input device 13, and a system bus 14.


The main memory 2 includes a random access memory (RAM) and a read only memory (ROM). The CPU 1 executes an operating system (OS) and various programs stored in the ROM of the main memory 2 and the hard disk drive (HDD) 5, by using the RAM of the main memory 2 as a work memory. Then, the CPU 1 controls each configuration via the system bus 14 such as a Peripheral Component Interconnect (PCI) bus. The CPU 1 further executes various programs including image processing (described below).


The CPU 1 accesses the HDD 5 via the system bus 14 and the SATA I/F 3 and accesses a network 15 such as a local area network (LAN) via the network I/F 4.


The CPU 1 communicates with the serial bus I/F 8, a Universal Serial Bus (USB), and devices connected to the serial bus 10 of an Institute of Electrical and Electronics Engineers (IEEE) 1394 standard. The CPU 1 acquires image data and three-dimensional (3D) data subjected to image processing from the image input device 13 including a card reader and outputs image data and 3D data including control parameters (described below) to the printer 9, for example, to print an image and shape a 3D object, which is specified by the user. The CPU 1 may read image data and 3D data subjected to image processing from the HDD 5 or a server on the network 15.


The CPU 1 displays a user interface for processing (described below) and a processing result on the monitor 7 via the graphics accelerator 6, and inputs an instruction from the user via the keyboard 11 and the mouse 12 connected to the serial bus 10.


Although, in the present exemplary embodiment, each piece of the following image processing will be described below on the premise that functions are implemented as software programs, a part or all of functions included in the function block may be configured by hardware. When functions are implemented by hardware, for example, a dedicated circuit on a Field Programmable Gate Array (FPGA) by using a predetermined compiler based on a program for implementing each step is automatically generated. Similar to a FPGA, a Gate Array circuit may be formed to implement functions as hardware. Further, functions may be implemented by an Application Specific Integrated Circuit (ASIC).


(Configuration of Image Input Device)


FIGS. 2A, 2B, and 2C are conceptual views illustrating examples of configurations of the image input device 13 according to the present exemplary embodiment.


As illustrated in FIG. 2A, the image input device 13 includes, for example, a light source 22 for irradiating a real object 21 with illumination light, and a digital camera 23 for imaging the real object 21 irradiated with illumination light by the light source 22.


The light source 22 can irradiate the real object from an arbitrary angle. The lighting direction is defined by (θi, φi). The digital camera 23 can image the real object 21 from an arbitrary angle. The viewing direction is defined by (θo, φo). In (θ, φ), θ denotes the polar angle with respect to a surface normal (n), and φ denotes the azimuth angle with respect to a reference direction (t) with a point X on the real object 21 set as the origin. The light source 22 and the digital camera 23 do not need to be limited to one in number, i.e., a plurality of light sources or a plurality of digital cameras may be used at the same time.



FIG. 2B illustrates an example of a configuration of the image input device 13 in which a plurality of the light sources 22 having different lighting directions is arranged on a light source semicircular arc arm 24, and a plurality of the digital cameras 23 having different viewing directions is arranged on an imaging semicircular arc arm 25. Since the light source semicircular arc arm 24 and the imaging semicircular arc arm 25 can be independently rotated in azimuth angle directions around the point X on the real object 21, the real object 21 irradiated with illumination light from different directions can be simultaneously imaged from a plurality of directions. In addition, the real object 21 may be rotated by using a turntable together.



FIG. 2C illustrates an example of a configuration in which a plurality of the light sources 22 and a plurality of the digital cameras 23 are arranged on a geodesic dome 26. The shape of the geodesic dome 26 is not limited to a hemisphere and may be a sphere. In this configuration, since it is not necessary to rotate the light source semicircular arc arm 24 and the imaging semicircular arc arm 25 or rotate the real object 21 on the turntable, the imaging time can be further shortened.


(Operation Overview)

The following describes operations of the image processing apparatus according to the present exemplary embodiment.


The image processing apparatus first acquires information about captured images (captured image information) of the real object 21 and environment map information via the image input device 13, and supplies these pieces of information to the CPU 1. The image processing apparatus also estimates the reflection characteristics of the real object 21 through processing by the CPU 1.


(Acquiring Environment Map Information)


FIG. 3A is a conceptual view illustrating an example of processing for acquiring the environment map information according to the present exemplary embodiment.


The image input device 13 is capable of imaging the real object 21 irradiated with light from the light source, from an arbitrary angle while changing the pattern of the light source (hereinafter referred to as a “light source pattern”) including direct light for irradiating the real object 21 and indirect light.


To associate the light source pattern including direct light and indirect light with the captured image information for the real object 21 irradiated with the light source, the image input device 13 acquires the light source pattern including direct light and indirect light as the environment map information, and supplies the information to the CPU 1. The image input device 13 acquires the environment map information for each of a plurality of light source patterns. More specifically, the image input device 13 acquires a plurality of pieces of environment map information for a plurality of light source patterns.


For example, as illustrated in FIG. 3A, the environment map information can be acquired by using an omnidirectional camera 31. More specifically, the image input device 13 acquires a light source pattern by extensively imaging the surrounding environment from a viewpoint on the real object 21. Alternatively, the environment map information can also be acquired by using a camera with a fish-eye lens or a mirror ball instead of the omnidirectional camera 31. The environment map information is a spherical or hemispherical light source pattern, and a viewpoint of the environment map information coincides with the point X on the real object 21.


A High Dynamic Range (HDR) camera with a high dynamic range is used as the omnidirectional camera 31 and the digital camera 23.


(Environment Map Information and Captured Image Information)


FIG. 3B is a conceptual view illustrating an example of processing for acquiring the captured image information according to the present exemplary embodiment. FIG. 3B illustrates a captured image 40 of the real object 21 irradiated with the light source pattern. Each time an illumination condition of the light source pattern including direct light by the light source 22 and indirect light changes, the image input device 13 acquires the captured image 40 of the real object 21 by using the digital camera 23.


More specifically, for each of a plurality of light source patterns, the image input device 13 acquires image information by imaging the real object 21 irradiated with the light source 22 from a plurality of viewing directions.



FIGS. 4A and 4B are conceptual views illustrating a relation between the environment map information (environment maps) and the captured image information, and an example of segmentation solid angles according to the present exemplary embodiment.



FIG. 4A illustrates a relationship between the environment map information (environment maps 41 to 49) acquired by using the omnidirectional camera 31 for light source patterns in 9 different lighting directions and images 411 to 499 of the real object 21 captured from 9 different viewing directions for each light source pattern. The number of lighting directions and the number of viewing directions do not need to be limited to 9. When Ni denotes the number of light source patterns and Nv denotes the number of viewing directions, the number of environment maps is Ni and the total number of captured images is given by Ni*Nv. In this case, the environment maps are omnidirectional images and are represented, for example, in the equirectangular projection format with a vertical axis θi (polar angle) and a horizontal axis φi (azimuth angle). The captured image information is represented by a horizontal axis xv [pixel] and a vertical axis yv [pixel]. If the optical axis of the digital camera 23 coincides with the point X on the real object 21, the center pixel of the captured image information is represented by (θo, φo).


(Estimating Reflection Characteristics of Real Object)

The CPU 1 of the image processing apparatus estimates the reflection characteristics of the real object based on the environment map information and the captured image information. Estimating the reflection characteristics is also referred to as determining the reflection characteristics.


Generally, the bidirectional reflectance distribution function BRDF is defined by the formula (1).











f
r



(

x
,

ω
i

,

ω
r


)


=



d







L
o



(

x
,

ω
r


)




d







E
i



(

x
,

ω
i


)




=


d







L
o



(

x
,

ω
r


)






L
i



(

x
,

ω
i


)



cos






(

θ
i

)


d






ω
i








(
1
)







Here, fr denotes BRDF [1/sr], Lo denotes the radiation luminance [W/sr/m2] in the viewing direction, Ei denotes the radiation illuminance [W/m2], Li denotes the radiation luminance [W/sr/m2] in the lighting direction, and θi denotes the angle (polar angle) formed between the lighting direction and the surface normal of the real object 21, x denotes the position coordinates of the point X, ωi denotes the lighting direction (solid angle [sr]), and ωr denotes the viewing direction (solid angle [sr]).


Solving the formula (1) for the radiation luminance Lo in the viewing direction rearranges the formula (1) into the rendering formula (2).











L
o



(

x
,

ω
r


)


=



L
e



(

x
,

ω
r


)


+



Ω





L
i



(

x
,

ω
i


)





f
r



(

x
,

ω
i

,

ω
r


)




cos


(

θ
i

)



d






ω
i








(
2
)







Here, Le denotes the radiation luminance [W/sr/m2] of spontaneous light and Ω denotes the sphere (4π) [sr] or hemisphere (2π) [sr] of the entire solid angle.


For simplicity, taking the real object 21 that does not emit spontaneous light, as an example gives the formula (3).











L
o



(

x
,

ω
r


)


=



Ω





L
i



(

x
,

ω
i


)





f
r



(

x
,

ω
i

,

ω
r


)




cos


(

θ
i

)



d






ω
i







(
3
)







When a method of discretizing the formula (3) to segment the light source patterns of direct light radiated from all directions and indirect light into m segmentation solid angles Δωj (j=1 to m) is applied to each of the Ni light source patterns, the simultaneous linear formula (4) is given for the viewing direction k ∈ [1, Nv]. In this case, there is a relation represented by the formula (5) between the omnidirectional solid angle Ω and the segmentation solid angles Δωj (j=1 to m).















L
o



(

x
,
k
,
1

)


=




j
=
1

m





L
i



(

x
,
j
,
1

)





f
r



(

x
,
j
,
k

)




cos


(

θ
j

)



Δ






ω
j











L
o



(

x
,
k
,
2

)


=




j
=
1

m





L
i



(

x
,
j
,
2

)





f
r



(

x
,
j
,
k

)




cos


(

θ
j

)



Δ






ω
j
















L
o



(

x
,
k
,

N
i


)


=




j
=
1

m





L
i



(

x
,
j
,

N
i


)





f
r



(

x
,
j
,
k

)




cos


(

θ
j

)



Δ






ω
j







}




(
4
)










j
=
1

m



Δ






ω
j



=
Ω




(
5
)







When the simultaneous linear formula (4) is to be expressed using a matrix, the formula (4) can be rearranged as the formula (6). When the formula (6) is solved for fr(x, 1, k) to fr(x, m, k) that are m BRDFs, the BRDFs for the m lighting directions (1 to m) and one viewing direction (k ∈ [1, Nv]) can be calculated by the formula (7).













(





L
o



(

x
,
k
,
1

)








L
o



(

x
,
k
,
2

)













L
o



(

x
,
k
,

N
i


)





)

=



(





L
i



(

x
,
1
,
1

)






L
i



(

x
,
2
,
1

)









L
i



(

x
,
m
,
1

)








L
i



(

x
,
1
,
2

)






L
i



(

x
,
2
,
2

)









L
i



(

x
,
m
,
2

)






















L
i



(

x
,
1
,

N
i


)






L
i



(

x
,
2
,

N
i


)









L
i



(

x
,
m
,

N
i


)





)










(






f
r



(

x
,
1
,
k

)




cos


(

θ
1

)



Δ






ω
1









f
r



(

x
,
2
,
k

)




cos


(

θ
2

)



Δ






ω
2














f
r



(

x
,
m
,
k

)




cos


(

θ
m

)



Δ






ω
m





)







=



(






L
i



(

x
,
1
,
1

)




cos


(

θ
1

)




Δω
1







L
i



(

x
,
2
,
1

)




cos


(

θ
2

)




Δω
2










L
i



(

x
,
m
,
1

)




cos


(

θ
m

)




Δω
m









L
i



(

x
,
1
,
2

)




cos


(

θ
1

)




Δω
1







L
i



(

x
,
2
,
2

)




cos


(

θ
2

)




Δω
2










L
i



(

x
,
m
,
2

)




cos


(

θ
m

)




Δω
m























L
i



(

x
,
1
,

N
i


)




cos


(

θ
1

)




Δω
1







L
i



(

x
,
2
,

N
i


)




cos


(

θ
2

)




Δω
2










L
i



(

x
,
m
,

N
i


)




cos


(

θ
m

)




Δω
m





)










(





f
r



(

x
,
1
,
k

)








f
r



(

x
,
2
,
k

)













f
r



(

x
,
m
,
k

)





)







=




(

























A

























)



(





f
r



(

x
,
1
,
k

)








f
r



(

x
,
2
,
k

)













f
r



(

x
,
m
,
k

)





)









(
6
)










(





f
r



(

x
,
1
,
k

)








f
r



(

x
,
2
,
k

)













f
r



(

x
,
m
,
k

)





)

=




(


























A

-
1



























)



(





L
o



(

x
,
k
,
1

)








L
o



(

x
,
k
,
2

)













L
o



(

x
,
k
,

N
i


)





)








=




(






L
i



(

x
,
1
,
1

)




cos


(

θ
1

)




Δω
1







L
i



(

x
,
2
,
1

)




cos


(

θ
2

)




Δω
2










L
i



(

x
,
m
,
1

)




cos


(

θ
m

)




Δω
m









L
i



(

x
,
1
,
2

)




cos


(

θ
1

)




Δω
1







L
i



(

x
,
2
,
2

)




cos


(

θ
2

)




Δω
2










L
i



(

x
,
m
,
2

)




cos


(

θ
m

)




Δω
m























L
i



(

x
,
1
,

N
i


)




cos


(

θ
1

)




Δω
1







L
i



(

x
,
2
,

N
i


)




cos


(

θ
2

)




Δω
2










L
i



(

x
,
m
,

N
i


)




cos


(

θ
m

)




Δω
m





)


-
1











(





L
o



(

x
,
k
,
1

)








L
o



(

x
,
k
,
2

)













L
o



(

x
,
k
,

N
i


)





)








(
7
)







In this way, the reflection characteristics of the real object 21 can be estimated by using a light source matrix (Ni*m) determined based on the number of light source patterns (Ni) for the environment map information and the number of segmentation solid angles (m) formed by segmenting the environment map information, and the imaging information Lo (1 to Ni) of the real object 21 irradiated with respective light source patterns. When Ni=m, a square light source matrix makes it possible to obtain a strict solution of the BRDF by using the inverse matrix of the light source matrix. On the other hand, a non-square light source matrix makes it possible to calculate a pseudo-inverse matrix by using Singular Value Deconfiguration (SVD). When Ni>m, an excessive determination makes it possible to obtain the least square solution of the BRDF. When Ni<m, a recessive determination makes it possible to obtain a minimum norm solution.



FIG. 4B is a conceptual view illustrating an example of segmentation solid angles according to the present exemplary embodiment.


Referring to FIG. 4B, the environment map 41 is segmented into m segmentation solid angles Δωj (j=1 to m). It is not necessary that all of the segmentation solid angles Δωj (j=1 to m) have the same magnitude. Referring to the formula (6), when the environment map 41 corresponds to a rendering formula for the first row of the matrix A, Li(x, 1, 1) corresponds to Li(1) illustrated in FIG. 4B, and likewise, Li(x, m, 1) corresponds to Li(m) illustrated in FIG. 4B. More specifically, Li(x, 1, 1) is equivalent to the radiation luminance of incident light to the point X on the real object 21 from the lighting direction (θ1, φ1) at the segmentation solid angle Δω1. Although, in FIG. 4B, the environment map is represented in the equirectangular projection format, the environment map may be represented in the equisolid angle projection or other formats.


(Operation Details)

The following describes detailed image processing of the image processing apparatus according to the present exemplary embodiment.


The following processing is implemented when the CPU 1 executes an image processing program.


[Estimation Processing of Reflection Characteristics of Real Object]


FIG. 5 is a flowchart illustrating estimation processing of reflection characteristics of the real object 21 according to the present exemplary embodiment. In step S1, the CPU 1 first performs HDR camera calibration processing to calibrate the omnidirectional camera 31 for acquiring the environment map information and the digital camera 23 for acquiring the captured image information. Since direct light from the light source 22 and specularly reflected light from the real object 21 have high luminance, a HDR camera may be used as the omnidirectional camera 31 and the digital camera 23. Pixel values of the captured image information (HDR images) captured by an HDR camera are associated with the radiation luminance [W/sr/m2] (radiant quantity), the luminance [cd/m2], or the tristimulus value XYZ [cd/m2] (photometric quantity) through calibration.


In associating pixel values of HDR images with the radiant quantity and photometric quantity, for example, the technique discussed in “DEBEVEC P. E., MALIK J. ‘Recovering high dynamic range radiance maps from photographs’, In Proc. ACM SIGGRAPH 97 (August 1997), pp. 369-378” can be used. The technique discussed in “Kim, M., Kautz, J. ‘Characterization for high dynamic range imaging’, Eurographics 27(2), pp. 691-697 (2008)” can also be used.


In step S2, the CPU 1 performs environment map information acquisition processing to acquire environment maps for the Ni light source patterns. The environment maps are acquired by performing HDR imaging on the Ni light source patterns by using the omnidirectional camera 31 with a viewpoint set to the position of the point X on the real object 21. Instead of directly acquiring the environment maps, the CPU 1 may read omnidirectional HDR images captured and prestored as files in the HDD 5.


In step S3, the CPU 1 performs segmentation solid angle determination processing to segment each environment map into m segmentation solid angles Δωj (j=1 to m). More specifically, the CPU 1 estimates the reflection characteristics of a real object by segmenting each of a plurality of environment maps into a plurality of solid angles, and determining the lighting direction and light source luminance for each of the plurality of solid angles. There are two different cases of determining a segmentation solid angle allocation method. In one case, the method is predetermined based on the arrangement of light sources. In the other case, the method is automatically determined based on the environment maps for the Ni light source patterns.


In the example illustrated in FIG. 2C, the segmentation solid angles are predetermined based on the arrangement of light sources. The light source 22 is arranged at the center of each triangle (or polygon) on the geodesic dome 26 so that a plurality of the light sources 22 is equally arranged over omnidirection. Although each triangle of the geodesic dome 26 is not strictly equirectangular, the segmentation solid angles can be approximated by segmenting the sphere (4π) or hemisphere (2π) of the entire solid angle by the number of triangles (m), i.e., Δωj=4π/m or 2π/m [sr], respectively. Although the segmentation solid angles can be easily calculated by using the allocation method, correct positioning when installing the light sources 22 is to be performed.



FIGS. 6A, 6B, and 6C illustrate an example of automatically determining segmentation solid angles based on environment maps for the Ni light source patterns. According to the present exemplary embodiment, Ni (=m) segmentation solid angles Δωj (j=1 to Ni) are determined for the Ni light source patterns for simplicity. In each environment map of a light source pattern, the CPU 1 obtains a direction (θi, φi) of a point 50 where the radiation luminance (or luminance) is maximized, and plots Ni points where the radiation luminance (or luminance) is larger than a predetermined value on one omnidirectional image 51, as illustrated in FIG. 6A.


Then, as illustrated in FIG. 6B, the CPU 1 performs region segmentation based on a Voronoi diagram with the Ni points, where the radiation luminance (or luminance) is larger than a predetermined value, set as kernel points. Segmentation regions 52 correspond to segmentation solid angles Δωj (j=1 to Ni). More specifically, the CPU 1 segments an environment map into a plurality of solid angles by performing region segmentation based on a Voronoi diagram with points, where the luminance in the environment map is larger than a predetermined value, set as kernel points. The Voronoi diagram refers to a diagram in which region segmentation is performed. More specifically, for a plurality of points (kernel points) arranged at arbitrary positions in a certain metric space, the region segmentation is performed depending on which kernel point other points in the same metric space are close to.



FIG. 6C three-dimensionally illustrates segmentation solid angles determined on an omnidirectional image composed of a segmentation solid angles Δω 53 with different magnitudes. According to the present exemplary embodiment, the omnidirectional image 51 in the equirectangular projection format is used for simplicity. However, taking into consideration the accuracies of area calculation on segmentation solid angles and region segmentation, the above-described processing may be performed on an omnidirectional image in the equisolid angle projection format. In the equisolid angle projection format, the area on the image is proportional to the solid angle. Therefore, to obtain the magnitude of each segmentation solid angle Δω, the area of a region 52 formed by segmenting the area of the omnidirectional image as a sphere (4π) or hemisphere (2π) of the entire solid angle is to be obtained.


Although, in the Voronoi diagram illustrated in FIG. 6B, Voronoi boundaries are set at equidistant positions from each kernel point, weighting in the metric space may be changed in such a manner that the distance to a Voronoi boundary decreases as radiation luminance (or luminance) of each kernel point increases. Although, in the calculation of segmentation solid angles by using this allocation method, the area of each segmentation region on the omnidirectional image is to be obtained, the positions of the light sources 22 do not need to be regularly arranged.


In step S4, the CPU 1 performs lighting direction determination processing to determine the lighting direction (θi, φi) of each segmentation solid angle Δωj (j=1 to m). There are two different methods of determining a lighting direction: one method uses the area center (gravity center), and the other method uses the luminance gravity center.


The area center (gravity center) is represented by the formula (8).














θ
i

=






Δ





ω





θ
i


d






ω
i







Δ





ω




d






ω
i




=





Δ





ω





θ
i


sin






θ
i


d






θ
i


d






φ
i







Δ





ω




sin






θ
i


d






θ
i


d






φ
i












φ
i

=






Δ





ω





φ
i


d






ω
i







Δ





ω




d






ω
i




=





Δ





ω





φ
i


sin






θ
i


d






θ
i


d






φ
i







Δ





ω




sin






θ
i


d






θ
i


d






φ
i









}




(
8
)







On the other hand, the luminance gravity center is represented by the formula (9).














θ
i

=






Δ





ω






L
i



(

x
,

d






ω
i



)




θ
i


d






ω
i







Δ





ω






L
i



(

x
,

d






ω
i



)



d






ω
i




=





Δ





ω






L
i



(

x
,

d






ω
i



)




θ
i


sin






θ
i


d






θ
i


d






φ
i







Δ





ω






L
i



(

x
,

d






ω
i



)



sin






θ
i


d






θ
i


d






φ
i












φ
i

=






Δ





ω






L
i



(

x
,

d






ω
i



)




φ
i


d






ω
i







Δ





ω






L
i



(

x
,

d






ω
i



)



d






ω
i




=





Δ





ω






L
i



(

x
,

d






ω
i



)




φ
i


sin






θ
i


d






θ
i


d






φ
i







Δ





ω






L
i



(

x
,

d






ω
i



)



sin






θ
i


d






θ
i


d






φ
i









}




(
9
)







Here, Li(x, dωi) denotes the radiation luminance (or luminance) of each pixel within a segmentation solid angle.


In step S5, the CPU 1 performs light source luminance determination processing to obtain the average radiation luminance (or average luminance) of each segmentation solid angle Δωj (j=1 to m). The average radiation luminance (or average luminance) is represented by the formula (10).











L
i



(

x
,

ω
i


)


=






Δ





ω






L
i



(

x
,

d






ω
i



)



d






ω
i







Δ





ω




d






ω
i




=





Δ





ω






L
i



(

x
,

d






ω
i



)



sin






θ
i


d






θ
i


d






φ
i







Δ





ω




sin






θ
i


d






θ
i


d






φ
i









(
10
)







In step S6, the CPU 1 performs light source matrix determination processing to determine elements of the matrix A represented by the formula (7).


In an element Li(x, 1, 1)cos(θ1) Δω1 of the matrix A, Li(x, 1, 1) is equivalent to the radiation luminance (or luminance) of incident light to the point X on the real object 21 from the lighting direction (θ1, φ1) at the segmentation solid angle Δω1. θ1 is equivalent to the lighting direction at the segmentation solid angle Δω1, and Δω1 is equivalent to a segmentation solid angle. The CPU 1 substitutes for Δω1 the magnitude [sr] of the solid angle Δω1 obtained in the segmentation solid angle determination processing (step S3), and substitutes for θ1 the polar angle of the lighting direction (θi, φi) calculated by the formula (8) or (9) in the lighting direction determination processing (step S4). The CPU 1 substitutes for Li(x, 1, 1) the average radiation luminance [W/sr/m2] (or the average luminance [cd/m2]) calculated by the formula (10) in the light source luminance determination processing (step S5). The CPU 1 also obtains elements other than Li(x, 1, 1)cos(θ1) Δω1 in a similar way to determine the light source matrix of the matrix A. Segmenting the environment maps into segmentation solid angles in this way enables reduction of the amount of calculation for the reflection characteristic estimation.


In step S7, the CPU 1 performs captured image information acquisition processing to image the real object 21 irradiated with the Ni light source patterns to acquire Bidirectional Texture Function (BTF) images. These BTF images can be acquired by performing HDR imaging, by using the digital camera 23, on the real object 21 irradiated with the Ni light source patterns. The CPU 1 acquires BTF images from the Nv viewing directions in all steps. In this step, the CPU 1 acquires Ni BTF images for one viewing direction (k ∈ [1, Nv]).


For simplicity, the present exemplary embodiment premises that the optical axis of the digital camera 23 coincides with the point X on the real object 21 and that the center pixel of each BTF image is a pixel in the viewing direction (θo, φo). The CPU 1 obtains the radiation luminance [W/sr/m2] (or the luminance [cd/m2]) of the center pixel of a BTF image as a pixel in the viewing direction (θo, φo) to acquire the imaging information Lo (1 to Ni) represented by the formula (7). Instead of directly acquiring the BTF images, the CPU 1 may read HDR images captured and prestored as files in the HDD 5.


In step S8, the CPU 1 performs reflection characteristic estimation processing to estimate the reflection characteristics fr(x, 1, k) to fr(x, m, k) [1/sr]. More specifically, the CPU 1 substitutes in the formula (7) the light source matrix (Ni*m) determined in the light source matrix determination processing (step S6), and the imaging information Lo (1 to Ni) in the viewing direction (θo, φo) acquired in the captured image information acquisition processing (step S7). The reflection characteristics fr(x, 1, k) to fr(x, m, k) represent the reflection characteristics for the m lighting directions (1 to m) and one viewing direction (k ∈ [1, Nv]). The reflection characteristics fr(x, 1, k) to fr(x, m, k) represent different reflection characteristics depending on the units of Li in the lighting direction and Lo in the viewing direction. When the unit is the radiant quantity (or the radiation luminance [W/sr/m2]), fr(x, 1, k) to fr(x, m, k) represent the BRDF [1/sr]. When the unit is the photometric quantity (or the luminance [cd/m2]), fr(x, 1, k) to fr(x, m, k) represent the reflection characteristics [1/sr] based on the photometric quantity differently defined from the common BRDF. The latter reflection characteristics are referred to as Luminous BRDF [1/sr].


In step S9, the CPU 1 determines whether the processing in steps S7 and S8 is performed on the BTF images (Ni*Nv) in all viewing directions (Nv). When the processing is not completed for all viewing directions (NO in step S9), the CPU 1 repeats the processing in steps S7 and S8. On the other hand, when the processing is completed for all viewing directions (YES in step S9), the processing proceeds to step S10 (reflection model parameter estimation processing).


In step S10, the CPU 1 performs reflection model parameter estimation processing to estimate parameters of a reflection model of the real object 21. Although the reflection characteristics for all lighting directions (m) and all viewing directions (Nv) are discretely obtained through the processing before step S10, the reflection characteristics for an arbitrary lighting direction or viewing direction are not obtained.


Therefore, the CPU 1 performs fitting on the discrete reflection characteristics by using parameters of a Blinn-Phong reflection model, a Cook-Torrance reflection model, a Ward reflection model, and a Lafortune reflection model. This fitting enables the reflection characteristic estimation for an arbitrary lighting direction or viewing direction by using a reflection model, providing an effect of reducing the amount of reflection characteristic data.


In step S11, the CPU 1 determines whether the processing in steps S7 to S10 is completed for the positions of all points set on the real object 21. When the processing is not completed for all points (NO in step S11), the CPU 1 moves the point X on the real object 21 on the XYZ stage and repeats the processing in steps S7 to S10. There are two different methods for moving the point X: one method moves the real object 21, and the other method moves the light source 22 or the digital camera 23. On the other hand, when the processing is completed for all points (YES in step S11), the processing illustrated in FIG. 5 ends.


Effects of Present Exemplary Embodiment

As described above, with a viewpoint set to the position of an object, the image processing apparatus according to the present exemplary embodiment acquires, for each position of light sources, a plurality of environment maps obtained by extensively imaging the surrounding environment from the viewpoint. The image processing apparatus further acquires, for each of positions of the light sources, a plurality of captured images obtained by imaging from a plurality of directions the object irradiated with light from the light sources. Then, the image processing apparatus determines the reflection characteristics of the object based on the environment maps and a plurality of the captured images. This enables improvement of the estimation accuracy of the reflection characteristics of the real object by taking into consideration the influence of external light other than direct light and indirect light without providing restrictions in the measurement environment.


A second exemplary embodiment will be described below. According to the first exemplary embodiment, the reflection characteristics are estimated without taking into consideration the self-shading and self-shadowing by the real object 21 itself. However, since self-shading and self-shadowing may arise depending on the shape of the real object 21, an error may occur in the reflection characteristic estimation. Self-shading refers to a portion where incident light is intercepted, and self-shadowing refers to a portion where reflected light is intercepted. Therefore, the present exemplary embodiment estimates the reflection characteristics in consideration of self-shading and self-shadowing.


The first exemplary embodiment has been described above centering on a method of moving the real object 21 by using the XYZ stage and a method of moving the light source 22 and the digital camera 23 with the real object 21 fixed when estimating the reflection characteristics at the point X on the real object 21. The method is used to cause the point X on the real object 21 to coincide with a measurement point or cause a measurement point to coincide with the point X on the real object 21. The method premises that the viewpoint of the environment map and the optical axis direction of the digital camera 23 physically coincide with a measurement point.


The present exemplary embodiment will be described below centering on a method of virtually moving a measurement point and estimating the reflection characteristics at the point X on the real object 21 in such a manner that the real object 21, the light source 22, and the digital camera 23 are remained fixed.



FIGS. 7A, 7B, and 8 are conceptual views illustrating relations between the environment map information and the captured image information, and an example of generating a virtual environment map according to the second exemplary embodiment. An example configuration of the image input device 13 (FIG. 2A) is identical to the configuration according to the first exemplary embodiment, and redundant descriptions thereof will be omitted. The present exemplary embodiment will be described in brief below centering on differences from the first exemplary embodiment.


(Environmental Map Information and Captured Image Information)

A relation between the environment map information and the captured image information according to the second exemplary embodiment will be described below.



FIG. 7A is a conceptual view illustrating an example of acquiring the environment map information according to the second exemplary embodiment.


According to the present exemplary embodiment, the image input device 13 can image, from arbitrary angles, a three-dimensional real object 61 irradiated with a light source pattern, while changing the light source pattern including direct light for irradiating the three-dimensional object 61 and indirect light. FIG. 7A illustrates an example of using a rabbit-shaped model as the real object 61. With the real object 61 having such a complicated shape, self-shading and self-shadowing may arise depending on the position of a point on the surface.


Similar to the first exemplary embodiment, the CPU 1 may acquire the environment map information 62 and 63 with a viewpoint set to a plurality of positions in a space, by using the omnidirectional camera 31 (FIG. 3A). More specifically, the CPU 1 acquires a plurality of environment maps with a viewpoint set to a plurality of positions on the real object 61. In this case, since an environment map includes a spherical or hemispherical light source pattern, the CPU 1 may acquire environment maps by using a camera with a fish-eye lens or a mirror ball instead of the omnidirectional camera 31. The CPU 1 generates virtual environment map information 64 (described in detail below) with a viewpoint set to the position of the point X on the three-dimensional real object 61, by using the acquired environment map information 62 and 63. In this case, the environment map information with a viewpoint set to a plurality of positions in a space does not need to be limited to two in number and may be three or more.


According to the present exemplary embodiment, with regard to light source patterns for 9 different lighting directions, the CPU 1 acquires environment maps 711 to 719 at the position of the environment map information 62, and acquire environment maps 721 to 729 at the position of the environment map information 63.



FIG. 8 illustrates correspondence relations between the environment maps 711 to 719 acquired at the position of the environment map information 62 and the environment maps 721 to 729 acquired at the position of the environment map information 63, and captured images 811 to 899 captured from 9 different viewing directions for each light source pattern.


The number of lighting directions and the number of viewing directions do not need to be limited to 9. With the Ni light source patterns and the Nv viewing directions, the number of environment maps acquired at each of the positions of the environment map information 62 and 63 is Ni and the total number of captured images is given by Ni*Nv. In this case, the environment maps are omnidirectional images. For example, the environment maps acquired at the position of the environment map information 62 are represented in the equirectangular projection format with a vertical axis θi1 and a horizontal axis φi1, and the environment maps acquired at the position of the environment map information 63 are represented in the equirectangular projection format with a vertical axis φi2 and a horizontal axis θi2. θi1 and θi2 are polar angles, and φi1 and φi2 are azimuth angles. The captured images are represented with a horizontal axis xv [pixel] and a vertical axis yv [pixel]. For example, if the optical axis of the digital camera 23 coincides with the origin of the three-dimensional global coordinate (or world coordinate) system for the real object 61 and the stage on which the real object 61 is placed, the center pixel of each captured image is represented by (θc, φc).


(Generating Virtual Environment Map)

The following describes an example of generating a virtual environment map according to the second exemplary embodiment.


As illustrated in FIG. 7A, the CPU 1 generates virtual environment map information 64 with a viewpoint set to the position of the point X on the three-dimensional real object 61 based on the environment map information 62 and 63 with a viewpoint set to a plurality of positions in a space.


The CPU 1 first acquires the environment maps 711 and 721 at the positions of the environment map information 62 and 63, respectively, which are Dx [m] distant in the x-axis direction.


Then, the CPU 1 searches for corresponding points in the two omnidirectional images, i.e., the environment maps 711 and 721 acquired at the positions of the environment map information 62 and 63, respectively. Known techniques such as Scale-Invariant Feature Transform (SIFT) can be used for corresponding point search.


Then, based on information about the corresponding points in the two omnidirectional images, the CPU 1 generates a virtual environment map at the position (virtual position) of the virtual environment map information 64.


For example, when corresponding points for the light source 22 are found on the environment maps 711 and 721, the corresponding points on the environment maps 711 and 721 have the coordinates (θ1, φ1) and (θ2, φ2), respectively. When the position of the environment map information 62 is set as reference coordinates (0, 0, 0), the coordinates (θxyz, φxyz) of the corresponding points on the virtual environment map with a viewpoint set to the position (x, y, z) of the virtual environment map information 64 can be calculated as follows. When the position of the environment map information 63 has the coordinates (Dx, 0, 0) and the position of the light source 22 has the coordinates (Lx, Ly, Lz), relations between the azimuth angles φ1, φ2, and φxyz of respective environment maps can be represented by the formula (11).














tan






φ
1


=


L
y


L
x









tan






φ
2


=


L
y



L
x

-

D
x










tan






φ
xyz


=



L
y

-
y



L
x

-
x






}




(
11
)







Solving the first and the second expressions of the formula (11) for Lx and Ly gives the formula (12).














L
x

=



D
x


tan






φ
2




tan






φ
2


-

tan






φ
1











L
y

=



D
x


tan






φ
1


tan






φ
2




tan






φ
2


-

tan






φ
1








}




(
12
)







Substituting the formula (12) for the third expression of the formula (11) and making arrangements give the formula (13).










tan






φ
xyz


=




D
x


tan






φ
1


tan






φ
2


-

y


(


tan






φ
2


-

tan






φ
1



)






D
x


tan






φ
2


-

x


(


tan






φ
2


-

tan






φ
1



)








(
13
)







Based on the formula (13), an azimuth angle φxyz of the corresponding point on the virtual environment map with a viewpoint set to the position (x, y, z) can be determined by the azimuth angle φ1 of the corresponding point on the environment map 711 and the azimuth angle φ2 of the corresponding point on the environment map 721, and the interval distance Dx [m] between the environment map information 62 and 63. On the other hand, when the formula (11) is rearranged, the polar angles θ1, θ2, and θxyz of respective environment maps can be represented by the formula (14).














tan






θ
1


=





L
x
2

+

L
y
2




L
z


=






L
x
2

+


L
x
2



tan
2






φ
1



L
z


=



L
x


L
z



sec






φ
1











tan






θ
2


=






(


L
x

-

D
x


)

2

+

L
y
2




L
z


=









(


L
x

-

D
x


)

2

+


(


L
x

-

D
x


)

2








tan
2



φ
2







L
z


=




L
x

-

D
x



L
z



sec






φ
2











tan






θ
xyz


=






(


L
x

-
x

)

2

+


(


L
y

-
y

)

2





L
z

-
z


=









(


L
x

-
x

)

2

+


(


L
x

-
x

)

2








tan
2



φ
xyz








L
z

-
z


=




L
x

-
x



L
z

-
z



sec






φ
xyz








}




(
14
)







Solving the first and the second expressions of the formula (14) and the formula (11) for Lx, Ly, and Lz gives the formula (15).














L
x

=


L
z


tan






θ
1


cos






φ
1









L
y

=



L
x


tan






φ
1


=


L
z


tan






θ
1


sin






φ
1










L
z

=


D
x



tan






θ
1


cos






φ
1


-

tan






θ
2


cos






φ
2








}




(
15
)







Substituting the formula (15) for the third expression of the formula (14) and making arrangements give the formula (16).













tan






θ
xyz


=











D
x


tan






θ
1


cos






φ
1


-






x


(


tan






θ
1


cos






φ
1


-

tan






θ
2


cos






φ
2



)







D
x

-

z


(


tan






θ
1


cos






φ
1


-

tan






θ
2


cos






φ
2



)




·
sec







φ
xyz








=










D
x


tan






θ
1


cos






φ
1


-






x


(


tan






θ
1


cos






φ
1


-

tan






θ
2


cos






φ
2



)







D
x

-

z


(


tan






θ
1


cos






φ
1


-

tan






θ
2


cos






φ
2



)




·










sec


(


tan

-
1







D
x


tan






φ
1


tan






φ
2


-

y


(


tan






φ
2


-

tan






φ
1



)






D
x


tan






φ
2


-

x


(


tan






φ
2


-

tan






φ
1



)





)









(
16
)







Based on the formula (16), the polar angle θxyz of the corresponding point on the virtual environment map with a viewpoint set to the position (x, y, z) can be determined by the coordinates (θ1, φ1) of the corresponding point on the environment map 711, the coordinates (θ2, φ2) of the corresponding point on the environment map 721, and the interval distance Dx [m] between the two coordinates.


Then, the CPU 1 determines the coordinates (θxyz, φxyz) of the corresponding point on the virtual environment map by using the formulas (13) and (16). For example, the CPU 1 calculates an average pixel value based on the pixel values of the corresponding points (θ1, φ1) and (θ2, φ2) on the environment maps 711 and 721, respectively. Then, the CPU 1 determines the pixel value of the corresponding point (θxyz, φxyz) on the virtual environment map.


The CPU 1 plots all corresponding points on the virtual environment map for the environment map information 62 and 63 to enable generating a virtual environment map with a viewpoint set to the position (x, y, z) in a space. More specifically, the CPU 1 can generate a virtual environment map with a viewpoint set to the position of an arbitrary point X on the three-dimensional real object 61.


However, since occlusion actually occurs, there arises a case where no corresponding points are found. In such a case, occlusion can be avoided by changing the position of the environment map information.


More specifically, when avoiding occlusion, the CPU 1 generates virtual environment map information 67 with a viewpoint set to the position of the point X on the three-dimensional real object 61, based on environment map information 65 and 66 with a viewpoint set to a plurality of positions in a space different from the space illustrated in FIG. 7A, as illustrated in FIG. 7B. For more details, the CPU 1 first acquires the environment maps 711 and 721 at the positions of the environment map information 65 and 66, respectively, which are Dz [m] distant in the z-axis direction.


Then, the CPU 1 searches for corresponding points in the two omnidirectional images, i.e., the environment maps 711 and 721 acquired at the positions of the environment map information 65 and 66, respectively.


Then, based on information about the corresponding points in the two omnidirectional images, the CPU 1 generates a virtual environment map at the position of the virtual environment map information 67.


For example, when corresponding points for the light source 22 are found on the environment maps 711 and 721, the corresponding point on the environment map 711 has the coordinates (θ1, φ1), and the corresponding point on the environment map 721 has the coordinates (θ2, φ2). When the position of the environment map information 65 is set as reference coordinates (0, 0, 0), the coordinates (θxyz, φxyz) of the corresponding point on the virtual environment map with a viewpoint set to the position (x, y, z) of the virtual environment map information 67 can be calculated as follows. When the position of the environment map information 66 has the coordinates (0, 0, Dz) and the position of the light source 22 has the coordinates (Lx, Ly, Lz), the azimuth angles φ1, φ2, and φxyz of respective environment maps can be represented by the formula (17).














tan






φ
1


=


tan






φ
2


=


L
y


L
x










tan






φ
xyz


=



L
y

-
y



L
x

-
x






}




(
17
)







On the other hand, when the formula (17) is rearranged, the polar angles θ1, θ2, and θxyz of respective environment maps can be represented by the formula (18).














tan






θ
1


=





L
x
2

+

L
y
2




L
z


=






L
x
2

+


L
x
2



tan
2






φ
1



L
z


=



L
x


L
z



sec






φ
1











tan






θ
2


=





L
x
2

+

L
y
2





L
z

-

D
z



=





L
x
2

+

L
x
2

+


tan
2



φ
1





L
z


=



L
x



L
z

-

D
z




sec






φ
1











tan






θ
xyz


=






(


L
x

-
x

)

2

+


(


L
y

-
y

)

2





L
z

-
z


=









(


L
x

-
x

)

2

+


(


L
x

-
x

)

2








tan
2



φ
xyz








L
z

-
z


=




L
x

-
x



L
z

-
z



sec






φ
xyz








}




(
18
)







When Lx and Ly are calculated by using the first expression of the formula (18) and the first expression of the formula (17) and then substituted for the second expression of the formula (18) to calculate Lz, the formula (19) is given.














L
x

=


L
z


tan






θ
1


cos






φ
1









L
y

=



L
x


tan






φ
1


=


L
z


tan






θ
1


sin






φ
1










L
z

=



D
z


tan






θ
2




tan






θ
2


-

tan






θ
1








}




(
19
)







Substituting the formula (19) for the second expression of the formula (17) and making arrangements give the formula (20).













tan






θ
xyz


=






L
x


tan






φ
1


-
y



L
x

-
x








=






L
z


tan






θ
1


sin






φ
1


-
y




L
z


tan






θ
1


cos






φ
1


-
x








=






D
z


tan






θ
1


tan






θ
2


sin






φ
1


-

y


(


tan






θ
1


-

tan






θ
2



)






D
z


tan






θ
1


tan






θ
2


cos






φ
1


-

x


(


tan






θ
1


-

tan






θ
2



)











(
20
)







Substituting the formula (19) for the third expression of the formula (18) and making arrangements give the formula (21).













tan






θ
xyz


=











D
z


tan






θ
1


tan






θ
2


cos






φ
1


-






x


(


tan






θ
2


-

tan






θ
2



)








D
z


tan






θ
2


-

z


(


tan






θ
2


-

tan






θ
1



)




·
sec







φ
xyz








=










D
z


tan






θ
1


tan






θ
2


cos






φ
1


-






x


(


tan






θ
2


-

tan






θ
1



)








D
z


tan






θ
2


-

z


(


tan






θ
2


-

tan






φ
1



)




·










sec


(


tan

-
1







D
z


tan






φ
1


tan






φ
2


sin






φ
1


-

y


(


tan






φ
2


-

tan






φ
1



)






D
z


tan






φ
1


tan






φ
2


cos






φ
1


-

x


(


tan






φ
2


-

tan






φ
1



)





)









(
21
)







Based on the formulas (20) and (21), the coordinates (θxyz, (φxyz) of the corresponding point on the virtual environment map with a viewpoint set to the position (x, y, z) can be determined by the coordinates (θ1, φ1) and (θ2, φ2) of the corresponding point of concern on the environment maps 711 and 712, respectively, and an interval distance Dz [m] between the two coordinates.


For example, the CPU 1 calculates an average pixel value based on the pixel values of the corresponding points (θ1, φ1) and (θ2, φ2) on the environment maps 711 and 721, respectively. Then, the CPU 1 determines the pixel value of the corresponding point (θxyz, φxyz) on the virtual environment map. Further, similar to the case where the environment map information 62 and 63 is used, the CPU 1 plots all corresponding points on the virtual environment map for the environment map information 65 and 66 to generate a virtual environment map with a viewpoint set to the position (x, y, z) in a space. More specifically, by optimally arranging the positions of a plurality of pieces of environment map information, the CPU 1 can generate a virtual environment map with a viewpoint set to the position of an arbitrary point X on the three-dimensional real object 61 while avoiding occlusion.



FIGS. 9A and 9B illustrate examples of three-dimensional optimal arrangements of a plurality of pieces of environment map information according to the second exemplary embodiment.



FIG. 9A illustrates an example of generating virtual environment map information 95 based on environment map information 91 to 94 for four different points which encompass the three-dimensional real object 61. If corresponding points are found in the environment map information for at least two out of four points, the CPU 1 can determine the coordinates of corresponding points on the virtual environment map. If corresponding points are found in the environment map information for three or more points, the reliability can be further improved based on relations among a plurality of corresponding points.


Likewise, as illustrated in FIG. 9B, the CPU 1 may generate virtual environment map information 919 based on environment maps 911 to 918 for 8 points which encompass the three-dimensional real object 61.


(Processing for Estimating Reflection Characteristics of Real Object)


FIG. 10 is a flowchart illustrating estimation processing of reflection characteristics of a three-dimensional real object according to the present exemplary embodiment. The present exemplary embodiment will be described in brief below centering on differences from the first exemplary embodiment.



FIG. 10 is a flowchart illustrating an example of estimation processing of reflection characteristics of a three-dimensional real object.


In step S21, similar to step S1 illustrated in FIG. 5, the CPU 1 first performs HDR camera calibration processing to calibrate the omnidirectional camera 31 for acquiring the environment map information and the digital camera 23 for acquiring the captured image information.


In step S22, the CPU 1 performs environment map information acquisition processing to acquire environment maps for the Ni light source patterns from the positions of environment map information for P points. The environment maps are acquired by performing HDR imaging on the Ni light source patterns by using the omnidirectional camera 31 with a viewpoint set to the positions of the P points. Instead of directly acquiring the environment maps, the CPU 1 may read omnidirectional HDR images captured in advance, from the HDD 5.


In step S23, the CPU 1 performs captured image information acquisition processing to image the three-dimensional real object 61 irradiated with the Ni light source patterns to acquire BTF images. The CPU 1 acquires the BTF images by performing, from the Nv viewing directions by using the digital camera 23, HDR imaging (Ni*Nv) on the real object 61 irradiated with the Ni light source patterns. For simplicity, the present exemplary embodiment premises that the optical axis of the digital camera 23 which performs imaging from the Nv viewing directions coincides with the origin of the global coordinate system for the stage on which the three-dimensional real object 61 is placed, and that the center pixel of a captured image is a pixel in the viewing direction (θc, φc). Instead of directly acquiring BTF images, the CPU 1 may also read HDR images captured in advance, from the HDD 5.


In step S24, the CPU 1 performs shape information acquisition processing to acquire a polygon mesh of the three-dimensional real object 61. The shape of the three-dimensional real object 61 is measured by using such a known technique as a 3D laser scanner, a photometric stereo, stereovision, or visual hull, and represented by three-dimensional coordinates of a point group or polygon mesh. For simplicity, a point group is assumed to be reconfigured into a polygon mesh. Instead of directly acquiring three-dimensional shapes, the CPU 1 may also read a polygon mesh measured in advance, from the HDD 5. In this case, the three-dimensional coordinates of the shape of the three-dimensional real object 61 are based on the local coordinate (or object coordinate or body coordinate) system, and therefore are to be converted into those of the global coordinate system for the stage on which the three-dimensional real object 61 is placed.


In step S25, the CPU 1 performs normal vector generation processing to generate a surface normal vector or vertex normal vector at the point X on the three-dimensional real object 61 from the polygon mesh. The surface normal vector, a unit vector perpendicular to the surface of the polygon plane, can be obtained by using the three-dimensional coordinates and the outer product of the vertexes of the polygon including the point X on the three-dimensional real object 61. On the other hand, the vertex normal vector can be obtained by adding all of surface normal vectors of the polygons which share the vertexes of the polygon including the point X on the three-dimensional real object 61 and performing normalization.


In this case, each normal vector in the global coordinate system can be represented by (nx, ny, nz).


In step S26, the CPU 1 performs shadowing map generation processing to generate a shadowing map at the point X on the three-dimensional real object 61. In the shadowing map generation processing (step S26), the CPU 1 may generate a visible map instead of the shadowing map. The shadowing map will be described below.


If surface unevenness can be ignored like the real object 21 according to the first exemplary embodiment, self-shading and self-shadowing do not largely affect processing. On the other hand, if geometric surface unevenness cannot be ignored like the three-dimensional real object 61, the reflection characteristics in consideration of the influences of self-shading and self-shadowing are to be estimated. This is because the definition of the reflection characteristics such as a BRDF premises that neither self-shading nor self-shadowing exists in the relation between incident light and reflected light. Therefore, the present exemplary embodiment estimates the reflection characteristics of the real object by generating a shadowing map indicating whether incident light to the real object 61 is shadowed and applying the generated shadowing map to the environment map, based on shape information for the real object 61.



FIGS. 11A and 11B are conceptual views illustrating an example of generating a shadowing map. The shadowing map represents whether incident light is intercepted in the form of an omnidirectional image with a viewpoint set to the position of the point X on the three-dimensional real object 61.


When estimating the reflection characteristics at the point X on the three-dimensional real object 61, the CPU 1 uses a hemispherical shadowing map 142 with a viewpoint set to the position of the point X on the three-dimensional real object 61, as illustrated in FIG. 11A. In this case, the hemisphere is determined by the zenith and the tangent plane on the normal vector. Further, when estimating also transmission characteristics at the point X on the three-dimensional real object 61, the CPU 1 uses a spherical shadowing map with a viewpoint set to the position of the point X on the three-dimensional real object 61. This shadowing map includes information indicating self-shading or self-shadowing at a point on the real object 61.


The CPU 1 generates a shadowing map by determining whether the polygon mesh of the three-dimensional real object 61 intersects with the straight line from the point X on the three-dimensional real object to the lighting direction ωi. When the polygon mesh intersects with the straight line (shadowed), the CPU 1 sets the pixel value of the omnidirectional image to 0. On the other hand, when the polygon mesh does not intersect with the straight line (not shadowed), the CPU 1 sets the pixel value to 1. Referring to FIG. 11A, the real object (rabbit) is segmented into shadowed portions 113 (invisible region) shadowed by ear portions and an unshadowed portion 141 (visible region). More specifically, the shadowing map includes information indicating a visible region. In the case of transmission characteristics, the shadowed portions 113 are transmitting portions.


When the shadowing map is expressed as a visible function V(x, ωi), the function can be represented by the formula (22).










V


(

x
,

ω
i


)


=

{



0




1








(
22
)







Here, V(x, ωi) for the lighting direction ωi represents self-shading and V(x, ωr) for the viewing direction represents self-shadowing.



FIG. 11B illustrates an example of a generated hemispheric shadowing map. In an omnidirectional image 142 with a viewpoint set to the position of the point X on the three-dimensional real object 61, ear portions of the rabbit (real object 61) are expressed as self-shading 113.


In step S27, the CPU 1 performs virtual environment map generation processing to generate a virtual environment map with a viewpoint set to the position of the point X on the three-dimensional real object 61.



FIGS. 12A to 13C are conceptual views illustrating relations among a normal vector, a virtual environment map, and a shadowing map according to the second exemplary embodiment. When estimating the reflection characteristics at the point X on the three-dimensional real object 61, the CPU 1 uses a hemispheric virtual environment map with a viewpoint set to the position of the point X on the three-dimensional real object 61 in a similar way to the shadowing map. More specifically, based on the information indicating a visible region in the shadowing map, the CPU 1 generates a virtual environment map and a virtual line-of-sight map at a virtual position.


In this case, the hemisphere is determined by the zenith and the tangent plane on the normal vector. Further, when estimating also transmission characteristics at the point X on the three-dimensional real object 61, the CPU 1 uses a spherical virtual environment map with a viewpoint set to the position of the point X on the three-dimensional real object 61. The CPU 1 generates a spherical or hemispherical virtual environment map with a viewpoint set to the position of the point X on the three-dimensional real object 61 according to the above-described virtual environment map generation method by using the environment map information for the P points acquired in the environment map information acquisition processing (step S22).



FIG. 12A is a conceptual view illustrating a relation between a normal vector for the coordinates (x, y, z) of the point X on the three-dimensional real object 61 and a virtual environment map. The three-dimensional coordinates of the polygon mesh of the three-dimensional real object 61 are defined with the global coordinate system, and the normal vector for the coordinates (x, y, z) of the point X on the three-dimensional real object 61 is represented by (nx, ny, nz). Reflection characteristics at the point X on the three-dimensional real object 61 can be obtained by using a hemispheric virtual environment map 111 with a viewpoint set to the coordinates (x, y, z). A hemispheric virtual environment map 112 is an example of a hemispheric virtual environment map with a viewpoint set to the position of another point X on the three-dimensional real object 61.



FIG. 12B illustrates a normal vector (nx, ny, nz) in the global coordinate system. The polar angle θn and the azimuth angle φn of the normal vector (nx, ny, nz) can be represented by the formula (23).














θ
n

=


tan

-
1







n
x
2

+

n
y
2




n
z










φ
n

=


tan

-
1





n
y


n
x







}




(
23
)







Reflection characteristics are defined by a coordinate system of which the normal vector coincides with the z-axis direction in the XYZ coordinate system. Therefore, the global coordinate system (or XYZ coordinate system) into the UVW coordinate system based on the normal vector is to be converted. The conversion from the XYZ coordinate system to the UVW coordinate system will be described below. FIG. 13A illustrates a relation between a normal vector and a hemispheric virtual environment map 111 in the global coordinate system. FIG. 13B illustrate a relation between a normal vector and the hemispheric virtual environment map 111 in the UVW coordinate system based on the normal vector.



FIG. 13C illustrates a relation between the hemispheric virtual environment map 111 and a shadowing map in the global coordinate system. Even if the hemispheric virtual environment map 111 can be generated, light from all lighting directions in the virtual environment map 111 does not necessarily enters the point X on the three-dimensional real object 61. When incident light is intercepted by the self-shading 113, the reflection characteristics in consideration of shadowing is to be estimated.


Applying the visible functions V(x, ωi) and V(x, (ωr) defined by the formula (22) to the rendering formula (2) gives the formula (24).











L
o



(

x
,

ω
r


)


=


V


(

x
,

ω
r


)




{



L
e



(

x
,

ω
r


)


+



Ω





L
i



(

x
,

ω
i


)




V


(

x
,

ω
i


)





f
r



(

x
,

ω
i

,

ω
r


)




cos


(

θ
i

)



d






ω
i




}






(
24
)







For simplicity, taking the real object 61 that does not emit spontaneous light, as an example gives the formula (25).











L
o



(

x
,

ω
r


)


=


V


(

x
,

ω
r


)






Ω





L
i



(

x
,

ω
i


)




V


(

x
,

ω
i


)





f
r



(

x
,

ω
i

,

ω
r


)




cos


(

θ
i

)



d






ω
i








(
25
)







When a method of discretizing the formula (25) to segmenting the light source patterns of direct light radiated from all directions and indirect light into m segmentation solid angles Δωj (j=1 to m) is applied to each of the Ni light source patterns, the simultaneous linear formula (26) is given for the viewing direction k ∈ [1, Nv]. In this case, there is a relation represented by the formula (27) between the omnidirectional solid angle Ω and the segmentation solid angles Δωj (j=1 to m).















L
o



(

x
,
k
,
1

)


=


V


(

x
,
k

)







j
=
1

m









L
i



(

x
,
j
,
1

)




V


(

x
,
j

)





f
r



(

x
,
j
,
k

)




cos


(

θ
j

)



Δ






ω
j












L
o



(

x
,
k
,
2

)


=


V


(

x
,
k

)







j
=
1

m









L
i



(

x
,
j
,
2

)




V


(

x
,
j

)





f
r



(

x
,
j
,
k

)




cos


(

θ
j

)



Δ






ω
j

















L
o



(

x
,
k
,

N
i


)


=


V


(

x
,
k

)







j
=
1

m









L
i



(

x
,
j
,

N
i


)




V


(

x
,
j

)





f
r



(

x
,
j
,
k

)




cos


(

θ
j

)



Δ






ω
j








}




(
26
)










j
=
1

m







Δ






ω
j



=
Ω




(
27
)







When the simultaneous linear formula (26) is to be expressed using a matrix, the formula (26) can be rearranged as the formula (28). When the formula (28) is solved for fr(x, 1, k) to fr(x, m, k) that are m BRDFs, the BRDFs for the m lighting directions (1 to m) and one viewing direction (k ∈ [1, Nv]) can be calculated by the formula (29).













(





L
o



(

x
,
k
,
1

)








L
o



(

x
,
k
,
2

)













L
o



(

x
,
k
,

N
i


)





)

=




V


(

x
,
k

)




(





L
i



(

x
,
1
,
1

)






L
i



(

x
,
2
,
1

)









L
i



(

x
,
m
,
1

)








L
i



(

x
,
1
,
2

)






L
i



(

x
,
2
,
2

)









L
i



(

x
,
m
,
2

)






















L
i



(

x
,
1
,

N
i


)






L
i



(

x
,
2
,

N
i


)









L
i



(

x
,
m
,

N
i


)





)











(





V


(

x
,
1

)





f
r



(

x
,
1
,
k

)




cos


(

θ
1

)



Δ






ω
1








V


(

x
,
2

)





f
r



(

x
,
2
,
k

)




cos


(

θ
2

)



Δ






ω
2













V


(

x
,
m

)





f
r



(

x
,
m
,
k

)




cos


(

θ
m

)



Δ






ω
m





)







=




V


(

x
,
k

)




(









L
i



(

x
,
1
,
1

)




V


(

x
,
1

)








cos


(

θ
1

)


Δ






ω
1













L
i



(

x
,
2
,
1

)




V


(

x
,
2

)








cos


(

θ
2

)


Δ






ω
2
















L
i



(

x
,
m
,
1

)




V


(

x
,
m

)








cos


(

θ
m

)


Δ






ω
m















L
i



(

x
,
1
,
2

)




V


(

x
,
1

)








cos


(

θ
1

)


Δ






ω
1













L
i



(

x
,
2
,
2

)




V


(

x
,
2

)








cos


(

θ
2

)


Δ






ω
2
















L
i



(

x
,
m
,
2

)




V


(

x
,
m

)








cos


(

θ
m

)


Δ






ω
m





























L
i



(

x
,
1
,

N
i


)




V


(

x
,
1

)








cos


(

θ
1

)


Δ






ω
1













L
i



(

x
,
2
,

N
i


)




V


(

x
,
2

)








cos


(

θ
2

)


Δ






ω
2
















L
i



(

x
,
m
,

N
i


)




V


(

x
,
m

)








cos


(

θ
m

)


Δ






ω
m








)











(





f
r



(

x
,
1
,
k

)








f
r



(

x
,
2
,
k

)













f
r



(

x
,
m
,
k

)





)







=




V


(

x
,
k

)




(
A
)



(





f
r



(

x
,
1
,
k

)








f
r



(

x
,
2
,
k

)













f
r



(

x
,
m
,
k

)





)









(
28
)










(





f
r



(

x
,
1
,
k

)








f
r



(

x
,
2
,
k

)













f
r



(

x
,
m
,
k

)





)

=




1

V


(

x
,
k

)





(

A

-
1


)



(





L
o



(

x
,
k
,
1

)








L
o



(

x
,
k
,
2

)













L
o



(

x
,
k
,

N
i


)





)








=




1

V


(

x
,
k

)






(









L
i



(

x
,
1
,
1

)




V


(

x
,
1

)








cos


(

θ
1

)


Δ






ω
1













L
i



(

x
,
2
,
1

)




V


(

x
,
2

)








cos


(

θ
2

)


Δ






ω
2
















L
i



(

x
,
m
,
1

)




V


(

x
,
m

)








cos


(

θ
m

)


Δ






ω
m















L
i



(

x
,
1
,
2

)




V


(

x
,
1

)








cos


(

θ
1

)


Δ






ω
1













L
i



(

x
,
2
,
2

)




V


(

x
,
2

)








cos


(

θ
2

)


Δ






ω
2
















L
i



(

x
,
m
,
2

)




V


(

x
,
m

)








cos


(

θ
m

)


Δ






ω
m





























L
i



(

x
,
1
,

N
i


)




V


(

x
,
1

)








cos


(

θ
1

)


Δ






ω
1













L
i



(

x
,
2
,

N
i


)




V


(

x
,
2

)








cos


(

θ
2

)


Δ






ω
2
















L
i



(

x
,
m
,

N
i


)




V


(

x
,
m

)








cos


(

θ
m

)


Δ






ω
m








)


-
1












(





L
o



(

x
,
k
,
1

)








L
o



(

x
,
k
,
2

)













L
o



(

x
,
k
,

N
i


)





)








(
29
)







However, with regard to the viewing direction (k ∈ [1, Nv]) with V(x, k)=0, the point X on the three-dimensional real object 61 cannot be imaged from the viewing direction because of self-shadowing, and therefore the BRDF cannot be obtained. Further, when the lighting direction (j ∈ [1, m]) has V(x, j)=0 because of self-shading, column elements of the matrix A represented by the formula (28) become 0, and therefore the BRDF for the lighting direction (j ∈ [1, m]) with V(x, j)=0 cannot be obtained.


More specifically, when self-shadowing or self-shading exists, information about the shadowed portion is missing, and therefore not all BRDFs (m*Nv) for the m lighting directions and the Nv viewing directions can be obtained.


On the other hand, the estimation of reflection characteristics in consideration of shadowing enables not only improvement of the estimation accuracy but also shortening of the processing time compared to the estimation of reflection characteristics without consideration of shadowing. As illustrated in FIG. 13C, the hemispheric virtual environment map 111 includes the self-shading 113 due to the ear portions of the rabbit.



FIGS. 14A, 14B, and 14C are conceptual views illustrating the virtual environment map 111 in consideration of a shadowing map. There are two different methods of generating the virtual environment map 111 in consideration of a shadowing map: one method applies the shadowing map 142 as a mask to the virtual environment map information 64 without consideration of a shadowing map, and the other method performs successive processing based on the visible region 141 of the shadowing map 142. When generating the hemispheric virtual environment map 111, successive processing based on the visible region 141 of the shadowing map 142 enables omission of such processing as corresponding point search (determining the pixel values of corresponding points on the virtual environment map 111 based on a plurality of environment maps) for the shadowed portion 113.


In step S28, the CPU 1 performs virtual line-of-sight map generation processing to generate a virtual line-of-sight map for the point X on the three-dimensional real object 61 based on the BTF images acquired by the captured image information acquisition processing (step S23). A virtual line-of-sight map represents the radiation luminance (or luminance) Lo in the Nv viewing directions for the point X on the three-dimensional real object 61.



FIGS. 15, 16A, and 16B illustrate an example of generating a virtual line-of-sight map according to the second exemplary embodiment.



FIG. 15 illustrates the captured image information acquisition processing (step S23) in which the CPU 1 performs, by using Nv digital cameras 23, HDR imaging on the three-dimensional real object 61 irradiated with the light source 22 to acquire BTF images (captured images) 121 to 123. As described above, the optical axis of each of the Nv digital cameras 23 coincides with the origin of the global coordinate system for the stage on which the three-dimensional real object 61 is placed. Therefore, the center pixel of each of the captured images 121 to 123 is represented by the viewing direction (θc, φc) for the origin of the global coordinate system.


The viewing directions (θo, φo) for all of the points X on the three-dimensional real object 61 are not identical to the viewing directions (θc, φc) of each digital camera 23 for the origin of the global coordinate system. More specifically, the magnitude of an error from the viewing direction (θc, φc) increases as size of the real object 61 increases relative to the distance from the origin of the global coordinate system to the digital camera 23. FIG. 16A illustrates a relation between the viewing direction (θc, φc) for the origin of the global coordinate system (or XYZ coordinate system) and the viewing direction for the point X on the three-dimensional real object 61o, φo) for the captured image 121. The top of FIG. 16A is a front view illustrating the XZ plane, and the bottom of FIG. 16A is a top view illustrating the XY plane. According to the present exemplary embodiment, a pinhole camera model is used for simplicity. Referring to the front view, the formula (30) is given, where αv denotes the vertical viewing angle, dv denotes the vertical width of an image sensor, and f denotes the focal length.










tan



α
v

2


=


d
v


2





f






(
30
)







When the formula (30) is rearranged, the vertical viewing angle αv can be represented by the formula (31).










α
v

=

2






tan

-
1





d
v


2





f







(
31
)







Likewise, referring to the top view, the formula (32) is given, where αh denotes the horizontal viewing angle, dh denotes the horizontal width of the image sensor, and f denotes the focal length.










tan



α
h

2


=


d
h


2

f






(
32
)







When the formula (32) is rearranged, the horizontal viewing angle αh can be represented by the formula (33).










α
h

=

2






tan

-
1





d
h


2

f







(
33
)







Based on the formulas (31) and (33), the vertical viewing angle αv and the horizontal viewing angle αh can be calculated based on the size of the image sensor (the vertical width dv and the horizontal width dh) and the focal length f.



FIG. 16B illustrates a captured image of the digital camera 23 captured with the vertical viewing angle αv and the horizontal viewing angle αh. The vertical viewing angle αv and the horizontal viewing angle αh correspond to the height and the width of the captured image, respectively. The point X on the three-dimensional real object 61 corresponds to the coordinates (θ, φ) on the captured image. The viewing direction (θo, φo) for the point X on the three-dimensional real object 61 can be represented by the formulas (34) and (35) using the viewing direction (θc, φc) for the origin and the coordinates (θ, φ) on the captured image in the global coordinate system (or XYZ coordinate system).














θ
o

=


θ
c

+
θ








-


α
v

2



θ



α
v

2





}




(
34
)











φ
o

=


φ
c

-
φ








-


α
h

2



φ



α
h

2





}




(
35
)







In this case, when the coordinates (θ, φ) on the captured image are equal to the coordinates of the center pixel (0, 0), the viewing direction (θo, φo) refers to the viewing direction (θc, φc) for the origin of the global coordinate system, as described above.


More specifically, in the BTF images 121 to 123 captured by the Nv digital cameras 23, the CPU 1 perform corresponding point search on the point X on the three-dimensional real object 61 to identify the coordinates (θ, φ) on each captured image. Further, when the formulas (34) and (35) are applied to the identified coordinates (θ, φ) on each captured image, the CPU 1 can generate a virtual line-of-sight map for the point X on the three-dimensional real object 61.


A virtual line-of-sight map represents the radiation luminance (or luminance) Lo in the Nv viewing directions for the point X on the three-dimensional real object 61. When the three-dimensional real object 61 is irradiated with the Ni light source patterns, the number of virtual line-of-sight maps for the point X on the three-dimensional real object 61 is given by Ni*Nv. Known techniques such as Scale-Invariant Feature Transform (SIFT) can be used for corresponding point search.


A virtual line-of-sight map may be formed by plotting the radiation luminance (or luminance) Lo on respective line-of-sight coordinates on the omnidirectional image or by storing the radiation luminance (or luminance) Lo for respective viewing directions in list form. When generating a virtual line-of-sight map, taking a shadowing map into consideration enables detecting in advance the viewing direction subjected to self-shadowing, making it possible to shorten the processing time.



FIGS. 17A, 17B, and 17C are conceptual views illustrating a virtual line-of-sight map 154 in consideration of a shadowing map. There are two different methods of generating the virtual environment map 154 in consideration of a shadowing map: one method applies the shadowing map 142 as a mask to a virtual line-of-sight map 151 without consideration of a shadowing map, and the other method performs successive processing based on the visible region 141 of the shadowing map 142. When generating the hemispheric virtual environment map 154, successive processing based on the visible region 141 of the shadowing map 142 enables omission of such processing as corresponding point search (determining the pixel values of corresponding points based on captured images) for the shadowed portions 113.


In step S29, the CPU 1 performs coordinate conversion processing to convert the virtual environment map and the virtual line-of-sight map for the point X on the three-dimensional real object 61 from the global coordinate system (or XYZ coordinate system) into the UVW coordinate system. More specifically, the CPU 1 converts the virtual environment map (lighting direction) and the virtual line-of-sight map (viewing direction) for the point X on the three-dimensional real object 61 defined in the global coordinate system into those in the UVW coordinate system based on the normal vector (nx, ny, nz) for the point X on the three-dimensional real object 61.


Reflection characteristics are defined such that the direction of the normal vector coincides with the z-axis direction in the XYZ coordinate system. Therefore, the CPU 1 defines the UVW coordinate system such that the direction of the normal vector for the point X on the three-dimensional real object 61 coincides with the w axis.



FIG. 18 illustrates a relation between the global coordinate system (or XYZ coordinate system) and the UVW coordinate system. The direction of the w axis of the UVW coordinate system coincides with the direction of the normal vector for the point X on the three-dimensional real object 61, and therefore can be uniquely determined. On the other hand, the directions of the u and v axes are not defined based on the reflection characteristics, and therefore cannot be uniquely determined.


According to the present exemplary embodiment, the UVW coordinate system is defined such that the directions of the u and v axes of the UVW coordinate system continuously change according to the direction of the normal vector (w axis).


If the direction of the normal vector (w axis) coincides with the direction of the z axis, as illustrated in FIG. 18, the directions of the u and v axes in a tangent plane 131 are considered to coincide with the directions of the x and y axes, respectively. The directions of the u and v axes in the tangent plane 132 when the normal vector is rotated around the y axis are considered to coincide with the directions thereof when the tangent plane 131 is rotated around the y axis. The directions of the u and v axes in the tangent planes 133 and 134 when the normal vector is rotated around the x axis are considered to coincide with the directions thereof when the tangent plane 131 is rotated around the x axis.


The virtual environment map and the virtual line-of-sight map for the point X on the real object 61 defined in the global coordinate system (or XYZ coordinate system) is represented by the spherical coordinates. Therefore, when the spherical coordinates (r, θ, φ) in the XYZ coordinate system are represented by the orthogonal coordinates (x, y, z), the formula (36) is given.










(



x




y




z



)

=

(




r





sin





θcos





φ






r





sin





θ





sin





φ






r





cos





θ




)





(
36
)







Likewise, when the spherical coordinates (r′, θ′, φ′) in the UVW coordinate system are represented by the orthogonal coordinates (u, v, w), the formula (37) is given.










(



u




v




w



)

=

(





r







sin






θ



cos






φ









r







sin






θ







sin






φ









r







cos






θ






)





(
37
)







When the orthogonal coordinates (u, v, w) in the UVW coordinate system are represented by the spherical coordinates (r′, θ′, φ′), the formula (38) is given.














r


=



u
2

+

v
2

+

w
2










φ


=


tan

-
1




v
u









θ


=


tan

-
1







u
2

+

v
2



w






}




(
38
)







The CPU 1 converts the virtual environment map (lighting direction) and the virtual line-of-sight map (viewing direction) for the point X on the three-dimensional real object 61 defined in the global coordinate system into those in the UVW coordinate system based on the normal vector (nx, ny, nz) for the point X on the three-dimensional real object 61. To this end, the CPU 1 applies the formula (39) that is a three-dimensional rotation matrix for converting the XYZ coordinate system into the UVW coordinate system, by using the formula (23) to obtain the polar angle θn and the azimuth angle φn of the normal vector (nx, ny, nz). The XYZ coordinate system may be used instead of the global coordinate system.













(



u




v




w



)

=





R
z



(

φ
n

)





R
y



(

-

θ
n


)





R
z



(

-

φ
n


)




(



x




y




z



)








=




(




cos


(

φ
n

)





-

sin


(

φ
n

)





0





sin


(

φ
n

)





cos


(

φ
n

)




0




0


0


1



)



(




cos


(

-

θ
n


)




0



sin


(

-

θ
n


)






0


1


0





-

sin


(

θ
n

)





0



cos


(

-

θ
n


)





)












(




cos


(

-

φ
n


)





-

sin


(

-

φ
n


)





0





sin


(

-

φ
n


)





cos


(

-

φ
n


)




0




0


0


1



)



(



x




y




z



)








=




(




cos






φ
n






-
sin







φ
n




0





sin






φ
n





cos






φ
n




0




0


0


1



)



(




cos






θ
n




0




-
sin







θ
n






0


1


0





sin






θ
n




0



cos






θ
n





)












(




cos






φ
n





sin






φ
n




0






-
sin







φ
n





cos






φ
n




0




0


0


1



)



(



x




y




z



)








=



(




cos






φ
n






-
sin







φ
n




0





sin






φ
n





cos






φ
n




0




0


0


1



)











(




cos






θ
n


cos






φ
n





cos






θ
n


sin






φ
n






-
sin







θ
n








-
sin







φ
n





cos






φ
n




0





sin






θ
n


cos






φ
n





sin






θ
n


sin






φ
n





cos






θ
n





)



(



x




y




z



)








=




(








cos






θ
n



cos
2



φ
n


+







sin
2



φ
n











sin






φ
n


cos






φ
n







(


cos






θ
n


-
1

)








-
sin







θ
n


cos






φ
n










sin






φ
n


cos






φ
n







(


cos






θ
n


-
1

)











cos






θ
n



sin
2



φ
n


+







cos
2



φ
n









-
sin







θ
n


sin






φ
n







sin






θ
n


cos






φ
n





sin






θ
n


sin






φ
n





cos






φ
n





)



(



x




y




z



)









(
39
)







Here, Rz denotes a rotation matrix expressing the rotation around the z axis, and Ry denotes a rotation matrix expressing the rotation around the y axis. The rotational direction of Rz is such that the x axis is moved toward the y axis, and the rotational direction of Ry is such that the z axis is moved toward the x axis.


The CPU 1 applies the formulas (36), (39), and (38) for each lighting direction (θi, φi) of the virtual environment map for the point X on the three-dimensional real object 61 defined in the global coordinate system (or XYZ coordinate system). Then, the CPU 1 converts the virtual environment map in the global coordinate system into a virtual environment map in the UVW coordinate system based on the normal vector (nx, ny, nz) for the point X on the three-dimensional real object 61.


Likewise, the CPU 1 applies the formulas (36), (39), and (38) for each viewing direction (θo, φo) of the virtual line-of-sight map for the point X on the three-dimensional real object 61 defined in the global coordinate system (or XYZ coordinate system). Then, the CPU 1 converts the virtual line-of-sight map in the global coordinate system into a virtual line-of-sight map in the UVW coordinate system based on the normal vector (nx, ny, nz) for the point X on the three-dimensional real object 61.


In the UVW coordinate system for the point X on the three-dimensional real object 61, the above-described processing can provide a relation between the environment map information and the captured image information that is the same as the relation therebetween according to the first exemplary embodiment. Therefore, the CPU 1 is to perform processing equivalent to the processing according to the first exemplary embodiment on the point X on the three-dimensional real object 61 to estimate the reflection characteristics at the point X on the three-dimensional real object 61.


More specifically, in step S30, the CPU 1 first performs light source matrix generation processing to generate a light source matrix (Ni*m) determined based on the number of light source patterns (Ni) for the environment map information and the number of segmentation solid angles (m) obtained by segmenting the environment map information.



FIG. 19 is a flowchart illustrating in detail the light source matrix generation processing (step S30) according to the second exemplary embodiment. In the light source matrix generation processing (step S30), the CPU 1 performs the processing (steps S41, S42, S43, and S44) identical to the segmentation solid angle determination processing (step S3), the lighting direction determination processing (step S4), the light source luminance determination processing (step S5), and the light source matrix determination processing (step S6) according to the first exemplary embodiment. More specifically, the CPU 1 segments each virtual environment map in the UVW coordinate system for the Ni light source patterns into m segmentation solid angles, and determines a light source matrix (Ni*m) for the point X on the three-dimensional real object 61.


In step S31, the CPU 1 performs reflection characteristic estimation processing to estimate the reflection characteristics for the point X on the three-dimensional real object 61. The CPU 1 estimates the reflection characteristics by applying to the formula (7) or (29) the light source matrix (Ni*m) for the point X on the real object 61 and the radiation luminance (or luminance) Lo (1 to Ni) in the Nv viewing directions for the point X on the real object 61 obtained from the virtual line-of-sight map in the UVW coordinate system.


In step S32, the CPU 1 performs reflection model parameter estimation processing to apply fitting to the discrete reflection characteristics for the point X on the three-dimensional real object 61 by using parameters of a reflection model. In step S33, the CPU 1 determines whether the processing in steps S25 to S32 is completed for all of the points X set on the three-dimensional real object 61. When the processing is not completed (NO in step S33), the CPU 1 virtually moves the point X on the three-dimensional real object 61 and performs the processing from step S25. On the other hand, when the processing is completed (YES in step S33), the CPU 1 ends the processing illustrated in FIG. 10.


Effects of Second Exemplary Embodiment

As described above, according to the present exemplary embodiment, a virtual environment map and a virtual line-of-sight map are generated at each point on a three-dimensional real object. This enables estimation of the reflection characteristics on the three-dimensional real object at a high speed with a high accuracy with the real object, light sources, and digital cameras remained fixed.


Further, according to the present exemplary embodiment, the UVW coordinate system based on a normal vector is defined at each point set on the three-dimensional real object, and the reflection characteristics are described based on the coordinate system of concern. More specifically, a coordinate system based on the normal vector is defined at each point set on the real object, and the reflection characteristics are described based on the coordinate system of concern. This enables unique description of the reflection characteristics at each point on the three-dimensional real object.


A third exemplary embodiment will be described below. The second exemplary embodiment has been described above centering on a method of virtually moving a measurement point X in consideration of the shadowing map 142 when estimating the reflection characteristics at the point X on the three-dimensional real object 61. In the reflection characteristic estimation in consideration of the shadowing map 142, the processing speed can be improved by skipping the processing for the shadowed portion 113. However, there arises a situation that, of combinations of the BRDFs (m*Nv) for the m lighting directions and the Nv viewing directions, the BRDF for the shadowed portion cannot be estimated because of a lack of information.


The present exemplary embodiment will be described below centering on a method of complementing a lack of information due to shadowing while restraining the BRDF estimation accuracy degradation due to shadowing in consideration of the shadowing map 142.


The following briefly describes the present exemplary embodiment centering on differences from the first and second exemplary embodiments. Elements identical to those in the first and second exemplary embodiments will be omitted.


(Restraining BRDF Estimation Accuracy Degradation Due to Shadowing)


FIGS. 20A, 20B, and 20C illustrate a method of determining segmentation solid angles in consideration of shadowing according to the third exemplary embodiment.



FIG. 20A illustrates an example of determining segmentation solid angles 161 by using the virtual environment map information 64 with a viewpoint set to the position of the point X on the three-dimensional real object 61, instead of the environment map information 41 illustrated in FIG. 4B.



FIG. 20B illustrates an example of applying the determined segmentation solid angles 161 illustrated in FIG. 20A to the virtual environment map 111 in consideration of shadowing according to the formulas (26) and (27). Since the segmentation solid angles 161 are determined based on the virtual environment map information 64 without consideration of shadowing, the shadowed portion 113 and the unshadowed portion 141 may coexist in the segmentation solid angles 161.


As described above in the lighting direction determination processing (step S4) according to the first exemplary embodiment, there are two different methods of determining the lighting direction (θi, φi) of each segmentation solid angle Δωj (j=1 to m): one method uses the area center (gravity center), and the other method uses the luminance gravity center. In the above-described case where a shadowed portion and an unshadowed portion coexist, the method of using the luminance gravity center makes it possible to estimate the BRDF with a higher accuracy. This is because the method of using the area center (gravity center) determines the lighting direction regardless of shadowing, whereas the method of using the luminance gravity center determines the lighting direction in consideration of the radiation luminance (or luminance) Li of each pixel in the segmentation solid angles 161. However, the segmentation solid angles 161 determined regardless of shadowing are uniformly distributed over the hemisphere of the virtual environment map 111 in consideration of shadowing. On the other hand, the coexistence rate of the shadowed portion 113 and the unshadowed portion 141 in the segmentation solid angles 161 becomes uneven. Accordingly, the distribution of light directions determined from the segmentation solid angles 161 where a shadowed portion and an unshadowed portion coexist also becomes nonuniform, degrading the BRDF estimation accuracy.



FIG. 20C illustrates an example of determining segmentation solid angles 162 by using only the unshadowed portion 141 of the virtual environment map 111 in consideration of shadowing to prevent nonuniformity of the distribution of light directions determined from the segmentation solid angles 161 where a shadowed and an unshadowed portion coexist. For example, region segmentation with a Voronoi diagram on the unshadowed portion 141 is performed by using a method similar to the method illustrated in FIGS. 6A, 6B, and 6C, and to use a segmented region as the segmentation solid angles 162. The segmentation solid angles 162 segmented by using the Voronoi diagram include only segmentation solid angles where a shadowed portion and an unshadowed portion do not coexist, restraining the BRDF estimation accuracy degradation due to the coexistence of a shadowed portion and an unshadowed portion. More specifically, the present exemplary embodiment estimates the reflection characteristics of a real object by segmenting the environment maps into segmentation solid angles based on information indicating a visible region.


(Complementing Lack of Information Due to Shadowing)

As described above, in the reflection characteristic estimation in consideration of the shadowing map 142 according to the second exemplary embodiment (FIG. 10), the discrete reflection characteristics for the point X on the three-dimensional real object 61 can be acquired by the reflection characteristic estimation processing (step S31). However, of combinations of the BRDFs (m*Nv) for the m lighting directions and the Nv viewing directions, the BRDF for the shadowed portion cannot be estimated.


Therefore, in the reflection model parameter estimation processing (step S32), the second exemplary embodiment applies reflection model fitting to an incomplete BRDF including a lack of information due to shadowing. As a result, the estimated parameters of the reflection model will include a large error in a portion with a lack of information due to shadowing.



FIG. 21 is a flowchart illustrating estimation processing of reflection characteristics of a three-dimensional real object in consideration of shadowing according to the third exemplary embodiment. The following briefly describes the present exemplary embodiment centering on differences from the first and second exemplary embodiments. Processing identical to that according to the first and second exemplary embodiments is assigned the same reference numerals, and redundant descriptions thereof will be omitted.


The CPU 1 acquires the discrete reflection characteristics for the point X on the three-dimensional real object 61 in the processing up to the reflection characteristic estimation processing (step S31). In this case, the discrete reflection characteristics mean an incomplete BRDF including a lack of information due to shadowing. The reflection model parameter estimation processing (step S32) is performed after the processing in step S33 and BRDF complement processing in steps S51 and S52 (described below).


In step S51, when the discrete reflection characteristics are obtained at all of the points X on the three-dimensional real object 61 in the determination processing (step S33), the CPU 1 determines whether the discrete reflection characteristics for each point X mean an incomplete BRDF. The CPU 1 can determine whether the discrete reflection characteristics at each point X mean an incomplete BRDF when applying the formula (29) in the reflection characteristic estimation processing (step S31).


More specifically, the CPU 1 can make the determination based on whether the lighting direction (j ∈ [1, m]) with V(x, j)=0 or the viewing direction (k ∈ [1, Nv]) with V(x, k)=0 exists. For example, in the reflection characteristic estimation processing (step S31), there is a case where the lighting direction (j ∈ [1, m]) with V(x, j)=0 or the viewing direction (k ∈ [1, Nv]) with V(x, k)=0 exists. In such a case, presetting a flag for each point X enables simply performing the incomplete BRDF determination processing (step S51) at a high speed.


Then, the CPU 1 complements a lack of information due to an incomplete BRDF in the incomplete BRDF complement processing (step S52). Generally, in many cases, an adjacent portion of the point X on the three-dimensional real object 61 is made of the same material as the point X. Since the BRDF is a function reflecting only the surface material, the BRDF can be considered to be disassociated from surface unevenness. All of the BRDFs estimated in the reflection characteristic estimation processing (step S31) are represented in the UVW coordinate system converted by the coordinate conversion (step S29) such that the direction of the surface normal vector coincides with the w axis. Therefore, when the reflection characteristics mean isotropic reflection, the BRDF for the point X on the three-dimensional real object 61 and the BRDF for an adjacent point can be directly compared in the UVW coordinate system. On the other hand, when the reflection characteristics mean anisometric reflection, the BRDF for the point X on the three-dimensional real object 61 and the BRDF for an adjacent point can be directly compared by rotating the BRDFs around the w axis.


When the point X on the three-dimensional real object 61 and an adjacent point are made of the same material, the BRDFs for the two points will be identical. If an incomplete BRDF for the point X on the three-dimensional real object 61 partly coincides or highly correlates with the BRDF for an adjacent point, the two points are highly likely to be made of the same material. Therefore, the CPU 1 complements a portion with a lack of information due to shadowing by an incomplete BRDF for the point X on the three-dimensional real object 61, with the value of the BRDF for an adjacent point. More specifically, if information about reflection characteristics of the real object lacks due to shadowing, the CPU 1 complements the portion of concern with similar reflection characteristics at a peripheral portion.


Effects of Third Exemplary Embodiment

As described above, according to the present exemplary embodiment, the BRDF estimation accuracy degradation due to shadowing can be restrained by determining segmentation solid angles by using only an unshadowed portion in the virtual environment map.


Further, according to the present exemplary embodiment, a lack of information due to shadowing can be complemented with similar reflection characteristics at a peripheral portion. Thus, BRDF estimation accuracy degradation due to shadowing can be restrained.


According to the present exemplary embodiment, it is possible to improve the estimation accuracy of reflection characteristics of a real object without providing restrictions in a measurement environment.


Other Embodiments

Embodiment(s) of the disclosure can also be realized by a computer of a system or apparatus that reads out and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be referred to more fully as a ‘non-transitory computer-readable storage medium’) to perform the functions of one or more of the above-described embodiment(s) and/or that includes one or more circuits (e.g., application specific integrated circuit (ASIC)) for performing the functions of one or more of the above-described embodiment(s), and by a method performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiment(s) and/or controlling the one or more circuits to perform the functions of one or more of the above-described embodiment(s). The computer may comprise one or more processors (e.g., central processing unit (CPU), micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)), a flash memory device, a memory card, and the like.


While the disclosure has been described with reference to exemplary embodiments, it is to be understood that the disclosure is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.


This application claims the benefit of Japanese Patent Application No. 2017-034504, filed Feb. 27, 2017, which is hereby incorporated by reference herein in its entirety.

Claims
  • 1. An apparatus comprising: a first acquisition unit configured to, with a viewpoint set to a position of an object, acquire a plurality of environment maps for each position of light sources, the environment maps being obtained by imaging a surrounding environment from the viewpoint;a second acquisition unit configured to acquire a plurality of captured images for each position of the light sources, the captured images being obtained by imaging from a plurality of directions the object irradiated with light by the light sources; anda determination unit configured to determine reflection characteristics of the object based on the environment maps and the plurality of captured images.
  • 2. The apparatus according to claim 1, wherein, for each position of the light sources, the first acquisition unit acquires a plurality of the environment maps obtained by imaging a surrounding environment from the viewpoint by using an omnidirectional camera.
  • 3. The apparatus according to claim 1, wherein, for each position of the light sources, the first acquisition unit acquires a plurality of the environment maps obtained by imaging a surrounding environment from the viewpoint by using a camera with a fish-eye lens.
  • 4. The apparatus according to claim 1, wherein the first acquisition unit acquires the environment maps obtained by imaging an omnidirection from the viewpoint.
  • 5. The apparatus according to claim 1, further comprising a segmentation unit configured to segment each of the plurality of environment maps into a plurality of solid angles, wherein the determination unit determines the reflection characteristics of the object by determining a lighting direction and a light source luminance for each of the plurality of solid angles.
  • 6. The apparatus according to claim 5, wherein, based on a luminance on the environment maps, the segmentation unit segments each of the plurality of environment maps into a plurality of solid angles.
  • 7. The apparatus according to claim 6, wherein the segmentation unit segments the environment maps into a plurality of solid angles through a region segmentation using a Voronoi diagram with a kernel point set to a point where the luminance on the environment maps is larger than a predetermined value.
  • 8. The apparatus according to claim 5, wherein, based on a predetermined allocation method, the segmentation unit segments each of the plurality of environment maps into a plurality of solid angles.
  • 9. The apparatus according to claim 8, wherein the predetermined allocation method is determined based on an arrangement of the light sources.
  • 10. The apparatus according to claim 5, wherein, for each of the plurality of solid angles, the determination unit determines the lighting direction based on an area center in the solid angles.
  • 11. The apparatus according to claim 5, wherein, for each of the plurality of solid angles, the determination unit determines the lighting direction based on a luminance gravity center in the solid angles.
  • 12. The apparatus according to claim 1, further comprising: a third acquisition unit configured to acquire shape information about the object; anda generation unit configured to generate a shadowing map indicating whether incident light to the object is to be shadowed, based on the acquired shape information,wherein the determination unit determines the reflection characteristics of the object by applying the shadowing map to the environment maps.
  • 13. The apparatus according to claim 12, wherein the shadowing map includes information indicating self-shading or self-shadowing at a point on the object.
  • 14. The apparatus according to claim 12, wherein, in a case where information about reflection characteristics of the object lacks due to shadowing, the determination unit complements a portion of concern with similar reflection characteristics at a peripheral portion.
  • 15. The apparatus according to claim 12, wherein the shadowing map includes information indicating a visible region, andwherein, based on the information indicating the visible region in the shadowing map, the determination unit generates a virtual environment map and a virtual line-of-sight map at a virtual position.
  • 16. The apparatus according to claim 15, wherein, based on the information indicating the visible region, the determination unit segments the environment maps into segmentation solid angles and determines reflection characteristics of the object.
  • 17. The apparatus according to claim 1, wherein the first acquisition unit acquires the plurality of environment maps with viewpoints set to a plurality of positions on the object.
  • 18. The apparatus according to claim 1, wherein, at a point set on the object, the determination unit defines a coordinate system based on a normal vector, and describes the reflection characteristics based on the coordinate system.
  • 19. A method comprising: acquiring, with a viewpoint set to a position of an object, a plurality of environment maps for each position of light sources, the environment maps being obtained by imaging a surrounding environment from the viewpoint;acquiring a plurality of captured images for each position of the light sources, the captured images being obtained by imaging from a plurality of directions the object irradiated with light by the light sources; anddetermining reflection characteristics of the object based on the environment maps and the plurality of captured images.
  • 20. A non-transitory computer-readable storage medium storing instructions that, when executed by a computer, cause the computer to perform a method comprising: acquiring, with a viewpoint set to a position of an object, a plurality of environment maps for each position of light sources, the environment maps being obtained by imaging a surrounding environment from the viewpoint;acquiring a plurality of captured images for each position of the light sources, the captured images being obtained by imaging from a plurality of directions the object irradiated with light by the light sources; anddetermining reflection characteristics of the object based on the environment maps and the plurality of captured images.
Priority Claims (1)
Number Date Country Kind
2017-034504 Feb 2017 JP national