Converting Byte Intensities to a Unit Range
An unsigned eight-bit image sample can be mapped from 0 through 255 to a normalized 0 through 1 range by dividing by 255.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace one value
Value 128 maps to roughly 0.502. Zero and 255 become the two endpoints. Unsigned field width explains the source range.
Check the direction and quantization
Converting a normalized value back needs a rounding and range rule. A floating value of one half lies between two of the original codes. See rounding choices.[1][2]