0

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).

M Faisal Hameed
  • 673
  • 1
  • 7
  • 25

1 Answers1

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