DSPRelated.com
Forums

matlab error in my code

Started by VEDHANAYAKI LAKSHMANAN June 20, 2007
hi,
I am doing image stabilization project.I am using the following code to display last frame.while running i am getting the error is:
Assignment has more non-singleton rhs dimensions than non-singleton
subscripts.How should i debug the code.

% play orig movie
movie(H1,mov,1,movInfo.FramesPerSecond,[25 25 0 0]);
% convert from indexed image seq to grayscale double [0,255]
M = uint8(zeros(movInfo.Height,movInfo.Width,nFrames));
for i = 1:nFrames
M(:,:,i)= uint8(floor(256*ind2gray(mov(i).cdata,colormap)));
end
figure,imshow(M(:,:,i),[0 255]);
title('show last frame');
Dear Vedha...

- First Check the line number where it is showing error.
- The error which you got means ...........your code is having an
expression where the index of Right hand side is not matching with the
dimension of left hand side.
- If you are still facing the problem then define a small image of
4x4 or 8x8 ..then pass this image to your routine...Use breakpoint, step in
, step out in Debug menu to check the status of your array...

With Warm Wishes
Prajit
On 6/20/07, VEDHANAYAKI LAKSHMANAN wrote:
>
> hi,
> I am doing image stabilization project.I am using the following code to
> display last frame.while running i am getting the error is:
> Assignment has more non-singleton rhs dimensions than non-singleton
> subscripts.How should i debug the code.
>
> % play orig movie
> movie(H1,mov,1,movInfo.FramesPerSecond,[25 25 0 0]);
> % convert from indexed image seq to grayscale double [0,255]
> M = uint8(zeros(movInfo.Height,movInfo.Width,nFrames));
> for i = 1:nFrames
> M(:,:,i)= uint8(floor(256*ind2gray(mov(i).cdata,colormap)));
> end
> figure,imshow(M(:,:,i),[0 255]);
> title('show last frame');
>
>
>