With PHP, I have to find if a small picture is repeated in a big picture, whether it's randomly rotated or cropped.
I am looking for an elegant way (faster) to do this.
I want to use command line but I hang myself.
Is it possible to use directly compare -subimage-search with the result of convert -rotate ? (Without using an intermediate file) ?
Code: Select all
shell_exec("compare -metric MSE -subimage-search -dissimilarity-threshold 1 ".$big_image." (convert ".$small_image." -rotate ".$angle360_step_by_10." ) null: 2>&1");
Code: Select all
$objects = slice_image_to_objects("object", $big_image, 64, 64);
foreach ($objects as $object) {
foreach ($angles as $angle360_step_by_10) {
shell_exec();
}
}