[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45088] image package: rangefilt requires doma
From: |
Hartmut |
Subject: |
[Octave-bug-tracker] [bug #45088] image package: rangefilt requires domain and image to have equa number of dimensions |
Date: |
Sun, 1 Jan 2017 22:32:26 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0 |
Follow-up Comment #13, bug #45088 (project octave):
Sorry, I think __spatial_filtering__.cc is innocent and works correctly in
this case. We are just mis-using it in rangefilt.m.
When I read the help string of ordfiltn.m (to learn about the fourth parameter
S in the call to __spatial_filtering__.cc), then I read: "The optional
variable S is a matrix of size(DOMAIN). Values of S corresponding to nonzero
values of domain are added to values obtained from A when doing the sorting."
So we should probably use only 0s as S in the call to
__spatial_filtering__.cc, but currently we are calling it with S = I, the code
in ragefilt.m is currently this:
retval = __spatial_filtering__ (I, domain, "range", I, 0);
When I change this line in rangefilt.m in the following way:
retval = __spatial_filtering__ (I, domain, "range", zeros(size(I)), 0);
then I do get the correct result from the code in comment #10.
So I would suggest (after reviewing this) to
* use Avioams patch from comment #8
* add the mentioned semicolon to his patch
* change the fourth parameter in the single code line mentioned in this
comment
* add some new tests, e.g. taken from comment #10 and #0.
@Avinoam: Could you review this and prepare a new cset?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45088>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45088] image package: rangefilt requires domain and image to have equa number of dimensions,
Hartmut <=