namespace mrpt::img
Overview
Classes for image storage and manipulation.
namespace img { // namespaces namespace mrpt::img::camera_geometry; namespace mrpt::img::camera_geometry::distortion; namespace mrpt::img::detail; // typedefs typedef Eigen::Map<const Eigen::Matrix<uint8_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>, Eigen::Unaligned, Eigen::OuterStride<Eigen::Dynamic>> EigenGrayMapConst; typedef Eigen::Map<Eigen::Matrix<uint8_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>, Eigen::Unaligned, Eigen::OuterStride<Eigen::Dynamic>> EigenGrayMap; typedef TPixelCoordBase<int32_t> TPixelCoord; typedef TPixelCoord TImageSize; typedef TPixelCoordBase<float> TPixelCoordf; // enums enum DistortionModel; enum PixelDepth; enum TColormap; enum TImageChannels; enum TInterpolationMethod; enum VideoCodec; enum copy_type_t; enum ctor_CImage_ref_or_gray; // structs struct TColor; struct TColorf; template <typename T> struct TPixelCoordBase; // classes class CCanvas; class CExceptionExternalImageNotFound; class CImage; class CImagePyramid; class CMappedImage; class CStereoRectifyMap; class CUndistortMap; class CVideoFileWriter; class TCamera; class TStereoCamera; // global functions EigenGrayMapConst asEigenMap(const mrpt::img::CImage& img); EigenGrayMap asEigenMap(mrpt::img::CImage& img); mrpt::img::TColorf hsv2rgb(float h, float s, float v); std::tuple<float, float, float> rgb2hsv(float r, float g, float b); mrpt::img::TColorf colormap(const TColormap& color_map, float color_index); mrpt::img::TColorf jet2rgb(float color_index); mrpt::img::TColorf hot2rgb(float color_index); void registerAllClasses_mrpt_img(); bool operator == ( const mrpt::img::TCamera& a, const mrpt::img::TCamera& b ); bool operator != ( const mrpt::img::TCamera& a, const mrpt::img::TCamera& b ); std::ostream& operator << ( std::ostream& o, const TColor& c ); mrpt::serialization::CArchive& operator << ( mrpt::serialization::CArchive& o, const TColor& c ); mrpt::serialization::CArchive& operator >> ( mrpt::serialization::CArchive& i, TColor& c ); TColor operator + (const TColor& a, const TColor& b); TColor operator - (const TColor& a, const TColor& b); bool operator == ( const TColor& a, const TColor& b ); bool operator != ( const TColor& a, const TColor& b ); bool operator == ( const TColorf& a, const TColorf& b ); bool operator != ( const TColorf& a, const TColorf& b ); std::ostream& operator << ( std::ostream& o, const TColorf& c ); mrpt::serialization::CArchive& operator << ( mrpt::serialization::CArchive& o, const TColorf& c ); mrpt::serialization::CArchive& operator >> ( mrpt::serialization::CArchive& i, TColorf& c ); template <typename T> std::ostream& operator << (std::ostream& o, const TPixelCoordBase<T>& p); template std::ostream& operator <<<int > ( std::ostream&, const TPixelCoordBase<int>& ); template std::ostream& operator <<<unsigned > ( std::ostream&, const TPixelCoordBase<unsigned>& ); template std::ostream& operator <<<float > ( std::ostream&, const TPixelCoordBase<float>& ); template std::ostream& operator <<<double > ( std::ostream&, const TPixelCoordBase<double>& ); } // namespace img
Typedefs
typedef Eigen::Map<const Eigen::Matrix<uint8_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>, Eigen::Unaligned, Eigen::OuterStride<Eigen::Dynamic>> EigenGrayMapConst
Zero-copy read-only Eigen::Map<RowMajor uint8> over a grayscale CImage.
No memory is allocated; the Map shares the CImage buffer.
Requirements: img must be CH_GRAY, PixelDepth::D8U, and already loaded. The Map remains valid as long as img is alive and not resized.
Row stride is handled via Eigen::OuterStride so images with padding are also supported (though MRPT’s STB backend typically has no padding).
Global Functions
TColor operator + (const TColor& a, const TColor& b)
Pairwise addition of their corresponding RGBA members.
TColor operator - (const TColor& a, const TColor& b)
Pairwise substraction of their corresponding RGBA members.
template <typename T> std::ostream& operator << (std::ostream& o, const TPixelCoordBase<T>& p)
Prints TPixelCoordBase as “(x,y)”.