added test for GPU LBP cascade: load cascade

This commit is contained in:
Marina Kolpakova
2012-06-25 08:46:34 +00:00
parent 715b0d181c
commit 5f6bbcc89a
3 changed files with 45 additions and 289 deletions

View File

@@ -40,6 +40,7 @@
//M*/
#include "precomp.hpp"
#include <string>
namespace {
@@ -284,4 +285,28 @@ TEST_P(HOG, GetDescriptors)
INSTANTIATE_TEST_CASE_P(GPU_ObjDetect, HOG, ALL_DEVICES);
PARAM_TEST_CASE(LBP_Read_classifier, cv::gpu::DeviceInfo, int)
{
cv::gpu::DeviceInfo devInfo;
virtual void SetUp()
{
devInfo = GET_PARAM(0);
cv::gpu::setDevice(devInfo.deviceID());
}
};
TEST_P(LBP_Read_classifier, Accuracy)
{
cv::gpu::CascadeClassifier_GPU_LBP classifier;
std::cout << (std::string(cvtest::TS::ptr()->get_data_path()) + "lbpcascade/lbpcascade_frontalface.xml") << std::endl;
std::string classifierXmlPath = std::string(cvtest::TS::ptr()->get_data_path()) + "lbpcascade/lbpcascade_frontalface.xml";
classifier.load(classifierXmlPath);
}
INSTANTIATE_TEST_CASE_P(GPU_ObjDetect, LBP_Read_classifier, testing::Combine(
ALL_DEVICES,
testing::Values<int>(0)
));
} // namespace