2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-19 16:22:14 +00:00
Commit Graph

74 Commits

Author SHA1 Message Date
Mateusz Łoskot
0dc68398b8 CMakeSettings.json: Fix use of BOOST_GIL_ENABLE_EXT_NUMERIC [ci skip] 2020-07-27 02:51:02 +02:00
Mateusz Łoskot
e27454d040 CMakeSettings.json: Add 1.74 to Boost_ADDITIONAL_VERSIONS [ci skip] 2020-07-26 13:51:11 +02:00
Samuel Debionne
601790f241 Replace Boost.Variant with Boost.Variant2 (#474)
* Update documentation
* Update example
* Update io and extensions
2020-04-17 19:25:19 +02:00
Mateusz Łoskot
23702f9879 Add good-enough .clang-format to example/clang-format/
This is an example which offers _good enough_ configuration and
may be useful when writing code for GIL, not required though.

This is **not** a complete configuration!

Closes #87
2020-03-26 00:38:24 +01:00
siddhant2001
cd2c894b4c Update example/Jamfile to compile all programs with b2 (#437)
Completes one of tasks of #436
2020-03-01 21:17:59 +01:00
Mateusz Łoskot
b1811c019d Include CTest to enable BUILD_TESTING as common CMake option [ci skip] 2020-02-21 19:20:45 +01:00
Pranam Lashkari
b03b51e4f3 Corrected the namespace in example (#427)
convolution_2d was invoked using wrong namespace in `sobel_scharr.cpp`

Change missing from #397
2020-01-20 23:54:00 +01:00
Sourabh Dharpure
5bfc4211f5 Prefix CMake parameters with BOOST_ (#419) 2020-01-16 20:14:10 +01:00
Mateusz Łoskot
5f2011b23e Fix environment variables syntax in CMakeSettings.json [ci skip] 2020-01-01 22:02:40 +01:00
Mateusz Łoskot
0875e278d1 B2: Tidy up example/b2/user-config-windows-vcpkg.jam [ci skip] 2019-12-17 18:29:07 +01:00
Mateusz Łoskot
837888bef2 B2: Add example/b2/user-config-windows-vcpkg.jam [ci skip] 2019-12-17 14:14:04 +01:00
Mateusz Łoskot
21aa1d3d39 Refactor CMakeSettings.json to allow reasonable defaults [ci skip] 2019-12-13 20:30:55 +01:00
Mateusz Łoskot
0446e9df19 CMakeSettings.json: Add 1.73 to Boost_ADDITIONAL_VERSIONS [ci skip] 2019-12-13 20:13:21 +01:00
Mateusz Łoskot
60e579b84d Typo in README [ci skip] 2019-11-10 22:31:27 +01:00
Olzhas Zhumabek
62379dd5b9 Implement Sobel and Scharr operators (#392)
* Implement Sobel and Scharr operators

This commit adds Sobel and Scharr
operators with support for 0th and 1st
degrees with other degrees planned for
later

* Migrate and fix Harris example

Generate Harris entries now uses
signed image view.
The Harris corner detector example
now uses the Scharr filter generator
and convolve_2d to reduce amount
of code needed.

* Fix and migrate Hessian example

The Hessian example now uses signed
image views and uses newly added kernel
generators to compute gradients

* Fix Harris and Hessian tests

The tests broke due to migration to
signed views in algorithms, but tests
were not adjusted

* Fix Jamfile for example/sobel_scharr.cpp

* Cosmetic changes

* Commented out fail tests

* Fixed pixel16 used in image16s

In Harris and Hessian tests, unsigned
pixel values was used to construct
signed image, which was causing
appveyor to error out.

* Reenable failing targets

* Unify kernel generator interface

This commit makes all kernel
generator functions to return kernel_2d
and adapts dependant threshold
function to use the new interface

* Migrate Hessian and Harris tests

Migrate Hessian and Harris tests to new
interface for kernel generators

* Migrate Harris and Hessian examples

Harris and Hessian examples now use
new interface for kernel generation

* Migrate simple_kernels tests

simple_kernels are now using kernel_2d
interface

* Add missing return

Normalized mean generation had missing
return at the end of the function

* Adapt code to namespace move

This commit reacts to kernel_2d,
convolve_2d being moved to
namespace detail
2019-10-29 22:38:04 +06:00
Mateusz Łoskot
1007627601 Add GIL_ENABLE_EXT_DYNAMIC_IMAGE to CMakeSettings.json example [ci skip] 2019-10-28 23:10:41 +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
Mateusz Łoskot
c3e1fb767a CMake: Add Boost version 1.72 to CMakeSettings.json for VS 2019-10-13 18:10:05 +02:00
Pranam Lashkari
90f6fc04ed convolve_boundary_option renamed to boundary_option (#390)
`boundary_option` moved to `numeric/algorithm.hpp`

Closes #387
2019-09-18 11:48:20 +02:00
Olzhas Zhumabek
5c52dff369 Hessian corner detector (#364)
* Hessian plain determinant

This commit partially implements
Hessian corner detector, but only
uses determinant as Hessian response

* Implement full Hessian corner detector

This commit complements last one
by summing in a window and applying
det - k * trace * trace formula to
final Hessian response

* Add docs and make code align with docs

This commit adds docs to new functions,
and makes function and variable names
align with docs to not confuse readers

* Use determinant as response function

A-KAZE uses only determinant in it's
response, and since for now Hessian
is only a mean to advance A-KAZE
implementation, response function is
adjusted to use only determinant

* Create simple test for Hessian detector

This commit adds an s at the end of
function name to make it uniform with
another detector, and adds a simple
test for sanity check

* Improve documentations for d params

dx and similar naming seems to be
confusing, improved documentation
to explain the naming convention

* Address minor comments about style

* Address type based issues

Mostly changes to constness and
integral types, with small cosmetic
changes mixed in

* Fix typo and address review comment

Fixes typo in call for Hessian and
addresses a review comment about
replacing multiple exact indexing
calls to one with a reference

* Reorder includes in Hessian example

* Address review comments

Add literature reference to luminosity
computation, and perform some cosmetic
changes.
2019-08-21 09:37:53 +03:00
Olzhas Zhumabek
65fda3cf7b Harris response computation (#350)
* Restore previous state of Harris

This is a fresh start of branch
Harris with manual copying and
placement of code from previous
versions

* Use supplied weights in Harris

Weights passed as arguments were not
used prior to this commit

* Address review comments

Mostly moving brackets and adding
const, but also address MSVC's
max macro

* Make namespace qualification consistent

In file numeric.hpp, there is
full qualification, but harris.hpp
didn't have full qualification,
thus full qualification is added to
harris.hpp

* Add copyright and license notice
2019-08-21 06:06:29 +03:00
MIRAL SHAH
5f612ccf7a added definition of gaussian adaptive threshold (#379)
closes #316
2019-08-20 02:04:11 +05:30
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
348fd6942e Include <boost/gil.hpp> in examples (#355)
A typical user is supposed to include the main header and
to not know the library enough to include headers selectively.
2019-07-29 20:49:32 +02:00
MIRAL SHAH
5f005b0692 Add adaptive threshold algorithm using mean method (#341)
* Mean adaptive threshold implemented with the example
Implements #315
2019-07-26 01:36:43 +05:30
Mateusz Łoskot
08c546dc7f Add VS2019 and WSL configuration to CMakeSettings.json [ci skip] 2019-07-07 00:02:24 +02:00
Mateusz Łoskot
bd91abfff3 Add cmake-variants.yaml sample for Visual Studio Code + CMake Tools [skip ci] 2019-07-04 23:57:30 +02:00
Mateusz Łoskot
48b5ec4e68 Update example/cmake/CMakeSettings.json [ci skip] 2019-07-04 20:23:54 +02:00
MIRAL SHAH
716fe9ad8c Implement algorithms for binary and binary inverse thresholding (#313)
Add public functions threshold_binary and threshold_truncate.
Add tests and example.
Closes #310
2019-06-18 21:42:43 +02:00
Mateusz Łoskot
895aa77fb6 [CMake] Remove GIL_DOWNLOAD_FINDBOOST option (#307)
Upcoming CMake 3.15 introduced more dependencies in FindBoost.cmake
what makes the downloading impractical.
2019-06-05 09:19:17 +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
Olzhas Zhumabek
c504f8279c Add missing equal sign in interleaved_ptr.hpp (#299) [ci skip]
Ignore Conan artefacts.
2019-05-07 21:44:45 +02:00
Mateusz Łoskot
1f2474fa1e [cmake] Update CMakeSettings.json with Boost hints [ci skip] 2019-04-16 21:06:07 +02:00
Mateusz Łoskot
5611bd5807 Replace Boost.MPL with Boost.MP11 (#274)
Use type traits and features of C++11, then use Boost.MP11.
Remove unused and unnecessary metafunctions in `detail` namespace.
Remove explicit access to ::type as no longer necessary with MP11.
Clean up and reformat code according to the current guidelines.

Legacy tests have been updated where necessary to accommodate
switch to MP11.

Replace std::is_integral with gil::detail::is_channel_integral
Replacing boost::is_integral with std::is_integral is C++ UB:

    C++11 / 20.11.2 Header <type_traits> synopsis
    1 The behavior of a program that adds specializations for any
    of the class templates defined in this subclause is undefined
    unless otherwise specified.


Implements also proposal in #93
Closes #229
2019-04-14 22:13:45 +02:00
Mateusz Łoskot
ecf41b59ae Update example/README.txt and convert to Markdown [ci skip]
Update README.md and CONTRIBUTING.md about available examples.

Clarifies #252 and #253
2019-03-06 19:24:13 +01:00
Mateusz Łoskot
9004a67662 Remove old example/Makefile
It is not maintained; may be broken; redundant.
2019-03-06 19:08:12 +01:00
Mateusz Łoskot
5f241af90d [ci] Ensure CI builds clone pre-determined super-project branch
Rename custom variant with gil_ prefix.
Do not define project ID from Jamfile-s as unnecessary.
The project ID-s and build features are global resources, easy to clash.

Add recently added test/ subdirectories to build.
2019-02-19 18:21:28 +01:00
Mateusz Łoskot
e3ef52bb80 Correct order of constexpr and type specifier
The constexpr belongs to the declaration specifiers (like static) and
not just the type specifiers (like cv-qualifiers), so it binds to
the declaration (like static), not the type (like const).

Refines #211
2019-01-15 00:42:20 +01:00
Mateusz Loskot
78b7dcfeca Remove uses of Boost.Bind and Boost.Lambda (#212)
Replace with std::bind and C++11 lambda functions.
The two Boost libraries should no longer be a direct
dependency of Boost.GIL.
2019-01-13 02:03:25 +01:00
Mateusz Loskot
a2b2ca977a Replace BOOST_STATIC_CONSTANT with constexpr (#211)
Tidy up formatting of refactored parts of code.
2019-01-12 23:57:35 +01:00
Mateusz Loskot
fb19a1205d Apply clang-tidy modernize-use-using to all examples (#210)
Run clang-tidy 7.0 with -checks='-*,modernize-use-using' -fix
against TU-s of examples.

Manually refactor numerous typedef-s where missed by modernize-use-using
check, not uncommon in code snippets in comments.

Outcome is that searching for lower-case whole word typedef
in sources of all the tests should return only handful of matches
in boost/gil/extension/dynamic_image/apply_operation_base.hpp
2019-01-12 17:36:29 +01:00
Mateusz Łoskot
73edd31781 [cmake] Add GIL_BUILD_HEADERS_TESTS option [ci skip]
Allows to avoid generating lots of headers tests,
if unnecessary, e.g. while developing in IDE.
2019-01-05 23:01:37 +01:00
Mateusz Loskot
06d1dbb066 Fix hard-wired use of Boost.Array static_size member (#200)
Fixes #142
2018-12-18 11:57:32 +01:00
Mateusz Loskot
f3795176fc Fix examples to make them compile again (#201)
Following release of the new IO in Boost 1.68, the examples stopped compiling.

Fixes #40
2018-12-18 01:13:10 +01:00
Mateusz Łoskot
8cb28a56cb [cmake] Update sample CMakeSettings.json with new options [ci skip] 2018-12-15 21:04:30 +01:00
Mateusz Łoskot
92cddb3f71 [cmake] Bundle all Boost and IO libraries in gil_dependencies target
Simplify generating of IO tests targets, remove lots of duplicate cruft.
Tidy up CMake scripts.
2018-12-08 23:20:54 +01:00
Mateusz Łoskot
b07501a8cc [cmake] Simplify and clarify -D options [ci skip]
Clean up CMakeLists.txt if-s.
2018-12-08 21:25:27 +01:00
Mateusz Łoskot
03bba74b4e Modernize example/CMakeLists.txt [ci skip] 2018-12-08 11:54:56 +01:00
Mateusz Łoskot
9499b9db24 Update CMakeSettings.json to build examples [ci skip] 2018-12-08 11:31:25 +01:00
Mateusz Łoskot
531e671b49 Update example resize.cpp for new GIL IO
The I/O extensions have been entirely rewritten in Boost.GIL released
in Boost 1.68. The examples refactoring is still an ongoing effort.
2018-12-08 11:24:44 +01:00