Extracting information from an object into variables?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Shubham Bose
am 24 Jan. 2019
Bearbeitet: John D'Errico
am 24 Jan. 2019
Hey guys, I'm fairly new to MATLAB and I wrote the code to detect eyes in an image. I'm using:
corners = detectFASTFeatures(sobel, 'MinContrast', 0.05);
and I need to get the coordinates of the eyes in variables left_x, left_y, right_x and right_y. How should I go about this?
Thanks for reading!
0 Kommentare
Akzeptierte Antwort
John D'Errico
am 24 Jan. 2019
Bearbeitet: John D'Errico
am 24 Jan. 2019
I assume this returns an object of some ilk, though I do not have the necessary toolbox to verify that assertion.
When you don't know how to work with an object of some class, I would first read any help on that class I could find. Surely you will find some.
If you get nowhere on that front however, there are a few tricks to try. The first one I would look to is:
methods(corners)
See what it tells you. What functions are defined? Is there anything that looks useful?
If that fails to prove helpful, try this:
S = struct(corners)
This will extract the information stuffed into the object, into a structure. Do any of those fields seem like they have useful information inside them?
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Eye Tracking 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!