How to plot Intensity profile along the vertical line of an image

6 ビュー (過去 30 日間)
Warid Islam
Warid Islam 2019 年 7 月 9 日
コメント済み: Warid Islam 2019 年 7 月 10 日
I have plotted the intensity profile of an image. Below is the image file.
Below is the code.
I = imread('Intensity1.jpg');
x = [0 size(I,2)];
y = [size(I,1)/2 size(I,1)/2];
c = improfile(I,x,y);
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')
I want to find the intensity profile of the image in the vertical direction instead of the horizontal direction. Any help would be appreciated. Thank you.

採用された回答

Matt J
Matt J 2019 年 7 月 10 日
y = [0 size(I,1)];
x = [size(I,2)/2 size(I,2)/2];
  1 件のコメント
Warid Islam
Warid Islam 2019 年 7 月 10 日
Hi Matt,
Thank you very much for the help.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by