How to extract corresponding x axis value in improfile.
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
U B
am 24 Jul. 2022
Kommentiert: Star Strider
am 25 Jul. 2022
How to extract the values of x axis in improfile? I'm using
t=improfile(I,p1,p2) ;
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?
1 Kommentar
dpb
am 24 Jul. 2022
Read the doc improfile -- there are other optional output arguments to return the coordinates and two more beyond those for the line endpoints as well.
Akzeptierte Antwort
Star Strider
am 24 Jul. 2022
I = imread('liftingbody.png');
x = [19 427 416 77];
y = [96 462 37 33];
figure
improfile(I,x,y)
grid on
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.
.
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Computational Geometry finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!