Operators (View)
Include <mln/core/image/view/operators.hpp>
Arithmetical
-
auto operator+(Scalar s, Image ima1)
Makes a view where for each pixel value evals to out(p) = ima1(p) + ima2(p)
Makes a view where for each pixel value evals to out(p) = ima1(p) + s.
Makes a view where for each pixel value evals to out(p) = s + ima1(p).
- Parameters:
ima1 – Input range
ima2 – Input range
s – Scalar value
mln::image2d<mln::rgb8> ima1 = ...; mln::image2d<mln::rgb8> ima2 = ...; auto g1 = ima1 + ima2; double s = 5.5; auto g1 = ima1 + s; auto g1 = s + ima1;
-
auto operator+(Scalar s, Image ima1)
-
auto operator-(Scalar s, Image ima1)
Makes a view where for each pixel value evals to out(p) = ima1(p) - ima2(p)
Makes a view where for each pixel value evals to out(p) = ima1(p) - s.
Makes a view where for each pixel value evals to out(p) = s - ima1(p).
- Parameters:
ima1 – Input range
ima2 – Input range
s – Scalar value
mln::image2d<mln::rgb8> ima1 = ...; mln::image2d<mln::rgb8> ima2 = ...; auto g1 = ima1 - ima2; double s = 5.5; auto g1 = ima1 - s; auto g1 = s - ima1;
-
auto operator-(Scalar s, Image ima1)
-
auto operator*(Scalar s, Image ima1)
Makes a view where for each pixel value evals to out(p) = ima1(p) * ima2(p)
Makes a view where for each pixel value evals to out(p) = ima1(p) * s.
Makes a view where for each pixel value evals to out(p) = s * ima1(p).
- Parameters:
ima1 – Input range
ima2 – Input range
s – Scalar value
mln::image2d<mln::rgb8> ima1 = ...; mln::image2d<mln::rgb8> ima2 = ...; auto g1 = ima1 * ima2; double s = 5.5; auto g1 = ima1 * s; auto g1 = s * ima1;
-
auto operator*(Scalar s, Image ima1)
-
auto operator/(Scalar s, Image ima1)
Makes a view where for each pixel value evals to out(p) = ima1(p) / ima2(p)
Makes a view where for each pixel value evals to out(p) = ima1(p) / s.
Makes a view where for each pixel value evals to out(p) = s / ima1(p).
- Parameters:
ima1 – Input range
ima2 – Input range
s – Scalar value
Warning
Mind the division by zero.
mln::image2d<mln::rgb8> ima1 = ...; mln::image2d<mln::rgb8> ima2 = ...; auto g1 = ima1 / ima2; double s = 5.5; auto g1 = ima1 / s; auto g1 = s / ima1;
-
auto operator/(Scalar s, Image ima1)
-
auto operator%(Scalar s, Image ima1)
Makes a view where for each pixel value evals to out(p) = ima1(p) % ima2(p)
Makes a view where for each pixel value evals to out(p) = ima1(p) % s.
Makes a view where for each pixel value evals to out(p) = s % ima1(p).
- Parameters:
ima1 – Input range
ima2 – Input range
s – Scalar value
mln::image2d<mln::rgb8> ima1 = ...; mln::image2d<mln::rgb8> ima2 = ...; auto g1 = ima1 % ima2; double s = 5.5; auto g1 = ima1 % s; auto g1 = s % ima1;
-
auto operator%(Scalar s, Image ima1)
Logical
-
auto operator&&(Scalar s, Image ima1)
Makes a view where for each pixel value evals to out(p) = ima1(p) && ima2(p)
Makes a view where for each pixel value evals to out(p) = ima1(p) && s.
Makes a view where for each pixel value evals to out(p) = s && ima1(p).
- Parameters:
ima1 – Input range
ima2 – Input range
s – Scalar value
mln::image2d<mln::rgb8> ima1 = ...; mln::image2d<mln::rgb8> ima2 = ...; auto g1 = ima1 && ima2; double s = 5.5; auto g1 = ima1 && s; auto g1 = s && ima1;
-
auto operator&&(Scalar s, Image ima1)
-
auto operator||(Scalar s, Image ima1)
Makes a view where for each pixel value evals to out(p) = ima1(p) || ima2(p)
Makes a view where for each pixel value evals to out(p) = ima1(p) || s.
Makes a view where for each pixel value evals to out(p) = s || ima1(p).
- Parameters:
ima1 – Input range
ima2 – Input range
s – Scalar value
mln::image2d<mln::rgb8> ima1 = ...; mln::image2d<mln::rgb8> ima2 = ...; auto g1 = ima1 || ima2; double s = 5.5; auto g1 = ima1 || s; auto g1 = s || ima1;
-
auto operator||(Scalar s, Image ima1)
Comparison
-
auto operator<(Scalar s, Image ima1)
Makes a view where for each pixel value evals to out(p) = ima1(p) < ima2(p)
Makes a view where for each pixel value evals to out(p) = ima1(p) < s.
Makes a view where for each pixel value evals to out(p) = s < ima1(p).
- Parameters:
ima1 – Input range
ima2 – Input range
s – Scalar value
mln::image2d<mln::rgb8> ima1 = ...; mln::image2d<mln::rgb8> ima2 = ...; auto g1 = ima1 < ima2; double s = 5.5; auto g1 = ima1 < s; auto g1 = s < ima1;
-
auto operator<(Scalar s, Image ima1)
-
auto operator<=(Scalar s, Image ima1)
Makes a view where for each pixel value evals to out(p) = ima1(p) <= ima2(p)
Makes a view where for each pixel value evals to out(p) = ima1(p) <= s.
Makes a view where for each pixel value evals to out(p) = s <= ima1(p).
- Parameters:
ima1 – Input range
ima2 – Input range
s – Scalar value
mln::image2d<mln::rgb8> ima1 = ...; mln::image2d<mln::rgb8> ima2 = ...; auto g1 = ima1 <= ima2; double s = 5.5; auto g1 = ima1 <= s; auto g1 = s <= ima1;
-
auto operator<=(Scalar s, Image ima1)
-
auto operator==(Scalar s, Image ima1)
Makes a view where for each pixel value evals to out(p) = ima1(p) == ima2(p)
Makes a view where for each pixel value evals to out(p) = ima1(p) == s.
Makes a view where for each pixel value evals to out(p) = s == ima1(p).
- Parameters:
ima1 – Input range
ima2 – Input range
s – Scalar value
mln::image2d<mln::rgb8> ima1 = ...; mln::image2d<mln::rgb8> ima2 = ...; auto g1 = ima1 == ima2; double s = 5.5; auto g1 = ima1 == s; auto g1 = s == ima1;
-
auto operator==(Scalar s, Image ima1)
-
auto equalFP(Scalar s, Image ima1, double eps)
Makes a view where for each pixel value evals to out(p) = abs(ima1(p) - ima2(p)) < eps
Makes a view where for each pixel value evals to out(p) = abs(ima1(p) - s) < eps.
Makes a view where for each pixel value evals to out(p) = abs(s - ima1(p)) < eps.
- Parameters:
ima1 – Input range
ima2 – Input range
s – Scalar value
eps – Epsilon precision
mln::image2d<mln::rgb8> ima1 = ...; mln::image2d<mln::rgb8> ima2 = ...; auto g1 = equalFP(ima1, ima2, 10e-6); double s = 5.5; auto g1 = equalFP(ima1, s, 10e-6); auto g1 = equalFP(s, ima1, 10e-6);
-
auto equalFP(Scalar s, Image ima1, double eps)
-
auto operator!=(Scalar s, Image ima1)
Makes a view where for each pixel value evals to out(p) = ima1(p) != ima2(p)
Makes a view where for each pixel value evals to out(p) = ima1(p) != s.
Makes a view where for each pixel value evals to out(p) = s != ima1(p).
- Parameters:
ima1 – Input range
ima2 – Input range
s – Scalar value
mln::image2d<mln::rgb8> ima1 = ...; mln::image2d<mln::rgb8> ima2 = ...; auto g1 = ima1 != ima2; double s = 5.5; auto g1 = ima1 != s; auto g1 = s != ima1;
-
auto operator!=(Scalar s, Image ima1)
-
auto operator>(Scalar s, Image ima1)
Makes a view where for each pixel value evals to out(p) = ima1(p) > ima2(p)
Makes a view where for each pixel value evals to out(p) = ima1(p) > s.
Makes a view where for each pixel value evals to out(p) = s > ima1(p).
- Parameters:
ima1 – Input range
ima2 – Input range
s – Scalar value
mln::image2d<mln::rgb8> ima1 = ...; mln::image2d<mln::rgb8> ima2 = ...; auto g1 = ima1 > ima2; double s = 5.5; auto g1 = ima1 > s; auto g1 = s > ima1;
-
auto operator>(Scalar s, Image ima1)
-
auto operator>=(Scalar s, Image ima1)
Makes a view where for each pixel value evals to out(p) = ima1(p) >= ima2(p)
Makes a view where for each pixel value evals to out(p) = ima1(p) >= s.
Makes a view where for each pixel value evals to out(p) = s >= ima1(p).
- Parameters:
ima1 – Input range
ima2 – Input range
s – Scalar value
mln::image2d<mln::rgb8> ima1 = ...; mln::image2d<mln::rgb8> ima2 = ...; auto g1 = ima1 >= ima2; double s = 5.5; auto g1 = ima1 >= s; auto g1 = s >= ima1;
-
auto operator>=(Scalar s, Image ima1)
Conditional
ima, ima1, ima2 |
+, -, *, /, %, <, <=, ==, !=, >, >= |
ifelse(ima, ima1, ima2) |
ifelse(ima, ima1, s_else) / ifelse(ima, s_if, ima2) / ifelse(ima, s_if, s_else) |
||
---|---|---|---|---|---|
Category |
Forward |
X |
X |
X |
X |
Bidirectional |
X |
X |
X |
X |
|
Raw |
X |
||||
Properties |
Writable |
X |
X |
||
Accessible |
X |
X |
X |
X |
|
Indexable |
X |
X |
X |
X |
Examples
TODO