[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: type handling bug?
From: |
Jaroslav Hajek |
Subject: |
Re: type handling bug? |
Date: |
Tue, 26 May 2009 13:53:49 +0200 |
On Tue, May 26, 2009 at 1:02 PM, Levente Torok <address@hidden> wrote:
> HI Soren,
>
> Thanks for the quick response.
> This behaviour may be questionable.
> It modifies my data hiddenly(!) for the expense of some memory saving.
>
> Unfortunately my example contains a reference to another bug (or bug-like)
> finding as well
> and I found no solution to this yet.
>
> im =imread("p1020037.jpg" );
> octave:10> sum(sum(im==0))
> ans = 16980
>
> z=resize( im, s=rows(im)*columns(im),1 );
> octave:11> sum(sum(z==0))
> ans = 3144192
>
> Levente
>
As Soren said, if your image is RGB, you get an MxNx3 array in im.
The resize call is almost certainly not doing what you meant. resize
is very different from reshape (yes, the description for resize is
poor in 3.0.x).
regards
--
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
- Re: type handling bug?, (continued)
- Re: type handling bug?, Søren Hauberg, 2009/05/26
- Re: type handling bug?, Levente Torok, 2009/05/26
- Re: type handling bug?, Søren Hauberg, 2009/05/26
- Re: type handling bug?, Levente Torok, 2009/05/26
- Re: type handling bug?, Søren Hauberg, 2009/05/26
- Re: type handling bug?, John W. Eaton, 2009/05/26
- Re: type handling bug?, Jaroslav Hajek, 2009/05/26
- Re: type handling bug?, Michael Creel, 2009/05/26
- Re: type handling bug?, Jaroslav Hajek, 2009/05/26
- Re: type handling bug?, Michael Creel, 2009/05/26
- Re: type handling bug?,
Jaroslav Hajek <=
Re: type handling bug?, Jaroslav Hajek, 2009/05/26