Closed fangpin closed 8 years ago
why divide 255 when make_char_ims ' yield c, numpy.array(im)[:, :, 0].astype(numpy.float32) / 255.' and then mul 255 when generate the images: 'cv2.imwrite(fname, im * 255.)'.
Having image values in the range 0-1 makes operations such as masking simpler to express, so I convert to / from this range on input / output.
why divide 255 when make_char_ims ' yield c, numpy.array(im)[:, :, 0].astype(numpy.float32) / 255.' and then mul 255 when generate the images: 'cv2.imwrite(fname, im * 255.)'.