I need to load an image to apply my filter registration code but cannot get the image to load. The image is in a matlab file, but keep getting an error loading, line 9.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
clear all; close all; clc;
%Number of shifted noisy frames
Nshifts = 50;
%Noise standard deviation
nze_std_dev = 80;
%Set to 1 to play the movie otherwise do not play
playmovie = 1;
%Load the image
photo = double(imread(undergraduate_data.mat,jpg));
photo = mean(photo,3);
%Generate and plot the image registration example
registration_v02(photo,Nshifts,nze_std_dev,playmovie);
0 comentarios
Respuestas (2)
Voss
el 5 de Dic. de 2021
Editada: Voss
el 5 de Dic. de 2021
Put the file name in quotes, and put jpg in quotes:
photo = double(imread('undergraduate_data.mat','jpg'));
Otherwise the interpreter thinks undergraduate_data and jpg are the names of variables or functions.
1 comentario
Voss
el 5 de Dic. de 2021
I don't know about using imread to read a mat-file like a jpg-file, though.
yanqi liu
el 6 de Dic. de 2021
clear all; close all; clc;
%Number of shifted noisy frames
Nshifts = 50;
%Noise standard deviation
nze_std_dev = 80;
%Set to 1 to play the movie otherwise do not play
playmovie = 1;
%Load the image
a=load('undergraduate_data.mat');
fs = fieldnames(a);
photo = getfield(a,fs{1});
photo = mean(photo,3);
%Generate and plot the image registration example
registration_v02(photo,Nshifts,nze_std_dev,playmovie);
0 comentarios
Ver también
Categorías
Más información sobre Image Processing Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!