checkDisplayRange error
1 回表示 (過去 30 日間)
古いコメントを表示
Hello, I posted this question in a previous section, but I doubt it will get view so I am re-posting it to a new topic.
Odd, I am having the error again, and this time without the ability to fix it.
My data flow is MxNxK Logical -> double -> 1x1 Struct -> 4-D uint8, I get the same error: ?? Error using ==> checkDisplayRange at 22 HIGH must be greater than LOW.
using the rand values it works fine, so it must be a data problem. Here is my code:
clear all
close all
clc;
fileIn= 'input.avi';
fileInfo = aviinfo(filein);
nFrames = fileinfo.NumFrames;
Y=fileinfo.Height;
X=fileinfo.Width;
aviInfo= avifile(fout, 'compression', 'none', 'fps',fileinfo.FramesPerSecond);
Stack=zeros([Y, X, nframes]);
for i = 1:nFrames %1
movie_in = aviread(fin,i);
[Stack(:,:,i),map]=frame2im(movie_in,i);
bwAreaOpenBW = bwareaopen(Stack,200);
L = bwlabeln(bwAreaOpenBW,26);
s=regionprops(L,'Centroid','Area','PixelList','PixelIdxList');
movie_out=label2CC(L);
V=CC2RGB3(movie_out);
movie2avi(immovie(V),'Output');
end
I get this error output:
?? Error using ==>
checkDisplayRange at 22
HIGH must be greater than LOW.
Error in ==>
imageDisplayParseInputs at 215
common_args.DisplayRange =
checkDisplayRange(common_args.DisplayRange,mfilename);
Error in ==> imshow at 173
[common_args,specific_args] =
...
Error in ==> immovie at 56
imshow(X(:,:,:,k),map);
Error in ==> bwlabeltoavi at 22
movie2avi(immovie(V),'Output');
2 件のコメント
Sean de Wolski
2011 年 7 月 12 日
what happens if you
implay(bwAreaOpenBW)
does it look correct?
what does
class(Stack)
return?
回答 (1 件)
Sean de Wolski
2011 年 7 月 12 日
for i = 1:nFrames %1
movie_in = aviread(fin,i);
[Stack(:,:,i),map]=frame2im(movie_in,i);
end
I think you want the end of the for-loop there and then continue. Also bwareaopen will turn your double image into a logical, so make sure it's a logical beforehand.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Text Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!