PHP | Imagick getImageChannelKurtosis() Function
Last Updated :
19 Nov, 2019
The Imagick::getImageChannelKurtosis() function is an inbuilt function in PHP which is used to get the kurtosis and skewness of a specific channel.
Syntax:
array Imagick::getImageChannelKurtosis( int $channel )
Parameters: This function accepts a single parameter $channel which is used to specify the channel constant that is valid for your channel mode. You can combine channel-type constants using bitwise operators if you want to apply to more than one channel. Default’s value is Imagick:: CHANNEL_DEFAULT.
Exceptions: This function throws ImagickException on error.
Return Value: This function returns an array with kurtosis and skewness members.
Below programs illustrate the Imagick::getImageChannelKurtosis() function in PHP:
Program 1:
<?php
$imagick1 = new Imagick(
$kurtosis = $imagick1 ->getImageChannelKurtosis();
print_r( $kurtosis );
?>
|
Output:
Array ( [kurtosis] => 3.4855489191387 [skewness] => -2.2453954888518 )
Program 2:
<?php
$imagick = new Imagick(
$kurtosis = $imagick ->getImageChannelKurtosis(6);
print_r( $kurtosis );
?>
|
Output:
Array ( [kurtosis] => 17.803640811167 [skewness] => -4.0753636831512 )
Reference: https://www.php.net/manual/en/imagick.getimagechannelkurtosis.php
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...