In reference to the range of the local maxima. What I mean is that I need to pinpoint local maxima points from a certain value and higher. Hope that clarifies the meaning of range.
How can local maxima be pinpointed on a surf plot?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone. I posted a question a few days ago and I repost it now since I got no answers (maybe because Ι wasn't clear about what I needed). So I have a surf plot (I include an image of it) and I need to pinpoint the local maxima on it. The range of the local maxima that will be pinpointed I want to be controlled by me. I also include my data if that helps. Thanks in advance!
Réponses (3)
KSSV
le 22 Jan 2017
You can get your maximum value using max along with indices. To get your range values use find.
0 commentaires
Walter Roberson
le 22 Jan 2017
Calculate a mask image, Data>threshold. regionprops asking for PixelIdxList. For each region returned use the indices to index the data and take max of that subset of the data with the two output max to find the index of the max relative to to that subset; use that to index the the PixelIdxList to find the linear index of the local max. You can then convert linear to 2d coordinate. Caution: the local max might be duplicated which your problem description did not account for.
18 commentaires
Walter Roberson
le 3 Fév 2017
Sorry, I missed seeing the update here. Could you include a bit of data with this kind of structure that imregionalmax is not working for? Looking at the diagram it looks to me as if imregionalmax would work.
Image Analyst
le 22 Jan 2017
Modifié(e) : Image Analyst
le 22 Jan 2017
I don't know what "pinpoint" means. Perhaps you want a 3-D arrow with the tip of it pointing to the max. If so, there are 3-D arrow functions in the File Exchange. Please attach a screenshot that's an image file, like PNG, NOT a .fig file which requires me to right click, save it to disk, switch to MATLAB, browse to the file I saved, and open it. I did not do any of that. With a PNG file you can jsut insert it here and save me a lot of work.
By the way, local max can be found with the function imregionalmax().
3 commentaires
Image Analyst
le 22 Jan 2017
I'd probably use plot3() to put a marker at the top peak location. Let's say you somehow found the x,y,z location(s) of the peaks, then say
plot3(x, y, z, 'r.', 'MarkerSize', 30);
Of course the arrow in 3D is also a good alternative way.
Voir également
Catégories
En savoir plus sur Entering Commands 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!