Azzera filtri
Azzera filtri

Program doesn't always start.

2 visualizzazioni (ultimi 30 giorni)
Douglas Brenner
Douglas Brenner il 16 Set 2016
Commentato: Stephen23 il 17 Set 2016
My program doesn't always run. I access my license through a VPN. Could that have something to do it with? Here's the code.
clear
include
for i = 3:3%1:nimages;
aviin = [transformeddir,base_name,'_transformed_', int2str(i),'.avi'];
disp('Converting')
disp(aviin)
a = VideoReader(aviin)
n_frames = a.NumberOfFrames;
frame=read(a,1);
Sum=double(frame);
for j = 2:n_frames;
frame = double(read(a,j));
Sum = Sum + frame;
end
Mean = Sum / n_frames;
figure(1), imshow(uint8(Mean));
[Gmag, Gdir] = imgradient(Mean,'prewitt');
rgbmag = ind2rgb(uint8(3*Gmag), flipud(jet(256)));
rgbdir = ind2rgb(uint8(Gdir), hsv(256));
figure(2);
imshow(rgbmag);
figure(3);
imshow(rgbdir);
end
  1 Commento
Stephen23
Stephen23 il 17 Set 2016
"My program doesn't always run"
So what does it do? Does MATLAB print an error message or a warning, crash, go into an endless loop, quit without warning, show an incorrect output, or does your computer explode into flames?
Each of these can have different causes, so when you actually tell us exactly what is happening then we can actually help you. Until then you make us guess what "doesn't always run" means: I will interpret it to mean that your computer is tired and wants to go on holiday. The solution is thus to give it a massage and book it a week in the Bahamas.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Dates and Time in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by