Make highgui.hpp independent from C API
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user