Re: Help Finding Sources (Peaks) in an Image [message #65741] |
Sat, 21 March 2009 23:59 |
TonyL
Messages: 14 Registered: November 2008
|
Junior Member |
|
|
On Mar 21, 5:28 am, einszweil...@gmail.com wrote:
> I have a 2D image that I've read into IDL. I'm trying to write a
> procedure to locate all of the "peaks" (i.e.highest intensities) of
> the image.
>
> I suppose I'm defining a "peak" as any pixel that has a higher
> intensity than any of it's surrounding r pixels, where r is some sort
> of "radius" around the pixel (not necessarily a circular region).
> Maybe r = 4 or something
>
> After scanning through the image I'd like the procedure to either
> print out the pixel locations and/or create circles around them on the
> image itself.
>
> Does anyone have any ideas? I mean, I'm not asking you to write up a
> whole procedure for me unless you want to be really helpful. But any
> hints or tips on what functions, etc. I could use would be extremely
> helpful. Or just a quick few lines of code I could build off of would
> be great.
>
> Thanks in advance!
I may have a similar problem with automatically finding centres of
high and low pressure systems in a 2D grid of mean sea level pressure.
I use the contour command with the path keywords set to store the
contour information. Then i extract all closed contours that have been
tagged as local highs. Then sorting from high to low within that set
of closed high contours, i extract the lat-lon of the highest contour.
Then work downwards, ignoring closed contours that have the same
position. I suspect you might be able to do the same thing provided
there is some degree of uniformity to your 2D array. If contour
plotting gives spotty results, then my method is probably no good.
Tony
|
|
|
Re: Help Finding Sources (Peaks) in an Image [message #65750 is a reply to message #65741] |
Fri, 20 March 2009 12:40  |
ben.bighair
Messages: 221 Registered: April 2007
|
Senior Member |
|
|
On Mar 20, 2:28 pm, einszweil...@gmail.com wrote:
> I have a 2D image that I've read into IDL. I'm trying to write a
> procedure to locate all of the "peaks" (i.e.highest intensities) of
> the image.
>
> I suppose I'm defining a "peak" as any pixel that has a higher
> intensity than any of it's surrounding r pixels, where r is some sort
> of "radius" around the pixel (not necessarily a circular region).
> Maybe r = 4 or something
>
> After scanning through the image I'd like the procedure to either
> print out the pixel locations and/or create circles around them on the
> image itself.
>
> Does anyone have any ideas? I mean, I'm not asking you to write up a
> whole procedure for me unless you want to be really helpful. But any
> hints or tips on what functions, etc. I could use would be extremely
> helpful. Or just a quick few lines of code I could build off of would
> be great.
>
> Thanks in advance!
Hi,
A search on Google (for this newsgroup) for "local maxima" found
this...
http://tinyurl.com/d5d7kx
That might be a good start.
Cheers,
Ben
|
|
|