Filter (View)
Include <mln/core/image/view/filter.hpp>
ima |
filter(ima, pred) |
||
---|---|---|---|
Category |
Forward |
X |
X |
Bidirectional |
X |
X |
|
Raw |
X |
||
Properties |
Writable |
X |
|
Accessible |
X |
X |
|
Indexable |
X |
X |
Examples
Keep all add values:
mln::image2d<int> input = { {0, 1, 2}, {3, 4, 5} };
auto g = mln::view::transform(input, [](int v) { return v % 2 != 0; });
mln::io::imprint(g);
Outputs:
0 1
3 5