0

enter image description here

Which of the openCV methods would be suitable for finding the position of a captured image on a larger image, which the capture will be within.

My intention is to match a captured image of the floor with a full image of the entire floor to find the current location. I am only aware of template matching as below;

match = cv2.matchTemplate(capture, floor, method)

Where the third argument would be the cv2 template matching method used. How might this be done?

Thanks!

Mark Corrigan
  • 544
  • 2
  • 11
  • 29
  • as Vit tried to point out below, template matching in general might not be the best solution in your case. "to match a captured image of the floor" - if your image comes from a real camera, you're basically suffering from perspective distortion, rotation, scaling. all of them bad for your aproach(template matching). – berak Dec 28 '14 at 19:34
  • I was planning to blur the images before, but what else would you suggest? My understanding was it returned the section with maximum resemblance? – Mark Corrigan Dec 28 '14 at 19:44
  • iirc, template matching is using a dct based cross-correlation under the hood, so i doubt, that blurring won't ever help there. again, you probably have to look out for alternatives to template-matching in general. – berak Dec 28 '14 at 19:49
  • maybe it helps, if you rephrase the question, like : "how do i match the floor ?" (without restricting it to the only method you know atm.) – berak Dec 28 '14 at 19:53
  • ok then i will do that – Mark Corrigan Dec 28 '14 at 19:58

1 Answers1

0

"Standard" is salient points (corners, blobs etc) and it's descriptors (SIFT, SURF, FREAK etc), and then homography search for two images.

But your question is very broad, the best method depends on your case and floor properties. You'd better show your "captured image of the floor" and "full image of the entire floor". Template matching for this descriptors and it's quantity may differ, no a priory best method.

Vit
  • 793
  • 4
  • 17
  • How is this an answer, terrible – Mark Corrigan Dec 28 '14 at 19:00
  • You'd better show your "captured image of the floor" and "full image of the entire floor" – Vit Dec 28 '14 at 19:14
  • I can show you one of the floor images but don't yet have one of the entire surface. it's just a white surface with straight black lines – Mark Corrigan Dec 28 '14 at 19:27
  • In the case of low detail surface and strait lines it could be useful undistort image, find lines (Hough transform etc) and - if there are no line repeating pattern - try to understand where you are. – Vit Dec 28 '14 at 20:07
  • I was hoping there was less manual way to do it, I'd thought about doing this but I would have though there'd be built in functionality – Mark Corrigan Dec 28 '14 at 20:19