how to calculate width and length of binary image?
1 次查看(过去 30 天)
显示 更早的评论
I need to calculate width and length of the binary image... PLZ SUGGEST A WAY
0 个评论
采纳的回答
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!