Value range of grayscale image not being correct?
Show older comments
Hi, I used following script to convert a cmyk image into rgb and then convert it into grayscale, but after this I got a array with all values being either 35 or 37, not 0 or 1.
I think that grayscale image should generate array with values being either 0 or 1, right?
How can get final array with values in the range [0,1]?
clear all, close all clc I_cmyk=imread('jetflow.tiff'); C=makecform('cmyk2srgb'); I_rgb=applycform(I_cmyk,C); I_gray=rgb2gray(I_rgb);
Plus: after I use imread function to load the tiff image, it generated a 1280x800x4 uint8 array, which should be cmyk format, so I used the following 3 lines of commands.
Thank you.
Accepted Answer
More Answers (0)
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!