2

For a color image, say with dimensions 320 by 240, we have 76,800 pixels in the image. What does each pixel represent for a color image? Is it just the RGB values for that pixel? How are shapes and textures represented in pixels? If each pixel in a colored image only contains RGB values, is that information enough to store the shape, size, and texture of the objects in the image?

Sid
  • 107
  • 2
  • 8
  • That depends on if the resolution of the image is high enough to represent all objects with sufficient accuracy. For small objects, intricate shapes or textures with more details you may need more pixels depending on how well you want to represent them. But in general lots of points with three colors in varying degrees are enough to describe the visual impression of every object. – NoDataDumpNoContribution Oct 22 '20 at 06:26

2 Answers2

2

A single pixel in RGB space can only hold information about the color value of that single pixel.

Shapes, and textures can only be described with the combination of several pixels, that information is not stored in single pixels themselves.

Moreover this information (same as for shape, size, texture of possible objects) is never stored explicitly in the image data. You can infer shapes or textures based on your interpretation of underlying pixel data, but this always depends on how you yourself define a shape or a texture.

T A
  • 1,677
  • 4
  • 21
  • 29
  • Ok, so from what I understand, just the color information should be sufficient to recreate the original image with textures, shapes, size, etc? – Sid Oct 25 '20 at 05:42
  • @Sid Yes, that's also most information that is being stored in most image formats as you know them as well (e.g. JPEG) apart from some meta-information in the headers. You can derive any other information such as shapes or textures since it is stored in a raster format. – T A Oct 25 '20 at 08:05
2

Every pixel contains a simplified representation of the light landing on the corresponding sensor cell in the camera. The amount of light is averaged over the cell area, and light spectrum is grossly described by taking three weighted averages of intensity over the frequencies. The result is (usually) three integers in the range 0-255, for a total of 24 bits of information.

As the pixels are aligned on a grid, a digital color image can be seen as a triple matrix of integers, that's it. (Below, an example of such a matrix.) This information is raw.

The semantic image content must be inferred by an image analysis system, which is able to segment the image in distinct areas, and to a lesser extent, characterize the textures.

enter image description here

  • Thank you for your response, that's very helpful. Just to follow up on that, do you happen to know what does a pixel in a 3D colour image (say a .obj or .ply file) represents? Would it still be just three values for colours? – Sid Oct 25 '20 at 05:44
  • @Sid It is the same, just that the underlying grid is 3D instead of 2D. Just imagine the illustration as a gridded cube instead of a plane. – T A Oct 25 '20 at 08:07
  • @Sid: .obj and .ply files are not 3D images. They are point clouds. The three values represent coordinates. There can be associated color or not. –  Oct 25 '20 at 15:46
  • @TA: no, the OP is talking about point clouds, not volumetric images. –  Oct 25 '20 at 15:47
  • So for point clouds, if pixels had color, we'd need 6 values (3 for coordinates, 3 for color)? – Sid Oct 31 '20 at 02:00
  • 1
    @Sid: absolutely. –  Oct 31 '20 at 15:15