Plot intensity minima with improfile

1 vue (au cours des 30 derniers jours)
Diondra
Diondra le 12 Nov 2015
Modifié(e) : Diondra le 12 Nov 2015
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

Réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by