# Calculating the Minimum and The Maximum of a Slidig Window

1 visualización (últimos 30 días)
Royi Avital el 23 de Abr. de 2014
Respondida: Matt J el 11 de Sept. de 2014
Hello,
How would you create the fastest implementation to extract the Minimum and the Maximum of a Local Sliding Window over an image?
So far I used this:
localMaxImage = colfilt(inputImage, [winLength winLength], 'sliding', @max);
localMinImage = colfilt(inputImage, [winLength winLength], 'sliding', @min);
Yet it is really slow. I know I can use `imerode` and `imdilate`, Yet I'm looking for a toolbox free implementation. Thank You.
##### 2 comentariosMostrar NingunoOcultar Ninguno
José-Luis el 8 de Sept. de 2014
Editada: Image Analyst el 11 de Sept. de 2014
Royi Avital el 8 de Sept. de 2014
Well, I guess as you see, I don't remember getting the right answer. You may look at my profile in StackExchange, I accept more than 80% of answers.
Anyhow, When I try answering someone, I never look at that. We're not trying to get scored, we're trying to assist people and build well organized information source.

Iniciar sesión para comentar.

Matt J el 11 de Sept. de 2014
I've never used it, but this FEX contribution is MEX-driven, and so should be fast
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Más respuestas (1)

Anand el 11 de Sept. de 2014
What do you mean toolbox-free? colfilt is also from the Image Processing Toolbox. Can you use ordfilt2
localMaxImage = ordfilt2(inputImage, winLength^2, true(winLength));
localMinImage = ordfilt2(inputImage, 1 , true(winLength));
This should be faster than colfilt, but maybe you can't use it.
##### 1 comentarioMostrar -1 comentarios más antiguosOcultar -1 comentarios más antiguos
Royi Avital el 11 de Sept. de 2014
I think it is also from the image toolbox.

Iniciar sesión para comentar.

### Categorías

Más información sobre Introduction to Installation and Licensing 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