spice namespace
Contains the entire public interface of the library.
Contents
- Reference
Namespaces
- namespace convolve
- Groups various convolution methods together.
- namespace function
- Contains implementations of commonly used mathematical functions.
- namespace helpers
- This namespace contains utility functionality like adapters between interfaces.
- namespace print
- This namespace exports utilities to print some of spice's types to the console.
- namespace statistics
- This namespace exports a number of functions for calculating statistics on images.
- namespace threshold
- Includes functions for determining thresholds as well as segmenting images according to a pre-determined threshold.
Classes
-
template<typename T = float, size_t Channels = 4>class color
-
template<typename T>class color_view
- Wrapper around color data of arbitrary length with arbitrary stride between channel samples.
-
template<typename T = float, size_t Channels = 4>class image
- Represents an image.
Functions
-
template<typename T, std::enable_if_t<std::is_signed_v<T>, int> = 0>auto min(T const& a, T const& b) -> T
- Returns the lesser of the given values.
-
template<typename T, std::enable_if_t<std::is_signed_v<T>, int> = 0>auto max(T const& a, T const& b) -> T
- Returns the greater of the given values.
-
template<typename T, std::enable_if_t<std::is_signed_v<T>, int> = 0>auto clamp(T const& val, T const& lo, T const& hi) -> T
- If v compares less than lo, returns lo; otherwise if hi compares less than v, returns hi; otherwise returns v.
-
template<typename T, size_t Channels>auto operator<<(std::ostream& os, color<T, Channels> const& pxl) -> std::ostream&
-
template<typename T>auto operator<<(std::ostream& os, color_
view<T> const& pxl) -> std::ostream&
Function documentation
#include <include/spice-lib/algorithm.hpp>
template<typename T, std::enable_if_t<std::is_signed_v<T>, int> = 0>
T spice:: min(T const& a,
T const& b)
Returns the lesser of the given values.
Template parameters | |
---|---|
T | |
Parameters | |
a | |
b | |
Returns | T |
#include <include/spice-lib/algorithm.hpp>
template<typename T, std::enable_if_t<std::is_signed_v<T>, int> = 0>
T spice:: max(T const& a,
T const& b)
Returns the greater of the given values.
Template parameters | |
---|---|
T | |
Parameters | |
a | |
b | |
Returns | T |
#include <include/spice-lib/algorithm.hpp>
template<typename T, std::enable_if_t<std::is_signed_v<T>, int> = 0>
T spice:: clamp(T const& val,
T const& lo,
T const& hi)
If v compares less than lo, returns lo; otherwise if hi compares less than v, returns hi; otherwise returns v.
Template parameters | |
---|---|
T | |
Returns | T |
template<typename T, size_t Channels>
std::ostream& spice:: operator<<(std::ostream& os,
color<T, Channels> const& pxl)
Specialized formatter for spice::
.
#include <include/spice-lib/color_view.hpp>
template<typename T>
std::ostream& spice:: operator<<(std::ostream& os,
color_ view<T> const& pxl)
Specialized formatter for spice::
.