|
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.
|