You have to come up with some kind of thresholding algorithm that can get you the corect threshold despite the overall brightness varying. Try imbinarize() or else plot the histogram and look for something that makes sense. Perhaps triangle thresholding will work well if you have a skewed hump in your histogram.
MATLAB image processing technique
5 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166769/image.jpeg)
I have this 3D array in MATLAB (V: vertical, H: horizontal, t: time frame)
Figures below represent images obtained using imagesc function after slicing the array in terms of t axis
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166770/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166771/image.jpeg)
area in black represents damage area and other area is intact
each frame looks similar but has different amplitude
I am trying to visualize only defect area and get rid of intact area
I tried to use 'threshold' method to get rid of intact area as below
NewSet = zeros(450,450,200);
for kk = 1:200
frame = uwpi(:,:,kk);
STD = std(frame(:));
Mean = mean(frame(:));
for ii = 1:450
for jj =1:450
if frame(ii, jj) > 2*STD+Mean
% I also tried abs(frame(ii,jj)) but doesn't seem to work
NewSet(ii, jj, kk) = frame(ii, jj);
else
NewSet(ii, jj, kk) = NaN;
end
end
end
end
however, since each frame has different amplitude, result becomes
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166772/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166773/image.jpeg)
Is there any image processing method to get rid of intact area in this case?
Thanks in advance
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Thresholding 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!