Click here to Skip to main content
15,882,113 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
I have created web base image comparison application in Here i am comparing and finding the difference between two images (one is x-ray image which is compared with vendor image) & also finding percentage of similarity between them. But it should display similarity percentage based on which x-ray image maps with vendor image( i.e whether that x-ray image fits with given vendor image if yes then it should shows that much percentage of similarity).Can anyone help me. Give some sample code or link.
Thank you
Updated 10-May-11 20:22pm
Sandeep Mewara 11-May-11 2:29am    
What have you tried so far?
Member 7795470 11-May-11 2:35am    
We have compared two images & it shows difference between them with percentage, but i have to check whether first image(x-ray image) fits with 2nd image(vendor tool image) or not if yes then with how much percentage.
CS2011 11-May-11 2:52am    
All medical imaging devices follow DICOM standard. You should look into DICOM website to find out details of different tags and values you can compare

1 solution

This problem is not yet defined. To make some comparison, you need to define comparison criteria. There is such mathematical concept as norm, a map that assigns lengths to vectors in the normed vector space, see[^].

The problem is defined is you define some norm in the space of gray-scale pixel images. Don't tell me there is a natural norm which is assumed. There are different ways of calculating the difference between images.

Main directions in programming this thing would be using System.Drawing.Imaging. You can load two Bitmaps, instances of the class System.Drawing.Bitmap from files and use the method System.Drawing.Bitmap.LockBits with System.Runtime.InteropServices.Marshal to get access to the array of bitmap bits, so you could apply your algorithm of comparison.

See this code sample:[^].

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900