سؤال

I am new to image processing and related areas. I am trying to figure out how to chose structuring element (strel) for Morphological operations? For eg: I want to dilate a binary image in Matlab but I am not sure which strel to chose. That's proving to be really difficult since which is used when isn't clear to me. I am basically procssing large number of video frames and the algorithm demands dilation of each after binarization.

هل كانت مفيدة؟

المحلول

I advise you using SE = strel('disk', R, N); R depends on your image size and your purpose and N is the neighbourhood, usually 4 or 8. But experimenting with different strel elements is not difficult, you can try all and decide the best for yourself

نصائح أخرى

When you dilate, the shape of the structuring element is the shape a single isolated pixel will transform into.

Which shape you choose depends a lot on the type of features you're dilating. For example, if you dilate rectangular shapes that are aligned with the image axes, you'll want to use a square shape, so that you retain sharp corners. Conversely, if the shapes are arbitrary and smooth, you'll want to use a circular shape (disk), and so on. Here's an example where I used a rectangular structuring element.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top