Im attempting to input my image to this method, but when i try to draw the image, it comes totally black.
I tried inputing just one image and inputing the whole MNIST dataset. Same result.
https://github.com/lisa-lab/pylearn2/blob/master/pylearn2/expr/preprocessing.py
if GCN is True:
trainingFolder = "../inputData/converted_training/GCN/"
testingFolder = "../inputData/converted_testing/GCN/"
img0 = (data[1,1:]).reshape((28,28)).astype('uint8')*255
im = Image.fromarray(img0)
im.show()
#GCN#
img_gcn = global_contrast_normalize(data)
img_gcn_1 = Image.fromarray(img_gcn[1,1:].reshape((28,28)).astype('uint8')*255)
img_gcn_1.show()
The second image, which is img_gcn_1 comes blacked.
What am i doing wrong?
Have you tried to visualize the image without multiplying by 255? i.e.,
I think that procedure should work.