find first or second maximum in a cell containing stacks of images

1 visualización (últimos 30 días)
rob
rob el 17 de Mzo. de 2012
Hey
I have a cell containing 26 dipimage(size 111*111*17) Now i want for each pixel value in the original dipimage to know the second maximum of the 26 values corresponding to that pixel.
Since the size a loop is not really an option. The dipimage part is not really relevant if there is a normal matlab way.
grtz
Rob
  1 comentario
Image Analyst
Image Analyst el 17 de Mzo. de 2012
Just wondering ... why is a loop not an option because of the size? A loop can certainly be used with small arrays like this. There is no minimum size limit that says an array has to be bigger than a certain size. It would work fine with your small array.

Iniciar sesión para comentar.

Respuestas (2)

Image Analyst
Image Analyst el 17 de Mzo. de 2012
Use
meanValue = max(dipImage3D, [], 3);
to get the max value of each of the 26 images. Then set them to nan or the min values, so now the second highest value will now be the highest. Now you have 26 images that are only 2D instead of 2D. Then you can convert those 26 2D images into a 3D image in a variety of ways and use the same code to find the second highest max value for each x,y pixel location.

rob
rob el 17 de Mzo. de 2012
well maybe i should elaborate further. Every pixel is the reslult of a convolution on a 3d volume of pixels with a sphere of several radius. So each of the 26 volumes corresponds to a different radius. Usually the highest maximum(real maxium) is not the correct one i need the one with a small radius and high value.
  1 comentario
Image Analyst
Image Analyst el 17 de Mzo. de 2012
Not sure what that means, but it sounds like you need some sort of image restoration algorithm like Richardson-Lucy or something similar (see the help). Are you saying each cell is one 2D image and that image was convolved several times with PSFs (kernels) or different radii? Well you know from the central limit theorem that that would be pretty darn close to convolving with a Gaussian.

Iniciar sesión para comentar.

Categorías

Más información sobre Fluid Dynamics en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by