Surface roughness determined from a depth map.
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi,
I would like to determine the surface rougness of a microscopic picture.

I have code that creates a depth map:
File_Name='CPTi_D2_75_right_off_centre.tif';
% micron/pixel
% this is the spatial resolution of the input
Resolution=0.459;
% Number of intensity levels in the image,
% if you think that the result porosity is overestimated,
% just increase this number and vice versa, it accepts integers
N=18;
A = imread(File_Name);
if ndims(A) == 3
B = rgb2gray(A);
end
level = multithresh(B ,N);
C= imquantize(B,level);
RGB1 = label2rgb(B);
imwrite(RGB1,[File_Name(1:end-4) '_Depth Map.png']);
P=zeros(size(C));
for I=1:size(C,1)
for J=1:size(C,2)
if C(I,J)==1
P(I,J)=1;
end
end
end
P=1-P;
P=bwmorph(P,'majority',1);
figure;
imshow(RGB1); title('Depth Map')

I would like to use to create a 2D graph of the various distances and then use that to calculate the surface roughness.
Can anyone help me with this? Would it be possible? If not, any other suggestions?
Thank you for taking the time to assist me.
Kind Regards,
Andri
댓글 수: 0
채택된 답변
Image Analyst
2023년 10월 2일
Looks like youi're assuming that your brightness corresponds to depth. Assuming that's true there are several definitions of roughness. In fact whole books have been written about them. Perhaps the most common are Sa and Sq. Sa is the average absolute deviation from the mean surface, in other words
Sa = mean2(abs(C - mean2(C)));
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Biomedical Imaging에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!