Hi FranÃ¯Â¿Â½ois,
that's an excellent question, and not a troll :-). Opencv is a
very powerful library, but it focuses primarily on computer vision
(feature detection and extraction, classification, ...), as opposed to
image processing in general (with other tasks such as denoising,
segmentation, ...).
The other big difference is that skimage builds on numpy
ndarrays, and uses the full power of the numpy API (including of course
the basic facilities for processing arrays as images that come with
numpy), as well as some of scipy functions (you could have added
scipy.ndimage to your list -- a few functions in skimage are wrappers
around scipy.ndimage, that exist for the sake of completeneness). One
important consequence is that algorithms working for 3-d or even n-d
images can be easily implemented in 3-d/n-d in skimage, whereas opencv is
restricted to 2-D images (as far as I know). Thanks to the use of numpy
arrays, the API of skimage is also quite pleasant for a numpy user, more
than the API of opencv.
A related difference is that skimage is written in python and
cython, whereas opencv is a C++ library. The two libraries attract a
different crowd of developers, and a Python/Cython toolkit based on numpy
arrays is easier to develop and maintain inside the Scientific Python
ecosystem.
I'm sure that other devs/users will have things to add to this
discussion!
Cheers,
Emmanuelle
On Thu, Dec 27, 2012 at 02:06:08PM -0800, FranÃ¯Â¿Â½ois wrote:
> Hi users and devs,
> It came to my knowledge that another python library (based on C++ and C
> codes) for image processing exists too : opencv
> I understand that numpy intregrates some basic features and we need some
> advanced features but I have the feeling that skimages is redoundant with
> opencv in some ways.
> What's the position of skimage about that? (Don't read this question as a
> troll but like a real question).
> I mean that similar features exist in both. Would not be possible to
> reuse/integrate opencv or merge? what's the reason for keeping them apart?
> My observation is there is 4 libraries to manipulate images:
> * PIL
> * numpy
> * skimages
> * opencv
> That's a lot.
> Cheers,

Hi,
FYI, I plan to work on the detection of ellipses quite soon. Stefan
indicated to me a reference which seems fairly simple to implement.
Cheers,
François.

Hello,
I think you must all pay attention to standards if you want to act on nD
images. For structured data files there is a library that hab been used for
decade and which is very efficient, it's netcdf
(http://www.unidata.ucar.edu/software/netcdf/), there is already tools in
python to deal with it. This library allows one to deal with data in //
which is important when one deals with big datas. The last version is based
on hdf wich is the tools used on HPC.
If your data are not stored in a standard format, the library ITK has
provide a binding called SimpleITK that allows one to read every format ITK
konws.
It is important to take into account the fact that the operation on pixel
depend on the grid spacing, as for exampe the finite difference gradient
which is wrong when one chooses a step of one because the file as not been
read correctly.
As the 3D datas often comes from the measurement X-Ray Tomography, MRI,
Echography, it is important to consider the device information. The format
dicom as been made in this specific purpose there is a python binding
called pydicom.
I know that scikit team does'nt want to have to much dependances, but for
nD case I think it is important to use existing libraries.
Best regards
Le vendredi 30 novembre 2012 05:45:49 UTC+1, Juan Nunez-Iglesias a écrit :
>
> Hey Guys,
>
> I mentioned this briefly at SciPy, but I would like to reiterate: a lot of
> data is 3D images these days, and more and more data is being generated
> that is multi-channel, 3D+t. Therefore, it would be awesome if scikit-image
> started making more of an effort to support these. In the best case, the
> dimension of the underlying array can be abstracted away — see here<https://github.com/jni/ray/blob/develop/ray/morpho.py#L328>for example, the functions juicy_center (which extracts the centre of an
> array, along all dimensions), surfaces (grabs the "border" arrays along
> each dimension), hollowed (zeroes-out the centre), and more. Otherwise,
> writing a 3D function that gracefully degrades to 2D when one of the
> dimensions is 1 is also possible.
>
> In general, the amount of additional effort to make code 3-, 4- or n-
> dimensional is relatively low when you write the algorithm initially,
> relative to refactoring a whole bunch of functions later. I'll try to
> fiddle with whichever code I need, but in the meantime, what do you think
> about adding a paragraph or a sentence about this issue in the scikit-image
> contribute <http://scikit-image.org/docs/dev/contribute.html> section, so
> that people at least have this in mind when they are thinking of writing
> something new?
>
> Thanks,
>
> Juan.
>

