Page 1 of 1
Watercolor effects: How to do these steps in IM
Posted: 2006-07-19T16:34:56-07:00
by dognose
This guy details the Water color effect:
http://www.state-of-entropy.com/watercolor.html
to
How possible are those steps? I can do the color reduction and textures, but the smoothing and edge detection doesn't seem to be the same in IM.
Posted: 2006-07-19T18:52:10-07:00
by anthony
Sounds like it isn't sharpen as -adaptive-sharpen
Also remember their are tow types of sharpen -sharpen and -unsharp each using different algorithms.
Anyone with more info pleas email me so I can add it to the IM examples pages. This is one area I have practically nothing on.
Posted: 2006-07-19T21:53:56-07:00
by anthony
Your reference is very interesting. When you work out the final method can you please email it to either here or to me.
Posted: 2006-07-20T09:43:10-07:00
by dognose
Yeah, I was able to get close on another on of his examples, the sketch effect.
His sketching example:
http://www.state-of-entropy.com/sketching.htm
My IM output
Code: Select all
convert source.gif -fx intenstiy bw.gif
convert -size 100x100 xc: -fx 'rand()' -motion-blur 0x20+135 -charcoal 1 charcoal.gif
convert -size 50x50 charcoal.gif pencil.gif
composite -compose color_dodge pencil.gif bw.gif rough.gif
composite -blend 80x20 rough.gif bw.gif output.gif
Posted: 2006-07-20T17:28:52-07:00
by anthony
Good job, but your commands don't work as given..
The third command for example just copies charcoal.gif to pencil.gif.
I have tried to replicate your success on the IM examples page (curtisy) of your name), but it looks like you did a number of steps that was not listed.
See
http://www.cit.gu.edu.au/~anthony/graph ... k6/photos/
This is a new page, that has a large number of things yet to be added.
Posted: 2006-07-20T18:38:13-07:00
by magick
When the sketch effect you generated is applied to the horse the overall image looks right but the colors do not seem to match. In the original tutorial the horse is brown and yellow as expected but with your command the horse is predominately green. Any way to fix the problem? If you can get sketching working properly we can code it as a command line option -sketch.
Posted: 2006-07-20T19:44:36-07:00
by anthony
I don't think a commanline option is needed, too many things users may like to change for their own use. Photoshop doesn't encode it for the same reasons.
What mat be needed is better handling of some of the more primative operators.
For example -fx intensity is slow. but -type greyscale is a input setting
and -colorspace seems to be a half operator half setting. Another hold out from IMv5 I think. If you try to use it, it stuffs later operators up.
That is where things are needed, more formal definition of what these things do.
For example for some reason the -charcoal produces a color pattern rather than black and white in some situations when I try to compond the IM code into a single command!
Posted: 2006-07-22T08:57:07-07:00
by dognose
Opps, the 3rd on need a resize.
I made the pencil image bigger so there less repeat.
I don't know how your horse is ending up green.
I just keep the pencil template around, so I'm not generating it all the time ( the more intensive operation)
If you don't use -fx intensity, you end up with a color sketch.
Code: Select all
convert source.gif -fx intenstiy bw.gif
convert -size 1000x1000 xc: -fx 'rand()' -motion-blur 0x20+135 -charcoal 1 charcoal.gif
convert -resize 500x500 charcoal.gif pencil.gif
composite -compose color_dodge pencil.gif bw.gif rough.gif
composite -blend 80x20 rough.gif bw.gif output.gif
putting it into a single command sound better though. I wish I was better at combining them, but I usually just end up with a lot of intermediate images to look at
Posted: 2006-07-23T16:26:11-07:00
by magick
We added
-sketch in 6.2.8-6. It should be available within a few days. Try
- convert horse.jpg -sketch 0x20+135 sketch.jpg
Add
-type gray to get a grayscale pencil sketch.
Posted: 2006-07-23T19:21:29-07:00
by anthony
I have updated the 'photo' IM examples page.
Though again I do not think a dedicated -sketch operator is needed as thier are a lot of variables that users may need to control, line thikness, pencil image overlay size, using tiling for the overlay,
color changes, strok direction, etc etc etc.
It is far better to add a cookbook recipe, than a dedicated IM operator for this type of thing, and there are hundred's if not thousands of variations. That is way photoshop done not do this type of thing.
Posted: 2006-07-23T19:29:59-07:00
by magick
You are correct of course but sketch was added as an option to quickly produce a sketch for those that do not want to fuss with the different parameters and for the ImageMagick Studio web interface that do not have the convenience of the command line (mostly MSN TV users).
Posted: 2006-07-23T21:55:33-07:00
by anthony
Getting back to the Original Program.
While what has been done (good work by the way) is great, their is still
the matter of adding the pencil outlines of the areas. Eg inserting a little edge detection into the final mix.
Posted: 2006-07-23T22:33:27-07:00
by dognose
Oh, thank you for adding the -sketch, I think it goes well with -paint and -charcoal. I do wish there was a better way to package up these recipes.. like with plug-ins or scripting or something. Till then, I'm fine with whatever you guys can do.
For the Original sketch recipe, yes, there did need to be a better edge. To me, -edge doesn't work right. -edge 1 will trace a pixel outside of what should be the actual edge. And, -edge 0 will do what -edge 1 does.
Is there a better way to get the edge command or other command to trace the contour lines of the image? Or, do you see a way to get the outline effect he has in the example?
Posted: 2006-07-24T23:57:21-07:00
by anthony
You are right about edge being slightly on one side of the actual edge.
If you want the edge on the other side you can negate the image then edge it.
I don't think thier is any other choice as a color change is a 0 width, unless you
edge it at a higher resolution.
I pointed out this edge detail in...
http://www.cit.gu.edu.au/~anthony/graph ... form/#edge
And actually rely on it to generate some interesting mottling effect
on the IM example backgrounds page...
http://www.cit.gu.edu.au/~anthony/graph ... nds/#blobs
Basically edge only currently draws in areas that are more that 50% white.
Hmmm one alturnative, use -shade with a 90 degree asmith (any direction) EG: -shade 0x90
You may need to brighten the image before appling. However it will tend to generate a 3 pixel wide edge, so maybe a higher resolution is needed.