help-octave
[Top][All Lists]
Advanced

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

Re: __spatial_filtering__() returns double precision results for single


From: Carnë Draug
Subject: Re: __spatial_filtering__() returns double precision results for single precision arguments
Date: Thu, 14 Feb 2013 02:01:49 +0000

On 10 February 2013 04:33,  <address@hidden> wrote:
> Date: Sat, 09 Feb 2013 19:23:08 -0600
> From: Russell Haley <address@hidden>
> To: address@hidden
> Subject: __spatial_filtering__() returns double precision results for
>         single  precision arguments
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello,
>
> I'm working on cleaning up images from a book photographing apparatus,
> and I've been using some grayscale morphological filters.  These are
> quite CPU intensive, taking some 40 seconds for a 5 megapixel image. I
> recently gained access to a commercial scanner that produces 20
> megapixel images.  I ran a benchmark with matrix multiplication, and
> found that my machine is ~80% faster with single rather than double
> precision, and therefore decided to switch to single precision.
>
> Unfortunately, not only were the morphological filters not any faster,
> they also returned double precision results.  As my structure element
> was single precision, this caused the second operation to error out. I
> tracked it down to __spatial_filtering__(), the compiled function
> underneath ordfiltn().  Attached is a test case that demonstrates the issue.
>
> Regardless of whether or not an implementation using single precision
> internally would be faster, I don't think __spatial_filtering__() should
> be returning results with different precision than the input.

You are correct, this is a bug. Could you please fill a bug report at
http://savannah.gnu.org/bugs/?func=additem&group=octave
And if you are able to fix this and also submit a patch, that would be great.

Thanks,
Carnë


reply via email to

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