22 #ifndef CRNIMAGE2DINTPOLARVECTOR_HEADER
23 #define CRNIMAGE2DINTPOLARVECTOR_HEADER
44 throw ExceptionDimension(
"Image<pixel::Cart2D<T>> MakeVector(const Image<T> &x, const Image<T> &y): images do not have the same size.");
46 for (
auto tmp :
Range(x))
47 res.
At(tmp) = {x.
At(tmp), y.
At(tmp)};
58 for (
auto tmp :
Range(img))
59 res.At(tmp) = img.At(tmp).rho;
70 for (
auto tmp :
Range(img))
71 res.At(tmp) = img.At(tmp).theta.value;
Abstract class for images.
ScalarRange< T > Range(T b, T e)
Creates a range [[b, e[[.
std::vector< pixel_type >::reference At(size_t x, size_t y) noexcept
Returns a reference to a pixel.
size_t GetHeight() const noexcept
Image< pixel::Cart2D< T > > MakeVector(const Image< T > &x, const Image< T > &y)
Image< typename Unit< T >::type > ThetaChannel(const Image< pixel::Polar2D< R, T >> &img)
size_t GetWidth() const noexcept
Image< R > RhoChannel(const Image< pixel::Polar2D< R, T >> &img)