I hava a data of images 20 x 20 pixel in the form of intensities normalized by anti-aliasing.I took this data from THE MNIST DATABASE I want to convert these intensities to pixel (0-255) so that i can visualize these grayscale images it in java. Also why there are negative values(-1 to 1).
Asked
Active
Viewed 231 times
1 Answers
0
Whats hard about converting a range of values from -1 to +1 to a range of 0 to 255. Simply multiply each component (the -1 to +1] by 255/2 and round.

mP.
- 18,002
- 10
- 71
- 105
-
pixel = 128 + ( value[x] * 127 ) – some Jun 12 '12 at 10:15