Information Technology Reference
In-Depth Information
calc_arr , calc_lv , and calc_fork are used rather than the img predicates directly,
since they will be refined later.) Loading this program and including the image data
from figure 6.14 produces
?- cuboid(A,B,C,D,E,F,G).
A=6, B=7, C=2, D=3, E=4, F=5, G=1;
A=2, B=3, C=4, D=5, E=6, F=7, G=1;
A=4, B=5, C=6, D=7, E=2, F=3, G=1;
No
The program finds three cuboids in the scene, which are actually just three ways of
looking at the same seven vertices. (Since there is no orientation information in the
image, there is no reason to prefer one view over the others.)
Of course, this predicate would be unable to find a cuboid that was positioned in
such a way that some of its vertices were hidden. Moreover, the only given informa-
tion is about the connectivity of the vertices. The wedge in figure 6.14 does not contain
the cuboid pattern of vertices, but a truncated version of it would. To disambiguate
between a cuboid and a truncated wedge, one would need image information about
the relative orientation of the edges (in particular, which edges are parallel ). If there
were also image information about the relative lengths of the edges, one could go
further and find objects like a cube in the image.
6.4.1 Handling occlusion
One interesting extension of this analysis concerns occlusion. Consider the two
cuboids in figure 6.16. Neither would be recognized by the previous cuboid pred-
icate. This is because the cuboid on the right occludes part of the cuboid on the left.
So, for example, both vertex 8 and vertex 2 connect to T-vertices (vertices 3 and 10,
respectively). These T-vertices are the signal that occlusion is taking place, and the
identification cannot be handled by the current cuboid definition.
Consider the occluding cuboid on the right. The goal would be to say that this is
a cuboid over vertices 8, 9, 15, 12, 13, 14, 11 and to simply bypass any intervening
T-vertices. To do so, it is necessary to extend the definition of the predicates calc_lv
and calc_arr . For calc_lv , instead of having
calc_lv(V,V1,V2) :- img_lv(V,V1,V2).
the following is used:
calc_lv(V,V1,V2) :-
img_lv(V,X,Y), ltv_seq(V,X,V1), rtv_seq(V,Y,V2).
 
Search WWH ::




Custom Search