Move cv::Mat out of core.hpp

This commit is contained in:
Andrey Kamaev
2013-03-28 21:01:12 +04:00
parent 135c0b6cb5
commit 715fa3303e
46 changed files with 1854 additions and 1731 deletions

View File

@@ -1,6 +1,7 @@
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/core/utility.hpp"
#include <cctype>
#include <iostream>
@@ -124,7 +125,7 @@ int main( int argc, const char** argv )
for(;;)
{
IplImage* iplImg = cvQueryFrame( capture );
frame = iplImg;
frame = cv::cvarrToMat(iplImg);
if( frame.empty() )
break;
if( iplImg->origin == IPL_ORIGIN_TL )

View File

@@ -1,6 +1,7 @@
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/core/utility.hpp"
#include <cctype>
#include <iostream>
@@ -120,7 +121,7 @@ int main( int argc, const char** argv )
for(;;)
{
IplImage* iplImg = cvQueryFrame( capture );
frame = iplImg;
frame = cv::cvarrToMat(iplImg);
if( frame.empty() )
break;
if( iplImg->origin == IPL_ORIGIN_TL )

View File

@@ -1,5 +1,6 @@
#include "opencv2/ml/ml.hpp"
#include "opencv2/core/core_c.h"
#include "opencv2/core/utility.hpp"
#include <stdio.h>
#include <map>
@@ -21,7 +22,7 @@ static void help()
static int count_classes(CvMLData& data)
{
cv::Mat r(data.get_responses());
cv::Mat r = cv::cvarrToMat(data.get_responses());
std::map<int, int> rmap;
int i, n = (int)r.total();
for( i = 0; i < n; i++ )
@@ -42,7 +43,7 @@ static void print_result(float train_err, float test_err, const CvMat* _var_imp)
if (_var_imp)
{
cv::Mat var_imp(_var_imp), sorted_idx;
cv::Mat var_imp = cv::cvarrToMat(_var_imp), sorted_idx;
cv::sortIdx(var_imp, sorted_idx, CV_SORT_EVERY_ROW + CV_SORT_DESCENDING);
printf( "variable importance:\n" );