How to find intensity profile of multiple lines in an image?

조회 수: 9(최근 30일)
Warid Islam
Warid Islam 2019년 8월 1일
댓글: Warid Islam 2019년 8월 1일
I have an image on which I want to find the intensity profiles of 50 lines along the vertical direction. Below is my code and the result.
I = imread('Intensity1.jpg');
x=[size(I,2)/2 size(I,2)/2];
y=[0 size(I,1)];
n = 50;
c = improfile(I,x,y,n);
figure
subplot(2,1,1)
imshow(I)
hold on
plot(x,y,'r')
subplot(2,1,2)
plot(c(:,1,1),'r')
hold on
plot(c(:,1,2),'g')
plot(c(:,1,3),'b')
U.jpg
The graph above probably shows the intensity profile of 50 points along the same vertical direction. Whereas I want to find the intensity profiles of 50 equally spaced vertical lines of the image above. Any help would be appreciated.
  댓글 수: 2
Warid Islam
Warid Islam 2019년 8월 1일
Hi Walter,
Thank you very much for the suggestion.

댓글을 달려면 로그인하십시오.

답변(0개)

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by