octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: type handling bug?


From: Søren Hauberg
Subject: Re: type handling bug?
Date: Tue, 26 May 2009 13:17:03 +0200

tir, 26 05 2009 kl. 13:02 +0200, skrev Levente Torok:
> Thanks for the quick response.
> This behaviour may be questionable.
> It modifies my data hiddenly(!) for the expense of some memory saving.

As Jaroslav said: Blame Mathworks.

> 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

My guess is that you image is an RGB image (all JPEG's are RGB, right?).
This makes the image NxMx3, but you're treating it as being MxN. But I'm
just guessing here.

Soren



reply via email to

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