T O P I C R E V I E W |
PeterPanino |
Posted - Sep 17 2013 : 05:50:35 Hi! Is it possible to calculate a similarity factor when comparing images? For example:
When comparing ImageA with ImageB, they have a similarity factor of 35%
When comparing ImageA with ImageC, they have a similarity factor of 22%
Of course, the similarity calculation should be based on various parameters, for example:
Distribution map of n predominant colors
Similarity between maps of shapes after transformation of image content to shape primitives
Etc. etc. |
1 L A T E S T R E P L I E S (Newest First) |
w2m |
Posted - Sep 17 2013 : 08:08:56 The only similarity factor that I am aware of is:
TImageEnProc.CompareWith
Declaration function CompareWith(SecondImage:TIEBitmap; DiffBitmap:TIEBitmap):double;
Description Compares current image with SecondImage and returns a floating point value from 0 to 1 which specifies the percentage of equality. 1 means that two images are equal. The algorithm compares only the intensity of the pixels, not the colors.
The DiffBitmap can be nil, otherwise it must be an 8 bit bitmap (ie8g or ie8p PixelFormat) which will contain a bitmap with the differences.
Images must have same size and have PixelFormat=ie24RGB.
See 'motiondetector' example for more info.
Example Eq := ImageEnView1.CompareWith( ImageEnView2.IEBitmap, nil );
William Miller Adirondack Software & Graphics Email: w2m@frontiernet.net EBook: http://www.imageen.com/ebook/ Apprehend: http://www.frontiernet.net/~w2m/index.html |
|
|