[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #9354] image package: new function wiener2
From: |
Hartmut |
Subject: |
[Octave-patch-tracker] [patch #9354] image package: new function wiener2.m |
Date: |
Mon, 12 Jun 2017 14:08:50 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0 |
Follow-up Comment #17, patch #9354 (project octave):
Here are 3 new tests for neighborhoods with even size:
im1 = zeros (5, 5);
im1(2:4, 2:4) = 1;
im1_out_23 = [
0.1667 0.2233 0.2978 0.2233 0.1667
0.2233 0.7767 1.0000 0.7767 0.2233
0.2233 0.7767 1.0000 0.7767 0.2233
0.1667 0.5533 0.7022 0.5533 0.1667
0 0 0 0 0];
im1_out_43 = [
0.1667 0.2813 0.3750 0.2813 0.1667
0.2500 0.6250 0.7500 0.6250 0.2500
0.2500 0.6250 0.7500 0.6250 0.2500
0.1667 0.4375 0.6250 0.4375 0.1667
0.0833 0.1667 0.2500 0.1667 0.0833];
im1_out_44 = [
0.2500 0.3018 0.3018 0.2500 0.1250
0.3018 0.6647 0.6647 0.4971 0.1875
0.3018 0.6647 0.6647 0.4971 0.1875
0.2500 0.4971 0.4971 0.2500 0.1250
0.1250 0.1875 0.1875 0.1250 0.0625];
assert (wiener2 (im1, [2, 3]), im1_out_23, 1e-4);
assert (wiener2 (im1, [4, 3]), im1_out_43, 1e-4);
assert (wiener2 (im1, [4, 4]), im1_out_44, 1e-4);
You could simply add those tests under the already existing test with "im1".
Those tests
* are Matlab compatible
* and pass
So everything seems fine for even sized neighborhoods.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?9354>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/