필터 지우기
필터 지우기

How to plot intensity profile of a 3D image

조회 수: 7 (최근 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
Image Analyst
Image Analyst 2022년 7월 8일
What do you mean by profile? Do you mean projection (to get a 2-D image)? If so, mean, sum, or max projection? Or do you mean just along a certain line (to get a 1-D profile)? If so, how are you defining the line through the 3-D volume?
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개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by