Thresholding a dark region in an image

Nabil Freij nabil.freij at gmail.com
Thu May 19 10:25:54 EDT 2016


Hello,

I have been investigating how to threshold a structure in my images. More
specifically, a sunspot, that can be seen in Figure 1. The aim has been to
isolate and measure the number of pixels that are part of the central part
of a sunspot, which is the darkest region of the structure.

The method I have been using is to define a region which contains no
features that are similar to a sunspot. The size of this region is not
fixed but I generally make it as large as the data allows. This region is
at the bottom black box in Figure 1 (ignore the slider). The mean and
standard deviation of this region is calculated, which allows me to define
a threshold limit, which is subtracting the standard deviation multiplied
by a user defined constant from the mean. The constant is chosen so that
overall, the threshold is selecting the pixels we know that are part of the
central region. But this value varies depending the structure and the data
source.

Another method I have discussed or looked into are related to Figure 2. On
the left is a cropped field of view of the sunspot and on the right is a
histogram of this image in red and in yellow is the histogram of the
background box from Figure 1. By using the histogram, I can work out the
numerical gradient and pick the points with the largest shift. I also tried
this method on the original image by taking slices along the sunspot,
however, due to the non-uniform nature of a sunspot the results were not
very good.

I was wondering if there were any suggestions to threshold this region that
is not as ad hoc as my method?

Thanks,
Nabil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20160519/fcbee0bb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: figure_1.png
Type: image/png
Size: 1255460 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20160519/fcbee0bb/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: figure_2.png
Type: image/png
Size: 226214 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20160519/fcbee0bb/attachment-0001.png>


More information about the scikit-image mailing list