Imagick::adaptiveSharpenImage


wizard apg

ADAPTATIVELY sharpen one image.



<?php

bool 
public Imagick::adaptiveSharpenImage(
                            
float $radius
                            
float $sigma
                             
int $channel Imagick::CHANNEL_DEFAULT
                                         
);

?>

$radius


The ZERO is auto-selection.

This is the Gaussian, in pixels, not counting the center pixel.



$sigma


The standard deviation of the Gaussian, in pixels.



$channel


Defaults to Imagick::CHANNEL_DEFAULT.





This function returns a TRUE on success.



AVAILABLE "imagick" CHANNEL
STUDIED IN THIS TUTORIAL

1690 - ImageMagick 6.9.10-6
CHANNEL
CONSTANTVALUEABOUT
imagick::CHANNEL_UNDEFINED0 
imagick::CHANNEL_RED1 
imagick::CHANNEL_GRAY1 
imagick::CHANNEL_CYAN1 
imagick::CHANNEL_GREEN2 
imagick::CHANNEL_MAGENTA2 
imagick::CHANNEL_BLUE4 
imagick::CHANNEL_YELLOW4 
imagick::CHANNEL_ALPHA8 
imagick::CHANNEL_OPACITY8 
imagick::CHANNEL_MATTE 8  
imagick::CHANNEL_BLACK32 
imagick::CHANNEL_INDEX32 
imagick::CHANNEL_ALL134217727 
imagick::CHANNEL_DEFAULT134217719 
ed48

  1 EXERCISE   

<?php

// Run several times

$img1 = new Imagick();

$jpgfn PATH2IMGW '/jpg/all.jpg';
$str1img 'img/results/all521.jpg';

$img1->readImage($jpgfn);

$rd mt_rand(0,10);
$sg mt_rand(0,100);

$img1->adaptiveSharpenImage($rd,$sg,imagick::CHANNEL_BLUE);

$strg $img1->getImageBlob();

$img imagecreatefromstring($strg);

imagejpeg($img$str1img);

echo 
basename($str1img); ?>
<br><br>
<img src="<?php echo $str1img?>"
 alt="<?php echo $str1img?>
 title="<?php echo $str1img?>">

 RESULT   


adaptiveSharpenImage(4,79,imagick::CHANNEL_CYAN);

all521.jpg

img/results/all521.jpg apr