2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-22 05:12:30 +00:00

35 Commits

Author SHA1 Message Date
Mateusz Łoskot
d50d85613a refactor: Make with_tolerance reusable across other tests
Refinement of PR #527
2022-06-25 13:52:54 +02:00
Pranam Lashkari
9bd8642f69 numeric extension move into core part 5
moved numeric/kernel.hpp into core
2022-02-18 14:25:59 +05:30
Pranam Lashkari
87a3157c4b numeric extension move into core part 4
moved numeric/pixel_numeric_operations.hpp into core
2022-02-18 14:25:59 +05:30
Pranam Lashkari
483915cb20 numeric extension move into core part 3
moved numeric/convolve.hpp into core
2022-02-18 14:25:59 +05:30
Pranam Lashkari
baf246a726 numeric extension move into core part 2
moved numeric/channel_numeric_operations.hpp into core
2022-02-18 14:25:59 +05:30
Pranam Lashkari
2562e11241 numeric extension move into core 1
moved numeric/algorithm.hpp into core
2022-02-18 14:25:59 +05:30
Harshit Pant
c7aba23c74 Fix convolve_2d for images with float32_t channel model (#577)
Fixes #575
2022-02-09 14:43:48 +01:00
Gaurav kumar
392ac4996d Rotation of image by any arbitrary angle from its center (#565)
* basic rotation function for theta between +/- 180 deg
* added scaling matrix for same dimensions and added bound checks for theta
2021-03-09 10:26:21 +05:30
Samuel Debionne
68cdbdd2ec Add inverse function for matrix3x2 (#527) 2021-01-20 23:09:58 +01:00
Pranam Lashkari
6bf8bc4d65 Implemented mechanism to reverse kernel_2d (#489) 2020-04-27 18:14:44 +05:30
Mateusz Łoskot
b9011e10da Replace uses of abs with fabs where applicable 2020-04-06 23:32:38 +02:00
Mateusz Łoskot
9f94af76e7 Silence -Wmissing-braces 2020-04-06 23:32:06 +02:00
Mateusz Łoskot
f641190948 Replace BOOST_TEST with BOOST_TEST_EQ for streamable operands (#472)
Improve utilities sending channels, pixels and other GIL objects to
output stream for logging of test errors.

Fix missing namespace qualification in IO tests.

Comment TARGA test case with FIXME that was accidentally
uncommented in cc64bdd1a4
2020-04-01 01:54:12 +02:00
Mateusz Łoskot
dda885e5ff Replace Boost.Test with Boost.LightweightTest in test/ (#459)
Motivation is to:
- use on simpler and light test framework,
- eliminate dependency on libraries like Boost.MPL,
- achieve faster compilation times for CI builds (20% seems feasible)
- have test programs easy to run and debug
- avoid macros

Remove outdated FIXME-s for bugs that have been already fixed.
Fix off-by-one bug in test/core/test_fixture.hpp generators.
Minor corrections and tidying up.

Add missing test assertions to numeric extension tests.
Fixes #458
2020-03-21 22:53:09 +01:00
Mateusz Łoskot
d527916db0 Add test for pixel types with std::uninitialized_fill (#418)
Since `std::uninitialized_fill` performs a placement new on each
element in the range, it is important to ensure core and packed
pixel types behave correctly.

Split general purpose test fixtures into core/test_fixture.hpp.
2020-01-18 11:03:17 +01:00
Mateusz Łoskot
cd40a87b83 Replace use of boost/core/lightweight_test.hpp with Boost.Test (#417)
Refactoring to unify use of the common framework across GIL tests.
Merge `unit_test_utility.hpp` into `unit_test.hpp` for convenience.
Add several test cases to `gil::point` tests.
2020-01-13 22:38:06 +01:00
Mateusz Łoskot
79ad37f75a Clean up BOOST_TEST_MODULE values for naming of test suites (#415)
Fix some Jamfile-s to not just `compile` some tests but also `run`, where applicable.
Remove redundant `project` definition from Jamfile-s.
2020-01-09 11:44:25 +01:00
Pranam Lashkari
146d81bb7e Update extend_boundary function to handle all boundary_option-s (#398)
Closes #391
2019-10-28 17:19:27 +01:00
Mateusz Łoskot
8235ee645a Hide convolve_1d, convolve_2d and kernel_2 in namespace detail (#397)
* Hide convolve_1d and convolve_2d in namespace detail
* Hide kernel_2d in namespace detail.
* Tidy up naming of horizontal/vertical to y/x for kernel center.

Following @lpranam comments on planned changes to convolve_2d,
which will not be ready for Boost 1.72,
@mloskot proposed to hide the function as implementation detail,
https://lists.boost.org/boost-gil/2019/10/0316.php,
until it is ready and @stefanseefeld agreed on the proposal,
https://lists.boost.org/boost-gil/2019/10/0320.php.
2019-10-24 12:50:56 +02:00
Pranam Lashkari
6a1c99a33c Implement image boundary extension algorithm (#386) 2019-09-05 20:47:21 +02:00
MIRAL SHAH
f6c502be02 Fix Boost guidelines violations (#378)
Add copyright notice.
Add protection from the min/max macro.

Closes #376
2019-08-09 17:36:37 +02:00
MIRAL SHAH
ca696ce6d0 Added 2D convolution definitions to numeric extension (#367)
2D convolution tests added

`convolve` function renamed to `convolve_1d`

closes #356
2019-08-09 03:17:09 +05:30
Mateusz Łoskot
a895b5eb55 Add tests for extension/numeric/pixel_numeric_operations.hpp (#372)
Add new and update existing Doxygen comments describing interfaces in
`extension/numeric/pixel_numeric_operations.hpp`.
2019-08-08 11:10:20 +02:00
MIRAL SHAH
11c897bb07 2D kernel support added to numeric extension (#361)
Tests for 2D numeric kernel added
2019-08-04 19:46:47 +05:30
Mateusz Łoskot
67ac10d3ab Rename test/extension/numeric/convolve_2d.cpp to convolve.cpp (#357)
Accommodate to @miralshah365 's plan in #356 to add `convolve` function.
2019-07-30 08:10:40 +02:00
Mateusz Łoskot
5d3208ec57 Add tests for extension/numeric/channel_numeric_operations.hpp (#340)
Add static assertions to verify channel types are convertible to
expected result type.

Add new and update existing Doxygen comments describing interfaces in
`extension/numeric/channel_numeric_operations.hpp`.
2019-07-25 09:18:51 +02:00
Mateusz Łoskot
90e5e1738f Add test for convolve function from Numeric extension (#349)
Minimal test for new function added in #347 (with identity kernel only).
2019-07-22 18:59:21 +02:00
Mateusz Łoskot
dafcaa169e Extract GIL-specific Boost.Test utilities from test/unit_test.hpp (#338)
Add separate header `test/unit_test_utility.hpp` for printers and
other utilities for better integration of GIL types with Boost.Test.
2019-07-18 17:49:05 +02:00
Mateusz Łoskot
d7884ee1a6 Fix parameters type of subimage_view functions in core and dynamic_image (#337)
Align with `subsampled_view` overloads accepting `point_t` and `coord_t`
Both types are based on `std::ptrdiff_t`. Fixes compilation warnings.
Tidy up `subimage_view` and `subsampled_view` with trailing return.
Add tests for `subimage_view` in core and dynamic_image extension.
(First tests for the dynamic_image, hurray! :))

Add explicit cast to double in division operator for point<T> to
fix compilation warnings.
2019-07-16 13:05:48 +02:00
Mateusz Łoskot
73314b19a6 [numeric] Correct name of BOOST_TEST_MODULE [ci skip] 2019-07-14 23:00:47 +02:00
Mateusz Łoskot
9ce3f08a36 Add first tests for convolve functions from Numeric extension (#335)
First stab at convolution tests includes cases with the identity kernel.
Move `pixel`-s streaming facility used by Boost.Test (required  by
`BOOST_TEST` macro) to the common header for re-use in other tests.
2019-07-14 21:43:32 +01:00
Mateusz Łoskot
ab4c686970 [numeric] std::extent not usable to obtain size of kernel_1d_fixed (#320)
Use of `std::extent` was introduced in PR #200 but it turns out as
not applicable for `std::array` or derived types (e.g. `kernel_1d_fixed`).
This led to obtaining invalid size of `kernel_1d_fixed` and erroneous
results of the rows and columns convolution.
This change replaces `std::extent` with new public constant member
`kernel_1d_fixed::static_size`.

Since `kernel_1d_fixed` is derived from `std::array`, the Alternative
could be to use `std::tuple_size` specialization for `std::array`.

Add static assertion to require that kernel size must be odd to
ensure validity at the center.
2019-07-04 20:45:33 +02:00
Mateusz Łoskot
67c3ac77c9 Add kernel test to numeric/Jamfile (#318)
Change missing from #317
2019-06-30 20:52:41 +02:00
Mateusz Łoskot
b4a69319bc Add tests for kernel_1d and kernel_1d_fixed classes (#317)
Add FIXME and TODO comments about issues that needs to be clarified.
2019-06-29 10:38:24 +02:00
Mateusz Łoskot
4ed7701b47 Move tests of extensions inside test/ directory (#302)
Split header tests accordingly i.e. test core headers as part of
core tests, numeric extension headers as part of numeric tests, etc.

It extends the convention of sub-directories already established in
`include/boost/gil` directory. It is sensible to follow it in other
areas of the source tree (i.e. `test/`, `doc/` and `benchmark/`).

Another important reason to move the tests is to enable removal of
the top-level `Jamfile` with all its definitions of test-specific
requirements.
The top-level `Jamfile` is not advised, especially if it specifies
build requirements like C++ language version.
Those affect non-tests builds e.g. documentation, causing failures
during generation of HTML documentation (leads to missing docs).
2019-05-28 18:58:22 +02:00