Re: skimage and opencv

1,882 views
Skip to first unread message

Emmanuelle Gouillart

unread,
Dec 28, 2012, 3:25:07 AM12/28/12
to scikit...@googlegroups.com
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,

Stéfan van der Walt

unread,
Dec 28, 2012, 3:01:40 PM12/28/12
to scikit...@googlegroups.com
Hi Francois

On Thu, Dec 27, 2012 at 2:06 PM, François <francois...@gmail.com> wrote:
> 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?

Thanks for your question--it's a good one. There are several reasons
for a separate project, some of them already highlighted by
Emmanuelle. A few years ago, we had to decide whether we wanted to
build on top of OpenCV, and the general consensus was that it is too
heavy a dependency. We have three aims with `skimage`:

1. Provide a highly Pythonic interface to building blocks for
reproducible image processing reseach
2. Have simple, well-written and clear implementations of common
algorithms for use in education
3. Provide tools for solving industry problems efficiently

I think OpenCV does number 3 particularly well, while some projects
such as SimpleCV take on number 1. But when it comes to education and
reproducible research, I believe `skimage` still holds a significant
advantage, in terms of the transparency and clarity of the code, as
well as the examples provided.

`skimage` plays particularly well with the scipy stack of tools, and I
find that the pipelining tools (dtype conversion, color space
handling, exposure adjustment, etc.) significantly improve my research
productivity.

Your comments and criticisms are most welcome; we are always keen to
hear good feedback!

Regards
Stéfan

François

unread,
Dec 29, 2012, 9:54:17 AM12/29/12
to scikit...@googlegroups.com
Many thanks for your responses.

I agree with the fact that methods implemented in python are definitely easier to read. This a major advantage for education purpose.

On the skimage home page, there is a 'Related project' box. Don't you think that it would be interesting to add these explanations on a dedicated page? Even the overview (see http://scikit-image.org/docs/dev/overview.html) is very light on the topic.

Emmanuelle Gouillart

unread,
Dec 29, 2012, 10:36:49 AM12/29/12
to scikit...@googlegroups.com
> On the skimage home page, there is a 'Related project' box. Don't you
> think that it would be interesting to add these explanations on a
> dedicated page? Even the overview (see
> http://scikit-image.org/docs/dev/overview.html) is very light on the
> topic.

We welcome pull requests :-D

François

unread,
Jan 5, 2013, 4:08:57 PM1/5/13
to scikit...@googlegroups.com

:) Added in my contrib. todo list.

Isaac Gerg

unread,
Jan 8, 2013, 5:06:07 PM1/8/13
to scikit...@googlegroups.com
Does openCV have Python 3 bindings?

Isaac


On Thursday, December 27, 2012 5:06:08 PM UTC-5, 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,
-- 
François Boulogne.
http://www.sciunto.org

François

unread,
Jan 9, 2013, 10:39:18 AM1/9/13
to scikit...@googlegroups.com


Le mardi 8 janvier 2013 23:06:07 UTC+1, Isaac Gerg a écrit :
Does openCV have Python 3 bindings?

Isaac

AFAIK, no. Not provided with opencv 2.4.3-4 on archlinux.

Dipankar Ganguly

unread,
Sep 22, 2016, 12:22:56 AM9/22/16
to scikit-image
I have another question...
If I use SciPy functions within Python 3.5 code how hard will be convert that code using JPython?

Jérôme Kieffer

unread,
Sep 22, 2016, 12:26:53 PM9/22/16
to scikit...@googlegroups.com
On Wed, 21 Sep 2016 21:22:56 -0700 (PDT)
Dipankar Ganguly <dip...@gmail.com> wrote:

> I have another question...
> If I use SciPy functions within Python 3.5 code how hard will be convert
> that code using JPython?

hard ...
...as hard as calling fortran code from java
Reply all
Reply to author
Forward
0 new messages