How to extract corresponding x axis value in improfile.
8 views (last 30 days)
How to extract the values of x axis in improfile? I'm using
where p1 and p2 are the x,y coordinates for the profile, which is I'm assigning. t gives me the intensity value in [nx1] matrix. How do I extract corresponding x axis values?
Star Strider on 24 Jul 2022
Try this (using an example from the improfile documentation) —
I = imread('liftingbody.png');
x = [19 427 416 77];
y = [96 462 37 33];
Ax = gca;
Lines = findobj(Ax, 'Type','line');
x = Lines.XData
y = Lines.YData
z = Lines.ZData
See if this approach works in your application.
NOTE — I did not return an output from improfile here. This may not work correctly if you do.