dgyoo / pa3

Recent image representation as PA3 of the computer vision class.
7 stars 0 forks source link

Some information about 8bit jpeg images #9

Open bismex opened 8 years ago

bismex commented 8 years ago

Most of images are 24 bit type, but several images are 8 bit type.

For example )) iron/db/SCENE67/bar/bar_0527.jpg You can see that this is color image when you read directly in the folder. But If you use 'imread' function, it seems to be grayscale image.

This image has 256x256 cdata and, 256x3 colormap. So, you have to read like this

[cdata, colormap] = imread('iron/db/SCENE67/bar/bar_0527.jpg'); img = ind2rgb(cdata, colormap);

The variable 'img' will be [256, 256, 3] size.

Thank you Choi seok eon (20153640)

bismex commented 8 years ago

If you want to use this to put vl_simplenn, you have to convert into single type and [0, 255] range