1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

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
+3 -3
View File
@@ -389,7 +389,7 @@ int showRootFilterBoxes(IplImage *image,
color, thickness, line_type, shift);
}
#ifdef HAVE_OPENCV_HIGHGUI
cvShowImage("Initial image", image);
cv::imshow("Initial image", cv::cvarrToMat(image));
#endif
return LATENT_SVM_OK;
}
@@ -445,7 +445,7 @@ int showPartFilterBoxes(IplImage *image,
}
}
#ifdef HAVE_OPENCV_HIGHGUI
cvShowImage("Initial image", image);
cv::imshow("Initial image", cv::cvarrToMat(image));
#endif
return LATENT_SVM_OK;
}
@@ -481,7 +481,7 @@ int showBoxes(IplImage *img,
color, thickness, line_type, shift);
}
#ifdef HAVE_OPENCV_HIGHGUI
cvShowImage("Initial image", img);
cv::imshow("Initial image", cv::cvarrToMat(img));
#endif
return LATENT_SVM_OK;
}
@@ -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