gil icon indicating copy to clipboard operation
gil copied to clipboard

Bicubic sampler

Open Scramjet911 opened this issue 3 years ago • 6 comments

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

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

Scramjet911 avatar Mar 30 '21 09:03 Scramjet911

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     

codecov[bot] avatar Mar 30 '21 10:03 codecov[bot]

@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 avatar Mar 30 '21 10:03 Sayan-Chaudhuri

Also,how do you design the test cases?

Sayan-Chaudhuri avatar Mar 30 '21 10:03 Sayan-Chaudhuri

@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.

Scramjet911 avatar Mar 30 '21 10:03 Scramjet911

@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

lpranam avatar Mar 30 '21 10:03 lpranam

@lpranam Thanks.

Sayan-Chaudhuri avatar Mar 30 '21 10:03 Sayan-Chaudhuri