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,
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
I'm sure that other devs/users will have things to add to this
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.
I've been implementing my own HoG transform looking at different sources.
While the implementation in scikit-image seems to lack certain features
(multiple normalization schemes, general block overlap, Gaussian block
window, trillinear interpolation/weighting of bin assignments,...) these
don't seem to be that important, at least when applied to my current
problem (eye blink analysis).
Most of these would increase complexity, giving the implementation a
complicated look, with little gain. I've also been looking into some
practical improvements - integral histogram, separating the cell-block
histogram feature to use it with other dense feature transforms such as
LBP, a HoG visualization function that would render the visualization at
higher resolutions that the original image.
Would any of these be welcomed additions to scikit-image?
A while ago I wrote a post on my blog with code on how to import in Python
a colour palette in an ASCII file and convert it to a Matplotlib colormap:
Following that post I wrote a tutorial on a geoscience magazine on how to
evaluate and compare colormaps using Python:
In the accompanying notebook I show how to convert a 256x3 RGB colormap to
a 256x256x3 RGB image, then convert it to CIELAB using scikit-image's
rgb2lab, then plot the 256x1 lightness (L) array to evaluate the colormaps
You can read the relevant extract of the notebook using this nbviewer link:
In that case scikit-image worked really well for me.
Now I am trying to follow up with a new tutorial and I run into problems
with the color space conversions.
You can follow what I am trying to do in this other notebook extract:
The goal of this new tutorial is to show how to build colormaps from
scratch using perceptual principles. I design a color palette in LCH (polar
version of CIELAB) by keeping Chroma and Lightness fixed and interpolating
Hue around the circle, then convert to LAB, then to RGB.
As far as I know the code I wrote should work, but the result is a black
colormap. I am thinking I got wrong one or more of the ranges for the LCH
coordinates. I assumed L between (0,1), Ch between (0,1), and H between (0,
Is that wrong, and if that's the case, what are the ranges? Many of them
are not stated clearly in the documentation in here:
Is it possible to update the documentation to clearly state all ranges for
all colour spaces.
Thanks for your help.
Just wanted to mention an algorithm which I was very impressed by and
which might be an awesome addition to scikit-image. The algorithm is
called COSFIRE (Combination of Shifted Filter Responses).
I saw a talk by Geore Azzopardi, who presented the use of the algorithm
for object and patter recognition. I was very impressed with the quality
of segmentation of the shown examples, but also with the wide variety of
image data (e.g. retina images, traffic signs, hand-written characters,
The filter is inspired by how the brain processes visual information,
and according to the author the algorithm is actually quite simple. The
algorithm was the topic of his PhD and he's going to continue working on
it in his new job.
The code (in Matlab) is available, so it might be worth a shot to try
and port it to Python.
- PhD thesis: http://www.cs.rug.nl/~george/phd-thesis/
- Matlab code: nl.mathworks.com/matlabcentral/fileexchange/37395
- Paper in MIA:
I'm pleased to announce version 1.0 of imageio - a library for reading
and writing images. This library started as a spin-off of the freeimage
plugin in skimage, and is now a fully-fledged library with unit tests
Imageio provides an easy interface to read and write a wide range of
image data, including animated images, volumetric data, and scientific
formats. It is cross-platform, runs on Python 2.x and 3.x, and is easy
Imageio is plugin-based, making it easy to extend. It could probably use
more scientific formats. I welcome anyone who's interested to contribute!
install: pip install imageio
release notes: http://imageio.readthedocs.org/en/latest/releasenotes.html
I am pleased to see interest in the COSFIRE approach that I started during
my PhD studies.
The COSFIRE approach is a trainable pattern recognition approach which can
be applied to several applications, including feature detection, object
recognition and localization, image classification, contour detection and
vessel segmentation. The selectively for a pattern of interest is
automatically configured in a training process. The method involves several
computations that are independent of each other, and thus it can be easily
implemented using parallel programming (e.g. on a GPU). The original paper
(http://www.cs.rug.nl/~george/articles/PAMI2013.pdf) combines information
about the contours of the concerned pattern. We now have another paper
which is currently being reviewed for CVPR2015 where we show that by adding
colour information COSFIRE filters become even more robust.
Please feel free to send me other ideas on how this work can be developed
I would be very happy and available to work with an undergraduate or a
postgraduate student (or any other person) to have this parallel
implementation in Python. I see that you already added it to the
Requested-features page. You can also add my contact details (geazzo@gmail)
there for the interested readers.
All my papers can be freely downloaded from my
On Tuesday, 16 December 2014 15:22:45 UTC+1, Stefan van der Walt wrote:
> On Tue, Dec 16, 2014 at 1:57 PM, Pratap Vardhan <prat...(a)gmail.com
> > I found few copies of the paper hosted by universities. I haven't
> checked if
> > these are the actual pre-prints - However, by the citation it looks like
> Thanks! I've added it to the list:
kind of a follow up question of my last one (see here
still have a chain of image processing tasks, which I want to visualize
with the image viewer. Certain parameters should be changed on the fly,
where i can see the results in the image viwer immediately by the use of
plugins. Something like this basically:
a, b = previous_function(image, parameter1 = 0.002
parameter = 0.02)
new_image = next_function(image, a, b, another_parameter = 3)
I managed to pass the values a and b, generated by a previous function
using Juan's hint with functools.
which was fine as long as I don't want to change parameter1 and parameter2
interactively. What do I do now, when I want to change them?
Using functools here won't get me far, since now I want to be able to
change parameter1 and parameter2 with a slider, as well as
Maybe there is still a way to achive this, I saw something like a callback
argument for the widgets, but I am not sure how to use them or whether they
are related to my problem at all. I would also be fine with writing my own
Plugin class, but could not get my head around the given examples. I feel
that something like this is quite common, so I hope there are already ways
to achieve this.
Thanks a lot for the great work,
As you'll see the dumb questions I'll make, I'm starting with scikit-image.
I started studying but I wanted to run the tests with my own images. But I
tried to import them and there was no way to do it.
Is there any documentation or tutorial that could help me with this issue?
All I want is to run the algorithms in my own image.
I'm working on an image processing project involving several consecutive
steps. For parameter optimization I would like to create a viewer plugin
which is capable to take these previous outputs into account.
So basically the introductory example found in the docs of
denoise_plugin = Plugin(image_filter=denoise_tv_bregman)
would be sufficient, if I could pass additional fixed arguments (like an
additional numpy array).
I hope I made myself clear, and someone can give me hint at where to look