20060925-Dilation, erosion, and the morphological gradient

原文:http://blogs.mathworks.com/steve/2006/09/25/dilation-erosion-and-the-morphological-gradient/

The morphological operator dilation acts like a local maximum operator. Erosion acts like a local minimum operator. You can use them together to compute something called the morphological gradient.

Dilation

The basic form of grayscale image dilation computes, for each image pixel, the maximum value of its neighboring pixels. The neighborhood is defined by the structuring element. For example, this structuring element:

se1 = strel([1 1 1])
defines a neighborhood consisting of the pixel itself, together with its left and right neighbors.

Erosion

Grayscale image erosion computes the minimum of each pixel's neighborhood.

Morphological gradient

Dilation and erosion are often used in combination to produce a desired image processing effect. One simple combination is the morphological gradient. P. Soille, in section 3.8 of the second edition of Morphological Image Analysis: Principles and Applications, talks about three kinds of basic morphological gradients:

  • dilated_image - eroded_image
  • original_image - eroded_image
  • dilated_image - original_image

Soille calls the first one the basic morphological gradient, and you compute it this way using MATLAB and the Image Processing Toolbox:

The second form is called the half-gradient by erosion or internal gradient.

"The internal gradient enhances internal boundaries of objects brighter than their background and external boundaries of objects darker than their background. For binary images, the internal gradient generates a mask of the internal boundaries of the foreground image objects." [Soille, page 86]

The third form is called the half-gradient by dilation or external gradient:

Direction gradients

By using line segments as structuring elements, you can compute directional gradients.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值