• Ingen resultater fundet

Implementation

In document Surface Estimation From Multiple Images (Sider 150-155)

Aside from the normal objective function, one could add a lookup for every vertex into the Harris field of every image and favor vertices being at strong features while penalizing when low feature. The cost for not being at a strong feature should be big enough to encourage the positioning there, but small enough to secure that vertices avoids being positioned at positions with weak features, if these are correct regarding the input images. Thus it should make vertices attracted to nearby features, but not force the model to remove all vertices in uniform areas with no features. This can be achieved by removing a part of the penalty for having a vertex in the mesh, discussed in section 9.2, based on how strong the features are in the projections of the vertices into the images. As the cost for having a vertex is now, it is not high enough to make the model remove all vertices. Thus it will only be an extra reduction in the cost, when a vertex is placed at a strong feature in space.

To be able to adjust the significance of the feature cost in the results a weighing constant,w, is introduced. This gives the final feature term

F(M) = 1

16.3 Results 133 , wheref(v, c) is the feature strength ofv in camerac. The max term are used to ensure that the cost is positive.

Figure 16.2: The result of one of the tests using feature cost, where w = 30.

The resulting model can be found inCactus/feature30/model1.x3d.

16.3 Results

One of the datasets that presented large problems because of uncontrolled vertex placement are the Cactus dataset. As can be seen in figure 16.1, the rim of the pot and many of the spikes are clearly visible in the feature field. It may thus be worthwhile to add this feature penalty, to make it beneficial for the vertices to use these points in space. This has been done for 5 different weighings of the feature cost, where a high weight gives large bonuses for using feature points. In generalwis chosen relatively high, as only the strongest features would otherwise be useful. The resulting convergences can be seen in figure 16.3. Recall that adding a feature cost actually removes some of the cost with respect to the basic implementation. As can be seen in the right plot, the amount is much less than what is actually gained in the objective function using the feature cost.

As an example the result using a weighing of the feature cost of 30 can be seen in figure 16.2. If studying the 3D models of the result it can be seen that many of the vertices are placed on or close to strong features. In general less errors in the models occurred when using the feature cost, which is natural, since erroneous surfaces that appear correct with respect to the images, seldom match the features as well.

16.4 Conclusion

The feature cost adds a new constraint to the mesh, making it more willingly to use good feature points in space. The result is that some errors are avoided,

134 Use of Feature Maps

Figure 16.3: The convergence of 5 different tests weighing the feature cost dif-ferent. To the right the actual feature cost is shown.

and that the result in general fits better. It has a small but significant impact on the objective function satisfying the objective for introducing it.

C h a p t e r 17

Error Based Selection

This chapter will describe a novel idea, where the randomized selection of a primitive for deformation, is substituted with a more sophisticated selection based errors. The idea has not been implemented fully, and this is thus only a presentation of it.

The algorithm as described makes use of some of the image data in its defor-mation of the model, however the selection of the primitive to be deformed are completely random. This makes the algorithm awfully slow for large meshes, as the algorithm may ’guess’ wrong many times before finding a primitive, that actually needs a deformation.

17.1 Using Errors

One intuitive way of improving this is to store the cost of each triangle in the evaluation, and use it to select abad triangle or one of its corners. This however is not straight forward when using an image based algorithm. It would require projecting the triangles into theCamera’s and sum the error at the pixels that they cover. This is both slow and difficult as some pixels are shared between triangles.

136 Error Based Selection

Figure 17.1: The automatic sampling and evaluation of triangles arranged in a texture. The actual triangles and their internal error can be made out.

On the other hand an object based approach could be used as in a correlation deformation. Sampling on the triangles and projecting them into the images to compare their colors are relatively slow using the straight forward approach on the CPU. The task however can be formulated as a problem solvable on a graphics card. Figure 17.1 shows how arbitrary triangles could be sent to the graphics hardware. Sampling in the triangles could be done using the automatic interpolation, lookup of the color values could be done using texture matrices like in section 10.2.4, and comparison of the colors using an image metric. The result for each sample, stored in the corresponding pixel, can even be summed into scalar values of each triangle using a modified summing algorithm.

As the algorithm only deforms a limited number of primitives each iteration, all triangle errors need not be updated each time. A deformation may how-ever render a distant triangle occluded or un-occluded, thus changing its cost.

Therefore to avoid too large errors the cost would have to be fully reevaluated regularly.

The triangle cost can not be used directly as a vertex cost, when searching for an expensive vertex to deform. A vertex’s cost could however be defined as the average cost of its owners. Thus if a vertex causes its nearby triangles to have a large cost, it will itself have a large cost, while the neighboring verticesbdvec would only be effected by a few of the high cost triangles.

In document Surface Estimation From Multiple Images (Sider 150-155)