Hi Tony,
I'm not going to SciPy 2013, but I've agreed to give a 1h30-long tutorial
on image processing with scikit-image at Euroscipy 2013 (August 21-24).
I'd happy to share course materials if you're interested.
I copy below the abstract I've given to the organizers.
Cheers,
Emmanuelle
Image processing with scikit-image and the SciPy stack
======================================================
Numerical image processing involves the manipulation and transformation
of images, often in order to extract information of interest from the
images. NumPy nd-arrays provide an efficient container for image data,
that can therefore be processed using the SciPy toolstack.
In this tutorial, we will first briefly see how simple operations on
images (e.g. cropping, framing) can be performed using NumPy. More
complex image processing operations will be handled principally by the
scikit-image module (occasionally by the ndimage submodule of
SciPy). Compared to other image processing modules for Python,
scikit-image is designed to work transparently with numpy nd-arrays, and
is written in pure Python and some Cython in order to promote readability
and maintainability.
The different subtopics of this tutorial include:
* input and output of images (file formats...)
* image enhancing / denoising
* image segmentation (separating an image in labeled regions)
* extraction of geometrical features (edges, lines, spheres, skeleton...)
* extraction of features for image classification
This tutorial will consist mostly of hands-on examples; no mathematical
justification of the algorithms will be given during the tutorial.
Besides the main image processing tasks, the tutorial will demonstrate
how NumPy advanced features (masks, broadcasting, manipulation of
subsets of indices) and scikit-image utilities functions make image
processing easier. The tutorial will also address the visualization of
image processing results (contours, etc.).
On Thu, Mar 28, 2013 at 09:06:04PM -0500, Tony Yu wrote:
> I was wondering if anyone has plans to submit a [1]tutorial proposal for
> SciPy 2013. The proposal is due on Monday (Apr. 1st). It'd be great to
> have scikit-image represented there; especially since medical imaging is
> one of the mini-symposia topics.
> If no one else is able, I'll probably submit something, but I have a
> feeling that many of you have more (i.e. any) experience teaching image
> processing than I do.
> Cheers,
> -Tony

Yeah, this works well!
BTW, the unwanted thicker bounds could be removed by a simple binary
dialation.
Thanks!
On Thu, Mar 28, 2013 at 9:14 PM, Juan Nunez-Iglesias <jni.soma(a)gmail.com>wrote:
> I think the following should work:
>
> # ws is your watershed label mapfrom scipy import ndimage as nd
> bound = nd.grey_erosion(ws) != nd.grey_dilation(ws)
>
>
> The only bad thing about this is that you'll get slightly thick
> boundaries. I'm not sure if that's a problem for you.
>
>
> On Thu, Mar 28, 2013 at 10:37 AM, Zetian Yang <zetian.yang(a)gmail.com>wrote:
>
>> Thanks Walt,
>>
>> I need a binary image in which the edges of every labeled region are set
>> to 1.
>> I've found the `find_boundaries` function in the skimage.segmentation
>> module, but its outcome didn't fit my requirement.
>>
>> Currently, I'm using the following algorithm to solve my question.
>>
>> ```
>> bound = np.zeros(data.shape)
>> labels = data.max()
>> for label in labels:
>> label_data = data==label
>> bound += label_data - scipy.ndimage.binary_erosion(label_data)
>> ```
>>
>> It seemed work, but I'm not sure its correctness and is there a more
>> efficient method?
>>
>>
>> On Thu, Mar 28, 2013 at 12:00 AM, Stéfan van der Walt <stefan(a)sun.ac.za>wrote:
>>
>>> Hi Zetian
>>>
>>> On Wed, Mar 27, 2013 at 5:07 AM, Zetian Yang <zetian.yang(a)gmail.com>
>>> wrote:
>>> > I have been trying the watershed algorithm in the skimage package and
>>> it is
>>> > really fantastic. Recently I have a problem where the edge of one
>>> segmented
>>> > image is need. Is there a convenient way to extract edges of the
>>> watersheded
>>> > result?
>>>
>>> I'm glad you find the package useful! Do you need the edges as
>>> coordinates, or do you need a bitmap of the edges? We have marching
>>> squares for contour finding, edge detection, etc.
>>>
>>> Stéfan
>>>
>>> --
>>> 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(a)googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>> --
>> 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(a)googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
> --
> 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(a)googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

