Made dependency of opencv_objdetect from opencv_highgui optional.
This commit is contained in:
parent
e1378aad79
commit
67838a7a66
@ -1,2 +1,2 @@
|
||||
set(the_description "Object Detection")
|
||||
ocv_define_module(objdetect opencv_highgui opencv_calib3d)
|
||||
ocv_define_module(objdetect opencv_calib3d OPTIONAL opencv_highgui)
|
||||
|
@ -388,7 +388,9 @@ int showRootFilterBoxes(IplImage *image,
|
||||
cvRectangle(image, points[i], oppositePoint,
|
||||
color, thickness, line_type, shift);
|
||||
}
|
||||
#ifdef HAVE_OPENCV_HIGHGUI
|
||||
cvShowImage("Initial image", image);
|
||||
#endif
|
||||
return LATENT_SVM_OK;
|
||||
}
|
||||
|
||||
@ -442,7 +444,9 @@ int showPartFilterBoxes(IplImage *image,
|
||||
color, thickness, line_type, shift);
|
||||
}
|
||||
}
|
||||
#ifdef HAVE_OPENCV_HIGHGUI
|
||||
cvShowImage("Initial image", image);
|
||||
#endif
|
||||
return LATENT_SVM_OK;
|
||||
}
|
||||
|
||||
@ -476,7 +480,9 @@ int showBoxes(IplImage *img,
|
||||
cvRectangle(img, points[i], oppositePoints[i],
|
||||
color, thickness, line_type, shift);
|
||||
}
|
||||
#ifdef HAVE_OPENCV_HIGHGUI
|
||||
cvShowImage("Initial image", img);
|
||||
#endif
|
||||
return LATENT_SVM_OK;
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,9 @@ CvSeq* cvLatentSvmDetectObjects(IplImage* image,
|
||||
CvSeq* result_seq = 0;
|
||||
int error = 0;
|
||||
|
||||
cvConvertImage(image, image, CV_CVTIMG_SWAP_RB);
|
||||
if(image->nChannels == 3)
|
||||
cvCvtColor(image, image, CV_BGR2RGB);
|
||||
|
||||
// Getting maximum filter dimensions
|
||||
getMaxFilterDims((const CvLSVMFilterObject**)(detector->filters), detector->num_components,
|
||||
detector->num_part_filters, &maxXBorder, &maxYBorder);
|
||||
@ -132,7 +134,9 @@ CvSeq* cvLatentSvmDetectObjects(IplImage* image,
|
||||
detection.rect = bounding_box;
|
||||
cvSeqPush(result_seq, &detection);
|
||||
}
|
||||
cvConvertImage(image, image, CV_CVTIMG_SWAP_RB);
|
||||
|
||||
if(image->nChannels == 3)
|
||||
cvCvtColor(image, image, CV_RGB2BGR);
|
||||
|
||||
freeFeaturePyramidObject(&H);
|
||||
free(points);
|
||||
|
@ -55,11 +55,15 @@
|
||||
#include "opencv2/imgproc/imgproc.hpp"
|
||||
#include "opencv2/imgproc/imgproc_c.h"
|
||||
#include "opencv2/core/core_c.h"
|
||||
#include "opencv2/highgui/highgui.hpp"
|
||||
#include "opencv2/core/internal.hpp"
|
||||
#include "opencv2/features2d/features2d.hpp"
|
||||
#include "opencv2/calib3d/calib3d.hpp"
|
||||
|
||||
#include "opencv2/opencv_modules.hpp"
|
||||
#ifdef HAVE_OPENCV_HIGHGUI
|
||||
# include "opencv2/highgui/highgui.hpp"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TEGRA_OPTIMIZATION
|
||||
#include "opencv2/objdetect/objdetect_tegra.hpp"
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user