Height and width of an image
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, is it possible to find the height and width of the object inside an image? I had attached an image with white and black line to find width and height value
2 件のコメント
採用された回答
ANKUR KUMAR
2018 年 10 月 8 日
Try this,
A=imread('testing.jpg');
AA=rgb2gray(A);
len=max(arrayfun(@(x) length(find(AA(:,x)~=255)),1:800))
bred=max(arrayfun(@(x) length(find(AA(x,:)~=255)),1:800))
9 件のコメント
ANKUR KUMAR
2018 年 10 月 8 日
Please refer these links:
Guillaume
2018 年 10 月 8 日
Note:
nnz(something)
is simpler and a lot faster to compute than:
length(find(something))
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!