Make imgproc.hpp independent from C API

This commit is contained in:
Andrey Kamaev
2013-04-06 18:16:51 +04:00
parent 7ac0d86992
commit 288a0634c2
95 changed files with 1400 additions and 1300 deletions

View File

@@ -17,8 +17,10 @@ static void help()
"./laplace [camera #, default 0]\n" << endl;
}
enum {GAUSSIAN, BLUR, MEDIAN};
int sigma = 3;
int smoothType = CV_GAUSSIAN;
int smoothType = GAUSSIAN;
int main( int argc, char** argv )
{
@@ -63,9 +65,9 @@ int main( int argc, char** argv )
break;
int ksize = (sigma*5)|1;
if(smoothType == CV_GAUSSIAN)
if(smoothType == GAUSSIAN)
GaussianBlur(frame, smoothed, Size(ksize, ksize), sigma, sigma);
else if(smoothType == CV_BLUR)
else if(smoothType == BLUR)
blur(frame, smoothed, Size(ksize, ksize));
else
medianBlur(frame, smoothed, ksize);
@@ -76,7 +78,7 @@ int main( int argc, char** argv )
int c = waitKey(30);
if( c == ' ' )
smoothType = smoothType == CV_GAUSSIAN ? CV_BLUR : smoothType == CV_BLUR ? CV_MEDIAN : CV_GAUSSIAN;
smoothType = smoothType == GAUSSIAN ? BLUR : smoothType == BLUR ? MEDIAN : GAUSSIAN;
if( c == 'q' || c == 'Q' || (c & 255) == 27 )
break;
}