0
$\begingroup$

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?

$\endgroup$
5
  • $\begingroup$ There are probably a hundred ways to do what you're asking. If you explain why you need this, or what is the problem you're trying to solve, someone might be able to point you in the right direction. $\endgroup$
    – MBaz
    May 23, 2018 at 17:08
  • $\begingroup$ @MBaz I'm just interested in extracting different sorts of signals from an image. That's $1 \times n$ vectors of numeric values. $\endgroup$
    – mavavilj
    May 23, 2018 at 17:29
  • 2
    $\begingroup$ Then your problem is trivial. You can do anything you want. $\endgroup$
    – MBaz
    May 23, 2018 at 18:13
  • $\begingroup$ @MBaz Yeah, but of course it's easier to not have to refigure what kinds of signals there are in a RGB image. In practice there are many kinds though, because of course one can always apply more and more transformations to get more and more signals. However, I want to retain some connection to how the image looks. That is, that the signal corresponds to something visible in the image. $\endgroup$
    – mavavilj
    May 23, 2018 at 18:15
  • $\begingroup$ 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. $\endgroup$
    – mavavilj
    May 23, 2018 at 18:17

2 Answers 2

1
$\begingroup$

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.

$\endgroup$
0
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.