function Img=ImgToCNN(filename)
%converts graysacle to -1:1
    tmp_img = imread(filename);
    if (size(tmp_img, 3) > 1)
        tmp_img = rgb2gray(tmp_img);
    end
    Img=(-1)*(double(tmp_img)/128-1);
end
