I tried several combinations and now I have come to a conclusion as to why my output is bad when I’m trying to normalise it.
Optical flow vectors contain signed values, but when I normalise them to 0 to 1 for imshow, the negative values somehow clip back to the upper interval i.e -1 corresponds to 255 and so on.
How do I scale a signed array (values ranging from around -6 to 6 based on what I’ve seen) to 0 to 1?
For context,
when I tried normalising using standard methods, the black parts of my image flashed white for a few moments. So thus my conclusion that negative numbers in when fed to the 0-255 constraint results in it taking values from the upper interval.