1
\$\begingroup\$

Camera noob here. I'm really just a programmer who recently became interested in barcodes with multiple colors to represent information, rather than just black and white. This overlaps with cameras due to the nature of colors and pictures, but I don't have much experience with photography. I'll give you some context as to why I'm interested in case any are wondering, and then move on to my question.

The background for my interest is that, using RGB codes, a single pixel can represent a 256^3 numbers (around 17 million), but the difference between each color is 1 value, and it would be near impossible to accurately detect on camera. Using boundaries between pixel values, I can make the distance between numbers larger, and the tolerance greater, but it reduces the amount of possible information. So, I wanted to find the combination of codes that maximizes both information storage and readability.

My question then is, what conditions affect a cameras ability to accurately perceive RGB codes? I know level of light would affect its ability and I'm sure internal specs cause it to vary from camera to camera, but if I were to do research into each factor specifically, what would be a good jumping-off point for terms and concepts to look into?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I think light level is the least of your problems... You also need to consider everything from how the codes are generated and every transformation they go through from digital values in memory, through printer drivers, to a printer and the variances of inks/toners from different manufacturers (or even different batches) and even printer firmware, to paper used, lighting, Bayer (or other) filters in front of the camera sensor, lighting, exposure, in-camera processing... just to name a few... \$\endgroup\$
    – twalberg
    Commented Dec 13, 2022 at 20:28
  • 1
    \$\begingroup\$ @twalberg You comment has the makings of a good answer. I'd also add fading of inks over time. \$\endgroup\$
    – Eric S
    Commented Dec 13, 2022 at 22:22

3 Answers 3

2
\$\begingroup\$

My question then is, what conditions affect a cameras ability to accurately perceive RGB codes?

The Color Rendering index of the illuminating light source will affect it the most. If the light source is missing portions of the visible spectrum, it doesn't matter how good the camera is, it won't be able to differentiate between different colors if both of those colors require wavelengths of light that are missing from the light source.

If we are in a dark room with a single light that is only outputting red light, it's impossible for us to tell the difference between a pink shirt and a white shirt. They'll both look the same very light grey under red light. Likewise, it will be impossible for us to tell the difference between a navy blue shirt and a sage green shirt. They'll both look black or very dark grey to our eyes under red light.

\$\endgroup\$
1
\$\begingroup\$

In the Michael's answer you will see the main "macro" reason for non-precise colours from the camera. I will try to mention (mostly) "micro" reasons:

  • noncalibrated monitor - w/o calibration monitor will show deviations of colours (compared to the original subject)
  • image format (compression) - lossy formats will unify the colour in some areas of image and display one colour instead of colour gradient for example.
  • image format (colour profile) - absent/wrong colour profile can lead to absent/wrong colours
  • demozaic - the algorithm will interpret RAW information from camera and produce totally false image (check link)
  • ADC - because of temperature fluctuations or power fluctuations can produce different value for particular voltage
  • sensor - capacitors in cells can "collect" and "save" different amount of energy depend of temperature of sensor under and around the cell.
  • colour filters (of cells) - as there is no 100% perfect things filters may differ and let in different amount of light and with different wave length.
  • lens (in front of cells) - again no 100% perfect and can let in different amount of photons (with even illumination)
\$\endgroup\$
0
\$\begingroup\$

As you said, a difference of one is impossible to detect/record with current image sensors.

First there is the fact that sensor photosites (pixels) do not see color at all, they simply see illuminance from a given spectrum. The color of an image pixel is then calculated based upon the information from that sensor photosite/pixel along with surrounding information. What exactly that calculation determines the image pixel to be (hue/saturation/lightness) will vary with the type of color filtration (wavelength separation) that was used by the sensor, and the formula/demosaicing method used. But given that the idea is to generate an RGB input for a camera using an RGB output (an RGB "code"), the color filtration scheme/sensitivities, and pixel spacing/density, could be matched/arranged to eliminate those errors; and demosaicing wouldn't be required.

However, there is pattern noise due to PRNU (photosite response non-uniformity) and DSNU (dark signal non-uniformity); which are characteristics of sensors where different photosites generate a different response given the same input. Not only is this variable between photosites, it is also variable within a photosite given different input signals. I.e. it would be difficult/expensive to accurately quantify and account for (but largely possible).

And then there is the read error; this error can be very low in a scientific camera (.1%), but it cannot be eliminated.

Given the nature of the question, it might be more appropriate for a data science/machine learning community?

\$\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.