File Exchange Pick of the Week

Our best user submissions

Segmenting Coins…a Tutorial on Blob Analysis

我们许多人使用或参与comp.soft-sys.matlabover the years--particularly those of us who have had occasion to solve image processing problems--have come to appreciateImage Analyst's thoughts on relevant matters.

Recently, Image Analyst had occasion to share his first file through the File Exchange--ademo tutorial on blob analysis。In a nice, well-documented bit of code, IA steps us through an approach to segmenting, and determining the properties of, some objects in an image. In this case, the image is a sample ('coins.png') that ships with theImage Processing Toolbox

IA的代码显示了如何从背景中划分感兴趣的对象(硬币),然后使用regionprops(my favorite IPT function!) to differentiate nickels from dimes, and dull dimes from shiny ones:

This is a nice demo--very informative, and certainly worth a read. Two thoughts: 1) IA's code usesbwlabelto calculate a connected components matrix of the image as a precursor to callingregionprops。作为R2009a,新的IPT函数bwconncompreplacesbwlabelas the preferred approach; it uses significantly less memory, and can be markedly faster! Also, 2) IA shows how one can extract the specific pixels (PixelIdxList) associated with each object of interest, then calculate statistics on those pixel intensities to differentiate shiny from dull objects. Note that the fourth syntax ofregionprops在文档中,启用一个人避免此步骤,而是直接在原始强度图像上运行。使用此语法,可以直接计算MIN,最大或平均强度 - 甚至是图像中每个BLOB的加权质心。

Nice work, Image Analyst!

Comments?




Published with MATLAB® 7.9

|
  • print
  • send email

评论

要发表评论,请点击此处登录到您的 MathWorks 帐户或创建一个新帐户。