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

Implementation of lanczos down scaling #309

Merged
merged 10 commits into from Jun 23, 2019
Merged

Conversation

@simmplecoder
Copy link
Contributor

simmplecoder commented Jun 7, 2019

Description

This is milestone merge after implementing lanczos scaling

Environment

Everything that supports Boost 1.70

References

https://en.wikipedia.org/wiki/Lanczos_resampling

Tasklist

  • Lanczos scaling
  • Add test case(s)
  • Ensure all CI builds pass
  • Review and approve
.ci/get-boost.sh Outdated Show resolved Hide resolved
@simmplecoder simmplecoder force-pushed the simmplecoder:gsoc2019 branch from 72a43f3 to ad3f64a Jun 11, 2019
@mloskot mloskot requested a review from stefanseefeld Jun 18, 2019
@mloskot mloskot added the cat/feature label Jun 18, 2019
Copy link
Member

stefanseefeld left a comment

Olzhas, great to see your first PR here. I'll let you do the merge yourself. (please squash to reduce noise.)

@mloskot

This comment has been minimized.

Copy link
Member

mloskot commented Jun 20, 2019

@stefanseefeld I don't think @simmplecoder has commit access to perform the merge.

@mloskot

This comment has been minimized.

Copy link
Member

mloskot commented Jun 20, 2019

@simmplecoder You now have commit access to this repository!

with great power comes great responsibility :)

simmplecoder added 9 commits Jun 5, 2019
* Simple implementation of lanczos scaling

* Refactor lanczos into separate header

This commit moves the algorithm
into its own header. It also provides
templated interface now, utilizing
a little bit of decltype and declval
to resolve types for lambdas and stuff

* Zero pixel at start of lanczos_at

This commit fixes a possible bug and
fixes some style incosistencies

* Improve documentation for Lanczos

This commit adds documentation which
describes when to use the algorithm,
a brief description of how it is
supposed to work, and some caution
on the quality of the output

* Address style issues and fix warnings

This commit fixes a style issue realted
to namespace declaration and
fixes a warning in added zeroing of
a pixel at start of lanczos

* text-realign function arguments

* fix formatting issues

* Implement handful of sanity tests

This commit introduces a couple of
sanity tests such as black image
scaling to black image, and lanczos
response being 0 at x = 0

* bracket on newline for for loops

* add lanczos scaling to tests

* more precision in lanczos calculation

This commit migrates integral values
to double precision and uses PI
provided by boost.Math. These changes
solve downscaled image being darker

* Simple implementation of lanczos scaling

* Refactor lanczos into separate header

This commit moves the algorithm
into its own header. It also provides
templated interface now, utilizing
a little bit of decltype and declval
to resolve types for lambdas and stuff

* Zero pixel at start of lanczos_at

This commit fixes a possible bug and
fixes some style incosistencies

* Improve documentation for Lanczos

This commit adds documentation which
describes when to use the algorithm,
a brief description of how it is
supposed to work, and some caution
on the quality of the output

* Address style issues and fix warnings

This commit fixes a style issue realted
to namespace declaration and
fixes a warning in added zeroing of
a pixel at start of lanczos

* text-realign function arguments

* fix formatting issues

* Implement handful of sanity tests

This commit introduces a couple of
sanity tests such as black image
scaling to black image, and lanczos
response being 0 at x = 0

* bracket on newline for for loops

* add lanczos scaling to tests

* more precision in lanczos calculation

This commit migrates integral values
to double precision and uses PI
provided by boost.Math. These changes
solve downscaled image being darker

* Add Jamfile for ip test directory

Add Jamfile for image_processing
test directory and build-project
from outer test directory

* Add IP test directory to ci build

This commit adds a line at the end
of .ci/build-and-test.sh to include
image processing tests in CI builds

* Remove redundant lines from Jamfile

Simplify Jamfile at
test/image_processing

* Rewrite range condition

x > -a && x < a exchange with
-a < x && x < a in lanczos

* Add newline at the end of files

* Add math and lexical_cast to get-boost

As math and lexical_cast are used
in lanczos scaling, both were added
to get-boost

* Revert "Add newline at the end of files"

Since Boost.Math.Constants is
overengineered for use case by
requiring Boost.lexical_cast or
a global define, it is removed

This reverts commit 0743ab0.

* Define pi and use in lanczos

Value of pi is moved out into detail
and used by lanczos

* Move image_processing to test/core

* formatting fixes

* Adjust CMakeLists for moved IP tests

This commit removes image_processing as
subdirectory from test/ and adds to
test/core's CMakeLists

* Remove unused from get-boost

Since lanczos scaling no longer uses
boost.math.constants, lexical_cast
has been removed as well
This is a stray change left from
my incorrect resetting of the HEAD
on lanczos branch
io includes are not used in lanczos
scaling test, and they break build
Since width() and height()  now return
std::ptrdiff_t, call to std::min needs
a cast. There was also shadowing of
pi declared in detail/math.hpp,
which is also fixed
The patch provided by Mateusz changes
all usages of long int into ptrdiff_t,
which is returned by width() and
height() functions of image_view
This commit is a simple reformat of
affected files
The change converges integer handling
in arguments, using view' type aliases.
View arguments have to come first to
avoid non-deduced context problem.
Also replaced long int with ptrdiff_t
in lanczos, in numeric.hpp file
Some places with ptrdiff_t were
left out from previous commit, so they
are changed in this one. Plus a fix for
max call being ambiguous.
This commit takes extreme stance of
never using an integer literal due to
problems in ambiguity of deduction of
min and max functions
@simmplecoder simmplecoder force-pushed the simmplecoder:gsoc2019 branch from e802bac to c68892e Jun 22, 2019
During rebase of gsoc2019 onto develop,
I didn't enclose first foreach with
matching endforeach, hence tests failed
@simmplecoder simmplecoder merged commit cf897c5 into boostorg:develop Jun 23, 2019
9 checks passed
9 checks passed
boostorg.gil Build #20190622.2 succeeded
Details
boostorg.gil (macos1013_xcode91_cmake) macos1013_xcode91_cmake succeeded
Details
boostorg.gil (ubuntu1604_gcc5_cxx11_cmake) ubuntu1604_gcc5_cxx11_cmake succeeded
Details
boostorg.gil (ubuntu1604_gcc8_cxx14_cmake) ubuntu1604_gcc8_cxx14_cmake succeeded
Details
boostorg.gil (win2012_vs2015_cmake) win2012_vs2015_cmake succeeded
Details
boostorg.gil (win2016_vs2017_cxx14_cmake) win2016_vs2017_cxx14_cmake succeeded
Details
boostorg.gil (win2016_vs2017_cxx17_cmake) win2016_vs2017_cxx17_cmake succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@mloskot mloskot moved this from To do to In progress in [gsoc2019] Epipolar Geometry Fundamentals Jun 23, 2019
@mloskot mloskot moved this from In progress to Done in [gsoc2019] Epipolar Geometry Fundamentals Jun 23, 2019
@mloskot mloskot added this to the Boost 1.71 milestone Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.