checkDisplayRange error

조회 수: 1 (최근 30일)
D
D 2011년 7월 12일
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
Sean de Wolski 2011년 7월 12일
what happens if you
implay(bwAreaOpenBW)
does it look correct?
what does
class(Stack)
return?
D
D 2011년 7월 12일
implay returns only the first image, the rest are blank, this seems to be the problem.
class(Stack) returns double which is expected.

댓글을 달려면 로그인하십시오.

답변 (1개)

Sean de Wolski
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.

카테고리

Help CenterFile Exchange에서 System Commands에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by