From: Walter Roberson on
Muhammad Razali wrote:
> Walter Roberson <roberson(a)hushmail.com> wrote in message

> tr_space(:,i) = reshape( imresize(tmp_tr .', m, n), [], 1);
>
> ??? Error using ==> imresize>parsePreMethodArgs at 379
> Invalid input syntax; input argument # 3 is unrecognized

Sorry, I did not cross-check the imresize calling sequence. Instead of
m,n it should be [m,n] or [n,m] -- rows first and then columns.
From: Muhammad Razali on
Walter Roberson <roberson(a)hushmail.com> wrote in message <aEcIn.14632$rE4.4699(a)newsfe15.iad>...
> Muhammad Razali wrote:
> > Walter Roberson <roberson(a)hushmail.com> wrote in message
>
> > tr_space(:,i) = reshape( imresize(tmp_tr .', m, n), [], 1);
> >
> > ??? Error using ==> imresize>parsePreMethodArgs at 379
> > Invalid input syntax; input argument # 3 is unrecognized
>
> Sorry, I did not cross-check the imresize calling sequence. Instead of
> m,n it should be [m,n] or [n,m] -- rows first and then columns.

Did u mean do it like this

??? tr_space(:,i) = reshape( imresize(tmp_tr .', [m,n], [], 1);
|
Error: Unbalanced or unexpected parenthesis or bracket.

Ive tried reversed [n,m] as well but it still produce same error.

When I use the reshape statement the (i) value turn out to be only two instead of 100 since i used 100images. Any suggestion to be able to read the whole set..Please advice and thank you in advance.
From: Walter Roberson on
Muhammad Razali wrote:
> Walter Roberson <roberson(a)hushmail.com> wrote in message
> <aEcIn.14632$rE4.4699(a)newsfe15.iad>...
>> Muhammad Razali wrote:
>> > Walter Roberson <roberson(a)hushmail.com> wrote in message
>> > tr_space(:,i) = reshape( imresize(tmp_tr .', m, n), [], 1);
>> > > ??? Error using ==> imresize>parsePreMethodArgs at 379
>> > Invalid input syntax; input argument # 3 is unrecognized
>>
>> Sorry, I did not cross-check the imresize calling sequence. Instead of
>> m,n it should be [m,n] or [n,m] -- rows first and then columns.
>
> Did u mean do it like this
>
> ??? tr_space(:,i) = reshape( imresize(tmp_tr .', [m,n], [], 1);

tr_space(:,i) = reshape( imresize(tmp_tr .', [m, n]), [], 1);
From: Muhammad Razali on
Walter Roberson <roberson(a)hushmail.com> wrote in message <hss0oh$na4$2(a)canopus.cc.umanitoba.ca>...
> Muhammad Razali wrote:
> > Walter Roberson <roberson(a)hushmail.com> wrote in message
> > <aEcIn.14632$rE4.4699(a)newsfe15.iad>...
> >> Muhammad Razali wrote:
> >> > Walter Roberson <roberson(a)hushmail.com> wrote in message
> >> > tr_space(:,i) = reshape( imresize(tmp_tr .', m, n), [], 1);
> >> > > ??? Error using ==> imresize>parsePreMethodArgs at 379
> >> > Invalid input syntax; input argument # 3 is unrecognized
> >>
> >> Sorry, I did not cross-check the imresize calling sequence. Instead of
> >> m,n it should be [m,n] or [n,m] -- rows first and then columns.
> >
> > Did u mean do it like this
> >
> > ??? tr_space(:,i) = reshape( imresize(tmp_tr .', [m,n], [], 1);
>
> tr_space(:,i) = reshape( imresize(tmp_tr .', [m, n]), [], 1);



Thank you very much for your help. I try to crop the image using the same statement but it gives me error. Can you tell me how to crop the image instead of resize it.
From: Walter Roberson on
Muhammad Razali wrote:

> Thank you very much for your help. I try to crop the image using the
> same statement but it gives me error. Can you tell me how to crop the
> image instead of resize it.

doc imcrop


X2 = imcrop(X, map, rect) crops the indexed image X. map specifies the
colormap used with X. rect is a four-element position vector [xmin ymin
width height] that specifies the size and position of the cropping
rectangle.


And be sure to read the Remarks section of the documentation.