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에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!