octave-maintainers
[Top][All Lists]
Advanced

[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 12:55:11 +0200

On Tue, May 26, 2009 at 12:15 PM, Levente Torok <address@hidden> wrote:
> Hi All,
>
> I guess I have found a bug in the type handling when displayed.
>
> I did the folllowing:
>
> im = imread("p1020037.jpg");
>
> size(im)
> ans =
>
> 1536 2048
>
> typeinfo(im)
> ans = uint8 matrix
>
> s=rows(im)*columns(im); % size of the vector
> z = resize( im, s,1 ); % in vector from
>
> listing the two vectors together as
> [ [1:s]' z ]
>
> gives:
> ..
> ..
> ..
>
> 248 127
> 249 124
> 250 118
> 251 106
> 252 98
> 253 103
> 254 110
> 255 113
> 255 117
> 255 123
> 255 125
> 255 130
> 255 132
> 255 127
> 255 122
>
> which certainly implies some bug in the type halding when printed.

Blame Matlab for this choice - when double is combined with uint8, the
result is uint8 (same for other integer types).

regards

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]