jimp-dev / jimp-dev/jimp

Even sized kernel support

Open
#749 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
TypeScript
Stars
14.7k
Forks
777
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
It would be useful to have even sized kernel support for convolution etc.

**Describe the solution you'd like**
The implementation could follow Matlabs imfilter/conv2 algorithm. Imfilter(M, k) result is same as conv2(M, k, 'same').

Matlabs documentation states:
"If you specify an even-sized kernel h, then the center of the kernel is floor((size(h) + 1)/2).

For example, the center of 4-element filter [0.25 0.75 -0.75 -0.25] is the second element, 0.75. This filter gives identical results as filtering with the 5-element filter [0 0.25 0.75 -0.75 -0.25]."

https://se.mathworks.com/help/images/ref/imfilter.html

Contributor guide

Open the contributing guide

Research direction

Start by locating the convolution or filtering entry point and review the MATLAB imfilter/conv2 behavior linked in the issue. Done means even-sized kernels are supported and their center follows the stated floor((size(h) + 1)/2) rule, with results matching the described equivalent odd-sized filter.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-vision
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.