Imagick::subimagematch

creationdev

Documentation

Conception web ecommerce
Conception web ecommerce

2500$ CAD

Conception web extra
Conception web extra

5000$ CAD

Référencement web expert
Référencement web expert

750$ CAD

Conception web microsite
Conception web microsite

1000$ CAD

Référencement web organique
Référencement web organique

300$ CAD

Formation référencement web
Formation référencement web

100$ CAD

Référencement web optimisé
Référencement web optimisé

500$ CAD

Référencement web stratégique
Référencement web stratégique

1000$ CAD

Conception d'application web
Conception d'application web

100$ CAD

Conception web standard
Conception web standard

2500$ CAD

Méthode

Méthode

Imagick::subimagematch

Imagick::subimagematch

Page Vue 26 déc. 2018
Page Vue 11 fois

(PECL imagick 3 >= 3.3.0)

Imagick::subImageMatch — Searches for a subimage in the current image and returns a similarity image

Description

public Imagick::subImageMatch(Imagick $Imagick, array &$offset = ?, float &$similarity = ?): Imagick

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.

Liste de paramètres

Imagick

offset

similarity

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

Valeurs de retour

Exemples

Exemple #1 imagick::subimagematch()

<?php
function subImageMatch($imagePath) {
$imagick = new \Imagick(realpath($imagePath));
$imagick2 = clone $imagick;
$imagick2->cropimage(40, 40, 250, 110);
$imagick2->vignetteimage(0, 1, 3, 3);

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

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

?>


Source : http://www.php.net/
Ref : methode-imagick::subimagematch.php




Contact

Contact

Veuillez saisir les infos dans le formulaire d'identification
suivant pour concevoir et référencer votre site.









Veuillez saisir votre message.

Carte d'affaires

Affichage de la carte d'affaires recto/verso.

Carte d'affaires recto
Carte d'affaires verso

Partagez

Partagez

Discussion ayant comme sujet la page Imagick::subimagematch.

©2025 creationdev -  F.A.Q. -  Soutien -  Haut de page
THÈMES: