# How RGB images are formed when normalized between 0 and 1

There is a popular technique of normalising images by dividing each pixel with 255 so that it comes in the range of 0 and 1.
But, then how the same colours are formed when we normalize images.
for instance, there is a pixel with value 0 1 1 and other 0 255 255, I checked on RGB colors chart, both are showing different colors, but if we normalise the second pixel values then its value will be same as the first one and it should produce different results but on plotting the set of normalized pixels, they come out to be same as the previous one.

I have previously asked this question - how RGB images are formed so deriving out conclusions from the above question.

• Somewhere down the line this is still mapped to whatever you monitor supports. – lightxbulb Nov 5 '19 at 20:33

## 1 Answer

Let's suggest an analogy. I have a distance of 1 centimeter and 2.54 centimeters. If I transform the latter distance to inches, then it's 1 inch. This has the same value as the first distance.

But 1 inch is still longer than 1 centimeter, no matter the fact that they both use the numeral 1. These numbers are attached to different units, so simply comparing their numerical values is meaningless.

So it doesn't matter if the 8-bit unsigned, normalized value of 255 happens to have the same value of 1. Because you cannot compare them when they are in different spaces like that. Your original values were both in 8-bit normalized, unsigned integer space. If you want to compare them in a floating-point space, you have to transform both of them.

• superb, I never realised that data type was changing while converting and yes, when converting to same data-type they are giving the expected result. – Mark Nov 6 '19 at 5:05