UWARG Computer Vision
Macros | Functions
contour_comparison.h File Reference
#include <opencv2/imgproc.hpp>
#include <vector>
Include dependency graph for contour_comparison.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double compare_contours (std::vector< std::vector< cv::Point > > &contourA, std::vector< std::vector< cv::Point > > &contourB)
 Compares two contours and returns their overlap. More...
 

Detailed Description

Author
WARG

LICENSE

Copyright (c) 2015, Waterloo Aerial Robotics Group (WARG) All rights reserved.

This software is licensed under a modified version of the BSD 3 clause license that should have been included with this software in a file called COPYING.txt Otherwise it is available at: https://raw.githubusercontent.com/UWARG/computer-vision/master/COPYING.txt

Function Documentation

double compare_contours ( std::vector< std::vector< cv::Point > > &  contourA,
std::vector< std::vector< cv::Point > > &  contourB 
)

Compares two contours and returns their overlap.

The return value uses the larger of the two contour sets as the base This means that, for example, if the first set of contours encloses the second but is twice as large, the resulting value will be 0.5, which is the same value as if the first was only half the size as the second

Parameters
contourAfirst contour to compare
contourBsecond contour to compare
Returns
Overlap between the two Contours, 1 being a complete match, 0 being a complete mismatch