Python – charcoal() method in Wand
charcoal() generates a sketch kind of image of original image. A very similar image to edge extraction is generated with inverted colours. One of the artistic simulations, charcoal() can emulate a drawing on paper.
Syntax :
wand.image.charcoal(radius, sigma)
Parameters :
Parameter |
Input Type |
Description |
radius |
numbers.Real |
The size of the Gaussian operator. |
sigma |
numbers.Real |
The standard deviation of the Gaussian.
|
Source Image:
Example 1:
from wand.image import Image
with Image(filename = "koala.jpeg" ) as img:
img.charcoal(radius = 1.5 , sigma = 0.5 )
img.save(filename = "ch_koala.jpeg" )
|
Output:
Example 2: Increasing radius and sigma value.
from wand.image import Image
with Image(filename = "koala.jpeg" ) as img:
img.charcoal(radius = 4 , sigma = 0.65 )
img.save(filename = "ch_koala_2.jpeg" )
|
Output:
Last Updated :
08 May, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...