how can i use log function on the image pixels without converting image pixels into normalized8 form?
显示 更早的评论
my main focus is to scale the pixels by multiplying pixels with some constant to make image clearer. but first of all i want to use log function on the image to enhance the image but for that i need to convert that pixels into normalized8. can i use log function without converting it into normalized8 form.
X=imread('2.pgm'); figure,imshow((X)); %X=normalize8(X); [a,b]=size(X); M=a; N=b;
for ia=1:M for ib=1:N Y(ia,ib)=X(ia,ib)*2;
end
end
figure,imshow(Y);
%% Transform to logarithm X=log(X+1);
here, if i am not converting it into normalization8 then it shows Y image that is scaled. but it gives error for log function. ??? Undefined function or method 'log' for input arguments of type 'uint8'.
Error in ==> DCT_norm at 21 X=log(X+1);
if i am converting it into normalized8 then i cant see the appropriate result for scaling. i get just white colored image.
is there any way of using log function without converting it into normalized8??? please help me out...
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Modify Image Colors 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!