Ask Your Question
0

Why MORPH_ELLIPSE kernel is slower than MORPH_RECT and others?

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

stalin gravatar image

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

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 -0600

LBerger gravatar image

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

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

Question Tools

1 follower

Stats

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

Seen: 1,208 times

Last updated: Dec 29 '16