Rescaling an Intensity Range

A linear rescale can map a chosen input minimum and maximum to a new interval, with documented rules for values outside it.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace a small mapping
  2. Check constant input

Trace a small mapping

Mapping input 20 to zero and 100 to one gives 0.5 for input 60. Linear interpolation supplies the proportional distance.

Check constant input

When maximum equals minimum, ordinary division by the range fails. Decide whether to keep a constant or report the range is undefined for the operation. Guard clauses express that boundary.[1][2]

References

  1. scikit-image Contributors, NumPy Images and Coordinate Conventions ↩
  2. scikit-image Contributors, Image Data Types and Representable Values ↩