我有一个带有uint8类的大小为(2048X3072X3)的RGB图像,我想对RGB图像的绿色和红色通道进行归一化。我写了以下代码:
Image_rgb=imread('RGB.jpg'); %Reading RGB image
Image_red = Image_rgb(:,:,1); %Reading R channel of image
Image_green = Image_rgb(:,:,2); %Reading G channel of image
x = double(Image_green(:));
m = mean(x);
s = std(x);
x = (x - m) / s; % normalization of green channel但是在归一化之后,图像x的维度是6291456x1,而不是2048X3072。
谁能告诉我怎样才能得到尺寸为2048X3072的归一化图像?
发布于 2012-11-14 22:46:01
试试这个:
x = double(Image_green);
m = mean(x(:));
s = std(x(:));
x = (x - m) / s; % normalization of green channelhttps://stackoverflow.com/questions/13380981
复制相似问题