[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #50151] image package: normxcorr2 is not compa
From: |
Hartmut |
Subject: |
[Octave-bug-tracker] [bug #50151] image package: normxcorr2 is not compatible with Matlab |
Date: |
Sun, 29 Jan 2017 13:01:31 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 |
Follow-up Comment #2, bug #50151 (project octave):
Here is another normxcorr2 result from Matlab and Octave, to compare:
I = [0 1 2 1 2;
1 0 1 1 0;
0 1 2 2 0;
0 2 0 0 0;
2 1 0 0 0]
T = [0 1 1];
c = normxcorr2(T, I);
c(isinf(c))=0 # work around bug #50122
c_matlab = [ ... # the Matlab result
0 0.5000 0.8660 0.5000 -0.5000 0 -1.0000
0.5000 0.5000 -0.5000 1.0000 -0.5000 -1.0000 0
0 0.5000 0.8660 1.0000 -0.5000 -1.0000 0
0 0.5000 0.5000 -1.0000 0 0 0
0.5000 0.8660 -0.8660 -1.0000 0 0 0]
(abs(c - c_matlab)) > 1e-4
# result of this difference calcluation (in Octave):
# 1 1 0 0 0 1 0
# 0 1 0 0 0 1 1
# 1 1 0 0 0 1 1
# 1 1 0 0 0 1 1
# 0 1 0 0 0 1 1
This strengthens my suspicion that the significant differences are mainly
around the border pixels, where some kind of extrapolation needed to be done.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50151>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/