Injective function of RGB
Is it possible to find a function that transforms a three-dimensional vector of values (each from 0 to 255) into a one-dimensional injective set of values? In other words, a function that assings an unequivocal value for each of RGB possible colors. Thanks in advance.
please explain: "one-dimensional injective set of values"
and: " an unequivocal value for each of RGB possible colors"
f(R,G,B): [R, G, B ] = [(0-255), (0-255), (0-255)] -> [(a,b)] where, for instance f([1, 2, 2]) != f([2, 1, 1]) and so on.
are you simply trying to find unique B,G,R combinations in your image ?
have a look here
you can use hash function
What is the bigger goal here? There might be a better way to solve it.