New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
correlate2d's output does not agree with correlate's output in scipy.signal module (Trac #1443) #1968
Comments
What is the purpose of |
@orodbhen correlate2d has different boundary options for image processing |
@endolith That makes sense then. I'm not clear on why this difference would cause the output to be offset, though. Is that really a bug, or expected behavior? I see this using |
Yes
It wouldn't, that's unrelated. The full output of convolve/correlate is always odd-length, so for odd-length input,
But for even-length input you can't center the output, so you have to shift it one way or the other.
I'm not sure if one choice makes more sense in certain contexts or if this is just an accident. It might be this way for consistency with other software, too. Should compare with Octave and Matlab. |
Based on what @endolith concluded, I'm marking this as a documentation issue. I think we need to add to the |
Original ticket http://projects.scipy.org/scipy/ticket/1443 on 2011-05-23 by trac user SevenSea, assigned to unknown.
When the 2-dimensional array size is even, correlate2d's output does not agree with correlate's output in scipy.signal module. There is a shift of index in the output of correlate2d function. (Information for comparition: convolv2d works good.)
Testing code:
The output:
The text was updated successfully, but these errors were encountered: