boostorg / boostorg/gil

Bicubic sampler in GIL

Open
#576 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
199
Forks
171
Avg merge
1d 14h
Merged PRs (30d)
10

Description

### Is your feature request related to a problem? Please describe.
In the current image resizing algorithms in GIL, there is nearest neighbour and bilinear sampler. But bicubic sampler is not available. Bicubic interpolation is also a very popular algorithm which might be needed useful for resizing.

### Describe the solution you'd like
Implementing a bicubic sampler in sampler.hpp

#### C++ Example
So the way I have currently implemented it is using [this](https://www.paulinternet.nl/?page=bicubic) as a reference, [here](https://github.com/Scramjet911/gil/blob/6e81dd392b5b67c08fd49e1a63b3b14d9e143e26/include/boost/gil/extension/numeric/sampler.hpp#L210)

But there are issues with my implementation, I cannot figure out why image artifacts are being generated in the output image.









Can someone help me with what I am missing?

### Describe alternatives you've considered
Another method for bicubic interpolation is using convolution like [this](https://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm)

### Additional context
Bicubic interpolation is a very popular technique for image interpolation because it is smoother than bilinear interpolation and nearest neighbour interpolation, though it requires higher computational power.

PR #588

Future milestones :
- [ ] (maybe?) Clean up `sampler.hpp` comments
- [x] Add tests
- [ ] Ensure all tests pass

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.