Sketch

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
wAlex
Posts: 5
Joined: 2012-04-20T10:03:08-07:00
Authentication code: 13

Sketch

Post by wAlex »

Hi,
Someone knows how i could get an effect like this?
http://i.imgur.com/fgmGz.jpg
I tried to recreate this effect with :

Code: Select all

		$im->modulateImage(120, 0, 100); 
		$im->embossImage(0,0.6);
		$im->sketchImage (1000 , 27 , 45 ); 
		$im->shadeImage ( 0 , 10 , 80 );
		$im->adaptiveBlurImage(0.8,0.9);

but what I got was this...horrible result :(
http://i.imgur.com/VrYGb.jpg
Someone can help me?
Thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Sketch

Post by fmw42 »

Starting from what image? Your result is not that bad. Try adding some one-sided white noise.
wAlex
Posts: 5
Joined: 2012-04-20T10:03:08-07:00
Authentication code: 13

Re: Sketch

Post by wAlex »

from that image
Image
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Sketch

Post by Bonzo »

I do not think sketch will give you that effect.
wAlex
Posts: 5
Joined: 2012-04-20T10:03:08-07:00
Authentication code: 13

Re: Sketch

Post by wAlex »

How can I add one-sided white noise?
I know that sketch don't give me this effect, i've tried all possible way, but I can't achieve the result i want.
How can I do? Do you know some other way to realize that?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Sketch

Post by fmw42 »

wAlex wrote:How can I add one-sided white noise?
I know that sketch don't give me this effect, i've tried all possible way, but I can't achieve the result i want.
How can I do? Do you know some other way to realize that?
You can add one sided noise by (command line equivalent -- you will have to find the same functions in Imagick):

1) create a separate image the size you want using +noise Random
2) select any one channel
3) threshold that channel so that you have mostly black with white noise using -threshold XX%
or use -black-threshold XX% so that you get mostly black and some gray to white noise
4) composite the noise over your image using -compose screen

Here is an example

convert -size 128x128 gradient: grad.png
convert grad.png \
\( -size 128x128 xc: +noise random -channel g -separate +channel -black-threshold 95% \) \
-compose screen -composite grad_white_noise.png

Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Sketch

Post by fmw42 »

You could also manually create masks and for each mask use -sketch in a different direction.
Post Reply