Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to make an SSIM algorithm in PHP?

Does PHP have enough low-layer methods in order to implement an image comparison metric such as SSIM (structural similarity)?

Do you have an SSIM function for PHP? I've been searching but I can't find it. I will try to make it on my own, by converting code from C.

like image 218
Kevin Van Ryckegem Avatar asked Mar 15 '26 21:03

Kevin Van Ryckegem


1 Answers

With GD it is theoretically possible to do any image processing that you would do in C (albeit probably rather more slowly). But what I have done in the past is to just write a simple C program to do the processing, and call it from PHP. This usually requires you to save the image to a temporary file, if it exists only in a database, but it allows you to use your existing C code without porting.

like image 86
Russell Zahniser Avatar answered Mar 17 '26 12:03

Russell Zahniser