Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

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.


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:

// Create two new imagick object
$imagick1 = new Imagick(
// Get the Kurtosis and Skewness
$kurtosis = $imagick1->getImageChannelKurtosis();


Array ( [kurtosis] => 3.4855489191387 [skewness] => -2.2453954888518 )

Program 2:

// Create new imagick object
$imagick = new Imagick(
// Get the Kurtosis and Skewness with CHANNEL constant as 6
// which corresponds to imagick::CHANNEL_BLUE
$kurtosis = $imagick->getImageChannelKurtosis(6);


Array ( [kurtosis] => 17.803640811167 [skewness] => -4.0753636831512 )


My Personal Notes arrow_drop_up
Recommended Articles
Page :