Ask Your Question
0

medianBlur doesn't work

asked Apr 18 '13

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?

Preview: (hide)

1 answer

Sort by » oldest newest most voted
1

answered Apr 19 '13

berak gravatar image

did you

#include "include/opencv2/imgproc.hpp"

??

and no, it already existed before 2.3.1

Preview: (hide)

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 (Apr 19 '13)edit

"But it doesn't work."

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

berak gravatar imageberak (Apr 19 '13)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 (Apr 19 '13)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 (Apr 19 '13)edit

Thanks! :) Now it works!

BigBadIrbis gravatar imageBigBadIrbis (Apr 19 '13)edit

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

berak gravatar imageberak (Apr 19 '13)edit

Question Tools

Stats

Asked: Apr 18 '13

Seen: 1,031 times

Last updated: Apr 19 '13