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.
- hardware specs?
- OS/IDE/how did you build ITK? In debug or release?
- Are you using C++, or one of the other language wrappers?
- 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.
精彩评论