CSE 473: Introduction to Artificial IntelligenceAutumn 2007 |
We would like to determine where the camera is located and the direction in which it is pointing. This is represented by a set of camera parameters. There are six parameters: t1, t2, t3, r1, r2, and r3. The ti's are translation parameters and the ri's are rotation parameters. We know approximately where the camera is and are given an initial state (t10, t20, t30, r10, r20, r30). We are also given a black box function called project(t1,t2,t3,r1,r2,r3) that when given the 6 parameters, projects the object onto the image plane from that view point. It essentially produces another array showing where the outline of the object would be from the given view point.
Suppose the actual image plane array with the real outline of the object is in array A[*,*] and the project method writes its outline from the current set of parameters in another array B[*,*]. The goal of the problem is to find the set of parameters for which the 2 outlines line up perfectly. The start state is (t10,t20,t30,r10,r20,r30). The parameters of the goal state are the unknowns to be found.
Define a heuristic function h that estimates how far the current state (set of parameters) is from the goal. Use the two arrays A and B to compute your answer. A is what should happen at the goal state. B is what is happening at the current state. Note that this problem took a lot of space to explain, but your function just has to decide how close the A array is to the B array, and we are only interested in the 1-elements.
Here is a picture of the problem setup.