image and video processing
4 ビュー (過去 30 日間)
古いコメントを表示
hi.i want to find accuracy(100%) in binary image.for example my roi size is 241x77.if all columns(77) detect 1 instead of 0 then i say its 100%. so i use yy= find(ROI_2(:,end)==1) to know which column has 1.
0 件のコメント
採用された回答
Thorsten
2015 年 11 月 27 日
編集済み: Thorsten
2015 年 11 月 27 日
ROI = rand(241,77) > 0; % sample data
any(ROI) give 1 for each column that contains at least one 1.
acc = nnz(any(ROI))/size(ROI, 2);
2 件のコメント
Image Analyst
2015 年 11 月 27 日
And for an example where the accuracy is not 100%, because some columns do not have a 1 in them:
% Create sample data where some columns won't have a 1 in them:
ROI = rand(241,77) > 0.995;
% any(ROI) gives a 1 for each column that contains at least one 1.
accuracyPercentage = nnz(any(ROI)) / size(ROI, 2)
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!