how to calculate width and length of binary image?

13 次查看(过去 30 天)
I need to calculate width and length of the binary image... PLZ SUGGEST A WAY

采纳的回答

Image Analyst
Image Analyst 2014-10-18
You can use the size() function:
[theLength, width] = size(binaryImage);
The first return argument, theLength, is the number of rows (the height), and the second output argument, width, is the number of columns.
As an aside, don't use length as the name of a variable since it's the name of a built-in function.
  8 个评论
sou
sou 2014-10-20
sir but this gives wrong width for my image sir...
my image is in this link http://labs.fme.aegean.gr/decision/downloads in this link under martin2003 zip file New database pictures\normal superficiel cells are my images sir... plz try it

请先登录,再进行评论。

更多回答(1 个)

Matt J
Matt J 2014-10-18
编辑:Matt J 2014-10-18
The size() command?
[Width,Length]=size(binaryImage);

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by