Saving filtered image
4 次查看(过去 30 天)
显示 更早的评论
I have tested some code that applies homomorphic filtering to an image in the logarithmic space:
%%%%%log of image
im_l=log(1+im);
%%%%%DFT of logged image
im_f=fft2(im_l);
%%%%%Filter Applying DFT image
im_nf=H.*im_f;
%%%%Inverse DFT of filtered image
im_n=abs(ifft2(im_nf));
%%%%%Inverse log
im_e=exp(im_n);
When this process is complete, the image can be displayed using imshow(im_e,[]), but since im_e is of type double I cannot save it as per what is seen from the imshow statement...
Does anyone know how to solve this problem so that the image can be saved properly?
Many thanks!
0 个评论
采纳的回答
更多回答(1 个)
Sean de Wolski
2011-3-14
doc imwrite
3 个评论
Sean de Wolski
2011-3-14
If you look at the formats in doc imwrite you'll see what the requirements are for each format. Since your images are of class double you'll either need a format that supports double or to convert you images to one of the accepted formats.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!