Ask Your Question
0

Why MORPH_ELLIPSE kernel is slower than MORPH_RECT and others?

asked 2016-12-29 11:33:12 -0500

stalin gravatar image

updated 2016-12-29 11:34:09 -0500

I was doing some dilation and erosion operations and noticed that MORPH_ELLIPSE kernel takes much more time than MORPH_RECT and MORPH_CROSS kernel. A similar question and finding is also posted in StackOverflow here.

Can somebody tell why this is so?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-12-29 12:14:31 -0500

LBerger gravatar image

updated 2016-12-29 13:55:57 -0500

Try to write algorithm. For a rect I look for extremun in rectangle (or line for cross). I can use previous result for a pixel to calculate new pixel. Rect and cross are separable filter

Now I cannot do like this for MORPH_ELLIPS I have to scan two arrays. I cannot use previous results For each pixel I need to scan all neighbouhood It is not a separable filter

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-12-29 11:33:12 -0500

Seen: 423 times

Last updated: Dec 29 '16