473,386 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Compare Images

Does anyone know a simple way to compare two images to see if they are
the same? The filenames of the images will be different, but if the
image data is the same I would like to test for that.

The files will be jpeg images.

Apr 7 '06 #1
2 12305
> Does anyone know a simple way to compare two images to see if they are
the same? The filenames of the images will be different, but if the
image data is the same I would like to test for that.
Just compare the md5 codes of the two files :

if (md5(file_get_contents($filename01)) ==
md5(file_get_contents($filename02))) {
echo "The files are the same";
} else {
echo "The files are not the same";
}
The files will be jpeg images.


The md5 should work for any type of file.

BLob
Apr 7 '06 #2
do you mean, are the files from the same original source? or do they
"look" the same?

You could use an OS level cmp (compare) utility -- Four Unix utilities,
cmp, comm and diff/sdiff, can be used to compare the contents of two
files.

to see if they "look" the same requires special recognition software
that - generally speaking - only governmental agencies can afford.

or:
http://news.cnet.co.uk/digitalcamera...9257088,00.htm
www.riya.com

Apr 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Qiangning Hong | last post by:
I want to make an app to help students study foreign language. I want the following function in it: The student reads a piece of text to the microphone. The software records it and compares it...
14
by: Dino M. Buljubasic | last post by:
I would like to be able to compare BackgroundImage Property of two picture boxes on my form. How can I do that? I am using : if (pctOne.BackgroundImage Is pctTwo.BackgroundImage) then //...
0
by: Nikolay Petrov | last post by:
I need to compare to byte values, but one of them may differ from the other by let's say 5%, and they still should count as same. I need a fast method, because i am going to compare a set of about...
4
by: Dave | last post by:
Does any one know how to compare pixels in a picture, or a dll that will allow me to do so. I need to be able to find objects in a picture. Like a table, chair, car etc. Compare a given picture say...
2
by: Fir5tSight | last post by:
Hi, I'm sorry this may not be the right place for this topic. However, I don't know where else I should get help. Hopefully some people here can give me an answer on the following topic: How...
3
by: grey | last post by:
does anyone suggest me how to write a windows application for comparing two pdf content. The requirement is very easy... i only need to inform user two pdf are differnet, no need to spot where the...
1
by: rickz | last post by:
hi !! i need to compare images in vb.net. i am unable to find which component i am supposedly to compare.(RGB or the YCrCb ). my aim is to compare two similar images taken at different resolution...
4
by: dlfshweta | last post by:
I am doing work on FINGERPRINT RECOGNITION SYSTEM, I am using VB.NET AS FRONT END SQL SERVER 2000 AS BACK END, i had saved fingerprint images in sqlserver using image datatype, images are saving...
6
by: aznimah | last post by:
hi, i'm work on image comparison. i'm using the similarity measurement which i need to: 1) convert the image into the binary form since the algorithm that i've use works with binary data for the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.