find puntual maximum in a 3D array.

6 次查看(过去 30 天)
Hi, I have a 3D array with values of intensity in each voxel. Now I need to find some point sources of intensity that are inside de array, The problem is that there are other voxels with more intensity but they aren't puntual sources.
I add an image of a sagital plane that show which local maximum I want to find.
If I would have only one dimension datas I would use findpeacks and the information of width at half prominence, but I'm lost doing it in a 3D array.
Thank you for your time.

回答(1 个)

Sam Cook
Sam Cook 2018-6-13
If you're looking for the local maxima, and you have the Image Processing Toolbox, you can use the imregionalmax function. It returns a logical matrix that identifies the points that you need. From there, you can determine which regions you are specifically looking for.
[X,Y] = meshgrid(0:0.5:10, 0:0.5:10);
Z = min(cos(X) + sin(Y), 1.5);
surf(X, Y, Z);
ix = imregionalmax(Z);
hold on
scatter3(X(ix), Y(ix), Z(ix), 'r', 'LineWidth', 5);

Community Treasure Hunt

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

Start Hunting!

Translated by