bugGNU Octave - Bugs: bug #50122, image package: normxcorr2...

 
 

bug #50122: image package: normxcorr2 sometimes returns inf values

Submitted by:  Hartmut <hardy>
Submitted on:  Sun 22 Jan 2017 07:28:24 PM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  4.2.0 Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

( Jump to the original submission)

Wed 12 Apr 2017 12:36:34 PM UTC, comment #7:

Pushed after removing trailing whitespace

http://hg.code.sf.net/p/octave/image/rev/9f1930bae20b

Thank you guys

Carnë Draug <carandraug>
Project Member
Thu 26 Jan 2017 04:47:21 AM UTC, comment #6:

See also bug #50151

Avinoam Kalma <avinoam>
Project Member
Tue 24 Jan 2017 09:40:53 PM UTC, comment #5:

I have tested this patch:
It solves the original issue of this bug report and it adds (passing) tests for the bug.

I would be happy to see this one applied to the image repository.

Note that normxcorr2 still has a problem of Matlab compatibility in
the margins. It is not related to this bug, so I will open a new bug report for this.

Changing status to "Patch Reviewed" (By Mike and by me).

Avinoam Kalma <avinoam>
Project Member
Mon 23 Jan 2017 07:05:09 PM UTC, comment #4:

Here is a new version (V2) of my PATCH, that includes Mike's hints from comment #3.

(file #39543)

Hartmut <hardy>
Mon 23 Jan 2017 06:10:05 PM UTC, comment #3:

Hartmut - you could combine your change into one line, may be slightly more efficient since it will be assigning the zeros all at the same time:

You could also change the test to assert that c is exactly what you expect it to be, something like

or at least test that c(3) is exactly zero. Just my two cents, makes it clear exactly what this test was added for.

Other than that, patch and test look good to me.

Mike Miller <mtmiller>
Project Administrator
Mon 23 Jan 2017 05:29:18 PM UTC, comment #2:

(adding people to cc who care about the image package)

Hartmut <hardy>
Sun 22 Jan 2017 07:43:14 PM UTC, comment #1:

Here is a PATCH to fix this behavior, including a new test for it.

(file #39533)

Hartmut <hardy>
Sun 22 Jan 2017 07:28:24 PM UTC, original submission:

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:

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

I will prepare a patch for this soon.

Hartmut <hardy>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #39533:  normxcorr2_no_infs.patch added by hardy (990B - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by hardy (adding people to cc who care about the image package)
  • -email is unavailable- added by hardy (adding people to cc who care about the image package)
  • -email is unavailable- added by hardy (Submitted the item)
  •  

    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 project members can vote.

     

     

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-04-12 carandraug StatusPatch Reviewed => Fixed
        Open/ClosedOpen => Closed
    2017-01-24 avinoam StatusPatch Submitted => Patch Reviewed
    2017-01-23 hardy Attached File- => Added normxcorr2_no_infs_V2.patch, #39543
    2017-01-23 mtmiller StatusNone => Patch Submitted
    2017-01-23 hardy Carbon-Copy- => Added avinoam
        Carbon-Copy- => Added carandraug
    2017-01-22 hardy Attached File- => Added normxcorr2_no_infs.patch, #39533

    Back to the top


    Powered by Savane 3.3