Photo to cartoon script
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Photo to cartoon script
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.
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Photo to cartoon script
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.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Photo to cartoon script
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.
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Photo to cartoon script
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
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 :/
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
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
___________
market samurai ~ marketsamurai ~ marketsamurai.com
Last edited by leonorax on 2009-08-21T04:36:52-07:00, edited 1 time in total.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Photo to cartoon script
I think you may need to get a new interest!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?
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Photo to cartoon script
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
http://www.caip.rutgers.edu/~comanici/segm_images.html
I believe it uses the mean shift concept. http://en.wikipedia.org/wiki/Mean_shift
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Photo to cartoon script
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
mean shift
original
mean shift
original
mean shift
original
mean shift
original
mean shift
original
mean shift
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Photo to cartoon script
What is the point of your post? There is no question and you are not showing any cartooning? Am I missing something?johnymac wrote:<-- orig
Re: Photo to cartoon script
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.
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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Photo to cartoon script
Yes, I have been pushing for that open source code as well.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.
Have you integrated this code for use with IM? If so, post it or send it to Magick
Re: Photo to cartoon script
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.
Anyway, checkout my google code page for the sourcecode or binary.