Range of beta values in segmentation algorithm?

Emmanuelle Gouillart emmanuelle.gouillart at normalesup.org
Sat Apr 4 09:22:36 EDT 2015


Hi Yuta,

beta has to take a positive value. In the algorithm, the weight on a graph
edge is given by exp(- beta * diff) where diff is the absolute value of
pixels differences on both sides of the edge. Furthermore, the value of
beta you give is normalized by ten times the standard deviation of the
image, so that you don't have to worry about the image range (I know this
sounds a bit weird, but that's how it's coded. I might even be responsible
for this hack :-).

Therefore, if you put a large value of beta there will be a very small
weight on edges for which pixels have different values, and diffusion will
be difficult. On the other hand, for small values diffusion will be easy
and regions will be "flooded" for markers, no matter the gradients. A
larger value of beta means that boundaries are more likely to lie on pixels
with a strong gradient. I would advise that you start with a small value of
beta (1 for example) and look at the result. If you feel like boudaries are
"leaky" it means that diffusion is too fast and you should increase beta.

Hope this helps
Emma



2015-04-04 14:58 GMT+02:00 Juan Nunez-Iglesias <jni.soma at gmail.com>:

> Hi Yuta,
>
> Sorry, this slipped through the cracks. I haven't used random walker
> segmentation so I can't give you advice here... You might want to read the
> original publication [1], or, more practically, try out different betas on
> a logarithmic scale.
>
> Juan.
>
> [1] http://webdocs.cs.ualberta.ca/~nray1/CMPUT615/MRF/grady2006random.pdf
>
>
>
>
> On Sat, Apr 4, 2015 at 12:56 AM, Yuta Sato <yutaxsato at gmail.com> wrote:
>
>>
>> Dear skimage developers:
>> I would really appreciate to hear the answer on my question if it does
>> worth.
>>
>> Thanks
>>
>> On Thu, Mar 12, 2015 at 4:04 PM, Yuta Sato <yutaxsato at gmail.com> wrote:
>>
>>>   In the following skimage.segmentation.random_walker algorithm:
>>> What is the range of 'beta' values that can be supplied?
>>> I am working with a single band 8bit unsigned image.
>>>
>>> Is it 0 to 255?
>>>
>>>
>>> skimage.segmentation.random_walker(data, labels, beta=130, mode='bf',
>>> tol=0.001, copy=True,multichannel=False, return_full_prob=False,
>>> spacing=None)
>>>
>>> beta : float [Penalization coefficient for the random walker motion (the
>>> greater beta, the more difficult the diffusion)]
>>>
>>> Thanks for your support.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "scikit-image" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to scikit-image+unsubscribe at googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "scikit-image" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to scikit-image+unsubscribe at googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20150404/7c26edff/attachment.html>


More information about the scikit-image mailing list