PHP Imagick getImageChannelKurtosis () Function

PHP

Syntax:
array Imagick::getImageChannelKurtosis (int $channel)
Parameters:This function takes one parameter, $channel,which is used to specify a channel constant valid for your channel mode. You can combine channel type constants using bitwise operators if you want to apply to more than one channel. The default is Imagick::CHANNEL_DEFAULT.Exceptions:This function throws an ImagickException on error.Return Value:this the function returns an array with kurtosis and skewness elements.The following programs illustrate the Imagick::getImageChannelKurtosis() functionin PHP:Program 1: < / strong> < tr>  
// Create two new imagick objects $imagick1 = new Imagick ( `< a href = "https://media.engineerforengineer.org/wp-content/uploads/engineerforengineer-13.png" rel = "nofollow noopener" target = "_blank"> https://media.engineerforengineer.org/wp- cont ent / uploads / engineerforengineer-13.png
` );  
// We get Kurtos and asymmetry $kurtosis = $imagick1 -> getImageChannelKurtosis(); print_r ( $kurtosis ); ?>
Output:
Array ([kurtosis] = > 3.4855489191387 [skewness] = > -2.2453954888518)
Program 2:  
// Create new imagick object $imagick = new Imagick ( ` https://media.engineerforengineer.org/wp-content/uploads/20190918234528/colorize1.png ` );  
// Get Kurtosis and Skewness with constant CHANNEL as 6
// which corresponds to imagick::CHANNEL_BLUE $kurtosis = $imagick -> getImageChannelKurtosis (6); print_r ( $kurtosis ); ?>
Output:
Array ([kurtosis] = > 17.803640811167 [skewness] = > -4.0753636831512)
Link: https://www.php.net/manual/en/imagick.getimagechannelkurtosis.php



Get Solution for free from DataCamp guru