Improfile: Integrating over many pixels
이전 댓글 표시
I = imread("1.1.png");
imshow(I);
%180 pixels = 1um
%getting points
[xi,yi] = getpts;
x = [xi(1) xi(2)];
y = [yi(1) yi(2)];
line(x,y,'Color','red','LineStyle','-','LineWidth',2.5);
% newx1 = [ (xi(1)-2) (xi(1)-1) (xi(1)) (xi(1)+1) (xi(1)+2) ];
% newx2 = [ (xi(2)-2) (xi(2)-1) (xi(2)) (xi(2)+1) (xi(2)+2) ];
% newy1 = [ (yi(1)-2) (yi(1)-1) (yi(1)) (yi(1)+1) (yi(1)+2) ];
% newy2 = [ (yi(2)-2) (yi(2)-1) (yi(2)) (yi(2)+1) (yi(2)+2) ];
%
% x = [newx1 newx2];
% y = [newy1 newy2];
% Intensity Profile
[c] = improfile(I, x, y);
figure; improfile(I, x, y);
Hi all,
I am attempting to analyse the intensity profiles of several grayscale images like attached using the improfile function. The intensity levels are very similar in the image leading to noisy profiles that are difficult to extract minima/maxima from. To reduce this noise I want to integrate over several pixels orthogonal to the line drawn. I have attempted to do this manually with no luck, would anyone know how to increase the width of the improfile function?
Many thanks,
Tamsin
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!