Eliminate the pixel that have a lower intensity?
2 次查看(过去 30 天)
显示 更早的评论
I read the immage in this way:
m=max(Imm,[],'all');
%Threshold
thr=10;
for i=1:2048
for j=1:2448
if Imm(i,j)>(m-thr)
pos(k,1:2)=[i,j];
k=k+1;
end
end
end
"Pos" contain all the pixel of my intrest, now i want to elimintate all the coordinates of the pixel that have intensity lower than a value
0 个评论
采纳的回答
Ameer Hamza
2020-11-9
You don't need a for-loop for this
m=max(Imm,[],'all');
%Threshold
thr=10;
[r,c] = find(Imm>(m-thr))
pos = [r c];
By elimination, if you mean to set them to zero, then try this
m=max(Imm,[],'all');
%Threshold
thr=10;
Imm(Imm<(m-thr)) = 0;
4 个评论
Ameer Hamza
2020-11-10
I didn't understand the question. Can you take 2 small 3x3 matrices and show with an example of what you want?
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!