// Load in the ASM
masm_model model;
if (!vsl_quick_file_load(model,params.asm_path)) return 1;
// Create a searcher (which will be initialised with the default pose)
masm_searcher asm_searcher(model);
// Load in an image
vimt_image_2d_of image;
vimt_load(image,image_path);
if (image.image().size()==0) return 2;
// Most models assume grey-scale images. If RGB then convert to grey.
if (image.image().nplanes()==3)
{
vil_image_view grey_image;
vil_convert_planes_to_grey(image.image(),grey_image);
image.image()=grey_image;
}
// Build an image pyramid from this
vimt_gaussian_pyramid_builder_2d pyr_builder;
vimt_image_pyramid image_pyr;
pyr_builder.build(image_pyr,image);
// Perform the search
asm_searcher.search(image_pyr);
// Get the resulting points
msm_points final_points = asm_searcher.points();