2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-21 04:52:17 +00:00

93 Commits

Author SHA1 Message Date
Samuel Debionne
3d8dcb68bf Omit pmr image tests on apple clang 15 2025-11-25 21:40:19 +01:00
Mateusz Łoskot
f018ebf79b chore: Remove executable bit from .cpp files [ci skip]
Ref https://github.com/boostorg/admin/issues/47#issuecomment-2575165830

Signed-off-by: Mateusz Łoskot <mateusz@loskot.net>
2025-01-07 15:39:58 +01:00
René Ferdinand Rivera Morell
8fd5cc5b32 Add support for modular build structure. (#752)
* Make the library modular usable.

* Add missing modular build.jam. And fix gitignore that caused it to be originally deleted!

* Switch to library requirements instead of source. As source puts extra source in install targets.

* Add missing import-search for cconfig/predef checks.

* Add requires-b2 check to top-level build file.

* Bump B2 require to 5.2

* Update copyright dates.

* Move inter-lib dependencies to a project variable and into the build targets.

* Update build deps.
2024-08-20 15:03:19 +02:00
Dirk Stolle
f56c4c65a8 tests: add test cases for wide character path conversions (#754) 2024-07-23 15:58:12 +02:00
Dirk Stolle
74ffdcb047 chore: fix some typos (#751) 2024-07-08 10:40:31 +02:00
Christoph Gringmuth
d6e67f38c5 fix: Normalize Gaussian 2D kernel. (#725) 2023-02-07 14:11:51 +01:00
Christoph Gringmuth
712b827edb fix: Convolution in convolve_2d (#723)
Fixes #722
2023-02-07 14:10:38 +01:00
Marco Langer
573ba132cd fix: broken build for midpoint_ellipse_rasterizer::draw_curve (#705)
* fix: ellipse_rasterizer draw_curve()
* moved ostream operator overload of point into test fixture file
2022-07-04 21:09:21 +02:00
Mateusz Łoskot
2409be4bd6 test: Add more basic cases for image class (#423)
This hopefully will begin extensive test suite for the image class to
maintain decent coverage for this major class of GIL.
2022-06-29 23:00:03 +02:00
Mateusz Łoskot
86ee473f51 test: Add virtual_2d_locator fixture; is_2d_traversable test case 2022-06-29 22:58:00 +02:00
Mateusz Łoskot
08e3e6dadb test: Add basic is_1d_traversable cases for image_view 2022-06-29 01:00:14 +02:00
Samuel Debionne
4dbf35a510 Add pmr image typedefs (#529)
* Add pmr image typedefs

* Swap allocators only if it propagate on container

* Do not call propagate_on_container_swap for C++14

Co-authored-by: Mateusz Łoskot <mateusz@loskot.net>
2022-06-28 07:35:27 +01:00
Mateusz Łoskot
ef9b89a93a test: Add test cases for image with empty dimensions (#702)
Test fix #649
2022-06-28 06:59:33 +01:00
Mateusz Łoskot
a0ac9fb4aa test: Case test_constructor_from_view was not called 2022-06-28 00:34:44 +02:00
Olzhas Zhumabek
3965f2ab99 Remove migrated files 2022-05-31 02:37:56 +06:00
Olzhas Zhumabek
b962a6a2db Edit Jamfile to new layout 2022-05-31 02:37:56 +06:00
Olzhas Zhumabek
48d7ebffe0 Move diffusion and Hough transform
Move anisotropic diffusion and
Hough transform into extension.
Adjust tests and cmakelists
2022-05-31 02:37:56 +06:00
Olzhas Zhumabek
bab2a370ff Fix Hough transform and move rasterization
Hough line transform had incorrect
rounding which lead to misleading message
2022-05-31 02:37:56 +06:00
Dirk Stolle
1be8c87c10 chore: do not use deprecated header in test or elsewhere (#675) 2022-05-18 23:25:36 +02:00
Marco Langer
3289fe0bc4 refactor: Unified operation names for pixel and channel operations (#655)
Renamed
- gil::pixel_multiply_t to gil::pixel_multiplies_t
- gil::pixel_divide_t to gil::pixel_divides_t

Closes #368
2022-04-30 23:53:41 +02:00
Dirk Stolle
4f83beb735 style: Remove trailing space characters (#651) 2022-04-26 20:52:56 +02:00
Samuel Debionne
da0655fb66 Merge pull request #621 from sdebionne/fix-620
Fix for_each_pixel for non 1d iterable views
2022-03-01 14:35:20 +01: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
Pranam Lashkari
199520179e Refactor CMake test config (#634) 2022-02-09 19:47:47 +05:30
Mateusz Łoskot
2db5fe9f44 Fix warning: unused variable ‘r_squared’ [-Wunused-variable] 2022-02-05 14:13:11 +01:00
Samuel Debionne
2cc525a2d6 Fix for_each_pixel for non 1d iterable views 2021-07-16 17:46:30 +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
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
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
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
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
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