1 | initial version |
So the issue with the colors being paler comes down to where they are centered.
normals[x,y] = n * 0.5 + 0.5
This centers the normals around a neutral gray. This isnt noticeable in the example because none of the normals face away from the viewer, in your display they would appear dark and colored. In the other display each channel would clip at zero and it would look very strange.
As bearak says, the swap of the channel order comes down to opencv and matplotlib using different bgr/rgb conventions.