octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #50122] image package: normxcorr2 sometimes re


From: Hartmut
Subject: [Octave-bug-tracker] [bug #50122] image package: normxcorr2 sometimes returns inf values
Date: Sun, 22 Jan 2017 19:28:25 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

URL:
  <http://savannah.gnu.org/bugs/?50122>

                 Summary: image package: normxcorr2 sometimes returns inf
values
                 Project: GNU Octave
            Submitted by: hardy
            Submitted on: Sun 22 Jan 2017 07:28:24 PM GMT
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.0
        Operating System: Any

    _______________________________________________________

Details:

This bug was mentioned on the Octave help list:

http://octave.1599824.n4.nabble.com/Octave-4-0-3-normxcorr2-producing-unexpected-result-tt4681543.html

The behavior is still present with Octave 4.2.0 and image-2.6.1.

The reason for this behavior is that the current Octave version of
normxcorr2.m does not properly treat the special case of a constant value in
the image part.

Here is what Matlab does:

Tips

Normalized cross-correlation is an undefined operation in regions where A has
zero variance over the full extent of the template. In these regions, we
assign correlation coefficients of zero to the output C.


A solution to this is to add the following line to the code to the end of
normxcorr2.m:

  c(isinf (c)) = 0;


I will prepare a patch for this soon.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50122>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]