brainlit icon indicating copy to clipboard operation
brainlit copied to clipboard

Method to scale intensity range to [0,1]

Open tathey1 opened this issue 4 years ago • 3 comments
trafficstars

Make a method in image_process.py with the following specs: Input: numpy array Output: array with values shifted/scaled to the range [0,1]

i.e. the minimal value in the array becomes 0 and the maximal value becomes 1.

tathey1 avatar Dec 19 '20 18:12 tathey1

If no one is assigned this issue then I would like to work on it

1nF0rmed avatar Dec 20 '20 02:12 1nF0rmed

If we have input with all same values, i.e. [5, 5, 5, 5, 5]. In such case would the output be [0.5, 0.5, 0.5, 0.5, 0.5] ?

1nF0rmed avatar Dec 20 '20 07:12 1nF0rmed

Good question. I don't have any strong preferences, but my weak preference is that the output will always have an element with value 0. So in your case, the output would be [0, 0, 0, 0, 0].

tathey1 avatar Jan 04 '21 15:01 tathey1