Thread Subject: How to attack a local minima problem?

Subject: How to attack a local minima problem?

From: Sven

Date: 22 Nov, 2008 16:42:02

Message: 1 of 3

Hi all,

I have a problem that I can boil down to an image such as:
http://tinypic.com/view.php?pic=wirhxt&s=4

Here you see 9 fairly regularly spaced minima, with a little bit of smearing from one to the next. I'm trying to write something to automatically locate each of these minima. I have the image processing toolbox at my disposal.

I have attacked this problem a few different ways, but none to my satisfaction just yet.

If I use imregionalmin, I get a scattering of local minima, but no simple way to return only these 9 minima that I'm looking for. If I simply choose the 9 minima regions having the lowest average pixel value, I almost always get multiple hits returned in just some of the minima you see in the image.

Conceptually, I would like to 'hang' a chain of links/joints down my image. Each joint is attracted to pixels with lower values (ie, will merge towards minima), and each link is essentially a spring of some length (about the average distance between the minima I'm searching for).

Am I overthinking this? Can anyone help point me towards an algorithm I could adopt for the problem? Can anyone help me just *name* my problem so that I know what i should be searching for?

Thanks very much,
Sven.

Subject: How to attack a local minima problem?

From: Brendan

Date: 22 Nov, 2008 17:50:59

Message: 2 of 3

On Nov 22, 12:42=A0pm, "Sven" <sven.holco...@gmail.deleteme.com> wrote:
> Hi all,
>
> I have a problem that I can boil down to an image such as:http://tinypic.=
com/view.php?pic=3Dwirhxt&s=3D4
>
> Here you see 9 fairly regularly spaced minima, with a little bit of smear=
ing from one to the next. I'm trying to write something to automatically lo=
cate each of these minima. I have the image processing toolbox at my dispos=
al.
>
> I have attacked this problem a few different ways, but none to my satisfa=
ction just yet.
>
> If I use imregionalmin, I get a scattering of local minima, but no simple=
 way to return only these 9 minima that I'm looking for. If I simply choose=
 the 9 minima regions having the lowest average pixel value, I almost alway=
s get multiple hits returned in just some of the minima you see in the imag=
e.
>
> Conceptually, I would like to 'hang' a chain of links/joints down my imag=
e. Each joint is attracted to pixels with lower values (ie, will merge towa=
rds minima), and each link is essentially a spring of some length (about th=
e average distance between the minima I'm searching for).
>
> Am I overthinking this? Can anyone help point me towards an algorithm I c=
ould adopt for the problem? Can anyone help me just *name* my problem so th=
at I know what i should be searching for?
>
> Thanks very much,
> Sven.

The start of a simple-headed way is gray level threshold, something
like:
[I,map] =3D imread('wirhxt.gif');
Ig=3D rgb2gray(ind2rgb(I,map));
Iw=3Dwiener2(Ig,[5 5]);
bw =3D im2bw(1-Iw,0.69);
figure
imshow(I,map)
figure
imshow(bw)

You could then get the ROI using bwlabel, and calculate their centres
of mass.

Subject: How to attack a local minima problem?

From: ImageAnalyst

Date: 23 Nov, 2008 01:07:36

Message: 3 of 3

On Nov 22, 11:42=A0am, "Sven" <sven.holco...@gmail.deleteme.com> wrote:
> Hi all,
>
> I have a problem that I can boil down to an image such as:http://tinypic.=
com/view.php?pic=3Dwirhxt&s=3D4
>
> Here you see 9 fairly regularly spaced minima, with a little bit of smear=
ing from one to the next. I'm trying to write something to automatically lo=
cate each of these minima. I have the image processing toolbox at my dispos=
al.
>
> I have attacked this problem a few different ways, but none to my satisfa=
ction just yet.
>
> If I use imregionalmin, I get a scattering of local minima, but no simple=
 way to return only these 9 minima that I'm looking for. If I simply choose=
 the 9 minima regions having the lowest average pixel value, I almost alway=
s get multiple hits returned in just some of the minima you see in the imag=
e.
>
> Conceptually, I would like to 'hang' a chain of links/joints down my imag=
e. Each joint is attracted to pixels with lower values (ie, will merge towa=
rds minima), and each link is essentially a spring of some length (about th=
e average distance between the minima I'm searching for).
>
> Am I overthinking this? Can anyone help point me towards an algorithm I c=
ould adopt for the problem? Can anyone help me just *name* my problem so th=
at I know what i should be searching for?
>
> Thanks very much,
> Sven.

---------------------------------------------------------------------------=
-----------------------
Sven:
It's possible that what you're trying to describe, and looking for the
name of, is the "mean shift algorithm" or "mean shift segmentation."
Do a web search and see if that matches your thinking or gives you a
new direction to try.
Good luck,
ImageAnalyst

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
imregionalmin Sven 22 Nov, 2008 11:45:05
algorithm Sven 22 Nov, 2008 11:45:05
rssFeed for this Thread

Contact us at files@mathworks.com