How to plot intensity profile of a 3D image

6 ビュー (過去 30 日間)
Amit Chakraborty
Amit Chakraborty 2022 年 7 月 8 日
回答済み: Image Analyst 2022 年 7 月 9 日
Greetings to all !
I have a 3D image matrix which is sheep logan phantom. And I want to plot the intensity profile of the along Vertical direction and horizontal direction separately? But I am confused how to do it ! Can anyone help me ?
Thanks in ADVANCE!
  2 件のコメント
Amit Chakraborty
Amit Chakraborty 2022 年 7 月 8 日
I try to say intensity plot instead of profile. Yes you are correct I want the intensity plot along a certain line (to get a 1-D profile). Like the following picture.

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

採用された回答

Image Analyst
Image Analyst 2022 年 7 月 9 日
You can do
rgbImage = imread('peppers.png');
subplot(2, 1, 1);
imshow(rgbImage);
axis('on', 'image')
xline(205, 'Color', 'r', 'LineWidth', 2);
column205 = rgbImage(:, 205,:);
subplot(2, 1, 2);
plot(column205(:, 1), 'r-', 'LineWidth', 2);
hold on;
plot(column205(:, 2), 'g-', 'LineWidth', 2);
plot(column205(:, 3), 'b-', 'LineWidth', 2);
grid on;
legend('Red', 'Green', 'Blue');

その他の回答 (0 件)

カテゴリ

Find more on Lighting, Transparency, and Shading in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by