Commit 861a6e7b authored by Edwin Carlinet's avatar Edwin Carlinet
Browse files

fixup! Merge branch 'development/ranges' of gitlab.lrde.epita.fr:olena/pylene...

fixup! Merge branch 'development/ranges' of gitlab.lrde.epita.fr:olena/pylene into development/fix-dockers
parent 48a65127
......@@ -47,7 +47,7 @@ build-docker-automatic:
stage: test
script:
- mkdir build && cd build
- conan install .. -pr pylene_default --build missing
- conan install .. -pr pylene_default --build missing -e CXX=g++ -e CC=gcc
- cmake -G Ninja .. -DCMAKE_BUILD_TYPE=$PYLENE_CONFIGURATION -DPYLENE_CODE_COVERAGE=OFF -DSANITIZE_ADDRESS=$ASAN -DSANITIZE_MEMORY=$MSAN -DSANITIZE_UNDEFINED=$UBSAN $OTHER_CMAKE_ARGS
- cmake --build . --target build-fixtures --config $PYLENE_CONFIGURATION
- cmake --build . --target build-pylene --config $PYLENE_CONFIGURATION
......@@ -66,7 +66,7 @@ build-docker-automatic:
stage: test
script:
- mkdir build && cd build
- conan install .. -pr pylene_default --build missing
- conan install .. -pr pylene_default --build missing -e CXX=g++ -e CC=gcc
- cmake -G Ninja .. -DCMAKE_BUILD_TYPE=$PYLENE_CONFIGURATION -DPYLENE_CODE_COVERAGE=ON -DGCOV_PATH=$COV -DSANITIZE_ADDRESS=$ASAN -DSANITIZE_MEMORY=$MSAN -DSANITIZE_UNDEFINED=$UBSAN $OTHER_CMAKE_ARGS
- cmake --build . --target build-fixtures --config $PYLENE_CONFIGURATION
- cmake --build . --target build-pylene --config $PYLENE_CONFIGURATION
......@@ -204,7 +204,7 @@ distcheck-linux-clang8-debug-cov-asan-ubsan:
stage: bench
script:
- mkdir build && cd build
- conan install .. -pr $BUILD_PROFILE --build missing
- conan install .. -pr $BUILD_PROFILE --build missing -e CXX=g++ -e CC=gcc
- cmake -G Ninja .. -DCMAKE_BUILD_TYPE=$PYLENE_CONFIGURATION
- cmake --build . --target fetch-external-data --config $PYLENE_CONFIGURATION
- cmake --build . --target build-bench --config $PYLENE_CONFIGURATION
......@@ -261,7 +261,7 @@ distbench-linux-clang8-release:
stage: test
script:
- mkdir build && cd build
- conan install .. -pr pylene_default --build missing
- conan install .. -pr pylene_default --build missing -e CXX=g++ -e CC=gcc
- cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release
- cmake --build . --target build-doc --config Release
- mkdir ../public && mv doc/sphinx/* ../public/
......@@ -293,8 +293,8 @@ package:
dependencies: []
script:
- mkdir build && cd build
- conan install .. -pr pylene_default --build missing
- conan install .. -pr pylene_default --build missing -e CXX=g++ -e CC=gcc
- conan user carlinet -r lrde-public -p $CONAN_LRDE_API_KEY
- conan create .. --build missing $PACKAGE_NAME/$PACKAGE_VERSION@$CONAN_USER/$PACKAGE_TAG
- conan create .. --build missing -e CXX=g++ -e CC=gcc $PACKAGE_NAME/$PACKAGE_VERSION@$CONAN_USER/$PACKAGE_TAG
- conan upload -r lrde-public --all $PACKAGE_NAME/$PACKAGE_VERSION@$CONAN_USER/$PACKAGE_TAG
only: [ "dev", "development/ranges" ]
......@@ -10,7 +10,7 @@
#include <mln/core/algorithm/sort.hpp>
#include <mln/core/algorithm/transform.hpp>
#include <mln/core/colors.hpp>
#include <mln/core/image/image2d.hpp>
#include <mln/core/image/experimental/ndimage.hpp>
#include <algorithm>
#include <numeric>
......@@ -20,75 +20,75 @@ namespace baseline
{
template <class V>
void fill(mln::image2d<V>& ima, V value)
void fill(mln::experimental::image2d<V>& ima, V value)
{
std::ptrdiff_t stride = ima.index_strides()[0];
V* buffer = &ima.at(ima.domain().pmin);
std::size_t height = ima.nrows();
std::size_t width = ima.ncols();
std::ptrdiff_t stride = ima.stride();
V* buffer = ima.buffer();
int height = ima.height();
int width = ima.width();
for (std::size_t i = 0; i < height; ++i, buffer += stride)
for (int i = 0; i < height; ++i, buffer += stride)
std::fill(buffer, buffer + width, value);
}
template <class V>
void copy(const mln::image2d<V>& in, mln::image2d<V>& out)
void copy(const mln::experimental::image2d<V>& in, mln::experimental::image2d<V>& out)
{
std::ptrdiff_t istride = in.index_strides()[0];
std::ptrdiff_t ostride = out.index_strides()[0];
const V* ibuffer = &in.at(in.domain().pmin);
V* obuffer = &out.at(out.domain().pmin);
std::size_t height = in.nrows();
std::size_t width = in.ncols();
std::ptrdiff_t istride = in.stride();
std::ptrdiff_t ostride = out.stride();
const V* ibuffer = in.buffer();
V* obuffer = out.buffer();
int height = in.height();
int width = in.width();
assert(out.nrows() == height);
assert(out.ncols() == width);
assert(out.height() == height);
assert(out.width() == width);
for (std::size_t i = 0; i < height; ++i, ibuffer += istride, obuffer += ostride)
for (int i = 0; i < height; ++i, ibuffer += istride, obuffer += ostride)
std::copy(ibuffer, ibuffer + width, obuffer);
}
template <class V, class F>
std::ptrdiff_t count_if(const mln::image2d<V>& in, F f)
std::ptrdiff_t count_if(const mln::experimental::image2d<V>& in, F f)
{
std::ptrdiff_t istride = in.index_strides()[0];
const V* ibuffer = &in.at(in.domain().pmin);
std::size_t height = in.nrows();
std::size_t width = in.ncols();
std::ptrdiff_t istride = in.stride();
const V* ibuffer = in.buffer();
int height = in.height();
int width = in.width();
std::ptrdiff_t k = 0;
for (std::size_t i = 0; i < height; ++i, ibuffer += istride)
for (int i = 0; i < height; ++i, ibuffer += istride)
k += std::count_if(ibuffer, ibuffer + width, f);
return k;
}
template <class V>
std::ptrdiff_t count(const mln::image2d<V>& in, V v)
std::ptrdiff_t count(const mln::experimental::image2d<V>& in, V v)
{
std::ptrdiff_t istride = in.index_strides()[0];
const V* ibuffer = &in.at(in.domain().pmin);
std::size_t height = in.nrows();
std::size_t width = in.ncols();
std::ptrdiff_t istride = in.stride();
const V* ibuffer = in.buffer();
int height = in.height();
int width = in.width();
std::ptrdiff_t k = 0;
for (std::size_t i = 0; i < height; ++i, ibuffer += istride)
for (int i = 0; i < height; ++i, ibuffer += istride)
k += std::count(ibuffer, ibuffer + width, v);
return k;
}
template <class V>
bool equal(const mln::image2d<V>& lhs, const mln::image2d<V>& rhs)
bool equal(const mln::experimental::image2d<V>& lhs, const mln::experimental::image2d<V>& rhs)
{
std::ptrdiff_t lhs_stride = lhs.index_strides()[0];
std::ptrdiff_t rhs_stride = rhs.index_strides()[0];
const V* lhs_buffer = &lhs.at(lhs.domain().pmin);
const V* rhs_buffer = &rhs.at(lhs.domain().pmin);
std::size_t height = lhs.nrows();
std::size_t width = lhs.ncols();
for (std::size_t i = 0; i < height; ++i, lhs_buffer += lhs_stride, rhs_buffer += rhs_stride)
std::ptrdiff_t lhs_stride = lhs.stride();
std::ptrdiff_t rhs_stride = rhs.stride();
const V* lhs_buffer = lhs.buffer();
const V* rhs_buffer = rhs.buffer();
int height = lhs.height();
int width = lhs.width();
for (int i = 0; i < height; ++i, lhs_buffer += lhs_stride, rhs_buffer += rhs_stride)
if (!std::equal(lhs_buffer, lhs_buffer + width, rhs_buffer))
return false;
......@@ -96,72 +96,72 @@ namespace baseline
}
template <class V>
void paste(const mln::image2d<V>& in, mln::image2d<V>& out)
void paste(const mln::experimental::image2d<V>& in, mln::experimental::image2d<V>& out)
{
std::ptrdiff_t istride = in.index_strides()[0];
std::ptrdiff_t ostride = out.index_strides()[0];
const V* ibuffer = &in.at(in.domain().pmin);
V* obuffer = &out.at(in.domain().pmin);
std::size_t height = in.nrows();
std::size_t width = in.ncols();
std::ptrdiff_t istride = in.stride();
std::ptrdiff_t ostride = out.stride();
const V* ibuffer = in.buffer();
V* obuffer = out.buffer();
int height = in.height();
int width = in.width();
assert(out.nrows() == height);
assert(out.ncols() == width);
assert(out.height() == height);
assert(out.width() == width);
for (std::size_t i = 0; i < height; ++i, ibuffer += istride, obuffer += ostride)
for (int i = 0; i < height; ++i, ibuffer += istride, obuffer += ostride)
std::copy(ibuffer, ibuffer + width, obuffer);
}
template <class F, class U, class V>
void transform(const mln::image2d<U>& in, mln::image2d<V>& out, F f)
void transform(const mln::experimental::image2d<U>& in, mln::experimental::image2d<V>& out, F f)
{
std::ptrdiff_t istride = in.index_strides()[0];
std::ptrdiff_t ostride = out.index_strides()[0];
const U* ibuffer = &in.at(in.domain().pmin);
V* obuffer = &out.at(in.domain().pmin);
std::size_t height = in.nrows();
std::size_t width = in.ncols();
std::ptrdiff_t istride = in.stride();
std::ptrdiff_t ostride = out.stride();
const U* ibuffer = in.buffer();
V* obuffer = out.buffer();
int height = in.height();
int width = in.width();
assert(out.nrows() == height);
assert(out.ncols() == width);
assert(out.height() == height);
assert(out.width() == width);
for (std::size_t i = 0; i < height; ++i, ibuffer += istride, obuffer += ostride)
for (int i = 0; i < height; ++i, ibuffer += istride, obuffer += ostride)
std::transform(ibuffer, ibuffer + width, obuffer, f);
}
template <class F, class U>
void for_each(mln::image2d<U>& in, F f)
void for_each(mln::experimental::image2d<U>& in, F f)
{
std::ptrdiff_t istride = in.index_strides()[0];
U* ibuffer = &in.at(in.domain().pmin);
std::size_t height = in.nrows();
std::size_t width = in.ncols();
std::ptrdiff_t istride = in.stride();
U* ibuffer = in.buffer();
int height = in.height();
int width = in.width();
for (std::size_t i = 0; i < height; ++i, ibuffer += istride)
for (int i = 0; i < height; ++i, ibuffer += istride)
std::for_each(ibuffer, ibuffer + width, f);
}
template <class V, class Generator>
void generate(mln::image2d<V>& ima, Generator g)
void generate(mln::experimental::image2d<V>& ima, Generator g)
{
std::ptrdiff_t stride = ima.index_strides()[0];
V* buffer = &ima.at(ima.domain().pmin);
std::size_t height = ima.nrows();
std::size_t width = ima.ncols();
std::ptrdiff_t stride = ima.stride();
V* buffer = ima.buffer();
int height = ima.height();
int width = ima.width();
for (std::size_t i = 0; i < height; ++i, buffer += stride)
for (int i = 0; i < height; ++i, buffer += stride)
std::generate(buffer, buffer + width, g);
}
template <class U, class V, class BinaryOperator>
V accumulate(const mln::image2d<U>& ima, V init, BinaryOperator op)
V accumulate(const mln::experimental::image2d<U>& ima, V init, BinaryOperator op)
{
std::ptrdiff_t stride = ima.index_strides()[0];
const U* buffer = &ima.at(ima.domain().pmin);
std::size_t height = ima.nrows();
std::size_t width = ima.ncols();
std::ptrdiff_t stride = ima.stride();
const U* buffer = ima.buffer();
int height = ima.height();
int width = ima.width();
for (std::size_t i = 0; i < height; ++i, buffer += stride)
for (int i = 0; i < height; ++i, buffer += stride)
init = op(init, std::accumulate(buffer, buffer + width, init, op));
return init;
......@@ -169,37 +169,37 @@ namespace baseline
} // namespace baseline
void fill_baseline(mln::image2d<mln::uint8>& ima, mln::uint8 v)
void fill_baseline(mln::experimental::image2d<uint8_t>& ima, uint8_t v)
{
baseline::fill(ima, v);
}
void fill_baseline(mln::image2d<mln::rgb8>& ima, mln::rgb8 v)
void fill_baseline(mln::experimental::image2d<mln::rgb8>& ima, mln::rgb8 v)
{
baseline::fill(ima, v);
}
void fill(mln::image2d<mln::uint8>& ima, mln::uint8 v)
void fill(mln::experimental::image2d<uint8_t>& ima, uint8_t v)
{
mln::fill(ima, v);
}
void fill(mln::image2d<mln::rgb8>& ima, mln::rgb8 v)
void fill(mln::experimental::image2d<mln::rgb8>& ima, mln::rgb8 v)
{
mln::fill(ima, v);
}
void copy_baseline(const mln::image2d<mln::uint8>& in, mln::image2d<mln::uint8>& out)
void copy_baseline(const mln::experimental::image2d<uint8_t>& in, mln::experimental::image2d<uint8_t>& out)
{
baseline::copy(in, out);
}
void copy_baseline(const mln::image2d<mln::rgb8>& in, mln::image2d<mln::rgb8>& out)
void copy_baseline(const mln::experimental::image2d<mln::rgb8>& in, mln::experimental::image2d<mln::rgb8>& out)
{
baseline::copy(in, out);
}
void copy(const mln::image2d<mln::uint8>& in, mln::image2d<mln::uint8>& out)
void copy(const mln::experimental::image2d<uint8_t>& in, mln::experimental::image2d<uint8_t>& out)
{
mln::experimental::copy(in, out);
}
void copy(const mln::image2d<mln::rgb8>& in, mln::image2d<mln::rgb8>& out)
void copy(const mln::experimental::image2d<mln::rgb8>& in, mln::experimental::image2d<mln::rgb8>& out)
{
mln::experimental::copy(in, out);
}
......@@ -207,77 +207,77 @@ void copy(const mln::image2d<mln::rgb8>& in, mln::image2d<mln::rgb8>& out)
namespace
{
static auto is_uint8_15 = [](mln::uint8 v) { return v == 15; };
static auto is_uint8_15 = [](uint8_t v) { return v == 15; };
static auto is_rgb8_black = [](mln::rgb8 v) { return v == mln::rgb8{0, 0, 0}; };
} // namespace
std::ptrdiff_t count_if_baseline(const mln::image2d<mln::uint8>& in)
std::ptrdiff_t count_if_baseline(const mln::experimental::image2d<uint8_t>& in)
{
return baseline::count_if(in, is_uint8_15);
}
std::ptrdiff_t count_if_baseline(const mln::image2d<mln::rgb8>& in)
std::ptrdiff_t count_if_baseline(const mln::experimental::image2d<mln::rgb8>& in)
{
return baseline::count_if(in, is_rgb8_black);
}
std::ptrdiff_t count_if(const mln::image2d<mln::uint8>& in)
std::ptrdiff_t count_if(const mln::experimental::image2d<uint8_t>& in)
{
return mln::count_if(in, is_uint8_15);
}
std::ptrdiff_t count_if(const mln::image2d<mln::rgb8>& in)
std::ptrdiff_t count_if(const mln::experimental::image2d<mln::rgb8>& in)
{
return mln::count_if(in, is_rgb8_black);
}
std::ptrdiff_t count_baseline(const mln::image2d<mln::uint8>& in)
std::ptrdiff_t count_baseline(const mln::experimental::image2d<uint8_t>& in)
{
return baseline::count(in, mln::uint8(15));
return baseline::count(in, uint8_t(15));
}
std::ptrdiff_t count_baseline(const mln::image2d<mln::rgb8>& in)
std::ptrdiff_t count_baseline(const mln::experimental::image2d<mln::rgb8>& in)
{
return baseline::count(in, mln::rgb8{0, 0, 0});
}
std::ptrdiff_t count(const mln::image2d<mln::uint8>& in)
std::ptrdiff_t count(const mln::experimental::image2d<uint8_t>& in)
{
return mln::count(in, mln::uint8(15));
return mln::count(in, uint8_t(15));
}
std::ptrdiff_t count(const mln::image2d<mln::rgb8>& in)
std::ptrdiff_t count(const mln::experimental::image2d<mln::rgb8>& in)
{
return mln::count(in, mln::rgb8{0, 0, 0});
}
bool equal_baseline(const mln::image2d<mln::uint8>& lhs, const mln::image2d<mln::uint8>& rhs)
bool equal_baseline(const mln::experimental::image2d<uint8_t>& lhs, const mln::experimental::image2d<uint8_t>& rhs)
{
return baseline::equal(lhs, rhs);
}
bool equal_baseline(const mln::image2d<mln::rgb8>& lhs, const mln::image2d<mln::rgb8>& rhs)
bool equal_baseline(const mln::experimental::image2d<mln::rgb8>& lhs, const mln::experimental::image2d<mln::rgb8>& rhs)
{
return baseline::equal(lhs, rhs);
}
bool equal(const mln::image2d<mln::uint8>& lhs, const mln::image2d<mln::uint8>& rhs)
bool equal(const mln::experimental::image2d<uint8_t>& lhs, const mln::experimental::image2d<uint8_t>& rhs)
{
return mln::equal(lhs, rhs);
}
bool equal(const mln::image2d<mln::rgb8>& lhs, const mln::image2d<mln::rgb8>& rhs)
bool equal(const mln::experimental::image2d<mln::rgb8>& lhs, const mln::experimental::image2d<mln::rgb8>& rhs)
{
return mln::equal(lhs, rhs);
}
void paste_baseline(const mln::image2d<mln::uint8>& in, mln::image2d<mln::uint8>& out)
void paste_baseline(const mln::experimental::image2d<uint8_t>& in, mln::experimental::image2d<uint8_t>& out)
{
baseline::paste(in, out);
}
void paste_baseline(const mln::image2d<mln::rgb8>& in, mln::image2d<mln::rgb8>& out)
void paste_baseline(const mln::experimental::image2d<mln::rgb8>& in, mln::experimental::image2d<mln::rgb8>& out)
{
baseline::paste(in, out);
}
void paste(const mln::image2d<mln::uint8>& in, mln::image2d<mln::uint8>& out)
void paste(const mln::experimental::image2d<uint8_t>& in, mln::experimental::image2d<uint8_t>& out)
{
mln::paste(in, out);
}
void paste(const mln::image2d<mln::rgb8>& in, mln::image2d<mln::rgb8>& out)
void paste(const mln::experimental::image2d<mln::rgb8>& in, mln::experimental::image2d<mln::rgb8>& out)
{
mln::paste(in, out);
}
......@@ -289,37 +289,37 @@ namespace
static auto plus_one_inplace = [](auto& x) { x += 1; };
} // namespace
void transform_baseline(const mln::image2d<mln::uint8>& in, mln::image2d<mln::uint8>& out)
void transform_baseline(const mln::experimental::image2d<uint8_t>& in, mln::experimental::image2d<uint8_t>& out)
{
baseline::transform(in, out, plus_one);
}
void transform_baseline(const mln::image2d<mln::rgb8>& in, mln::image2d<mln::rgb8>& out)
void transform_baseline(const mln::experimental::image2d<mln::rgb8>& in, mln::experimental::image2d<mln::rgb8>& out)
{
baseline::transform(in, out, plus_one);
}
void transform(const mln::image2d<mln::uint8>& in, mln::image2d<mln::uint8>& out)
void transform(const mln::experimental::image2d<uint8_t>& in, mln::experimental::image2d<uint8_t>& out)
{
mln::transform(in, out, plus_one);
}
void transform(const mln::image2d<mln::rgb8>& in, mln::image2d<mln::rgb8>& out)
void transform(const mln::experimental::image2d<mln::rgb8>& in, mln::experimental::image2d<mln::rgb8>& out)
{
mln::transform(in, out, plus_one);
}
void for_each_baseline(mln::image2d<mln::uint8>& in)
void for_each_baseline(mln::experimental::image2d<uint8_t>& in)
{
baseline::for_each(in, plus_one_inplace);
}
void for_each_baseline(mln::image2d<mln::rgb8>& in)
void for_each_baseline(mln::experimental::image2d<mln::rgb8>& in)
{
baseline::for_each(in, plus_one_inplace);
}
void for_each(mln::image2d<mln::uint8>& in)
void for_each(mln::experimental::image2d<uint8_t>& in)
{
mln::for_each(in, plus_one_inplace);
}
void for_each(mln::image2d<mln::rgb8>& in)
void for_each(mln::experimental::image2d<mln::rgb8>& in)
{
mln::for_each(in, plus_one_inplace);
}
......@@ -332,11 +332,11 @@ namespace
} // namespace
void generate_baseline(mln::image2d<mln::uint8>& ima)
void generate_baseline(mln::experimental::image2d<uint8_t>& ima)
{
baseline::generate(ima, iota_generator);
}
void generate(mln::image2d<mln::uint8>& ima)
void generate(mln::experimental::image2d<uint8_t>& ima)
{
mln::generate(ima, iota_generator);
}
......@@ -344,29 +344,29 @@ void generate(mln::image2d<mln::uint8>& ima)
#include <mln/accu/accumulators/sum.hpp>
int accumulate_baseline(const mln::image2d<mln::uint8>& ima)
int accumulate_baseline(const mln::experimental::image2d<uint8_t>& ima)
{
return baseline::accumulate(ima, 0, std::plus<>{});
}
int accumulate(const mln::image2d<mln::uint8>& ima)
int accumulate(const mln::experimental::image2d<uint8_t>& ima)
{
return mln::accumulate(ima, 0, std::plus<>{});
}
int accumulate_accu(const mln::image2d<mln::uint8>& ima)
int accumulate_accu(const mln::experimental::image2d<uint8_t>& ima)
{
return mln::accumulate(ima, mln::accu::features::sum<int>());
}
std::vector<mln::point2d> sort_points(const mln::image2d<mln::uint8>& ima)
std::vector<mln::experimental::point2d> sort_points(const mln::experimental::image2d<uint8_t>& ima)
{
return mln::experimental::sort_points(ima);
}
std::vector<mln::point2d> sort_points(const mln::image2d<int>& ima)
std::vector<mln::experimental::point2d> sort_points(const mln::experimental::image2d<int>& ima)
{
return mln::experimental::sort_points(ima);
}
std::vector<mln::point2d> sort_points(const mln::image2d<mln::rgb8>& ima)
std::vector<mln::experimental::point2d> sort_points(const mln::experimental::image2d<mln::rgb8>& ima)
{
return mln::experimental::sort_points(ima, mln::lexicographicalorder_less<mln::rgb8>());
}
#include <mln/colors/rgba.hpp>
#include <mln/core/algorithm/clone.hpp>
#include <mln/core/algorithm/transform.hpp>
#include <mln/core/image/image2d.hpp>
#include <mln/io/imread.hpp>
#include <mln/core/colors.hpp>
#include <mln/core/image/experimental/ndimage.hpp>
#include <mln/io/experimental/imread.hpp>
#include <benchmark/benchmark.h>
void fill_baseline(mln::image2d<mln::uint8>& ima, mln::uint8 v);
void fill_baseline(mln::image2d<mln::rgb8>& ima, mln::rgb8 v);
void fill(mln::image2d<mln::uint8>& ima, mln::uint8 v);
void fill(mln::image2d<mln::rgb8>& ima, mln::rgb8 v);
void fill_baseline(mln::experimental::image2d<uint8_t>& ima, uint8_t v);
void fill_baseline(mln::experimental::image2d<mln::rgb8>& ima, mln::rgb8 v);
void fill(mln::experimental::image2d<uint8_t>& ima, uint8_t v);
void fill(mln::experimental::image2d<mln::rgb8>& ima, mln::rgb8 v);
void copy_baseline(const mln::image2d<mln::uint8>& in, mln::image2d<mln::uint8>& out);
void copy_baseline(const mln::image2d<mln::rgb8>& in, mln::image2d<mln::rgb8>& out);
void copy(const mln::image2d<mln::uint8>& in, mln::image2d<mln::uint8>& out);
void copy(const mln::image2d<mln::rgb8>& in, mln::image2d<mln::rgb8>& out);
void copy_baseline(const mln::experimental::image2d<uint8_t>& in, mln::experimental::image2d<uint8_t>& out);
void copy_baseline(const mln::experimental::image2d<mln::rgb8>& in, mln::experimental::image2d<mln::rgb8>& out);
void copy(const mln::experimental::image2d<uint8_t>& in, mln::experimental::image2d<uint8_t>& out);
void copy(const mln::experimental::image2d<mln::rgb8>& in, mln::experimental::image2d<mln::rgb8>& out);
std::ptrdiff_t count_if_baseline(const mln::image2d<mln::uint8>& in);
std::ptrdiff_t count_if_baseline(const mln::image2d<mln::rgb8>& in);
std::ptrdiff_t count_if(const mln::image2d<mln::uint8>& in);
std::ptrdiff_t count_if(const mln::image2d<mln::rgb8>& in);
std::ptrdiff_t count_if_baseline(const mln::experimental::image2d<uint8_t>& in);
std::ptrdiff_t count_if_baseline(const mln::experimental::image2d<mln::rgb8>& in);
std::ptrdiff_t count_if(const mln::experimental::image2d<uint8_t>& in);
std::ptrdiff_t count_if(const mln::experimental::image2d<mln::rgb8>& in);
std::ptrdiff_t count_baseline(const mln::image2d<mln::uint8>& in);
std::ptrdiff_t count_baseline(const mln::image2d<mln::rgb8>& in);
std::ptrdiff_t count(const mln::image2d<mln::uint8>& in);
std::ptrdiff_t count(const mln::image2d<mln::rgb8>& in);
std::ptrdiff_t count_baseline(const mln::experimental::image2d<uint8_t>& in);
std::ptrdiff_t count_baseline(const mln::experimental::image2d<mln::rgb8>& in);