[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #61754] Bicubic interpolation in interp2() inc
From: |
Christof Kaufmann |
Subject: |
[Octave-bug-tracker] [bug #61754] Bicubic interpolation in interp2() incompatible with Matlab |
Date: |
Sun, 2 Jan 2022 20:25:06 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0 |
URL:
<https://savannah.gnu.org/bugs/?61754>
Summary: Bicubic interpolation in interp2() incompatible with
Matlab
Project: GNU Octave
Submitted by: christofkaufmann
Submitted on: Mon 03 Jan 2022 01:25:04 AM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name: Christof Kaufmann
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: Any
_______________________________________________________
Details:
Using "cubic" for the method argument of interp2 is just an alias for "pchip"
(piecewise cubic Hermite interpolating polynomial). However in Matlab a cubic
convolution is used, as stated in their documentation of interp2
<https://www.mathworks.com/help/matlab/ref/interp2.html#inputarg_method>. This
method is also described on Wikipedia's Bicubic Interpolation
<https://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm>
page.
A tiny example to show the difference:
Octave:
> interp2(magic(4), 1, 1.5, 'cubic')
ans = 8.1875
Matlab (R2021a):
> interp2(magic(4), 1, 1.5, 'cubic')
ans = 8.6250
The topic has already been discussed in bug #60322 (regarding imresize) and
there is even a patch for imresize available to reach Matlab compatibility.
Maybe this patch can be adapted for interp2 as well? What is your opinion on
this?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61754>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #61754] Bicubic interpolation in interp2() incompatible with Matlab,
Christof Kaufmann <=
- [Octave-bug-tracker] [bug #61754] Bicubic interpolation in interp2() incompatible with Matlab, Markus Mützel, 2022/01/03
- [Octave-bug-tracker] [bug #61754] Bicubic interpolation in interp2() incompatible with Matlab, Christof Kaufmann, 2022/01/19
- [Octave-bug-tracker] [bug #61754] Bicubic interpolation in interp2() incompatible with Matlab, Markus Mützel, 2022/01/19
- [Octave-bug-tracker] [bug #61754] Bicubic interpolation in interp2() incompatible with Matlab, Christof Kaufmann, 2022/01/19
- [Octave-bug-tracker] [bug #61754] Bicubic interpolation in interp2() incompatible with Matlab, Christof Kaufmann, 2022/01/20
- [Octave-bug-tracker] [bug #61754] Bicubic interpolation in interp2() incompatible with Matlab, Christof Kaufmann, 2022/01/22
- [Octave-bug-tracker] [bug #61754] Bicubic interpolation in interp2() incompatible with Matlab, Christof Kaufmann, 2022/01/30