开发者

ITK Insight Toolkit - Slow Canny Filter

I am using the Canny Edge Detection of the ITK toolkit.

Compared to the OpenCV Canny Detection it seems to be pretty slow. My estimation is 0.5 sec for an image of size 144x176.

Or should the filter run faster?

Thanks f开发者_StackOverflowor help, Pete


Off the cuff, that seems a bit slow to me too, but i'll need a lot more info to help.

  1. hardware specs?
  2. OS/IDE/how did you build ITK? In debug or release?
  3. Are you using C++, or one of the other language wrappers?
  4. Can you put some clock() statements before and after the filter->update() call to verify the exact amount of time thats going to the edge detector, and what's going to overhead?


Many filters in ITK were written to be generic, but not necessarily optimized. OpenCV, on the other hand has been heavily optimized. It's not surprising that ITK would be much slower.

Because ITK is heavily templated, it relies on the compiler inlining function calls. If you compiled Debug (which might be your default), ITK will be really slow (make that Reaaaaaallllllllyyyyyy sssssslllooooowwwww). Try again after compiling in Release mode.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