Azzera filtri
Azzera filtri

Plot intensity minima with improfile

1 visualizzazione (ultimi 30 giorni)
Diondra
Diondra il 12 Nov 2015
Modificato: Diondra il 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

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by