how to calculate width and length of binary image?

조회 수: 14 (최근 30일)
sou
sou 2014년 10월 18일
댓글: sou 2014년 10월 20일
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일
ok sir i will check this...
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