Borrar filtros
Borrar filtros

Unable to write images of type 'double'

1 visualización (últimos 30 días)
ramdas patil
ramdas patil el 6 de Jun. de 2014
Respondida: Image Analyst el 6 de Jun. de 2014
I have obtained Fourier spectrum of an image and want to save the result image into the folder as specified in my code.
but as result image is of type "double",i am unable save it.i am getting blank image at the given folder. what should i do?
Here is my code
clc;
clear all;
close all;
i=imread('D:\pendrive\test1.jpg');
i=rgb2gray(i);
subplot(2,2,1),imshow(i);title('Test Image');
f=fftn(i);
magnitude=abs(f);
phase=angle(f);
f1=log(1+fftshift(f));
subplot(2,2,2),imshow(f1,[]);title('Fourier spectrum');
a=strcat('C:\Users\Public\Pictures\Sample Pictures\results\Fourier spectrum\','.jpg');
imwrite(f1,a);

Respuestas (1)

Image Analyst
Image Analyst el 6 de Jun. de 2014
Use save() to save it as a .mat file instead of a standard uint8 image file.

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by