math - measure correlation of colored pixels -


i need way measure color correlation of pixels. example, it's color correlation between 2 pixels chains higher

enter image description here

comparing 2 chains below

enter image description here.

ok, can: correlate r,g,b values separately next ? need obtain 1 figure, not three.

i can transform rgb hue representation, looks "grey"-colors (from black white) h-component = 0, so, correlating different luminance grey-pixels give same value...

so, need suggestions , :) thanks

in order compare r, g , b composents between 2 pixels, cosine similarity http://en.wikipedia.org/wiki/cosine_similarity best solution.

after that, if want compare arrays comparing couples of pixels in same index, can sum values. can sum rapidly decreasing function of values decrease (for example square) if want discard cases pixels same 1 or 2 big differences. can take square root if want opposite (privilegiate number of identical pixels rather fewest differences).


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -