Page 2 of 3

Re: Photo to cartoon script

Posted: 2009-06-18T21:51:29-07:00
by anthony
What you really want is spatial segmentation. Which divides images into areas of similar color and textures.

Unfortunately this is not something IM is currently very good at. At least not yet.


For example
http://people.cs.uchicago.edu/~pff/segment/
http://civs.ucla.edu/Segmentation/Segment.htm

Each areas can then be represented by a 'average color' for that segement, to produce a very cartoon like image.

Re: Photo to cartoon script

Posted: 2009-06-19T09:02:02-07:00
by fmw42

Re: Photo to cartoon script

Posted: 2009-06-21T11:43:29-07:00
by fmw42
Note that http://www.caip.rutgers.edu/~comanici/segm_images.html has C++ code available and uses the Mean Shift Algorithm that seems to be a standard these days for segmentation. If the licensing permits, someone may want to incorporate this code into IM.

Re: Photo to cartoon script

Posted: 2009-06-21T21:57:37-07:00
by anthony
One point -- you want spatial and texture separation, not color segmentation. Thay are related by two different things.

The former divides images into regions of similar attributes. The latter only divides the colors of the images into similar colors.

The color technique is implemented in -segment whos arguments involve number of pixels involved in each color, rather than the total number of colors.

Re: Photo to cartoon script

Posted: 2009-06-22T09:04:49-07:00
by fmw42
The mean shift technique includes both spatial and color distances in its approach. Also. the paper I mentioned above allows merging of small regions into larger ones, thus providing another spatial aspect. Also I have seen papers (PDF) that include an additional spatial modification as well as color approach using the mean shift technique.

Re: Photo to cartoon script

Posted: 2009-07-13T06:33:32-07:00
by johnymac
Sorry about slow response to this, shelved the project for a few weeks.

I wrote some more about it here:

http://www.mclear.co.uk/2009/06/how-to- ... -turn.html

I'm still not happy w/ the results I'm getting though :/

Re: Photo to cartoon script

Posted: 2009-08-19T22:39:17-07:00
by leonorax
How do I stop seeing cartoon face everywhere? Okay, this is weird. I keep seeing cartoon faces everywhere, even on my body. Whenever, I close my eyes or put my hand over it, it just randomly changes. How do I stop doing that?
___________
market samurai ~ marketsamurai ~ marketsamurai.com

Re: Photo to cartoon script

Posted: 2009-08-19T23:50:50-07:00
by anthony
leonorax wrote:How do I stop seeing cartoon face everywhere? Okay, this is weird. I keep seeing cartoon faces everywhere, even on my body. Whenever, I close my eyes or put my hand over it, it just randomly changes. How do I stop doing that?
I think you may need to get a new interest!


As for the original cartoon face problem. I am now thinking about it in a new way.

What is needed is some way to divide the image up into specific segments which are typically seperated by strong edges.

Each segment would then get a single average color, and then a black 'edge' is overlayed.

The separation into segments is the tricky part, but can be helped by the 'edge' detection as well.

Re: Photo to cartoon script

Posted: 2009-08-20T10:08:06-07:00
by fmw42
Anybody try this free software on the problem?

http://www.caip.rutgers.edu/~comanici/segm_images.html

I believe it uses the mean shift concept. http://en.wikipedia.org/wiki/Mean_shift

Re: Photo to cartoon script

Posted: 2009-12-11T20:51:01-07:00
by fmw42
Playing around with the color segmentation via the mean shift algorithm in ImageJ for cartooning. See http://rsb.info.nih.gov/ij/plugins/mean-shift.html

original
Image

mean shift
Image

original
Image

mean shift
Image

original
Image

mean shift
Image

Re: Photo to cartoon script

Posted: 2010-01-03T10:44:16-07:00
by johnymac
Image <-- orig

Re: Photo to cartoon script

Posted: 2010-01-03T15:41:19-07:00
by fmw42
johnymac wrote:<-- orig
What is the point of your post? There is no question and you are not showing any cartooning? Am I missing something?

Re: Photo to cartoon script

Posted: 2010-01-10T14:26:11-07:00
by festr
Hi, I've been searching for good color segmentation algorithms and noone does not sutisfied me except of http://www.caip.rutgers.edu/~comanici/segm_images.html.

I've created google code mirror to that program and modified it a little bit to allow compile on Linux and fix some bugfixes (segmentation faults). Checkout http://code.google.com/p/colorsegmenter/

There is compiled binary segm which should run on any linux with libstdc++.so.6 and it needs convert program installed.

Image
Image

Re: Photo to cartoon script

Posted: 2010-01-10T15:06:58-07:00
by fmw42
Hi, I've been searching for good color segmentation algorithms and noone does not sutisfied me except of http://www.caip.rutgers.edu/~comanici/segm_images.html.
Yes, I have been pushing for that open source code as well.

Have you integrated this code for use with IM? If so, post it or send it to Magick

Re: Photo to cartoon script

Posted: 2010-01-10T15:18:22-07:00
by festr
No, I didnt integrate it with IM, I'm using it on command line. Anyway the licence of this program is only for educational and research. Commercial use has to be approved by authors.

Anyway, checkout my google code page for the sourcecode or binary.