# Use of Gradient-Based Shadow Detection for Estimating Environmental Illumination Distribution
## 3 Results  
The experimental equipment consisted of a PC with 3.4 GHz CPU. Figure 6a shows the experimental setup used to estimate the environmental illumination distribution. We manually measured the directions of real light sources (in the elevation angle, \(\theta\), and the azimuth angle, \(\varphi\), in the spherical coordinate system), using the marker's center to ground truth. In this experiment, we used two to three bulbs (each 5 cm in diameter) as the environmental light sources. The candidate shadow consists of four to five boundary line segments. The image features (gradient direction and magnitude) are examined along the shadow line segments that make up the candidate shadow boundary. Specifically, we examined to what extent the shadows cast by the top plane and the side walls of the 3-D marker correlate with the image features on the shadow surface. Figure 6b,f show the input image with two and three illumination sources, respectively. Figure 6d shows the shadow boundaries and intersection points of the detected shadow lines, and Figure 6e,g show the final rendered image, estimated with two and three illumination sources, respectively, using the proposed method. Figure 6h,i show the threshold image (by 150 intensity value) and the rendered image, made using a previously published method [4]. Figure 6h shows that the threshold value selection greatly affects the region-based shadow region detection. This indicates that the previous  
Figure 6: (**a**) Experimental setup; (**b**) input image with two illumination sources; (**c**) one of the shadow boundaries cast by the candidate illumination source; (**d**) shadow casting elements and matched elements; (**e**) rendered image; (**f**) input image with three illumination sources; (**g**) rendered image; (**h**) threshold image (by 150 intensity value); (**i**) rendered image created using the method reported in Reference [4]. illumination estimation methods based on shadow detection are dependent on the illumination condition. In the point-based approaches, careful sampling is necessary to produce variation in the distribution of these light sources that is to be maximized. For example, the method of [PERSON] et al. sometimes fails to provide a correct estimate of the illumination distribution because it is sensitive to the number of sampling points and their positions [1]. To compare our proposed method with the method previously published in Reference [4], we overlaid the rendered shadows onto the input shadow image. The previous method examines the ratio between the threshold shadow image regions and the candidate shadow mask regions created by the illumination sources. The performance of the previous method is therefore heavily dependent on the determination of the threshold value for the shadow region segmentation. The real shadow region in Figure 6h is not sufficiently detected, meaning that the illumination information for the shadow region is incorrectly estimated. The candidate shadows are generated at 5\({}^{\circ}\) intervals in both the azimuth angle (0-360\({}^{\circ}\)) and the elevation angle (30-85\({}^{\circ}\)). The total number of candidate shadows is 864 (72 \(\times\) 12), and the matching scores of the candidate shadows are represented in the 2-D domain. Figure 7 shows the illumination source distribution for the scene depicted in Figure 6b. High-intensity illumination sources usually generate a shadow region with distinct edges. Therefore, the highest score is obtained at the angular position where the illumination source with the highest intensity is located. Because the order of the matching score generally coincides with the order of the illumination intensity, we represented the matching scores of another illumination source relative to the highest matching score, as shown in Figure 7a. In this experiment, we used a bulb with a diameter of 5 cm, covering one sample area in the longitude and latitude domains.