Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Comparing Two Contours: Rotation invariant?

I found one approach for estimate the orientation of two contours here , which rotates one contour and checks the distance to the original. I changed the headers to

#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#include <opencv2/shape.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <iostream>    
#include <opencv2/opencv_modules.hpp>
#include <iostream>
#include <fstream>
#include <string.h>

and the main to:

int main(int argc, char* argv[])

It may be kind of a stupid question, but first of all i don't know, why the transformation of the contours should improve the result of computeDistance. Is the <cv::shapecontextdistanceextractor> not invariant to rotation and translation, because it does internal fit?

If this would be the case, my results would be coherent, because I always get 0 as distance (but unfortunately no image as well). Also the result from an other program, where i match rotated contours with cv::shapecontextdistanceextractor> as well as the hausdorff metric seems not to be wrong (small distances, but no exact 0).

Comparing Two Contours: Rotation invariant?

I found one approach for estimate the orientation of two contours here , which rotates one contour and checks the distance to the original. I changed the headers to

#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#include <opencv2/shape.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <iostream>    
#include <opencv2/opencv_modules.hpp>
#include <iostream>
#include <fstream>
#include <string.h>

and the main to:

int main(int argc, char* argv[])

It may be kind of a stupid question, but first of all i don't know, why the transformation of the contours should improve the result of computeDistance. Is the <cv::shapecontextdistanceextractor> not invariant to rotation and translation, because it does internal fit?

If this would be the case, my results would be coherent, because I always get 0 as distance (but unfortunately no image as well). Also the result from an other program, where i match rotated contours with cv::shapecontextdistanceextractor> as well as the hausdorff metric seems not to be wrong (small distances, but no exact 0).

Comparing Two Contours: Rotation invariant?

I found one approach for estimate the orientation of two contours here , which rotates one contour and checks the distance to the original. I changed the headers to

#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#include <opencv2/shape.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <opencv2/opencv_modules.hpp>
#include <iostream>
#include <fstream>
#include <string.h>

and the main to:

int main(int argc, char* argv[])

It may be kind of a stupid question, but first of all i don't know, why the transformation of the contours should improve the result of computeDistance. Is the <cv::shapecontextdistanceextractor> not invariant to rotation and translation, because it does internal fit?

If this would be the case, my results would be coherent, because I always get 0 as distance (but unfortunately no image as well). Also the result from an other program, where i match rotated contours with cv::shapecontextdistanceextractor> as well as the hausdorff metric seems not to be wrong (small distances, but no exact 0).

Comparing Two Contours: Rotation invariant?

I found one approach for estimate the orientation of two contours here , which rotates one contour and checks the distance to the original. I changed the headers to

#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#include <opencv2/shape.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv_modules.hpp>
#include <iostream>
#include <fstream>
#include <string.h>

and the main to:

int main(int argc, char* argv[])

It may be kind of a stupid question, but first of all i don't know, why the transformation of the contours should improve the result of computeDistance. Is the <cv::shapecontextdistanceextractor> not invariant to rotation and translation, because it does internal fit?

If this would be the case, my results would be coherent, because I always get 0 as distance (but unfortunately no image as well). Also the result from an other program, where i match rotated contours with cv::shapecontextdistanceextractor> as well as the hausdorff metric seems not to be wrong (small distances, but no exact 0).

Comparing Two Contours: Rotation invariant?

I found one approach for estimate the orientation of two contours here , which rotates one contour and checks the distance to the original. I changed the headers to

#include <opencv2/core.hpp>
#include <opencv2/shape.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv_modules.hpp>
#include <iostream>
#include <fstream>
#include <string.h>

and the main to:

int main(int argc, char* argv[])

It may be kind of a stupid question, but first of all i don't know, why the transformation of the contours should improve the result of computeDistance. Is the <cv::shapecontextdistanceextractor> not invariant to rotation and translation, because it does an internal fit?

If this would be the case, my results would be coherent, because I always get 0 as distance (but unfortunately no image as well). Also the result from an other program, where i match rotated contours with cv::shapecontextdistanceextractor> as well as the hausdorff metric seems not to be wrong (small distances, but no exact 0).

Comparing Two Contours: Rotation invariant?

I found one approach for estimate the orientation of two contours here , which rotates one contour and checks the distance to the original. I changed the headers to

#include <opencv2/core.hpp>
#include <opencv2/shape.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv_modules.hpp>
#include <iostream>
#include <fstream>
#include <string.h>

and the main to:

int main(int argc, char* argv[])

It may be kind of a stupid question, but first of all i don't know, why the transformation of the contours should improve the result of computeDistance. Is the <cv::shapecontextdistanceextractor> not invariant to rotation and translation, because it does an internal fit?

If this would be the case, my results would be coherent, because I always get 0 as distance (but unfortunately no image as well). Also the result from an other program, where i match rotated contours with cv::shapecontextdistanceextractor> as well as the hausdorff metric seems not to be wrong (small distances, but no exact 0).