<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239733</link>
    <title>MATLAB Central Newsreader - How to attack a local minima problem?</title>
    <description>Feed for thread: How to attack a local minima problem?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sat, 22 Nov 2008 16:42:02 -0500</pubDate>
      <title>How to attack a local minima problem?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239733#612581</link>
      <author>Sven </author>
      <description>Hi all,&lt;br&gt;
&lt;br&gt;
I have a problem that I can boil down to an image such as:&lt;br&gt;
&lt;a href=&quot;http://tinypic.com/view.php?pic=wirhxt&amp;s=4&quot;&gt;http://tinypic.com/view.php?pic=wirhxt&amp;s=4&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
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.&lt;br&gt;
&lt;br&gt;
I have attacked this problem a few different ways, but none to my satisfaction just yet.&lt;br&gt;
&lt;br&gt;
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.&lt;br&gt;
&lt;br&gt;
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).&lt;br&gt;
&lt;br&gt;
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?&lt;br&gt;
&lt;br&gt;
Thanks very much,&lt;br&gt;
Sven.</description>
    </item>
    <item>
      <pubDate>Sat, 22 Nov 2008 17:50:59 -0500</pubDate>
      <title>Re: How to attack a local minima problem?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239733#612584</link>
      <author>Brendan</author>
      <description>On Nov 22, 12:42=A0pm, &quot;Sven&quot; &amp;lt;sven.holco...@gmail.deleteme.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hi all,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I have a problem that I can boil down to an image such as:&lt;a href=&quot;http://tinypic.=&quot;&gt;http://tinypic.=&lt;/a&gt;&lt;br&gt;
com/view.php?pic=3Dwirhxt&amp;s=3D4&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Here you see 9 fairly regularly spaced minima, with a little bit of smear=&lt;br&gt;
ing from one to the next. I'm trying to write something to automatically lo=&lt;br&gt;
cate each of these minima. I have the image processing toolbox at my dispos=&lt;br&gt;
al.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I have attacked this problem a few different ways, but none to my satisfa=&lt;br&gt;
ction just yet.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; If I use imregionalmin, I get a scattering of local minima, but no simple=&lt;br&gt;
&amp;nbsp;way to return only these 9 minima that I'm looking for. If I simply choose=&lt;br&gt;
&amp;nbsp;the 9 minima regions having the lowest average pixel value, I almost alway=&lt;br&gt;
s get multiple hits returned in just some of the minima you see in the imag=&lt;br&gt;
e.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Conceptually, I would like to 'hang' a chain of links/joints down my imag=&lt;br&gt;
e. Each joint is attracted to pixels with lower values (ie, will merge towa=&lt;br&gt;
rds minima), and each link is essentially a spring of some length (about th=&lt;br&gt;
e average distance between the minima I'm searching for).&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Am I overthinking this? Can anyone help point me towards an algorithm I c=&lt;br&gt;
ould adopt for the problem? Can anyone help me just *name* my problem so th=&lt;br&gt;
at I know what i should be searching for?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks very much,&lt;br&gt;
&amp;gt; Sven.&lt;br&gt;
&lt;br&gt;
The start of a simple-headed way is gray level threshold, something&lt;br&gt;
like:&lt;br&gt;
[I,map] =3D imread('wirhxt.gif');&lt;br&gt;
Ig=3D rgb2gray(ind2rgb(I,map));&lt;br&gt;
Iw=3Dwiener2(Ig,[5 5]);&lt;br&gt;
bw =3D im2bw(1-Iw,0.69);&lt;br&gt;
figure&lt;br&gt;
imshow(I,map)&lt;br&gt;
figure&lt;br&gt;
imshow(bw)&lt;br&gt;
&lt;br&gt;
You could then get the  ROI using bwlabel, and calculate their centres&lt;br&gt;
of mass.</description>
    </item>
    <item>
      <pubDate>Sun, 23 Nov 2008 01:07:36 -0500</pubDate>
      <title>Re: How to attack a local minima problem?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239733#612643</link>
      <author>ImageAnalyst</author>
      <description>On Nov 22, 11:42=A0am, &quot;Sven&quot; &amp;lt;sven.holco...@gmail.deleteme.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hi all,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I have a problem that I can boil down to an image such as:&lt;a href=&quot;http://tinypic.=&quot;&gt;http://tinypic.=&lt;/a&gt;&lt;br&gt;
com/view.php?pic=3Dwirhxt&amp;s=3D4&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Here you see 9 fairly regularly spaced minima, with a little bit of smear=&lt;br&gt;
ing from one to the next. I'm trying to write something to automatically lo=&lt;br&gt;
cate each of these minima. I have the image processing toolbox at my dispos=&lt;br&gt;
al.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I have attacked this problem a few different ways, but none to my satisfa=&lt;br&gt;
ction just yet.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; If I use imregionalmin, I get a scattering of local minima, but no simple=&lt;br&gt;
&amp;nbsp;way to return only these 9 minima that I'm looking for. If I simply choose=&lt;br&gt;
&amp;nbsp;the 9 minima regions having the lowest average pixel value, I almost alway=&lt;br&gt;
s get multiple hits returned in just some of the minima you see in the imag=&lt;br&gt;
e.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Conceptually, I would like to 'hang' a chain of links/joints down my imag=&lt;br&gt;
e. Each joint is attracted to pixels with lower values (ie, will merge towa=&lt;br&gt;
rds minima), and each link is essentially a spring of some length (about th=&lt;br&gt;
e average distance between the minima I'm searching for).&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Am I overthinking this? Can anyone help point me towards an algorithm I c=&lt;br&gt;
ould adopt for the problem? Can anyone help me just *name* my problem so th=&lt;br&gt;
at I know what i should be searching for?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks very much,&lt;br&gt;
&amp;gt; Sven.&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------------=&lt;br&gt;
-----------------------&lt;br&gt;
Sven:&lt;br&gt;
It's possible that what you're trying to describe, and looking for the&lt;br&gt;
name of, is the &quot;mean shift algorithm&quot; or &quot;mean shift segmentation.&quot;&lt;br&gt;
Do a web search and see if that matches your thinking or gives you a&lt;br&gt;
new direction to try.&lt;br&gt;
Good luck,&lt;br&gt;
ImageAnalyst</description>
    </item>
  </channel>
</rss>

