MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Delete close, but not identical elements in an array

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123356] Delete close, but not identical elements in an array
  • From: Peter Rodenbach <peter.rodenbach at googlemail.com>
  • Date: Sat, 3 Dec 2011 04:12:56 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hi,

I have the problem that I have to indentify peaks in an 2D array. I
can do this by Ordering[] the entries in the Flatten[] list. Then I
indentify the positions of the peaks in the array and write them into
a list. An example I work on in an 512 x 512 Pixel array:

Peaks={{229,170},{119,265},{331,202},{118,264},{314,245}}

As you can see from those 5 peaks, Number 2 and 4 belong to the same
peak. As I have to count the data at that positions and compare them,
I have to get rid of the peak postions that neighbor each other, as
they actually belong to the same peak.

What I want now is: have Mathem. evaluate the positions in the list
and delete those which are +-10 pixels around any other.
So the list would look like Peaks={{229,170},{119,265},{331,202},
{314,245}} afterwards.

Thanks for the help!!



  • Prev by Date: Re: A matrix element specified by a vector?
  • Next by Date: Re: A matrix element specified by a vector?
  • Previous by thread: Re: FindShortestTour Function - Roundtrip & Constructive Heuristic
  • Next by thread: Re: Delete close, but not identical elements in an array