Skip to content
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

Bicubic sampler #588

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Conversation

Scramjet911
Copy link
Contributor

@Scramjet911 Scramjet911 commented Mar 30, 2021

Description

This PR adds a bicubic sampler in the gil image resizing algorithms.
It also adds another static_for_each() method with 5 sources for easier manipulation of the sampler.
The overflow of the pixel values are checked inside the cubic_interpolate function. This is not optimum, but doing it after all cubic calculations is causing overflow errors in the output.
I would like to know of better ways to do this..

Also I haven't written testcases for the new static_for_each() method.

Closes #576

References

Tasklist

  • Add test case(s)
  • (Maybe) change overflow check outside the cubic_interpolation function
  • Ensure all CI builds pass
  • Review and approve

@Scramjet911 Scramjet911 mentioned this pull request Mar 30, 2021
3 tasks
@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #588 (b81d3cc) into develop (bc3a6c0) will increase coverage by 0.59%.
The diff coverage is 99.32%.

@@             Coverage Diff             @@
##           develop     #588      +/-   ##
===========================================
+ Coverage    78.72%   79.31%   +0.59%     
===========================================
  Files          118      118              
  Lines         5034     5183     +149     
===========================================
+ Hits          3963     4111     +148     
- Misses        1071     1072       +1     

@Sayan-Chaudhuri
Copy link

@Scramjet911 Can you kindly mention how do these tests work? What is the function Boost.test.Eq? I wish to learn about these tests

@Sayan-Chaudhuri
Copy link

Also,how do you design the test cases?

@Scramjet911
Copy link
Contributor Author

@Scramjet911 Can you kindly mention how do these tests work? What is the function Boost.test.Eq? I wish to learn about these tests

Boost.test.eq checks for the equality of the pixel values. The tests are basically instantiating an image with some pixels and then resizing it and testing the values of the pixels of the resized image.

@lpranam
Copy link
Member

lpranam commented Mar 30, 2021

@Sayan-Chaudhuri a simple google search will help you "boost tests" or "boost lightweight test"

https://www.boost.org/doc/libs/1_75_0/libs/core/doc/html/core/lightweight_test.html

@Sayan-Chaudhuri
Copy link

@lpranam Thanks.

@Scramjet911 Scramjet911 changed the title Bicubic sampler WIP:Bicubic sampler Apr 10, 2021
@Scramjet911 Scramjet911 changed the title WIP:Bicubic sampler Bicubic sampler Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bicubic sampler in GIL
3 participants