Imagick::segmentImage

(No version information available, might only be in Git)

Imagick::segmentImageSegments an image

설명

public bool Imagick::segmentImage ( int $COLORSPACE , float $cluster_threshold , float $smooth_threshold [, bool $verbose = false ] )

Analyses the image and identifies units that are similar. 이 메쏘드는 Imagick을 ImageMagick 6.4.5 이상으로 컴파일 했을 때만 사용할 수 있습니다.

인수

COLORSPACE

One of the COLORSPACE constants.

cluster_threshold

A percentage describing minimum number of pixels contained in hexedra before it is considered valid.

smooth_threshold

Eliminates noise from the histogram.

verbose

Whether to output detailed information about recognised classes.

반환값

예제

Example #1 Imagick::segmentImage()

<?php
function segmentImage($imagePath$colorSpace$clusterThreshold$smoothThreshold) {
    
$imagick = new \Imagick(realpath($imagePath));
    
$imagick->segmentImage($colorSpace$clusterThreshold$smoothThreshold);
    
header("Content-Type: image/jpg");
    echo 
$imagick->getImageBlob();
}

segmentImage($imagePath, \Imagick::COLORSPACE_RGB55);

?>

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top