If you now, from your SVM, which object is propably in the Image you can just use an Image that contains only your Object as "object image" and your current sample as "scene image".
Than you can follow the Example "Features2D + Homography to find a known object" (that you already mentioned) to find the Position of your Object in the Scene. If you want to draw only the Bounding Box (and not the matched features) just extract the Corner Points from your Object (Code from the Example):
//-- Get the corners from the image_1 ( the object to be "detected" )
std::vector<Point2f> obj_corners(4);
obj_corners[0] = cvPoint(0,0);
obj_corners[1] = cvPoint( img_object.cols, 0 );
obj_corners[2] = cvPoint( img_object.cols, img_object.rows );
obj_corners[3] = cvPoint( 0, img_object.rows );
and convert them into scene coordinates
std::vector<Point2f> scene_corners(4);
perspectiveTransform( obj_corners, scene_corners, H);
assuming you have already computed the Homography Matrix H
.
Now you have the Corner Point in Scene Coordinates and can simply draw the Lines between the Corner Points to get your Bounding Box (Code from the Example):
//-- Draw lines between the corners (the mapped object in the scene - image_2 )
line( img_matches, scene_corners[0] + Point2f( img_object.cols, 0), scene_corners[1] + Point2f( img_object.cols, 0), Scalar(0, 255, 0), 4 );
line( img_matches, scene_corners[1] + Point2f( img_object.cols, 0), scene_corners[2] + Point2f( img_object.cols, 0), Scalar( 0, 255, 0), 4 );
line( img_matches, scene_corners[2] + Point2f( img_object.cols, 0), scene_corners[3] + Point2f( img_object.cols, 0), Scalar( 0, 255, 0), 4 );
line( img_matches, scene_corners[3] + Point2f( img_object.cols, 0), scene_corners[0] + Point2f( img_object.cols, 0), Scalar( 0, 255, 0), 4 );
Important is that your "object_image" contains only the Object and nothing else.
If you want to get the best Sample from your Class you must compute scores for each sample. This can be done using the Method described in: "Probability Estimates for Multi-class Classification by Pairwise Coupling" from Wu et. al. which you can find here.
However this could be too slow for a real-time application.