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