• No results found

Chapter 4 View Evaluation

4.1 Hierarchical View Evaluation

4.1.3 Constraint and Sampling Density Evaluations

4.1.3.4 Visibility Constraint

Visibility between the scanner viewpoint and each surface point seems to be the most important, and sometimes the only, sensing constraint that is evaluated in almost all existing next-best-view algorithms. Here, we are testing the visibility between a viewcell and a rectangle-bounded patch.

When c3

(

V,P

)

=1, it implies that every point in the viewcell can see every point on the patch without obstruction, i.e. the viewcell and the patch are totally visible to each other. To determine that, one has to ensure that there is no occluder in the shaft [Haines1994] between the viewcell and the patch, which is the 3D volume occupied by the line segments connecting every point in the viewcell to every point on the patch. A 2D analogy of the shaft between a viewcell and a patch’s bounding rectangle is shown in Figure 4.10.

patch’s bounding rectangle nP nP nP nP

90

To determine c3

(

V,P

)

=1, bounding planes are constructed to enclose the shaft between the viewcell and the patch’s bounding rectangle. For efficiency, one can reduce the number of bounding planes needed by enclosing an approximation volume larger than the exact shaft. The surface and solid-space voxels in the partial octree model are then tested, in a top-down traversal manner, against all the bounding planes to find out if any of the voxels is inside or intersects the volume bounded by the bounding planes. The optimizations used in hierarchical view frustum culling [Assarsson2000] are applied to test the voxels against the bounded volume.

If no surface and solid-space voxel is found to be inside or intersect the bounded volume, EvaluateConstraint(3,V,P) returns 1 to indicate total visibility between the viewcell and the patch.

Figure 4.10: Bounding planes are constructed to enclose the shaft between the viewcell and the patch’s bounding rectangle.

When c3

(

V,P

)

=0, the viewcell and the patch are totally invisible to, or totally occluded from, each other. Determining total invisibility or total occlusion between two extended objects is a difficult problem because the total occlusion may be caused by multiple occluders that are not connected to each other [Cohen-Or2003]. This is made worse in the case when there are many individual small occluders. In computer graphics, most of the methods that deal with visibility between extended objects are for occlusion culling in interactive walkthrough [Cohen-Or2003], for computing shadows and for global illumination computation [Teller1993, Durand1999]. These methods are mostly used in preprocessing

patch’s bounding rectangle viewcell shaft shaft bounding planes

stages and are usually very computationally expensive, and many cannot sufficiently combine the occlusion of individual small occluders to quickly determine total occlusion.

In my case, many small voxels of the partial octree model may appear in the shaft between V and P. If it can be determined that, within the shaft, there is no path, straight or non-straight, between some point in the viewcell and some point on the patch, then one can conclude that V and P are totally occluded from each other. Of course, the inverse implication is not true because even if a path exists, V and P may still be totally occluded. This is fine for the function EvaluateConstraint(3,V,P) because it is allowed to return undefined even if V and P are actually totally occluded. The method of finding a path seems very suitable for indoor environments where there are large walls and partitions, and it will be able to correctly detect total occlusion when V and P are on opposite sides of some large wall or in different rooms. This can avoid many unnecessary subdivisions of the viewcells or the patches due to the inability to detect total occlusion early.

However, finding a path from V to P takes time quadratic to the number of voxels in the shaft [O’Rourke1998]. When a large shaft is obstructed or almost obstructed, there will be a large number of voxels in it, and it will take a long time to determine whether a path exists.

In the absence of an efficient algorithm, I have chosen to use a probabilistic approach to estimate total occlusion between a viewcell and a patch. The method is illustrated in Figure 4.11. On the viewcell’s bounding sphere, the great circle parallel to the patch is first identified. Then, an equal number of random points is generated in each quadrant of the disc bounded by the great circle, and in each quadrant of the patch’s bounding rectangle. Rays are shot from the random points on the disc to the points on the patch’s bounding rectangle. In the implementation, 16 random rays are generated in this way. If all the random rays are occluded, then it is estimated that the patch is totally occluded from the viewcell, and EvaluateConstraint(3,V,P) returns 0. Otherwise, it is assumed that the patch is

partially visible from the viewcell, and EvaluateConstraint(3,V,P) returns undefined. The hierarchical structure of the partial octree model is exploited to accelerate the determination of whether a ray intersects any non-empty-space voxels [Foley1992].

92

Figure 4.11: Generating random rays from the viewcell’s bounding sphere to the patch’s bounding rectangle to estimate total occlusion.

There is no ill-effect when total occlusion is erroneously declared as partial visibility, except that it may cause an unnecessary subdivision of the viewcell or the patch. On the other hand, it may be undesirable when partial visibility is erroneously declared as total occlusion, since the patch will be disregarded even though it may increase the score of the viewcell. If the occluders between the viewcell and the patch are few and small, then this method is less likely to make a mistake. The most difficult case is when the viewcell and the patch are almost, but not totally, occluded. An example is when the viewcell and the patch are on opposite sides of a large wall that has a very small window. Most likely, the method will declare total occlusion for this case. However, since the method is probabilistic, the chance that the patch will not be “missed” by the same viewcell is relatively higher if many model acquisition cycles are considered instead of just one.