+ -
当前位置:首页 → 问答吧 → 有谁用过libpuzzle这个扩展?

有谁用过libpuzzle这个扩展?

时间:2011-08-29

来源:互联网

我在ubuntu安装好了,用以下程序提示出错Fatal error: Call to undefined function puzzle_fill_cvec_from_file() in /var/www/11.php on line 4

<?php

# Compute signatures for two images
$cvec1 = puzzle_fill_cvec_from_file('3.png');
$cvec2 = puzzle_fill_cvec_from_file('4.png');

# Compute the distance between both signatures
$d = puzzle_vector_normalized_distance($cvec1, $cvec2);

# Are pictures similar?
if ($d < PUZZLE_CVEC_SIMILARITY_LOWER_THRESHOLD) {
  echo "Pictures are looking similar\n";
} else {
  echo "Pictures are different, distance=$d\n";
}

# Compress the signatures for database storage
$compress_cvec1 = puzzle_compress_cvec($cvec1);
$compress_cvec2 = puzzle_compress_cvec($cvec2);


?>

作者: musicmtv   发布时间: 2011-08-29

没有人用过这个东西吗?

作者: musicmtv   发布时间: 2011-08-30