patchGNU Octave - Patches: patch #9235, image package: improve filtering...


patch #9235: image package: improve filtering functions (stdfilt, entropyfilt) and add tests (also medfilt2, ordfilt2, rangefilt)

Submitted by:  Hartmut <hardy>
Submitted on:  Mon 23 Jan 2017 08:01:44 PM UTC  
Category:  Forge : other Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 10 Oct 2018 12:53:49 PM UTC, comment #1:

The patch adds tests for the functions and fixes the call to spatial_filtering

The fix for the call of spatial_filtering was incorrect. S is a height for each comparison and so needs to have the same dimensions as the DOMAIN and not the image. I fixed that with

About the tests, I have pushed the ones for ordfilt2 and medfilt2 since those are exact. The others were not but could be. For example, the test for stdfilt could actually be using the expected values instead of rounded to the default matlab display. Like so:

So the only missing thing here is to adapt the tests for entropyfilt, rangedilt, and stdfilt to actually compute the expected values.

Carnë Draug <carandraug>
Project Member
Mon 23 Jan 2017 08:01:44 PM UTC, original submission:

This patch came out of the work on bug #45088. It improves the results of all the filtering functions of the image package and adds Matlab compatible tests to them.

Currently the results of stdfilt.m are not Matlab compatible, this is fixed by this patch. The results of entropyfilt.m are currently also not Matlab compatible, this is improved in some sense by this patch. But mostly this patch adds new tests, that's why I put it into the patch tracker, I hope this is fine.

The patch fixes the call to (as described in bug #45088) in

  • entropyfilt.m
  • stdfilt.m

It additionally adds Matlab compatible tests to

  • entropyfilt.m: tests fail. But they also fails without the fix. This is still an improvement since we now use as it is intended. See details in bug #45088.
  • medfilt2.m: tests pass
  • ordfilt2.m: tests pass
  • rangefilt.m: tests pass
  • stdfilt.m: tests pass

This patch is ment to be applied AFTER the patch from bug #45088 (file #39535). Because that patch fixes the call to in rangefilt.m.

Hartmut <hardy>


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

Attach Files:

Attached Files


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by hardy (Submitted the item)
  • -email is unavailable- added by hardy
  • -email is unavailable- added by hardy

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-01-23 hardy Attached File- => Added fix_filtering_functions_V1.patch, #39544
        Carbon-Copy- => Added avinoam
        Carbon-Copy- => Added carandraug

    Back to the top

    Powered by Savane 3.3