Extended maxima transform in Matlab

Posted by garvin on Stack Overflow See other posts from Stack Overflow or by garvin
Published on 2010-05-06T09:44:14Z Indexed on 2010/05/06 9:48 UTC
Read the original article Hit count: 170

Filed under:

I use imtophat to apply a filter to an m x n array. I then find the local max using imextendedmax(). I get mostly 0's everywhere except for 1's in the general areas where I am expecting a local max. The weird thing is, though, that I don't get just one local max. Instead in these places I get MANY elements with 1's such as

00011100000 00111111000 00000110000

yet the values there are close but NOT equal so I would expect that there would be one that is higher than all of the rest. So I'm wondering a) if this is a bug and how I might fix it and b) how you would choose choose the element of these 1's with the highest value.

© Stack Overflow or respective owner

Related posts about matlab