Search code examples
opencvedge-detection

Object detecting without haarCascade.xml


matchTemplate works for only one object in the image, and object must have same size and rotation as template_image. haarTraining takes long time for generating haarCascade.xml file. So Is there any other method of detecting objects, which has not any of these problems?


Solution

  • OpenCV has some very good samples for object detection (without haar cascades). You should have a look at matcher_simple.cpp as a starting point. The next few to look at are descriptor_extractor_matcher.cpp and matching_to_many_images.cpp. matching_to_many_images.cpp will probably be closest to what you are looking for as it breaks out the training and query phases for you, and allows for persistent storage of the training descriptors.

    Also, have a look at the features2d tutorials.

    Hope that helps!