bugGNU Octave - Bugs: bug #55790, [octave forge] (image) stdfilt...

 
 

bug #55790: [octave forge] (image) stdfilt throws error "__spatial_filtering__: A should be real or logical"

Submitter:  None
Submitted:  Wed 27 Feb 2019 06:50:12 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Joel Cottrell Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 04 Mar 2019 05:44:47 PM UTC, comment #7: 

Anf for future reference, this was introduced with commit 8963435fce4d http://hg.code.sf.net/p/octave/image/rev/8963435fce4d#l1.493

Carnë Draug <carandraug>
Group Member
Fri 01 Mar 2019 01:09:37 PM UTC, comment #6: 


Fixed in http://hg.code.sf.net/p/octave/image/rev/65aeb4f2ea79

It will released in the next patch release version.
Closing.

Avinoam Kalma <avinoam>
Group Member
Thu 28 Feb 2019 11:59:10 PM UTC, comment #5: 

Ah yes, that makes sense, the 'is_real_matrix' test is the last in the series of type checks, not something separate. Thanks for taking another look.

Joel Cottrell <jcottrell>
Thu 28 Feb 2019 10:35:55 AM UTC, comment #4: 

Thanks for pointing again __spatial_filtering__.cc as the source of the problem.
Checking again, it seems that there is a missing else in line 536. I will check this and make a changeset with BISTs for this case.

Avinoam Kalma <avinoam>
Group Member
Wed 27 Feb 2019 11:07:09 PM UTC, comment #3: 

Thanks Avinoam, I imagine that would enable the stdfilt function to run without errors and produce a sensible output.

But from looking inside the C code, it seems like the _spatial_filtering_ function is meant to work for integer data types, and has done so in previous versions, perhaps with performance benefits over floating point.

Might it be possible to remove or fix the checks that cause this error message for integer input, so that it's not necessary to cast to double at the higher level?

Joel Cottrell <jcottrell>
Wed 27 Feb 2019 07:51:45 PM UTC, comment #2: 

Thanks for reporting

adding the lines


  if (! islogical(I) && ! isfloat (I))
    I = double (I);
  endif


before calling

__spatial_filtering__-nomarkup+ fixes
the problem.
I will add these lines with relevant tests.

Avinoam Kalma <avinoam>
Group Member
Wed 27 Feb 2019 06:56:16 AM UTC, comment #1: 

Sorry, typo in filename, should be:
src/__spatial_filtering__.cc

Anonymous
Wed 27 Feb 2019 06:50:12 AM UTC, original submission:  

When using a recent version of the image package, the 'S = stdfilt(IM, DOMAIN)' function throws an error from within the spatial filtering function, saying that the image matrix needs to be real or logical. I am using real data, of type 'uint8'.

I've followed the history back to '__spacial_filtering__.cc' at commit [896343], which made some significant changes to the matrix handling and checking.

Uninstalling the image package and installing image-2.8.0 (dated before the above commit) resolves this issue for me.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jcottrell (Posted a comment)
  • -email is unavailable- added by avinoam
  • -email is unavailable- added by avinoam
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-01 avinoam StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2019-02-28 avinoam StatusConfirmed In Progress
    2019-02-27 avinoam Carbon-Copy- Added hardy
        Carbon-Copy- Added carandraug
    2019-02-27 mtmiller StatusNone Confirmed
        Release5.1.0 dev
        Operating SystemMicrosoft Windows Any
        Summary'stdfilt' function throws error &quot;__spatial_filtering__: A should be real or logical&quot; [octave forge] (image) stdfilt throws error "__spatial_filtering__: A should be real or logical"

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code