Making all dependencies from highgui module optional

This commit is contained in:
Andrey Kamaev
2012-06-26 07:29:36 +00:00
parent 700b685575
commit ecf6b5a87c
12 changed files with 124 additions and 24 deletions

View File

@@ -44,7 +44,10 @@
//
#include "precomp.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_HIGHGUI
# include "opencv2/highgui/highgui.hpp"
#endif
#include <iostream>
#include <queue>
@@ -907,13 +910,16 @@ void ChamferMatcher::Template::show() const
}
}
circle(templ_color,Point(center.x + pad, center.y + pad),1,CV_RGB(0,255,0));
#ifdef HAVE_OPENCV_HIGHGUI
namedWindow("templ",1);
imshow("templ",templ_color);
cvWaitKey(0);
#else
CV_Error(CV_StsNotImplemented, "OpenCV has been compiled without GUI support");
#endif
templ_color.release();
}