Hi,
I am using the following code segment to input image from file. The code itself works fine. However, I have a question regarding line 7
img=img/255
I understand that it aims to scale the img value to 0 and 1. But I am not sure whether I should add some function/operator to enforce img/255 to be of integer value, or the result will be integer value by default due to the operator "/"
- import numpy as np
- from PIL import Image
- from skimage import io
- io.use_plugin('pil')
- from skimage import img_as_uint
- img = io.imread(os.path.join(train_data_path, image_mask_name))
- img = img/255