how to make bounding box on surf features ?
Hello all,
i am working on SURF features and i will be glad if someone could help me out in knowing how can i make bounding box on my good features on a live video. this (using this link as reference). i am not able to understand that in a live video if i have features on my face how to to just put bounding box where the good features clusters are more !! can anyone help me out in this ?? please see this image below, features on the packet are matched so it should give me result that this is is the object with same features match,
thanks all in advance
please understand, that feature detection has no notion at all about "objects" , it will retrieve keypoints in the whole image, thus the idea of a "bounding box" for those does not make sense.
@berak thanks for the reply, but i was wondering what is the use of feature points if we cannot distinguish those with rest of the image or scene. Also, the link i gave in my question has surf feature with homography but the object is already in database, but i am capturing object image after some delay so if the features match with the scene it should give me bounding box on my scene frame !! right ?
i have video frames, is there then any other way i can make a bounding box on objects approaching near ??
As berak said, you can't put a bounding box around the points, it means nothing. You can match the points to the model, figure out where the model is, and put a bounding box around that if you want though.
Which is precisely what you see in the tutorial. So what don't you understand?
@kzbr93, since this seems to be about human faces, you could apply face detection initially, and transform the rect from that with the homography matrix obtained from feature matching
@berak sorry i think i am not able to put my question properly, its not just about human faces, and i know that SURF works good if we have database or trained images (please see my edited question with image), if i have 2 frames and in both the frames SURF gives me features on same object then why can't it tell that this object have the same features in your current frame (eventually with the bounding box).
eventually its making that green color bounding box in whole of my current frame, then whats the use of those feature match. ??
the tutorial is using a small roi image as a template. if both images come from your webcam, they simply have the same size, and the resulting bbox will be the whole image (unless you rotate your bag of chips)
again, the problem is, that you do not have a good initial bounding box, and getting something from the keypoints won't work either, because there are a lot of them e.g. on your jacket (but could be anywhere else, too)
@berak ok lets make it simple, i store the image of the object and try to track it, in a video !! i am trying to do it but my book is not getting tracked using the same code but now "img_scene" contains the video frames. please check !! https://pastebin.com/Ac6WazL9 everytime i run the code the window is shutting down within seconds