Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 27th, 2005, 4:37 AM   #1
John
Newbie
 
Join Date: Apr 2005
Posts: 6
Rep Power: 0 John is on a distinguished road
Thumbs up image comparision

hi firends,

I m storing a image in table using AppendChunk. Now i want to check this image with another image from another table.So is there any way so that i can compare that 2 images to see whether that 2 images are identical or not?
John is offline   Reply With Quote
Old Jun 27th, 2005, 7:26 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
As long as you know how the image data is stored, you can always compare pixel by pixel to see if they're identical. Similar is another story. By hashing the data properly, you could establish with some degree of probability that two images with the same hash are identical. The probability is less than 1.0.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jun 27th, 2005, 9:00 AM   #3
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
It depends. If the image could be a variety of formats, then you will need to be able to interpret the data rather than just compare it. An image is still identical pixel-wise between two formats, but bit-wise totally different. I would reccomend that in a production type scenario, but if you aren't doing this seriously then a byte by byte comparison would work. What's your definition of identical? Do you mean the same visually or the same as stored? If the same visually, exactly the same to the pixel or just look the same?
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline   Reply With Quote
Old Jun 27th, 2005, 10:16 AM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Quote:
As long as you know how the image data is stored...
Even two identical .bmp images may be stored in a few different ways.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:16 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC