Plot intensity minima with improfile

1 次查看(过去 30 天)
Diondra
Diondra 2015-11-12
编辑: Diondra 2015-11-12
I currently have code that calculates the gradient along line segments I've drawn on an image and plots them using improfile. How can I retrieve the coordinates of the improfile minima? Even better, how can I also plot them on the graph as points? Any help would be greatly appreciated!
for j = 1:10
points_x(j) = (x(1) * j + x(2) * (11 - j))/11;
points_y(j) = (y(1) * j + y(2) * (11 - j))/11;
line_x(j) = points_x(j) - x(1);
line_y(j) = points_y(j) - y(1);
v = [line_x(j), line_y(j)];
normal_x = linspace(points_x(j) + v(2), points_x(j) - v(2), 200);
normal_y = linspace(points_y(j) - v(1), points_y(j) + v(1), 200);
subplot(5, 2, j);
improfile(I, normal_x, normal_y), grid on;
title(['Voxel Gradients along Ray ' num2str(j) ' '])
xlabel('x')
ylabel('y')
zlabel('Intensity')
end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by