Image size influence comparing histograms OpenCV -


i'm using comparehist() function compare histograms of 2 images.

my question is: size of image has considerable influence on results? should resize images or normalize histograms before comparing? i'm using cv_comp_correl method.

you have normalize histograms before comparision.

imagine have non noramlized histograms, e.g. 1 of them has bins values in interval [0..1000] , other in [0..1]. how can compare them? of course every mathematical operation addition makes no sense, because result of addition?

then in practice size of image not matters.

in practice means if hava image , scale lets 2 times , you've got image b, if compute hist(a) , hist(b), normalize both histograms practically same. because of fact if scaling image factor k, , have n pixels in color c in image a, in image b have approximately k*k*n pixels in color c (depends of interpolation). every color amount "scale" proportionally, if normalize hist(a)and hist(b), results approximately same (also if bins have sizes greater 1 16 etc.)


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -