Alberto Planas Dominguez wrote:
On Tuesday, July 08, 2014 01:50:56 PM Per Jessen wrote:
Per Jessen wrote:
Just a quick follow-up - for the time being, I'm using libjpeg. The interface is fairly easy and I do the comparison myself.
A note: compare images can mean different things. One interpretation is a new image represented with simple diff: abs(X - Y), or a binarization of this image. Other interpretation is a scalar between some range that measure how different or similar are the images, but do not show where is this difference . Another interesting interpretation is the one that ImageMagick do with compare:
http://www.imagemagick.org/script/compare.php
With this tool you can have a new image with red points in places where there are some difference bigger that some threshold.
Interesting discussion, I have been wondering about how best to approach it too. What I will be comparing are individual JPEGs from a camera that does MPJEG, with the intention of detection motion. I've been doing a simple diff with a threshold, saying 1% changed pixels -> motion. I have not yet tested how well this works :-) With imagemagick, this gave me good results in the past: composite img1 img2 -compose difference difference_frames.jpeg -- Per Jessen, Zürich (13.1°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org