Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 22684 программиста и 1281 робот. Сейчас ищет 751 программист ...
Приступая к работе

Imagick::segmentImage - Segments an image

Вернуться к: Imagick

Imagick::segmentImage

(Информация о версии неизвестна, возможно, только в SVN)

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.

Возвращаемые значения

Примеры

Пример #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);

?>



Вернуться к: Imagick

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware