Reputation: 713
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).
Upvotes: 0
Views: 255
Reputation: 18266
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.
Upvotes: 0