PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

Imagick::subImageMatch - Description | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

Imagick::subImageMatch

(バージョン情報なし。おそらく SVN 版にしか存在しないでしょう)

Imagick::subImageMatchDescription

説明

public Imagick Imagick::subImageMatch ( Imagick $Imagick [, array &$offset [, float &$similarity ]] )

Searches for a subimage in the current image and returns a similarity image such that an exact match location is completely white and if none of the pixels match, black, otherwise some gray level in-between. You can also pass in the optional parameters bestMatch and similarity. After calling the function similarity will be set to the 'score' of the similarity between the subimage and the matching position in the larger image, bestMatch will contain an associative array with elements x, y, width, height that describe the matching region.

パラメータ

Imagick

offset

similarity

A new image that displays the amount of similarity at each pixel.

返り値

例1 Imagick::subImageMatch()

<?php
function subImageMatch($imagePath) {
    
$imagick = new \Imagick(realpath($imagePath));
    
$imagick2 = clone $imagick;
    
$imagick2->cropimage(4040250110);
    
$imagick2->vignetteimage(0133);

    
$similarity null;
    
$bestMatch null;
    
$comparison $imagick->subImageMatch($imagick2$bestMatch$similarity);

    
$comparison->setImageFormat('png');
    
header("Content-Type: image/png");
    echo 
$imagick->getImageBlob();
}

?>


忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「Imagick::subImageMatch - Description」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | Imagick::subImageMatch - Description」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: