Cast (View)
Include <mln/core/image/view/cast.hpp>
ima |
cast<T>(ima) |
||
---|---|---|---|
Category |
Forward |
X |
X |
Bidirectional |
X |
X |
|
Raw |
X |
||
Properties |
Writable |
X |
|
Accessible |
X |
X |
|
Indexable |
X |
X |
Examples
Double image to int:
mln::image2d<double> input = { {0.1, 1.1, 2.1}, {3.5, 4.5, 5.5} };
auto g = mln::view::cast<int>(input);
mln::io::imprint(g);
Outputs:
0 1 2
3 4 5