Create multiple structure properties from a stack of 3D images
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mario
el 22 de Mzo. de 2015
Comentada: Mario
el 23 de Mzo. de 2015
Hello,
I have a stack of binary images(16 to be exact) in a 3D matrix that I named M2 and I wanted to extract centroids from each of those images inside that 3D matrix using regionprops using for loop, but without any success.
I labeled each of those images and stored them in a new 3D matrix called bw. I want to extract centroids of many labels contained by each image of that 3D matrix and store them in maybe separate structures. But I am not sure how to do that and use them later in my code. I want to be able to get perhaps separate sub-structures containing centroids of each labeled image so that I can access those centroids later on in my code.
I have done this so far:
numImages - is a number of images inside my 3D matrix
bw - is a 3D matrix of my labeled images
M2 - is a 3D matrix of my binary images
for i=1:numImages
s = regionprops(logical(bw(:,:,i)), M2(:,:,i), 'Centroid');
end
Here I am not sure how to get centroids stored in separate structures for each image of my 3D matrix. Any help would be much appreciated.
Thanks in advance!
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!