2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-24 05:52:13 +00:00
Commit Graph

268 Commits

Author SHA1 Message Date
Mateusz Łoskot
4738a38295 test: Catch up IO with switch to variant2 migration (#607)
See discussion at
https://github.com/boostorg/gil/issues/453#issuecomment-833898207

Closes #606
2021-05-11 06:54:39 +02:00
Mateusz Łoskot
0a21d741ce test: Verify core IO headers are self-contained
Looks like skipped by mistake
2021-05-06 23:06:24 +02:00
meshtag
bc3a6c0db9 Add rasterizer support for ellipse (#585)
* Added all standard morphological transformations
* Should handle grayscale dilation/erosion
* Added test cases and improved code structure
* Should handle multichannel images
2021-03-28 21:00:12 +02:00
Samuel Debionne
b8564e256c Fix any_image_view::const_t (#526)
Use inherited constructors in any_image as well
2021-03-18 10:53:53 +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
meshtag
1e8526797e Added all standard morphological transformations (#541)
* Added all standard morphological transformations

* Improved comments and some other things

* Applied adviced changes

* Applied adviced changes

* Should handle grayscale dilation/erosion

* Checking

* Added test cases and improved code structure

* Added command line control

* Added command line control

* Rectified some things

* Rectified some more things

* Improved comments

* Improved comments

* Improved doxygen comments and added more test cases

* Improved compatibility for builds and rectifying whitespace use

* Minor improvement in comments

* Did clang formatting

* pushed enum class inside namespace 'detail' and some other things

* Should handle multichannel images

* Clang formatting attempt

* got rid of if/else comparators for target_element

* Adds morphology.hpp declaration in boost/gil.hpp

* Fix newline

* (std::max)(a, b) instead of std::max(a, b)

* Improved Formatting
2021-02-13 22:01:22 +06:00
Mateusz Łoskot
f58f3a23a1 Disable warning: overlapping comparisons always evaluate to false [-Wtautological-overlap-compare] 2021-02-03 00:52:57 +01:00
Mateusz Łoskot
58804ecb24 Remove <cxxflags> and other cruft from Jamfile (#557)
The warnings, debug-symbols and other build properties
can (and should) be controlled via b2 command line options.

By the way, most of <cxxflags> uses in Jamfile-s are usually incorrect.
Instead, better option is to:
  use warnings=pedantic to control the warnings instead of cxxflags options directly
  either in requirements or in default-build,
  depending on whether you want to override it from the command line or not
2021-02-03 00:47:17 +01:00
theroyn
2e2764225f Support constructing a planar image from interleaved image (#552)
Fixes #478
2021-01-30 21:11:51 +01:00
Cypre55
422ca82fe5 Removed two instaces of boost.mpl (#551)
Removed "#include <boost/mp11/mpl.hpp>"
at include/boost/gil/detail/mp11/hpp
and test/core/pixel/test_fixture.hpp
2021-01-28 22:42:30 +01:00
Mateusz Łoskot
6007d74667 Fix some clang -Wunused-variable warnings 2021-01-28 22:43:31 +01:00
Mateusz Łoskot
063385398f Fix warnings about abs called without std qualification 2021-01-28 22:32:43 +01:00
Mateusz Łoskot
4e0f815f5e build: Remove most of uses of cxxflags from test/Jamfile (#550)
Most uses of cxxflags are wrong.
Use b2 warnings instead, e.g. warnings=pedantic
2021-01-27 07:07:51 +01:00
Mateusz Łoskot
434e78f76b ci: R.I.P. Travis CI - Long live GitHub Actions
Follows:
- https://github.com/boostorg/gil/pull/544

Outstanding tasks:
- https://github.com/boostorg/gil/issues/549
- https://github.com/boostorg/gil/issues/548
2021-01-26 01:05:07 +01:00
Olzhas Zhumabek
a37f12b3e9 Add implementation of Hough transforms (#512)
Support construction from step_size, step_count, and a function for angles

Implement angle and radious version of Hough line transform and adds a demo
with static line that goes over secondary diagonal.

Implement incremental line raster
Implement naive line raster
Implement Bresenham line raster
Leave only Bresenham line rasterization

Naive and incremental algorithms were removed because they are supposed
to produce the same results anyway.
The reason for diverging results is inaccuracy of floating point numbers

Add circle rendering through trigonometric functions, using
arctan(1 / (radius + 1)) as minimal angle step.

Trigonometric circle rasterizer does not follow circle equation, but still
produces very round shapes.
A new testing methodology needs to be devised for this rasterizer.

The new version accepts start and points inclusively and tries to use
canonic representation during computations.

Slope decided to be is (diff_y + 1) / (diff_x + 1).
2021-01-25 23:31:39 +01:00
Mateusz Łoskot
81b4dc08bd ci: Add configuration for GitHub Actions (#544)
Add basic GitHub Actions configuration based on mp11
Remove Actions jobs using GCC 4.7 and 4.8 - unsupported compilers
Run b2 with --abbreviate-paths on Windows
The -std=c++1z is broken for clang-4.0 but no need to test it
Add -mbig-obj to GCC on Windows
  - That is to avoid string table overflow and file too big
Define _GLIBCXX_USE_CXX11_ABI=0 for clang 3.5, 3.6, 3.7
  - Should help avoid linker error:
    `undefined reference to std::ios_base::failure::failure(char const*, std::error_code const&)`
Disable certain check in algorithm_channel_relation test for clang<3.8
2021-01-25 02:34:04 +01:00
Debabrata Mandal
a68a95d5f4 Add code for ahe algorithm (#516) 2021-01-24 23:22:48 +01:00
Debabrata Mandal
77255e9e61 Add histogram matching algorithm (#515) 2021-01-24 21:33:38 +01:00
Debabrata Mandal
fb7512c29f Add histogram equalization feature (#514)
Co-authored-by: codejaeger <dhabalm1@>
2021-01-24 21:32:39 +01:00
Debabrata Mandal
3e729e5dae Add histogram class and related functionality (#499)
A new histogram class proposed with close suport for gil
image constructs.

Shift the stl support implmentation to extension to
serve as example for overloading fill_histogram.

Add cumulative histogram and histogram normalization.

Co-authored-by: debabrata1 <debabrata@goodhealthapp.com>
2021-01-24 00:02:51 +01:00
Olzhas Zhumabek
cb5bc9d8c2 Add Perona–Malik anisotropic diffusion algorithm (#500)
The output type must be floating point, thus a check was added to make sure it
is the case. Though I had to add specific cases for float32_t as std::is_floating_point does not
consider it a floating point type

The accumulate part was wrong, it multiplied by delta_t on every sum, which is wrong

Use 8 way nabla compute.
This is just different discretization of Laplace operator
https://en.wikipedia.org/wiki/Discrete_Laplace_operator

Laplace stencils are now the same as in mathematical notation

The new function will provide a uniform way to generate stencils
by making sure directions are indexed properly

Add only required stencil points:
The 5 points Laplace stencil is now adding only required points and not assuming that others are zero
2021-01-22 23:55:17 +01:00
Mateusz Łoskot
470923be36 Fix default ctor of homogeneous_color_base for reference pixel elements (#542)
If `Element` is a reference, then Element v{} is ill-formed.

Refines #273 which aimed to correctly value-initialize channel and pixel value members
2021-01-22 18:01:54 +01:00
Giovanni Mascellani
853bc1266b Fix typo in copyright headers (#524) 2021-01-20 23:11:26 +01:00
Samuel Debionne
68cdbdd2ec Add inverse function for matrix3x2 (#527) 2021-01-20 23:09:58 +01:00
Samuel Debionne
f374a672a0 Add image constructor from compatible view (#520)
* Use pixels_are_compatible instead of std::is_convertible
2020-10-11 21:38:36 +02:00
harshitpant1
f7e83e0baf Fix conversion of rgb to signed cmyk(boostorg#479) (#522)
* Fix conversion of rgb to signed cmyk(boostorg#479)

* changed naming of dst_us_t to uint_t and undid the formatting change

* test for conversion of rgb to cmyk, PR #522.

* small formatting changes/fixes

* Build configuration update for PR #522

* removed unused header file
2020-10-10 15:17:47 +02:00
Giovanni Mascellani
f6a35532f0 Fix typo in copyright headers (#521) 2020-10-05 19:40:35 +02:00
Samuel Debionne
66e99c393c Re-enable self containing header tests in CMake (#509)
Both folder and CMake variables are now singular (headers -> header)
2020-07-26 21:06:32 +02:00
Samuel Debionne
43594d2ddd Fix dynamic_image extension header dependencies (#508) 2020-07-26 21:05:59 +02:00
Pranam Lashkari
6bf8bc4d65 Implemented mechanism to reverse kernel_2d (#489) 2020-04-27 18:14:44 +05:30
Samuel Debionne
cee21c261c Add initializing image constructor (#486)
* Add minimal test case for move constructor of any_image
* Copyright update
2020-04-24 12:24:58 +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
Samuel Debionne
05ee4c8cc6 Fix image constructor from other image (#477)
Add image constructor test for constructor from other image type
that exercises the template constructor.
2020-04-11 13:21:21 +02:00
Mateusz Łoskot
446c1a2132 Fix overflow in RGB to CMYK32 conversion (#470)
Correct calculation to correctly map CMYK 0 to minimum
and 1 to maximum of input and output channel types.

If float-point division is necessary, use double instead of float
which may be too narrow for large operands. cmyk32_pixel_t is based on
uint32_t which multiplication by its maximum may yield result too
large to fit 32-bit float.

For example, (uint32_t(c) -  uint32_t(k)) * float(s) for
  c = 4294967295, k = 0, s = 1.0
results in 4294967300 value which does not fit uint32_t.

Fixes #406, but does not fix #479
2020-04-10 19:11:33 +02:00
Mateusz Łoskot
b3f72cc1d6 Fix -Wsign-compare warning in uses of num_channels metafunction (#476) 2020-04-07 21:10:32 +02:00
Mateusz Łoskot
f6864ac6be Replace remain of boost::remove_reference with std::remove_reference [ci skip] 2020-04-07 01:55:09 +02:00
Samuel Debionne
9b055f285b Add move semantics to image class (#457)
Since we do not require C++17 yet with its `if constexpr
that would discard instantiation of allocator's `operator=`
when the statement is not active, we have to use the tag
dispatching with appropriate used of
`propagate_on_container_move_assignment` and
rebound `allocator_type` to choose the POCMA.

Minor coding style fixes.
2020-04-06 23:50:01 +02:00
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
c8e77a5636 Test: do not value-initialize member of type of pixel reference 2020-04-06 22:31:12 +02:00
Olzhas Zhumabek
c887d3b60d Move math.hpp constants to detail namespace (#473) 2020-04-01 13:45:28 +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
28a99d7bd7 Add basic tests for default_color_converter_impl specializations
Add static_assert to fail clearly for color space combinations
for which conversions are not supported.
2020-03-31 17:59:28 +02:00
Mateusz Łoskot
cc64bdd1a4 Always build test/extension/io/targa tests for images hosted in source tree
Remove use of compile-time configuration macros
  - BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
  - BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES

Remove BOOST_GIL_IO_USE_TARGA_FILEFORMAT_TEST_SUITE_IMAGES as not used anymore.
2020-03-30 00:42:10 +02:00
Mateusz Łoskot
7f4f5f1b61 Simplify test/extension/io/CMakeLists.txt
Remove uses of deprecated configuration defines
  - BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
  - BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
2020-03-29 00:59:18 +01:00
Mateusz Łoskot
8547b8df3e Add utilities to make some basic types printable for BOOST_TEST_EQ [ci skip]
Skip CI as nothing uses this file yet
2020-03-26 23:29:01 +01:00
Mateusz Łoskot
f85eaada0f Catch and report exceptions thrown from test/extension//simple test
Prevent ungraceful test program termination, with core dump.
2020-03-26 00:19:25 +01:00
Mateusz Łoskot
fbc462b29b Remove compile-time configuration macros from Jamfile 2020-03-26 00:07:43 +01:00
Mateusz Łoskot
8bd0959d3f Catch and report exceptions thrown from test/extension/io/bmp tests
Prevent ungraceful test program termination, with core dump.
Rename make.cpp to bmp_make.cpp.
2020-03-26 00:05:13 +01:00
Mateusz Łoskot
f098f9b2bc Always build test/extension/io/bmp//make for images hosted in source tree
Remove use of compile-time configuration macros
   - BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
   - BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES

Updates dbbdfd611e
2020-03-25 23:13:16 +01:00