Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a charcoal drawing filter

i'm interested in some kind of charcoal-filters like the photoshop Photocopy-Filter or the note-paper. Have someone a paper or some instructions how this filter works?

In best case i want to create the following:

input:

Image Hosted by ImageShack.us

Output:

Image Hosted by ImageShack.us

greetings

like image 907
501 - not implemented Avatar asked Jul 23 '12 23:07

501 - not implemented


People also ask

How do you control charcoal drawings?

A blending stump will allow you to have full control over the blending and smearing of the charcoal. You can create a blending stump by tightly rolling up drawing paper to a point. If you are drawing on a flat surface, it's also a good idea to have a paper towel handy.


2 Answers

I think it's a process akin to pan-sharpening. I could get a quite similar image in gimp by:

  • Converting to gray
  • Duplicating into two layers
  • Lightly blurring one layer
  • Edge-detecting in the other layer with a DOG filter with large radius
  • Compositing the two layers, playing a bit with the transparency.
like image 198
Francesco Callari Avatar answered Oct 13 '22 01:10

Francesco Callari


What this is doing is converting the color picture into a 0-1 bitmap picture. They typically use a threshold function which returns 1 (white) for some values and 0 (black) for some other.

One simple function would be transform the image from color to gray-scale, and then select a shade of gray above which everything is white, and below it everything is black. The actual threshold you use could be made adaptive depending on the brightness of the picture (you want a certain percentage of pixels to be white).

It can also be adaptive based on the context within the picture (i.e. a dark area may still have some white pixels to show local contrast). The trees behind the house are not all black because the filtering is sensitive to the average darkness of the region.

Also note that the area close to the light gap in the tree has a cluster of dark pixels, because of its relative darkness. The edges of the home, the bench are also highlighted. There is an edge detection element at play.

like image 35
VSOverFlow Avatar answered Oct 13 '22 02:10

VSOverFlow