Make highgui.hpp independent from C API

This commit is contained in:
Andrey Kamaev
2013-04-07 22:45:38 +04:00
parent 288a0634c2
commit 0738ea7d0f
152 changed files with 899 additions and 594 deletions

View File

@@ -82,8 +82,9 @@ void CV_LatentSVMDetectorTest::run( int /* start_from */)
init.initialize(numThreads);
#endif
IplImage* image = cvLoadImage(img_path.c_str());
if (!image)
Mat image2 = cv::imread(img_path.c_str());
IplImage image = image2;
if (image2.empty())
{
ts->set_failed_test_info( cvtest::TS::FAIL_INVALID_TEST_DATA );
return;
@@ -93,13 +94,12 @@ void CV_LatentSVMDetectorTest::run( int /* start_from */)
if (!detector)
{
ts->set_failed_test_info( cvtest::TS::FAIL_INVALID_TEST_DATA );
cvReleaseImage(&image);
return;
}
CvMemStorage* storage = cvCreateMemStorage(0);
CvSeq* detections = 0;
detections = cvLatentSvmDetectObjects(image, detector, storage, 0.5f, numThreads);
detections = cvLatentSvmDetectObjects(&image, detector, storage, 0.5f, numThreads);
if (detections->total != num_detections)
{
ts->set_failed_test_info( cvtest::TS::FAIL_MISMATCH );
@@ -124,7 +124,6 @@ void CV_LatentSVMDetectorTest::run( int /* start_from */)
#endif
cvReleaseMemStorage( &storage );
cvReleaseLatentSvmDetector( &detector );
cvReleaseImage( &image );
}
// Test for c++ version of Latent SVM