Discussion:
Freeware & techniques to turn a digital photo into a line drawing
(too old to reply)
Tony Palermo
2013-01-04 09:05:35 UTC
Permalink
*************************************************
Summary of Linux methods: (I like #4 the best)
**************************************************
1. Inkscape Pencil Effect:
Inkscape: Edit->Select All
Inkscape: Filters->Image effects->Pencil
Inkscape: File->Save As->/tmp/kids2.svg
Note: Drawing appears very light with fine lines.
2. Inkscape Edge Detection:
Inkscape: Edit->Select All
Inkscape: Path->Trace Bitmap->(o)Edge detection->Update->OK
Inkscape: Move the top trace layer off a bit to the side
Inkscape: Triple click on the vector diagram to visualize the points
Inkscape: File->Save As->kids2.svg
Note: Drawing appears dark (with an optional transparent background).
3. GIMP Pencil Effect:
Gimp: Filters->Pencil-Drawing->Blur Radius=4, Strength=1, OK
Gimp: File->Save As->/tmp/kids2.jpg
Note: Drawing appears light with fine lines (slightly more detail).
4. GIMP Edge Detection:
TheGimp: Filters->Edge Detect->Difference of Gaussians
DoG Edge Detect: Radius 1=3.0, Radius 2=1.0 px [x]Normalize [x]Invert
Note: Drawing appears slightly darker with fine lines (and more detail).
**************************************************
1. Inkscape Pencil Effect:
**************************************************
a. Save the picture below to /tmp/kids1.jpg
Loading Image...
b. Open up the file in Inkscape
$ cd /tmp; inkscape kids1.jpg &
c. Run the pencil effect:
Inkscape: Edit->Select All
Inkscape: Filters->Image effects->Pencil
d. Save the results and compare side by side:
Inkscape: File->Save As->/tmp/kids2.svg
$ convert kids1.jpg kids2.svg +append kids3.gif
Here is the result, side by side:
Loading Image...
**************************************************
2. Inkscape Edge Detection:
**************************************************
a. Save the picture below to /tmp/kids1.jpg
http://www1.picturepush.com/photo/a/11780489/img/11780489.jpg
b. Add a line drawing of the picture to a layer on TOP of that picture:
$ cd /tmp; inkscape kids1.jpg &
Inkscape: Edit->Select All
Inkscape: Path->Trace Bitmap->(o)Edge detection->Update->OK
RESULT:
Loading Image...
c. Delete the original picture:
Inkscape: Move the top trace layer off a bit to the side
Inkscape: Select the bottom photograph layer
Inkscape: Edit->Delete (this deletes the original photograph)
Inkscape: Triple click on the vector diagram to visualize the points
Inkscape: Modify the mathematical vector paths as desired.
Inkscape: File->Save As->kids2.svg
RESULT:
Loading Image...
d. Compare the vector trace of the outlines with the original:
$ convert kids1.jpg kids2.svg +append kids3.jpg
RESULT:
Loading Image...
e. Optionally, convert to transparent GIF to then add to a background:
$ convert kids2.svg kids2.gif
$ kolourpaint kids2.gif
Kolourpaint: File->Open File->background.jpg
Kolourpaint: Edit->Paste From File->kids2.gif
**************************************************
3. GIMP Pencil Effect Filter:
**************************************************
a. Choose a picture to turn into a line drawing, e.g., /tmp/kids1.jpg
http://www1.picturepush.com/photo/a/11780489/img/11780489.jpg
b. Download the script-fu-pencil-drawing.scm script to /tmp from
http://registry.gimp.org/node/22018
c. Read up on how to handle "scm" files for The Gimp:
http://registry.gimp.org/node/13950
Which says:
If it ends in .scm, put it in the scripts folder.
If it ends in .exe, put it in the plugins folder.
If it ends in .py, put it in the plug-ins folder.
d. Since it ends in scm, locate the proper scripts folder:
$ sudo updatedb; locate gimp| grep -i script
REPORTS: /usr/share/gimp/2.0/scripts/ & ~/.gimp-2.6/scripts/
e. Both directories worked for me, so use your personal preference:
$ sudo cp /tmp/script-fu-pencil-drawing.scm /usr/share/gimp/2.0/scripts/.
or
$ cp /tmp/script-fu-pencil-drawing.scm ~/.gimp-2.6/scripts/.
f. Load the photo to be converted into The Gimp, version 2.6:
$ /usr/bin/gimp kids1.jpg &
g. Convert the picture to a coloring book pencil line drawing & save:
Gimp: Filters->Pencil-Drawing->Blur Radius=4, Strength=1, OK
Gimp: File->Save As->/tmp/kids2.jpg
h. Compare the results, side by side:
$ cd /tmp; /usr/bin/convert kids1.jpg kids2.jpg +append kids3.jpg
See results here:
Loading Image...
**************************************************
4. GIMP Edge Detection:
**************************************************
a. Choose a picture to turn into a line drawing, e.g., /tmp/kids1.jpg
http://www1.picturepush.com/photo/a/11780489/img/11780489.jpg
b. Open up the photographi in The GIMP:
$ /usr/bin/gimp kids1.jpg &
c. Run the DoG filter:
TheGimp: Filters->Edge Detect->Difference of Gaussians
DoG Edge Detect: Radius 1=3.0, Radius 2=1.0 px [x]Normalize [x]Invert
RESULTS: Loading Image...
**************************************************
Cartoonize Method:
**************************************************
http://www.cartoonize.net/
Upload photo from disk: /tmp/kids1.jpg
Select the 15th cartoon effect (3rd column, 5th row)
Press the "Cartoonize Now" button & save the results.
RESULTS: Loading Image...
**************************************************
See also:
http://www.poorbruce.com/YouColorSetup.htm (Windows only)
http://www.fotosketcher.com (Windows only)
http://www.irfanview.com (Windows only, Relief & Emboss_32 filter)
https://itunes.apple.com/us/app/sketch-me!/id364365478?mt=8 (iPhone)
**************************************************
Eric Prilovich
2013-01-04 11:41:52 UTC
Permalink
In kc660v$gi1$***@dont-email.me, it was written:

5. Gimp: Filters->Artistic->Photocopy
6. Inkscape: Filters->Image effects,transparent->Alpha draw,color
Loading...