Ask Your Question
0

medianBlur doesn't work

asked 2013-04-18 12:48:53 -0600

BigBadIrbis gravatar image

I'm using opencv 2.3.1 and visual studio 2008.Trying to use medianBlur, but here is error - "medianBlur" identifier not found. Why? Was it realized after 2.3.1?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-04-19 08:10:45 -0600

berak gravatar image

did you

#include "include/opencv2/imgproc.hpp"

??

and no, it already existed before 2.3.1

edit flag offensive delete link more

Comments

include "C:\opencv\include\opencv\imgproc.hpp" and there is:

//! smooths the image using median filter. CV_EXPORTS_W void medianBlur( InputArray src, OutputArray dst, int ksize ); But it doesn't work.

BigBadIrbis gravatar imageBigBadIrbis ( 2013-04-19 09:46:56 -0600 )edit

"But it doesn't work."

what do you mean ? a bit more effort, please ...

berak gravatar imageberak ( 2013-04-19 09:52:48 -0600 )edit

"medianBlur" identifier not found. i don't understand - maybe vs can use only imgproc_c.hpp? there is no anything abought medianBlur in imgproc_c.hpp. only in imgproc.hpp, but i included it, and medianBlur still not found. should i try to use imgproc_c from last version of opencv?

BigBadIrbis gravatar imageBigBadIrbis ( 2013-04-19 11:23:53 -0600 )edit

oh, maybe you hit a c++ problem with namespaces.

it's in namespace cv, so either:

  1. use: cv::medianBlur();
  2. or, add using namespace cv; after the #include ... lines.

imgproc_c.hpp has all the old, c-style, 1.0 version functions like cvSmooth

berak gravatar imageberak ( 2013-04-19 11:37:29 -0600 )edit

Thanks! :) Now it works!

BigBadIrbis gravatar imageBigBadIrbis ( 2013-04-19 12:04:58 -0600 )edit

oh, nice, click the hook, so it's solved ;)

berak gravatar imageberak ( 2013-04-19 12:28:19 -0600 )edit

Question Tools

Stats

Asked: 2013-04-18 12:48:53 -0600

Seen: 999 times

Last updated: Apr 19 '13