I was wondering if anyone has plans to submit a tutorial proposal for SciPy
2013 <http://conference.scipy.org/scipy2013/tutorial_overview.php>. The
proposal is due on Monday (Apr. 1st). It'd be great to have scikit-image
represented there; especially since medical imaging is one of the
mini-symposia topics.
If no one else is able, I'll probably submit something, but I have a
feeling that many of you have more (i.e. any) experience teaching image
processing than I do.
Cheers,
-Tony

I think the following should work:
# ws is your watershed label mapfrom scipy import ndimage as nd
bound = nd.grey_erosion(ws) != nd.grey_dilation(ws)
The only bad thing about this is that you'll get slightly thick boundaries.
I'm not sure if that's a problem for you.
On Thu, Mar 28, 2013 at 10:37 AM, Zetian Yang <zetian.yang(a)gmail.com> wrote:
> Thanks Walt,
>
> I need a binary image in which the edges of every labeled region are set
> to 1.
> I've found the `find_boundaries` function in the skimage.segmentation
> module, but its outcome didn't fit my requirement.
>
> Currently, I'm using the following algorithm to solve my question.
>
> ```
> bound = np.zeros(data.shape)
> labels = data.max()
> for label in labels:
> label_data = data==label
> bound += label_data - scipy.ndimage.binary_erosion(label_data)
> ```
>
> It seemed work, but I'm not sure its correctness and is there a more
> efficient method?
>
>
> On Thu, Mar 28, 2013 at 12:00 AM, Stéfan van der Walt <stefan(a)sun.ac.za>wrote:
>
>> Hi Zetian
>>
>> On Wed, Mar 27, 2013 at 5:07 AM, Zetian Yang <zetian.yang(a)gmail.com>
>> wrote:
>> > I have been trying the watershed algorithm in the skimage package and
>> it is
>> > really fantastic. Recently I have a problem where the edge of one
>> segmented
>> > image is need. Is there a convenient way to extract edges of the
>> watersheded
>> > result?
>>
>> I'm glad you find the package useful! Do you need the edges as
>> coordinates, or do you need a bitmap of the edges? We have marching
>> squares for contour finding, edge detection, etc.
>>
>> Stéfan
>>
>> --
>> 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(a)googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
> --
> 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(a)googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

Hi everyone
I've been interested in getting face detection into skimage for a
while. This morning, Nathan Faggian reminded me that the highly
popular Viola-Jones detector is patent encumbered (yes, if you're not
careful you can use patented code in packages like OpenCV). However,
the following link seems to suggest that we can work around that by
training our own classifier with different features:
http://rafaelmizrahi.blogspot.com/2007/02/intel-opencv-face-detection-licen…
If there's any interest in working on this, or if you already have an
algorithm available, please get in touch.
Stéfan

Thanks Walt,
I need a binary image in which the edges of every labeled region are set to
1.
I've found the `find_boundaries` function in the skimage.segmentation
module, but its outcome didn't fit my requirement.
Currently, I'm using the following algorithm to solve my question.
```
bound = np.zeros(data.shape)
labels = data.max()
for label in labels:
label_data = data==label
bound += label_data - scipy.ndimage.binary_erosion(label_data)
```
It seemed work, but I'm not sure its correctness and is there a more
efficient method?
On Thu, Mar 28, 2013 at 12:00 AM, Stéfan van der Walt <stefan(a)sun.ac.za>wrote:
> Hi Zetian
>
> On Wed, Mar 27, 2013 at 5:07 AM, Zetian Yang <zetian.yang(a)gmail.com>
> wrote:
> > I have been trying the watershed algorithm in the skimage package and it
> is
> > really fantastic. Recently I have a problem where the edge of one
> segmented
> > image is need. Is there a convenient way to extract edges of the
> watersheded
> > result?
>
> I'm glad you find the package useful! Do you need the edges as
> coordinates, or do you need a bitmap of the edges? We have marching
> squares for contour finding, edge detection, etc.
>
> Stéfan
>
> --
> 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(a)googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

Hi Zetian
On Wed, Mar 27, 2013 at 5:07 AM, Zetian Yang <zetian.yang(a)gmail.com> wrote:
> I have been trying the watershed algorithm in the skimage package and it is
> really fantastic. Recently I have a problem where the edge of one segmented
> image is need. Is there a convenient way to extract edges of the watersheded
> result?
I'm glad you find the package useful! Do you need the edges as
coordinates, or do you need a bitmap of the edges? We have marching
squares for contour finding, edge detection, etc.
Stéfan