Page 1 of 1
Create a sketch from a Photo
Posted: 2017-02-04T08:26:10-07:00
by chzesin
Hi there,
Is there a way to achieve this:
https://www.youtube.com/watch?v=Gyu2yPwiQvA
I have used the following command: convert <sourcefile> -colorspace gray -sketch 0x20+120 -threshold 50% <renderedfile>
but the effect is not ideal.
I am using the latest imagemagick version.
Regards,
Help required from Singapore
Re: Create a sketch from a Photo
Posted: 2017-02-04T11:02:07-07:00
by snibgo
Code: Select all
convert in.png ( +clone -negate -blur 0x6 ) -compose ColorDodge -composite -modulate 100,0,100 -auto-level out.png
I added "-auto-level" to the video instructions.
I suggest you watch the video again, and work out how it corresponds to the command.
Re: Create a sketch from a Photo
Posted: 2017-02-04T11:21:30-07:00
by fmw42
What is the exact IM version? Is it IM 6 or IM 7? What platform/OS? Please always provide that information, since syntax differs.
Input:
In IM 6 Unix syntax:
Code: Select all
convert test.png \( -clone 0 -negate -blur 0x5 \) -compose colordodge -composite \
-modulate 100,0,100 -auto-level test_sketch.png
In IM 7 Unix syntax:
In IM 6 Unix syntax:
Code: Select all
magick test.png \( -clone 0 -negate -blur 0x5 \) -compose colordodge -composite \
-modulate 100,0,100 -auto-level test_sketch.png
For Windows, change \( ... \) to ( ... ) and replace the line ending \ with ^
Result:
Change the blur value as desired.
If on a Unix-like system, see my bash shell scripts, sketch and sketcher at my link below.
EDIT: Sorry, snibgo, you must have posted while I was writing my post.