Is there a way to measure each pixel's content in an image somehow?
Like can I interpret each color as some kind of a single value, rather than a triplet?
Perhaps I can think of them as $\mathbb{R}^3$ vectors and then e.g. take their norms?
Is there a way to measure each pixel's content in an image somehow?
Like can I interpret each color as some kind of a single value, rather than a triplet?
Perhaps I can think of them as $\mathbb{R}^3$ vectors and then e.g. take their norms?
I would want to start from e.g. making a measure of "color" that's a single real value, rather than a triplet. Then I could perhaps want to make a function that calculates the "change in" color between pixels adjacent to each other. So a derivative of some kind
Why would you need the color to be a single value for that? I'll do an analogy: To measure the distance between to cities, you don't need to map these two cities onto the real numbers; they still have coordinate vectors. All you do is map the difference vector onto a number. And for numbers, it's just the same: It's mathematically impossible to sensibly map them onto a single dimension and still preserve distance. So, you can't.
What you need is just some kind of a norm to map a color difference vector to a "perceptive difference". For many color systems, something like the squared sum of vector components would be a good start.
Color, as perceived by most humans in most conditions, requires a multi-dimensional descriptor. But there are lots of color spaces: RGB, sRGB, CYMK, HSV, YUV, YCrCb, and etc., into which your color data can be transformed. For instance, some apps only need some sort of luminance measure, in which case one can transform RGB to HSV, and throw away the hue and saturation. Or you can make up your own vector(s) inside your own color space.