libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Typedefs | Enumerations | Functions
crn Namespace Reference

Namespaces

 Combinatorics
 Combinatorics toolbox.
 
 Data
 
 FuzzyLogic
 Fuzzy logic toolbox.
 
 impl
 
 kmedoids
 k medoids
 
 LinearSystem
 Solvers for systems of linear equations.
 
 literals
 
 PDF
 
 pixel
 
 QuadraticEquation
 Solvers for quadratic equations.
 
 traits
 
 UnivariateRandomTools
 Univariate random toolbox class.
 
 xml
 

Classes

class  BasicClassify
 Basic classification tools. More...
 
class  ClassifResult
 A generic classification result. More...
 
class  DiscreteHMM
 Discrete HMM class. More...
 
struct  IsClonable< DiscreteHMM >
 
class  GaussianSCHMM
 Semi-continuous gaussian HMM class. More...
 
struct  IsClonable< GaussianSCHMM >
 
struct  CrossOver
 Crossover functor. More...
 
struct  GenerationCounter
 Simple counter to stop an genetic algorithm. More...
 
struct  FitnessThreshold
 Stops when the best individual has a fitness lower than a threshold. More...
 
struct  IterativeClustering
 A utility class to create clusters iteratively. More...
 
class  kMeans
 k-means clustering algorithm More...
 
class  IterativekNN
 Iterative kNN. More...
 
class  LazyDistanceMatrix
 Lazy computation of a distance matrix. More...
 
struct  AStarNode
 A node in an A* graph. More...
 
struct  AStarNodeC
 A node in an A* graph. More...
 
class  SpectralClustering
 Spectral clustering. More...
 
class  Block
 A block. More...
 
class  Config
 Global configuration utility class. More...
 
class  DataFactoryElementBase
 Base class for factory elements. More...
 
class  DataFactoryElement
 Factory element. More...
 
class  DataFactory
 Produces CRNData objects from XML. More...
 
class  Int
 Interface class for the metric real number class. More...
 
struct  IsSerializable< Int >
 
struct  IsClonable< Int >
 
struct  IsMetric< Int >
 
class  Map
 Data map class. More...
 
struct  IsSerializable< Map >
 
struct  IsClonable< Map >
 
class  Real
 Interface class for the metric real number class. More...
 
struct  IsSerializable< Real >
 
struct  IsClonable< Real >
 
struct  IsMetric< Real >
 
class  Vector
 Data vector class. More...
 
struct  IsSerializable< Vector >
 
struct  IsClonable< Vector >
 
struct  IsMetric< Vector >
 
class  Document
 Document utility class. More...
 
class  Exception
 Base class for exceptions. More...
 
class  ExceptionLogic
 A generic logic error. More...
 
class  ExceptionDomain
 A generic domain error. More...
 
class  ExceptionNotFound
 An item was not found in a container. More...
 
class  ExceptionInvalidArgument
 Invalid argument error (e.g.: nullptr pointer) More...
 
class  ExceptionDimension
 A dimension error. More...
 
class  ExceptionRuntime
 A generic runtime error. More...
 
class  ExceptionProtocol
 A protocol is not implemented. More...
 
class  ExceptionUninitialized
 Unintialized object error. More...
 
class  ExceptionTODO
 Something to be done. More...
 
class  ExceptionIO
 I/O error. More...
 
class  BlockTreeExtractor
 BlockTree extractor base class. More...
 
class  BlockTreeExtractorTextLinesFromProjection
 A class to extract text lines from a text block. More...
 
struct  IsSerializable< BlockTreeExtractorTextLinesFromProjection >
 
class  BlockTreeExtractorWordsFromProjection
 A class to extract words from a text line. More...
 
struct  IsSerializable< BlockTreeExtractorWordsFromProjection >
 
class  FeatureExtractor
 Feature extractor base class. More...
 
class  FeatureExtractorAngleRadialZoning
 AngleRadialZoning features extractor class. More...
 
struct  IsSerializable< FeatureExtractorAngleRadialZoning >
 
class  FeatureExtractorAngleZoning
 AngleZoning features extractor class. More...
 
struct  IsSerializable< FeatureExtractorAngleZoning >
 
class  FeatureExtractorOverlappingAngleHistogram
 OverlappingAngleHistogram features extractor class. More...
 
struct  IsSerializable< FeatureExtractorOverlappingAngleHistogram >
 
class  FeatureExtractorProfile
 Profile features extractor class. More...
 
struct  IsSerializable< FeatureExtractorProfile >
 
class  FeatureExtractorProjection
 Projection features extractor class. More...
 
struct  IsSerializable< FeatureExtractorProjection >
 
class  FeatureSet
 Feature vector class. More...
 
struct  IsSerializable< FeatureSet >
 
struct  GradientModel
 Gradient descriptor. More...
 
class  GradientShapeContext
 Gradient shape context factory. More...
 
class  Point2D
 A 2D point class. More...
 
class  Point2DDouble
 A 2D point class. More...
 
struct  IsSerializable< Point2DDouble >
 
struct  IsClonable< Point2DDouble >
 
class  Point2DInt
 A 2D point class. More...
 
struct  IsSerializable< Point2DInt >
 
struct  IsClonable< Point2DInt >
 
class  Point3D
 A 3D point class. More...
 
class  Rect
 A rectangle class. More...
 
struct  IsSerializable< Rect >
 
struct  IsClonable< Rect >
 
class  Stroke
 A list of points. More...
 
struct  IsSerializable< Stroke >
 
struct  IsClonable< Stroke >
 
struct  ColorModel
 Class for a color model of an image. More...
 
class  Differential
 Differential computation on images. More...
 
class  ImageBase
 Base class for images. More...
 
struct  BoolNotBool
 
struct  BoolNotBoolDummy
 
struct  BoolNotBool< bool >
 
class  Image
 Abstract class for images. More...
 
class  ImageGradient
 Gradient image in polar form. More...
 
class  Gray2BW
 Binarization action. More...
 
class  Gray2BWThreshold
 Threshold binarization action. More...
 
class  Gray2BWNiblack
 Niblack binarization action. More...
 
class  Gray2BWSauvola
 Sauvola binarization action. More...
 
class  Gray2BWkMeansHisto
 k-means histo binarization action More...
 
class  Gray2BWLocalMin
 Local min binarization action. More...
 
class  Gray2BWLocalMax
 Local max binarization action. More...
 
class  Gray2BWFisher
 Fisher binarization action. More...
 
class  Gray2BWEntropy
 Entropy binarization action. More...
 
class  Gray2BWOtsu
 Otsu binarization action. More...
 
struct  IsSerializable< Gray2BW >
 
struct  IsSerializable< Gray2BWThreshold >
 
struct  IsSerializable< Gray2BWNiblack >
 
struct  IsSerializable< Gray2BWSauvola >
 
struct  IsSerializable< Gray2BWkMeansHisto >
 
struct  IsSerializable< Gray2BWLocalMin >
 
struct  IsSerializable< Gray2BWLocalMax >
 
struct  IsSerializable< Gray2BWFisher >
 
struct  IsSerializable< Gray2BWEntropy >
 
struct  IsSerializable< Gray2BWOtsu >
 
class  RGB2Gray
 RGB to grayscale conversion action. More...
 
class  RGB2GrayRed
 Red pixels extraction action. More...
 
class  RGB2GrayGreen
 Green pixels extraction action. More...
 
class  RGB2GrayBlue
 Blue pixels extraction action. More...
 
class  RGB2GraySaturation
 Saturation pixels extraction action. More...
 
class  RGB2GrayValue
 Value pixels extraction action. More...
 
class  RGB2GrayY
 Y pixels extraction action. More...
 
class  RGB2GrayL
 L pixels extraction action. More...
 
class  RGB2GrayLPrime
 LPrime pixels extraction action. More...
 
struct  IsSerializable< RGB2Gray >
 
struct  IsSerializable< RGB2GrayRed >
 
struct  IsSerializable< RGB2GrayGreen >
 
struct  IsSerializable< RGB2GrayBlue >
 
struct  IsSerializable< RGB2GraySaturation >
 
struct  IsSerializable< RGB2GrayValue >
 
struct  IsSerializable< RGB2GrayY >
 
struct  IsSerializable< RGB2GrayL >
 
struct  IsSerializable< RGB2GrayLPrime >
 
struct  TypeInfo< pixel::RGB< I > >
 
struct  TypeInfo< pixel::HSV >
 
struct  TypeInfo< pixel::Cart2D< I > >
 
struct  TypeInfo< pixel::Polar2D< I, J > >
 
struct  TypeInfo< pixel::YUV >
 
class  SummedAreaTable
 A summed area table. More...
 
class  ConsoleMessenger
 Class to print messages to the console. More...
 
class  FileMessenger
 Class to print messages to a file. More...
 
class  FileShield
 A mutex manager for file access. More...
 
class  IO
 General purpose IO class. More...
 
class  Messenger
 Base class for an object that prints messages. More...
 
class  Path
 A convenience class for file paths. More...
 
struct  IsSerializable< Path >
 
struct  IsClonable< Path >
 
class  TextFile
 A text file. More...
 
class  Cartesian2DFunction
 Base class for 2D functions. More...
 
class  CubicSpline
 Cubic spline interpolation. More...
 
struct  IsClonable< CubicSpline >
 
class  LinearInterpolation
 Linear interpolation. More...
 
struct  IsSerializable< LinearInterpolation >
 
struct  IsClonable< LinearInterpolation >
 
class  Matrix
 Base matrix class. More...
 
struct  TypeInfo< Matrix< I > >
 
class  MatrixComplex
 Complex matrix class. More...
 
struct  IsClonable< MatrixComplex >
 
struct  TypeInfo< MatrixComplex >
 
class  MatrixDouble
 double matrix class More...
 
struct  IsSerializable< MatrixDouble >
 
struct  IsClonable< MatrixDouble >
 
struct  TypeInfo< MatrixDouble >
 
class  MatrixInt
 Integer matrix class. More...
 
struct  IsClonable< MatrixInt >
 
struct  TypeInfo< MatrixInt >
 
class  MultivariateGaussianMixture
 Multivariate gaussian mixture. More...
 
struct  IsClonable< MultivariateGaussianMixture >
 
class  MultivariateGaussianPDF
 Multivariate Gaussian distribution. More...
 
struct  IsClonable< MultivariateGaussianPDF >
 
class  MultivariateRandomTools
 Multivariate random toolbox class. More...
 
class  PolynomialRegression
 Polynomial regression. More...
 
struct  IsClonable< PolynomialRegression >
 
class  Prop3
 A ternary proposition. More...
 
struct  IsSerializable< Prop3 >
 
struct  IsClonable< Prop3 >
 
class  RealToRealFunction
 Numerical integration toolbox class. More...
 
struct  IsClonable< RealToRealFunction >
 
class  SquareMatrixDouble
 Square double matrix class. More...
 
struct  IsSerializable< SquareMatrixDouble >
 
struct  IsClonable< SquareMatrixDouble >
 
struct  TypeInfo< SquareMatrixDouble >
 
struct  Radian
 Radian angle unit. More...
 
struct  Degree
 Degree angle unit. More...
 
struct  ByteAngle
 BYTE angle unit. More...
 
struct  Angle
 A convenience class for angles units. More...
 
class  UnivariateGaussianMixture
 Univariate Gaussian mixture. More...
 
struct  IsSerializable< UnivariateGaussianMixture >
 
struct  IsClonable< UnivariateGaussianMixture >
 
class  UnivariateGaussianPDF
 Univariate Gaussian distribution. More...
 
struct  IsSerializable< UnivariateGaussianPDF >
 
struct  IsClonable< UnivariateGaussianPDF >
 
class  Object
 
struct  IsPOSet
 
struct  IsMetric
 
struct  IsMetric< Object >
 
struct  IsMetric< UObject >
 
struct  IsMetric< SObject >
 
struct  IsMagma
 
struct  IsGroup
 
struct  IsRing
 
struct  IsVectorOverR
 
struct  IsAlgebra
 
struct  IsField
 
struct  IsSerializable
 
struct  IsSerializable< Object >
 
struct  IsClonable
 
struct  IsClonable< Object >
 
struct  IsSavable
 
class  Serializer
 
class  Cloner
 
class  Ruler
 
class  Savable
 complex base abstract class More...
 
class  Histogram
 Mother class for integer histograms. More...
 
struct  IsSerializable< Histogram >
 
struct  IsClonable< Histogram >
 
struct  IsMetric< Histogram >
 
class  PCA
 Class to perform Principal Componant Analysis. More...
 
struct  IsSerializable< PCA >
 
struct  IsClonable< PCA >
 
class  String
 A UTF32 character string class. More...
 
struct  IsClonable< String >
 
struct  IsSerializable< String >
 
struct  IsMetric< String >
 
class  StringUTF8
 A character string class. More...
 
struct  IsSerializable< StringUTF8 >
 
struct  IsClonable< StringUTF8 >
 
struct  TypeInfo
 A class containing informations on a type. More...
 
class  ScalarRange
 A class that represents scalar values in [[b, e[[. More...
 
class  Destroyer
 An objects that calls a functor when destroyed. More...
 
class  CharsetConverter
 Character set converter. More...
 
class  ConfigElement
 A element of configuration. More...
 
class  ConfigurationFile
 Configuration file management utility class. More...
 
class  Action
 Base functor class. More...
 
class  DefaultAction
 A class containing functors. More...
 
class  ModuleManager
 A dynamic module manager. More...
 
class  Option
 A class to store an optional value. More...
 
struct  IsSerializable< PDF::Attributes >
 
struct  IsClonable< PDF::Attributes >
 
class  Progress
 Base class for a progress display. More...
 
class  ConsoleProgress
 Progress display in console. More...
 
class  RWLock
 A lock that allows multiple readers or one exclusive writer. More...
 
class  Timer
 A class to measure time. More...
 
class  UTFConverter
 Utility class to convert Unicode strings. More...
 
struct  CVMatType
 
struct  CVMatType< uint8_t >
 
struct  CVMatType< int8_t >
 
struct  CVMatType< uint16_t >
 
struct  CVMatType< int16_t >
 
struct  CVMatType< int32_t >
 
struct  CVMatType< float >
 
struct  CVMatType< double >
 
struct  CVMatType< crn::pixel::RGB< T > >
 
struct  CVMatType< crn::pixel::HSV >
 
struct  CVMatType< crn::pixel::Cart2D< T > >
 
struct  CVMatType< crn::pixel::XYZ >
 
struct  CVMatType< crn::pixel::YUV >
 
struct  CVMatType< crn::pixel::Lab >
 
struct  CVMatType< crn::pixel::Luv >
 

Typedefs

using SImage = std::shared_ptr< ImageBase >
 
using SCImage = std::shared_ptr< const ImageBase >
 
using WImage = std::weak_ptr< ImageBase >
 
using WCImage = std::weak_ptr< const ImageBase >
 
using UImage = std::unique_ptr< ImageBase >
 
using UCImage = std::unique_ptr< const ImageBase >
 
using ImageBW = Image< pixel::BW >
 Black and white image class. More...
 
using ImageGray = Image< uint8_t >
 Grayscale image class. More...
 
using ImageIntGray = Image< int >
 Int grayscale image class. More...
 
using ImageDoubleGray = Image< double >
 double Grayscale image class More...
 
using ImageRGB = Image< pixel::RGB< uint8_t >>
 Color image class. More...
 
using ImageIntRGB = Image< pixel::RGB< int >>
 Color image class. More...
 
using ImageHSV = Image< pixel::HSV >
 Color image class. More...
 
using ImageYUV = Image< pixel::YUV >
 Color image class. More...
 
using Image2DIntVector = Image< pixel::Cart2D< int >>
 2D int vector image class More...
 
using Image2DIntPolarVector = Image< pixel::Polar2D< unsigned int, Angle< ByteAngle >>>
 2D int polar vector image class More...
 
using ImageAngle = Image< typename ByteAngle::type >
 Angle image class. More...
 
using ImageXYZ = Image< pixel::XYZ >
 XYZ image class. More...
 
using ImageLab = Image< pixel::Lab >
 Color image class. More...
 
using ImageLuv = Image< pixel::Luv >
 Color image class. More...
 
template<class ANGLE >
using Unit = typename ANGLE::unit
 
template<typename T >
using SumType = typename TypeInfo< T >::SumType
 
template<typename T >
using DiffType = typename TypeInfo< T >::DiffType
 
template<typename T >
using DecimalType = typename TypeInfo< T >::DecimalType
 

Enumerations

enum  GenerationStrategy { GenerationStrategy::KEEP_BEST_PARENT, GenerationStrategy::KEEP_BEST_PARENTS_AND_CHILDREN }
 
enum  Direction {
  Direction::INVALID = 0, Direction::LEFT = 1, Direction::RIGHT = 2, Direction::TOP = 4,
  Direction::BOTTOM = 8
}
 An enumeration of directions. More...
 
enum  Orientation { Orientation::INVALID = 0, Orientation::HORIZONTAL, Orientation::VERTICAL }
 An enumeration of orientations. More...
 
enum  DistanceType { DistanceType::INVALID = 0, DistanceType::D4, DistanceType::D8, DistanceType::EUCLIDEAN }
 An enumeration of distances. More...
 
enum  ConfigurationType { ConfigurationType::USER, ConfigurationType::APP }
 

Functions

template<typename ITER , typename std::enable_if< std::is_copy_assignable< typename std::iterator_traits< ITER >::value_type >::value &&std::is_assignable< typename std::add_lvalue_reference< typename std::decay< typename std::iterator_traits< ITER >::value_type >::type >::type, int >::value &&traits::HasLT< typename std::iterator_traits< ITER >::value_type >::value &&IsVectorOverR< typename std::iterator_traits< ITER >::value_type >::value, int >::type = 0>
std::pair< typename
std::iterator_traits< ITER >
::value_type, typename
std::iterator_traits< ITER >
::value_type > 
TwoMeans (ITER beg, ITER en, double stop_crit=0.00001)
 2-means clustering algorithm for scalar data More...
 
template<typename ITER >
std::pair< typename
std::iterator_traits< ITER >
::value_type, typename
std::iterator_traits< ITER >
::value_type > 
TwoMeans (ITER beg, ITER en, typename std::iterator_traits< ITER >::value_type p1, typename std::iterator_traits< ITER >::value_type p2, double stop_crit=0.00001) noexcept(std::is_nothrow_constructible< typename std::iterator_traits< ITER >::value_type >::value &&std::is_nothrow_copy_assignable< typename std::iterator_traits< ITER >::value_type >::value)
 2-means clustering algorithm for scalar data More...
 
std::tuple< double,
std::vector< std::pair< size_t,
size_t > > > 
Hungarian (const std::vector< std::vector< double >> &distmat)
 
std::tuple< double,
std::vector< std::pair< size_t,
size_t > > > 
Hungarian (const SquareMatrixDouble &distmat)
 
template<typename ITER , typename BREEDING_FUNC , typename EVAL_FUNC , typename STOP_FUNC , typename URNG = std::default_random_engine>
std::multimap< double,
typename std::iterator_traits
< ITER >::value_type > 
Genetic (ITER b, ITER e, BREEDING_FUNC breed, EVAL_FUNC evaluate, STOP_FUNC stop, GenerationStrategy keep_parents=GenerationStrategy::KEEP_BEST_PARENT, URNG &&rng=std::default_random_engine{size_t(std::chrono::system_clock::now().time_since_epoch().count())})
 
template<typename DATA , typename DISTANCE >
LazyDistanceMatrix< DATA,
DISTANCE > 
MakeLazyDistanceMatrix (const std::vector< DATA > &d, DISTANCE &&dist)
 Helper to avoid typing long type names. More...
 
std::vector< double > ComputeLOF (const SquareMatrixDouble &distmat, size_t k)
 Compute the Local Outlier Factor for each element from the distance matrix. More...
 
std::vector< double > ComputeLOF (const std::vector< std::vector< double >> &distmat, size_t k)
 Compute the Local Outlier Factor for each element from the distance matrix. More...
 
std::vector< double > ComputeLoOP (const SquareMatrixDouble &distmat, size_t k, double lambda)
 compute the local outlier probability for each element from the distance matrix More...
 
std::vector< double > ComputeLoOP (const std::vector< std::vector< double >> &distmat, size_t k, double lambda)
 compute the local outlier probability for each element from the distance matrix More...
 
template<typename ITER >
std::vector< double > AngularOutliersE (ITER beg, ITER en)
 Outlier E statistics of a set of angles (Mardia, Statistics of directional data (with discussion), 1975) More...
 
template<typename ITER >
std::vector< double > AngularOutliersC (ITER beg, ITER en)
 Outlier C statistics of a set of angles (Collett, Outliers in circular data. Appl. Statist., 29, 50-57., 1980) More...
 
template<typename Node , typename StepCostFunc , typename DistanceEstimationFunc , typename NeighborFunc , typename std::enable_if<!traits::HasLT< Node >::value, int >::type = 0>
std::vector< Node > AStar (const Node &first, const Node &last, const StepCostFunc &stepcost, const DistanceEstimationFunc &heuristic, const NeighborFunc &get_neighbors)
 A* path finding. More...
 
double Distance (const Int &i1, const Int &i2) noexcept
 
void Swap (Map &m1, Map &m2) noexcept
 
double Distance (const Real &r1, const Real &r2) noexcept
 
double Distance (const Vector &v1, const Vector &v2)
 Distance between two vectors. More...
 
size_t Size (const Vector &v) noexcept
 Size of a vector. More...
 
void Swap (Vector &v1, Vector &v2) noexcept
 Swaps two vectors. More...
 
size_t Size (const Document &doc) noexcept
 Number of views in a document. More...
 
template<typename T >
double Distance (const Point2D< T > &p1, const Point2D< T > &p2, DistanceType dt=DistanceType::EUCLIDEAN)
 
std::vector< Point2DIntMakeSegment (const Point2DInt &p_begin, const Point2DInt &p_end)
 Make a segment between two points. More...
 
size_t Size (const Stroke &s) noexcept
 Size of a stroke. More...
 
UImage NewImageFromFile (const Path &fname)
 Loads an image from a file. More...
 
BoolNotBoolDummy operator+ (const BoolNotBoolDummy &, const BoolNotBoolDummy &)
 
BoolNotBoolDummy operator- (const BoolNotBoolDummy &, const BoolNotBoolDummy &)
 
BoolNotBoolDummy operator* (const BoolNotBoolDummy &, const BoolNotBoolDummy &)
 
BoolNotBoolDummy operator/ (const BoolNotBoolDummy &, const BoolNotBoolDummy &)
 
template<typename T >
bool IsBitonal (const Image< T > &img)
 Is the image binary (black & white)? More...
 
template<typename T , typename CMP = std::less<T>>
std::pair< T, T > MinMax (const Image< T > &img, CMP cmp=CMP{})
 Returns min and max pixel values. More...
 
template<typename T >
Rect AutoCrop (const Image< T > &img, const T &bgval)
 Estimates the ideal crop for the image. More...
 
template<typename T >
Image< T > MakeAutoCrop (const Image< T > &img, const T &bgval)
 Creates a new image as the ideal crop for the image. More...
 
template<typename T , typename Y >
Point2DInt CrossCorrelation (const Image< T > &img1, const Image< Y > &img2, T fill1=T(0), Y fill2=Y(0))
 Best match between two images. More...
 
template<typename IMG , typename T >
IMG Downgrade (const Image< T > &img)
 Converts the image to a type that has a smaller pixel range. More...
 
template<typename T >
SummedAreaTable< SumType< T > > MakeSummedAreaTable (const Image< T > &img)
 Creates a summed area table of the image. More...
 
template<typename T >
Image< T > MakeRotation (const Image< T > &img, const Angle< Degree > &angle, const T &bgColor)
 Creates a rotated version of the image. More...
 
template<typename T >
Image< T > Make90Rotation (const Image< T > &img)
 Creates a rotated version of the image. More...
 
template<typename T >
Image< T > Make180Rotation (const Image< T > &img)
 Creates a rotated version of the image. More...
 
template<typename T >
Image< T > Make270Rotation (const Image< T > &img)
 Creates a rotated version of the image. More...
 
template<typename T >
auto Size (const Image< T > &img) noexcept(noexcept(img.Size())) -> decltype(img.Size())
 
UImageRGB NewImageRGBFromFile (const Path &fname)
 Loads an image from a file and converts it if necessary. More...
 
UImageGray NewImageGrayFromFile (const Path &fname)
 Loads an image from a file and converts it if necessary. More...
 
UImageBW NewImageBWFromFile (const Path &fname)
 Loads an image from a file and converts it if necessary. More...
 
template<typename IMG , typename T >
IMG Downgrade (const Image< pixel::RGB< T >> &img)
 
template<typename T >
Image< pixel::Cart2D< T > > MakeVector (const Image< T > &x, const Image< T > &y)
 
template<typename R , typename T >
Image< R > RhoChannel (const Image< pixel::Polar2D< R, T >> &img)
 
template<typename R , typename T >
Image< typename Unit< T >::type > ThetaChannel (const Image< pixel::Polar2D< R, T >> &img)
 
ImageRGB ColorWheel (const ImageAngle &img)
 Transforms an angle image into a RGB image. More...
 
Histogram LeftProfile (const ImageBW &img)
 Computes the left profile. More...
 
Histogram RightProfile (const ImageBW &img)
 Computes the right profile. More...
 
Histogram TopProfile (const ImageBW &img)
 Computes the top profile. More...
 
Histogram BottomProfile (const ImageBW &img)
 Computes the bottom profile. More...
 
Histogram HorizontalProjection (const ImageBW &img)
 Computes the horizontal projection. More...
 
Histogram VerticalProjection (const ImageBW &img)
 Computes the vertical projection. More...
 
Histogram VerticalSlantedProjection (const ImageBW &img, const Angle< Radian > &theta)
 Computes the vertical projection after rotation. More...
 
double MeanBlackRun (const ImageBW &img) noexcept
 Gets the mean horizontal black run. More...
 
double MeanWhiteRun (const ImageBW &img, int blackrun=-1) noexcept
 Gets the mean horizontal white run. More...
 
double MeanBlackVRun (const ImageBW &img) noexcept
 Gets the mean vertical black run. More...
 
size_t CountBlackPixels (const ImageBW &img) noexcept
 Returns the number of black pixels. More...
 
size_t CountWhitePixels (const ImageBW &img) noexcept
 Returns the number of white pixels. More...
 
size_t Regularize (ImageBW &img, size_t min_neighbors=0)
 Removes isolated pixels and smooths edges. More...
 
ImageIntGray DistanceTransform (const ImageBW &img, const MatrixInt &m1, const MatrixInt &m2)
 Creates an image containing the distance transform. More...
 
 CRN_ALIAS_SMART_PTR (ImageBW)
 
 CRN_ALIAS_SMART_PTR (ImageGray)
 
 CRN_ALIAS_SMART_PTR (ImageIntGray)
 
 CRN_ALIAS_SMART_PTR (ImageDoubleGray)
 
 CRN_ALIAS_SMART_PTR (Image2DIntVector)
 
 CRN_ALIAS_SMART_PTR (Image2DIntPolarVector)
 
void Sqrt (ImageDoubleGray &img) noexcept
 Replaces the pixels with their square root. More...
 
template<typename T >
void Abs (Image< T > &img, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr) noexcept
 Replaces each pixel by its absolute value. More...
 
void AutoContrast (ImageGray &img)
 
template<typename T >
Histogram MakeHistogram (const Image< T > &img, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
Histogram MakeHistogram (const ImageGray &img)
 Creates an histogram from the pixels. More...
 
Histogram HorizontalProjection (const ImageGray &img)
 Computes the horizontal projection. More...
 
Histogram VerticalProjection (const ImageGray &img)
 Computes the vertical projection. More...
 
template<typename T >
size_t StrokesWidth (const Image< T > &img, size_t maxval=50, size_t defaultval=0, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
template<typename T >
size_t StrokesHeight (const Image< T > &img, size_t maxval=50, size_t defaultval=0, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
size_t EstimateLinesXHeight (const ImageGray &img, unsigned int xdiv=16)
 Computes the mean text line x-height. More...
 
size_t EstimateLeading (const ImageGray &img)
 Computes the median distance between two baselines. More...
 
Angle< RadianEstimateSkew (const ImageGray &img)
 Estimates the mean skew of the document's lines. More...
 
template<typename T >
ImageRGB RandomColors (const Image< T > &img, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
template<typename T , typename CMP = std::less<T>>
ImageBW Threshold (const Image< T > &img, T thresh, CMP cmp=std::less< T >{})
 
template<typename T >
ImageBW Niblack (const Image< T > &img, size_t halfwin, double k=0.5, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
template<typename T >
ImageBW Sauvola (const Image< T > &img, size_t halfwin, double k=0.5, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
template<typename T >
ImageBW kMeansHisto (const Image< T > &img, size_t classes, size_t black_classes, size_t maxcnt=10000, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
template<typename T >
ImageBW LocalMin (const Image< T > &img, size_t area=1, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
template<typename T >
ImageBW LocalMax (const Image< T > &img, size_t area=1, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
template<typename T >
ImageBW Fisher (const Image< T > &img, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
template<typename T >
ImageBW Entropy (const Image< T > &img, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
template<typename T >
ImageBW Otsu (const Image< T > &img, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
ImageBW MakeImageBW (const ImageGray &img)
 
ImageAngle HChannel (const ImageHSV &img)
 Create an image from the hue channel. More...
 
ImageGray SChannel (const ImageHSV &img)
 Create an image from the saturation channel. More...
 
ImageGray VChannel (const ImageHSV &img)
 Create an image from the value channel. More...
 
ImageGray RedChannel (const ImageHSV &img)
 Create an image from the red channel. More...
 
ImageGray GreenChannel (const ImageHSV &img)
 Create an image from the green channel. More...
 
ImageGray BlueChannel (const ImageHSV &img)
 Create an image from the blue channel. More...
 
ImageDoubleGray LChannel (const ImageLab &img)
 
ImageDoubleGray AChannel (const ImageLab &img)
 
ImageDoubleGray BChannel (const ImageLab &img)
 
ImageDoubleGray UChannel (const ImageLuv &img)
 
void EdgePreservingFilter (ImageRGB &img, size_t iter, uint8_t maxdist=30)
 Smooths and enhances the contrast. More...
 
template<typename T >
Image< T > RedChannel (const Image< pixel::RGB< T >> &img)
 
template<typename T >
Image< T > GreenChannel (const Image< pixel::RGB< T >> &img)
 
template<typename T >
Image< T > BlueChannel (const Image< pixel::RGB< T >> &img)
 
ImageGray SChannel (const ImageRGB &img)
 Computes the saturation (S) channel. More...
 
template<typename T >
Image< T > VChannel (const Image< pixel::RGB< T >> &img)
 
template<typename T >
Image< T > YChannel (const Image< pixel::RGB< T >> &img)
 
template<typename T >
Image< T > LChannel (const Image< pixel::RGB< T >> &img)
 
ImageGray LPrime (const ImageRGB &img)
 Computes the pseudo-luminance (U') channel. More...
 
ImageGray PseudoSaturation (const ImageRGB &img)
 Computes the pseudo-saturation channel. More...
 
ImageGray MakeImageGray (const ImageRGB &img)
 
ImageDoubleGray YChannel (const ImageYUV &img)
 
Path operator+ (const Path &s1, const Path &s2)
 Adds two paths. More...
 
Path operator/ (const Path &s1, const Path &s2)
 Adds two paths and insert directory separator between them if needed. More...
 
size_t Size (Path &p) noexcept
 Size of a path. More...
 
void Swap (Path &p1, Path &p2) noexcept
 Swaps two paths. More...
 
template<typename T >
const T & Max (const T &a, const T &b)
 Returns the max of two values. More...
 
template<typename T >
const T & Min (const T &a, const T &b)
 Returns the min of two values. More...
 
template<typename T >
const T & Max (const T &a, const T &b, const T &c)
 Returns the max of three values. More...
 
template<typename T >
const T & Min (const T &a, const T &b, const T &c)
 Returns the min of three values. More...
 
template<typename T >
constexpr TypeInfo< T >::SumType Twice (const T &v) noexcept(noexcept(v+v))
 Returns the double of a value. More...
 
template<typename T >
constexpr TypeInfo< T >::SumType Thrice (const T &v) noexcept(noexcept(v+v))
 Returns three times a value. More...
 
template<typename T >
constexpr int SignOf (const T &x) noexcept(noexcept(x< 0))
 Returns the sign (-1 or 1) of a value. More...
 
template<typename T >
constexpr SumType< T > Sqr (const T &v) noexcept(noexcept(v *v))
 Returns the square of a value. More...
 
template<typename T >
constexpr T Abs (const T &v) noexcept(noexcept(v< 0)&&noexcept(-v))
 Returns the absolute value of a value. More...
 
template<typename T >
Abs (const std::complex< T > &v) noexcept(noexcept(std::abs(std::complex< T >(0))))
 Returns the absolute value of a value. More...
 
template<typename T >
AbsMax (const T &a, const T &b) noexcept(noexcept(Abs(a)))
 Returns the value that has the maximal absolute value. More...
 
template<typename T >
AbsMin (const T &a, const T &b) noexcept(noexcept(Abs(a)))
 Returns the value that has the minimal absolute value. More...
 
template<typename T >
AbsMaxSameSign (const T &a, const T &b) noexcept(noexcept(Abs(a))&&noexcept(SignOf(a)))
 Returns the value that has the maximal absolute value if the values have the same sign. More...
 
template<typename T >
AbsMinSameSign (const T &a, const T &b) noexcept(noexcept(Abs(a))&&noexcept(SignOf(a)))
 Returns the value that has the minimal absolute value if the values have the same sign. More...
 
template<typename T >
const T & Cap (const T &v, const T &min, const T &max)
 Bounds a value to an interval. More...
 
double Gauss (double x, double sigma)
 Computes Gauss function at x for a given standard deviation (centered in 0) More...
 
double MeanGauss (double x, double sigma)
 Computes Gauss function at x for a given standard deviation (centered in 0) – to use with matrices. More...
 
double Pythagoras (double a, double b) noexcept
 Computes sqrt(a²+b²) without destructive underflow or overflow. More...
 
double Pythagoras (int a, int b) noexcept
 Computes sqrt(a²+b²) without destructive underflow or overflow. More...
 
double Pythagoras (double a, double b, double c) noexcept
 Computes sqrt(a²+b²+c²) More...
 
template<class ITER >
double Pythagoras (ITER it_begin, ITER it_end)
 Computes euclidean norm. More...
 
template<class ITER >
void Scale (ITER it_begin, ITER it_end, const double s)
 Scale a collection of numbers. More...
 
template<typename Unit >
Direction ToDirection (const Angle< Unit > &ang) noexcept
 
Orientation ToOrientation (Direction d) noexcept
 
template<typename T , typename std::enable_if< std::is_arithmetic< T >::value, int >::type = 0>
double Distance (T o1, T o2)
 Distance between two numbers. More...
 
template<typename T >
Matrix< T > operator+ (const Matrix< T > &m1, const Matrix< T > &m2)
 
template<typename T >
Matrix< T > operator+ (Matrix< T > &&m1, const Matrix< T > &m2)
 
template<typename T >
Matrix< T > operator+ (const Matrix< T > &m1, Matrix< T > &&m2)
 
template<typename T >
Matrix< T > operator- (const Matrix< T > &m1, const Matrix< T > &m2)
 
template<typename T >
Matrix< T > operator- (Matrix< T > &&m1, const Matrix< T > &m2)
 
template<typename T >
Matrix< T > operator* (const Matrix< T > &m, double d)
 
template<typename T >
Matrix< T > operator* (Matrix< T > &&m, double d)
 
template<typename T >
Matrix< T > operator* (double d, const Matrix< T > &m)
 
template<typename T >
Matrix< T > operator* (double d, Matrix< T > &&m)
 
template<typename T >
Matrix< T > operator/ (const Matrix< T > &m, double d)
 
template<typename T >
Matrix< T > operator/ (Matrix< T > &&m, double d)
 
template<typename T >
Matrix< T > operator/ (double d, const Matrix< T > &m)
 
template<typename T >
Matrix< T > operator/ (double d, Matrix< T > &&m)
 
template<typename T >
Matrix< T > operator* (const Matrix< T > &m1, const Matrix< T > &m2)
 
template<typename T >
Matrix< T > operator* (Matrix< T > &&m1, const Matrix< T > &m2)
 
void FFT (std::vector< std::complex< double > > &sig, bool direct)
 Fast Fourier transform. More...
 
void FFT (MatrixComplex &m, bool direct)
 Fast Fourier transform. More...
 
template<typename Unit >
double Cosine (typename Unit::type angle) noexcept
 Cosine of an angle. More...
 
template<typename Unit >
double Sine (typename Unit::type angle) noexcept
 Sine of an angle. More...
 
template<typename Unit >
double Tangent (typename Unit::type angle) noexcept
 Tangent of an angle. More...
 
template<>
double Cosine< ByteAngle > (uint8_t angle) noexcept
 Cosine of a byte angle using a lookup table. More...
 
template<>
double Sine< ByteAngle > (uint8_t angle) noexcept
 Sine of a byte angle using a lookup table. More...
 
template<>
double Tangent< ByteAngle > (uint8_t angle) noexcept
 Tangent of a byte angle using a lookup table. More...
 
template<typename Unit >
Angle< Unitoperator+ (const Angle< Unit > &a1, const Angle< Unit > &a2) noexcept(std::is_nothrow_constructible< typename Unit::type >::value &&std::is_nothrow_copy_assignable< typename Unit::type >::value)
 Adds two angles. More...
 
template<typename Unit >
Angle< Unitoperator- (const Angle< Unit > &a1, const Angle< Unit > &a2) noexcept(std::is_nothrow_constructible< typename Unit::type >::value &&std::is_nothrow_copy_assignable< typename Unit::type >::value)
 Subtracts two angles. More...
 
template<typename Unit >
Angle< Unitoperator* (double f, const Angle< Unit > &a) noexcept(std::is_nothrow_constructible< typename Unit::type >::value &&std::is_nothrow_copy_assignable< typename Unit::type >::value)
 Multiplies an scalar with an angle. More...
 
template<class A >
double Cos (const A &a) noexcept
 
double Cos (double a) noexcept
 
double Cos (uint8_t a) noexcept
 
template<class A >
double Sin (const A &a) noexcept
 
double Sin (double a) noexcept
 
double Sin (uint8_t a) noexcept
 
template<class A >
double Tan (const A &a) noexcept
 
double Tan (double a) noexcept
 
double Tan (uint8_t a) noexcept
 
template<class A >
Atan (double s, double c) noexcept
 
template<>
double Atan< double > (double s, double c) noexcept
 
template<typename Unit >
Unit::type AngularDistance (const Angle< Unit > &a1, const Angle< Unit > &a2) noexcept(std::is_nothrow_constructible< typename TypeInfo< typename Unit::type >::DiffType >::value &&std::is_nothrow_copy_assignable< typename TypeInfo< typename Unit::type >::DiffType >::value &&std::is_nothrow_constructible< typename Unit::type >::value)
 Distance between two angles. More...
 
double AngularDistance (double a1, double a2) noexcept
 Distance between two angles. More...
 
template<typename ITER >
std::iterator_traits< ITER >
::value_type 
AngularMean (ITER beg, ITER en)
 Mean of a set of angles. More...
 
template<typename ITER >
ITER AngularMedian (ITER beg, ITER en)
 Mean of a set of angles. More...
 
template<typename ITER >
double AngularVariance (ITER beg, ITER en)
 Variance of a set of angles. More...
 
template<typename ITER >
double AngularVariance (ITER beg, ITER en, typename std::iterator_traits< ITER >::value_type mean)
 Variance of a set of angles. More...
 
template<typename ITER >
double CircularVariance (ITER beg, ITER en)
 Circular (pseudo) variance of a set of angles. More...
 
template<typename ITER >
double CircularStdDev (ITER beg, ITER en)
 Circular (pseudo) standard deviation of a set of angles. More...
 
template<typename ITER >
std::complex< double > TrigonometricMoment (ITER beg, ITER en, typename std::iterator_traits< ITER >::value_type refer, size_t p)
 Trigonometric moment. More...
 
template<typename ITER >
double AngularSkewness (ITER beg, ITER en)
 Skewness of a set of angles. More...
 
template<typename ITER >
double AngularKurtosis (ITER beg, ITER en)
 Kurtosis of a set of angles. More...
 
UObject Clone (const Object &obj)
 Clones an object if possible. More...
 
UObject Clone (const UCObject &obj)
 
UObject Clone (const SCObject &obj)
 
std::unique_ptr< IntClone (int i)
 
std::unique_ptr< RealClone (double d)
 
std::unique_ptr< Prop3Clone (bool b)
 
template<typename T , typename U >
std::unique_ptr< T > CloneAs (const U &obj)
 
void Deserialize (Object &obj, xml::Element &el)
 Reads an object from XML if possible. More...
 
void Deserialize (const UObject &obj, xml::Element &el)
 
void Deserialize (const SObject &obj, xml::Element &el)
 
xml::Element Serialize (const Object &obj, xml::Element &parent)
 Writes an object to XML if possible. More...
 
xml::Element Serialize (const UCObject &obj, xml::Element &parent)
 
xml::Element Serialize (const SCObject &obj, xml::Element &parent)
 
double Distance (const Object &o1, const Object &o2)
 Distance between two objects. More...
 
double Distance (const UCObject &o1, const UCObject &o2)
 Distance between two objects. More...
 
double Distance (const SCObject &o1, const SCObject &o2)
 Distance between two objects. More...
 
double Distance (const Histogram &h1, const Histogram &h2)
 
size_t Size (const Histogram &h) noexcept
 Size of an histogram. More...
 
template<typename T >
Max (const std::vector< T > &v)
 Data analysis. More...
 
template<typename T >
Max (const std::vector< std::vector< T >> &m)
 Returns max. More...
 
template<typename T >
Min (const std::vector< T > &v)
 Returns min. More...
 
template<typename T >
Min (const std::vector< std::vector< T >> &m)
 Returns min. More...
 
template<typename T >
std::tuple< T, T > MinMax (const std::vector< T > &v)
 Returns min and max. More...
 
template<typename T >
std::tuple< T, T > MinMax (const std::vector< std::vector< T >> &m)
 Returns min and max. More...
 
template<typename T >
size_t Argmax (const std::vector< T > &v)
 Return index of a maximal. More...
 
template<typename T >
size_t Argmin (const std::vector< T > &v)
 Return index of a minimal. More...
 
template<typename T >
size_t ColumnArgmax (const std::vector< std::vector< T >> &m, size_t col)
 Return index of a maximal on a column. More...
 
template<typename T >
size_t ColumnArgmin (const std::vector< std::vector< T >> &m, size_t col)
 Return index of a minimal on a column. More...
 
double Mean (const std::vector< double > &v)
 Return mean value of sample. More...
 
template<typename ITER >
std::iterator_traits< ITER >
::value_type 
Mean (ITER be, ITER en)
 Return mean value of sample. More...
 
template<typename ITER >
double MeanAsDouble (ITER be, ITER en)
 Return mean value of sample as a double value. More...
 
std::vector< double > MeanPattern (const std::vector< std::vector< double >> &m)
 Return mean pattern of sample. More...
 
template<typename ITER >
std::vector< double > MeanPattern (ITER it_begin, ITER it_end)
 
double StdDeviation (const std::vector< double > &v)
 Return deviation of sample. More...
 
double Variance (const std::vector< double > &v)
 Return variance of sample. More...
 
std::vector< std::vector
< double > > 
MakeCovariance (const std::vector< std::vector< double >> &m)
 Return covariance for sample. More...
 
template<typename ITER >
std::vector< std::vector
< double > > 
MakeCovariance (ITER it_begin, ITER it_end)
 
std::tuple< double, double,
double > 
MeanVarDev (const std::vector< double > &v)
 Return mean, variance and standard deviation of sample. More...
 
template<typename ITER >
std::tuple< double, double,
double > 
MeanVarDev (ITER it_begin, ITER it_end)
 
std::vector< double > Quantiles (const std::vector< double > &v, size_t q, bool sort_flag=true)
 Return quantile values of sample. More...
 
template<typename T >
MedianValue (const std::vector< T > &v)
 Median value. More...
 
template<typename T >
bool AllEqual (const std::vector< T > &v)
 Test if all data values are equal. More...
 
template<typename T >
bool AllEqual (const std::vector< std::vector< T >> &m)
 Test if all data values are equal. More...
 
Histogram MakeHistogram (const std::vector< double > &v, size_t nb_bins)
 Returns count histogram. More...
 
Histogram MakeHistogramSquareRoot (const std::vector< double > &v)
 Returns count histogram (#bins = sqrt(pop) ) More...
 
Histogram MakeHistogramSturges (const std::vector< double > &v)
 Returns count histogram (#bins = 1+log_2(pop) ) More...
 
Histogram MakeHistogramRice (const std::vector< double > &v)
 Returns count histogram (#bins = 2n^(1/3) ) More...
 
Histogram MakeHistogramScott (const std::vector< double > &v)
 Returns count histogram (bin width = 3.5 * stddev / pop^(1/3)) More...
 
Histogram MakeHistogramFreedmanDiaconis (const std::vector< double > &v, bool sort_flag=true)
 Returns count histogram (bin width = 2 * IQR(v) / pop^(1/3)) More...
 
UnivariateGaussianMixture MakeGaussianMixtureModel (const std::vector< double > &v, size_t nb_seeds=2)
 Return Gaussian mixture model modeling current (univariate) sample. More...
 
MultivariateGaussianMixture MakeGaussianMixtureModel (const std::vector< std::vector< double >> &patterns, size_t nb_seeds=2)
 Return Gaussian mixture model modeling current (multivariate) sample. More...
 
wint_t ToWUpper (wint_t c)
 Transforms a character to its upper case. More...
 
wint_t ToWLower (wint_t c)
 Transforms a character to its lower case. More...
 
bool operator== (const StringUTF8 &s1, const StringUTF8 &s2)
 Tests equality of two strings. More...
 
bool operator!= (const StringUTF8 &s1, const StringUTF8 &s2)
 Tests inequality of two strings. More...
 
bool operator< (const StringUTF8 &s1, const StringUTF8 &s2)
 Compares two strings. More...
 
bool operator> (const StringUTF8 &s1, const StringUTF8 &s2)
 Compares two strings. More...
 
bool operator<= (const StringUTF8 &s1, const StringUTF8 &s2)
 Compares two strings. More...
 
bool operator>= (const StringUTF8 &s1, const StringUTF8 &s2)
 Compares two strings. More...
 
StringUTF8 operator+ (const StringUTF8 &s1, const StringUTF8 &s2)
 Adds two strings. More...
 
void Swap (StringUTF8 &s1, StringUTF8 &s2) noexcept
 Swaps two strings. More...
 
size_t Size (const StringUTF8 &s) noexcept
 Size of a string. More...
 
template<typename P , typename std::enable_if< traits::IsDereferenceable< P >::value, int >::type = 0>
std::pointer_traits< P >
::element_type & 
Dereference (const P &p)
 
template<typename P , typename std::enable_if<!traits::IsDereferenceable< P >::value, int >::type = 0>
const P & Dereference (const P &p)
 
template<typename P , typename std::enable_if<!traits::IsDereferenceable< P >::value, int >::type = 0>
P & Dereference (P &p)
 
template<typename T , typename std::enable_if< std::is_constructible< T, int >::value, int >::type = 0>
Zero (const T &)
 Returns an object of the same type that represents 0. More...
 
template<class T >
auto Size (const T &cont) noexcept(noexcept(cont.size())) -> decltype(cont.size())
 Returns the size of a container. More...
 
template<typename T >
ScalarRange< T > Range (T b, T e)
 Creates a range [[b, e[[. More...
 
template<typename T >
auto Range (const T &cont) -> ScalarRange< decltype(Size(cont))>
 Creates a range [[0, cont.size()[[. More...
 
template<typename T >
ScalarRange< int64_t > ReverseRange (const T &cont)
 Creates a range ]]cont.size(), 0]]. More...
 
template<typename T , typename std::enable_if<!std::is_lvalue_reference< T >::value, int >::type = 0>
std::shared_ptr< T > MoveShared (T &&v)
 
template<typename T , typename std::enable_if<!std::is_lvalue_reference< T >::value, int >::type = 0>
std::unique_ptr< T > MoveUnique (T &&v)
 
template<typename T >
cv::Mat WrapCVMat (crn::Image< T > &img)
 Wraps an image to an OpenCV matrix. More...
 
bool operator== (const String &s1, const String &s2)
 Tests equality of two strings. More...
 
bool operator!= (const String &s1, const String &s2)
 Tests inequality of two strings. More...
 
bool operator< (const String &s1, const String &s2)
 Compares two strings. More...
 
bool operator> (const String &s1, const String &s2)
 Compares two strings. More...
 
bool operator<= (const String &s1, const String &s2)
 Compares two strings. More...
 
bool operator>= (const String &s1, const String &s2)
 Compares two strings. More...
 
String operator+ (const String &s1, const String &s2)
 Adds two strings. More...
 
double Distance (const String &s1, const String &s2)
 Distance between two strings. More...
 
void Swap (String &s1, String &s2) noexcept
 Swaps two strings. More...
 
size_t Size (const String &s) noexcept
 Size of a string. More...
 
enum  AProClusters { AProClusters::MEDIUM, AProClusters::LOW }
 Strategies to limit the number of classes in affinity propagation. More...
 
std::pair< std::vector< size_t >
, std::vector< size_t > > 
AffinityPropagation (const SquareMatrixDouble &distance_matrix, AProClusters nclusters, double damping=0.5, size_t stable_iters_stop=10, size_t max_iter=100)
 Computes clusters and their prototypes. More...
 
std::pair< std::vector< size_t >
, std::vector< size_t > > 
AffinityPropagation (const SquareMatrixDouble &distance_matrix, double preference, double damping=0.5, size_t stable_iters_stop=10, size_t max_iter=100)
 Computes clusters and their prototypes. More...
 
std::pair< std::vector< size_t >
, std::vector< size_t > > 
AffinityPropagation (const SquareMatrixDouble &distance_matrix, const std::vector< double > &preference, double damping=0.5, size_t stable_iters_stop=10, size_t max_iter=100)
 Computes clusters and their prototypes. More...
 

Detailed Description

Enumeration Type Documentation

Enumerator
USER 
APP 

Definition at line 33 of file CRNConfigurationFile.h.

Enumerator
KEEP_BEST_PARENT 
KEEP_BEST_PARENTS_AND_CHILDREN 

Definition at line 33 of file CRNGenetic.h.

Function Documentation

template<typename ITER >
std::vector<double> crn::AngularOutliersC ( ITER  beg,
ITER  en 
)

Outlier C statistics of a set of angles (Collett, Outliers in circular data. Appl. Statist., 29, 50-57., 1980)

The higher the value, the most outlying is the sample.

Exceptions
ExceptionDomainempty set of angles
Parameters
[in]begiterator on the first angle
[in]eniterator after the last angle
Returns
the C statistics of the set

Definition at line 83 of file CRNOutliers.h.

template<typename ITER >
std::vector<double> crn::AngularOutliersE ( ITER  beg,
ITER  en 
)

Outlier E statistics of a set of angles (Mardia, Statistics of directional data (with discussion), 1975)

The lower the value, the most outlying is the sample.

Exceptions
ExceptionDomainempty set of angles
Parameters
[in]begiterator on the first angle
[in]eniterator after the last angle
Returns
the E statistics of the set

Definition at line 55 of file CRNOutliers.h.

template<typename Node , typename StepCostFunc , typename DistanceEstimationFunc , typename NeighborFunc , typename std::enable_if<!traits::HasLT< Node >::value, int >::type = 0>
std::vector< Node > crn::AStar ( const Node &  first,
const Node &  last,
const StepCostFunc &  stepcost,
const DistanceEstimationFunc &  heuristic,
const NeighborFunc &  get_neighbors 
)

A* path finding.

A* path finding for comparable data.

Searches the best path between two nodes with a heuristic.

Parameters
[in]firststart node
[in]lastend node
[in]stepcostcomputes the cost from a node to one of its neighbors: double stepcost(const Node&, const Node&)
[in]heuristicestimates the cost from a node to another: double heuristic(const Node&, const Node&)
[in]get_neighborsreturns the list of neighbors to a node: std::vector<Node> get_neighbors(const Node&)
Returns
a vector of Nodes containing the shortest path or an empty vector if no path was found.
Author
Yann LEYDIER
Date
June 2012
Version
0.1

Searches the best path between two comparable nodes with a heuristic.

Parameters
[in]firststart node
[in]lastend node
[in]stepcostcomputes the cost from a node to one of its neighbors: double stepcost(const Node&, const Node&)
[in]heuristicestimates the cost from a node to another: double heuristic(const Node&, const Node&)
[in]get_neighborsreturns the list of neighbors to a node: std::vector<Node> get_neighbors(const Node&)
Returns
a vector of Nodes containing the shortest path or an empty vector if no path was found.
Author
Yann LEYDIER
Date
June 2012
Version
0.1

Definition at line 67 of file CRNPathFinding.h.

UObject crn::Clone ( const Object obj)

Clones an object if possible.

Clones an object if possible

Exceptions
ExceptionProtocolnot a clonable object

Definition at line 35 of file CRNObject.cpp.

UObject crn::Clone ( const UCObject &  obj)

Clones an object if possible

Exceptions
ExceptionUninitializednull object
ExceptionProtocolnot a clonable object

Definition at line 44 of file CRNObject.cpp.

UObject crn::Clone ( const SCObject &  obj)

Clones an object if possible

Exceptions
ExceptionUninitializednull object
ExceptionProtocolnot a clonable object

Definition at line 55 of file CRNObject.cpp.

UInt crn::Clone ( int  i)

Definition at line 62 of file CRNObject.cpp.

UReal crn::Clone ( double  d)

Definition at line 67 of file CRNObject.cpp.

UProp3 crn::Clone ( bool  b)

Definition at line 72 of file CRNObject.cpp.

template<typename T , typename U >
std::unique_ptr<T> crn::CloneAs ( const U &  obj)
inline

Definition at line 53 of file CRNObject.h.

crn::CRN_ALIAS_SMART_PTR ( ImageBW  )
crn::CRN_ALIAS_SMART_PTR ( ImageGray  )
crn::CRN_ALIAS_SMART_PTR ( ImageIntGray  )
crn::CRN_ALIAS_SMART_PTR ( ImageDoubleGray  )
crn::CRN_ALIAS_SMART_PTR ( Image2DIntVector  )
crn::CRN_ALIAS_SMART_PTR ( Image2DIntPolarVector  )
template<typename P , typename std::enable_if<!traits::IsDereferenceable< P >::value, int >::type = 0>
const P& crn::Dereference ( const P &  p)

Definition at line 199 of file CRNType.h.

void crn::Deserialize ( Object obj,
xml::Element el 
)

Reads an object from XML if possible.

Reads an object from XML if possible

Exceptions
ExceptionProtocolnot a serializable object

Definition at line 80 of file CRNObject.cpp.

void crn::Deserialize ( const UObject &  obj,
xml::Element el 
)

Reads an object from XML if possible

Exceptions
ExceptionUninitializednull object
ExceptionProtocolnot a serializable object

Definition at line 89 of file CRNObject.cpp.

void crn::Deserialize ( const SObject &  obj,
xml::Element el 
)

Reads an object from XML if possible

Exceptions
ExceptionUninitializednull object
ExceptionProtocolnot a serializable object

Definition at line 100 of file CRNObject.cpp.

double crn::Distance ( const Object o1,
const Object o2 
)

Distance between two objects.

Distance between two objects

Exceptions
ExceptionProtocolnot a metric object

Definition at line 138 of file CRNObject.cpp.

double crn::Distance ( const UCObject &  o1,
const UCObject &  o2 
)

Distance between two objects.

Distance between two objects

Exceptions
ExceptionUninitializednull object
ExceptionProtocolnot a metric object

Definition at line 147 of file CRNObject.cpp.

double crn::Distance ( const SCObject &  o1,
const SCObject &  o2 
)

Distance between two objects.

Distance between two objects

Exceptions
ExceptionUninitializednull object
ExceptionProtocolnot a metric object

Definition at line 158 of file CRNObject.cpp.

double crn::Distance ( const Int &  i1,
const Int &  i2 
)
inlinenoexcept

Definition at line 78 of file CRNInt.h.

double crn::Distance ( const Real &  r1,
const Real &  r2 
)
inlinenoexcept

Definition at line 78 of file CRNReal.h.

template<typename T >
double crn::Distance ( const Point2D< T > &  p1,
const Point2D< T > &  p2,
DistanceType  dt = DistanceType::EUCLIDEAN 
)

Definition at line 102 of file CRNPoint2D.h.

double crn::Distance ( const Vector v1,
const Vector v2 
)

Distance between two vectors.

Distance between two vectors

Exceptions
ExceptionDimensionvectors have different sizes
ExceptionDomainsome objects are not of the same type
ExceptionProtocolan object is not metric

Definition at line 342 of file CRNVector.cpp.

double crn::Distance ( const Histogram &  h1,
const Histogram &  h2 
)
inline

Definition at line 301 of file CRNHistogram.h.

double crn::Distance ( const String &  s1,
const String &  s2 
)
inline

Distance between two strings.

Definition at line 302 of file CRNString.h.

template<typename IMG , typename T >
IMG crn::Downgrade ( const Image< pixel::RGB< T >> &  img)

Converts the image to a type that has a smaller pixel range

Parameters
[in]imgthe source image
Returns
a new image

Definition at line 394 of file CRNImage.h.

void crn::FFT ( MatrixComplex &  m,
bool  direct 
)
inline

Fast Fourier transform.

Definition at line 80 of file CRNMatrixComplex.h.

template<typename ITER , typename BREEDING_FUNC , typename EVAL_FUNC , typename STOP_FUNC , typename URNG = std::default_random_engine>
std::multimap<double, typename std::iterator_traits<ITER>::value_type> crn::Genetic ( ITER  b,
ITER  e,
BREEDING_FUNC  breed,
EVAL_FUNC  evaluate,
STOP_FUNC  stop,
GenerationStrategy  keep_parents = GenerationStrategy::KEEP_BEST_PARENT,
URNG &&  rng = std::default_random_engine{size_t(std::chrono::system_clock::now().time_since_epoch().count())} 
)

Genetic algorithm

Exceptions
ExceptionLogicthere is less than 2 individuals
Parameters
[in]biterator on the first individual
[in]eiterator after the last individual
[in]breeda function to create two individuals from two parents: std::pair<GENOTYPE, GENOTYPE> breed(const GENOTYPE &, const GENOTYPE &, URNG &rng)
[in]evaluatea function to evaluate the fitness of an individual: double evaluate(const GENOTYPE &)
[in]stopa function to verify if the algorithm has found a satisfying solution: bool stop(const std::multimap<double, GENOTYPE> &population)
[in]rnga random number generator (default value is the default random generator initialized with current time)
Returns
the population, sorted by fitness

Definition at line 50 of file CRNGenetic.h.

std::tuple< double, std::vector< std::pair< size_t, size_t > > > crn::Hungarian ( const std::vector< std::vector< double >> &  distmat)

Kuhn-Munkres' algorithm

Kuhn-Munkres' algorithm

Adapted from Brian M. Clapper's python implementation "munkres-1.0.7" (BSD license)

Exceptions
ExceptionInvalidArgumentinvalid distance matrix
Parameters
[in]distmata distance matrix
Returns
the total cost and the list of pair indices

Definition at line 300 of file CRNBipartite.cpp.

std::tuple< double, std::vector< std::pair< size_t, size_t > > > crn::Hungarian ( const SquareMatrixDouble distmat)

Kuhn-Munkres' algorithm

Kuhn-Munkres' algorithm

Adapted from Brian M. Clapper's python implementation "munkres-1.0.7" (BSD license)

Exceptions
ExceptionInvalidArgumentinvalid distance matrix
Parameters
[in]distmata distance matrix
Returns
the total cost and the list of pair indices

Definition at line 318 of file CRNBipartite.cpp.

std::vector< Point2DInt > crn::MakeSegment ( const Point2DInt p_begin,
const Point2DInt p_end 
)

Make a segment between two points.

Make a segment between two points

Parameters
[in]p_beginthe begining of the segment
[in]p_endthe end of the segment
Returns
segment vector of 2D points

Definition at line 88 of file CRNPoint2DInt.cpp.

template<typename T , typename std::enable_if<!std::is_lvalue_reference< T >::value, int >::type = 0>
std::shared_ptr<T> crn::MoveShared ( T &&  v)
inline

Definition at line 329 of file CRNType.h.

template<typename T , typename std::enable_if<!std::is_lvalue_reference< T >::value, int >::type = 0>
std::unique_ptr<T> crn::MoveUnique ( T &&  v)
inline

Definition at line 337 of file CRNType.h.

UImageBW crn::NewImageBWFromFile ( const Path fname)

Loads an image from a file and converts it if necessary.

Loads an image from a file and converts it if necessary using the default RGB2Gray and Gray2BW methods

Exceptions
ExceptionInvalidArgumentnull file name
ExceptionIOno decoder found
ExceptionDomainunhandled image format
Parameters
[in]fnamefull path to the image file
Returns
a pointer on an image

Definition at line 702 of file CRNImage.cpp.

UImageGray crn::NewImageGrayFromFile ( const Path fname)

Loads an image from a file and converts it if necessary.

Loads an image from a file and converts it if necessary using the default RGB2Gray method

Exceptions
ExceptionInvalidArgumentnull file name
ExceptionIOno decoder found
ExceptionDomainunhandled image format
Parameters
[in]fnamefull path to the image file
Returns
a pointer on an image

Definition at line 681 of file CRNImage.cpp.

UImageRGB crn::NewImageRGBFromFile ( const Path fname)

Loads an image from a file and converts it if necessary.

Loads an image from a file and converts it if necessary

Exceptions
ExceptionInvalidArgumentnull file name
ExceptionIOno decoder found
ExceptionDomainunhandled image format
Parameters
[in]fnamefull path to the image file
Returns
a pointer on an image

Definition at line 660 of file CRNImage.cpp.

bool crn::operator!= ( const String &  s1,
const String &  s2 
)
inline

Tests inequality of two strings.

Definition at line 289 of file CRNString.h.

template<typename T >
Matrix<T> crn::operator* ( const Matrix< T > &  m,
double  d 
)

Definition at line 709 of file CRNMatrix.h.

template<typename T >
Matrix<T> crn::operator* ( Matrix< T > &&  m,
double  d 
)

Definition at line 711 of file CRNMatrix.h.

template<typename T >
Matrix<T> crn::operator* ( double  d,
const Matrix< T > &  m 
)

Definition at line 713 of file CRNMatrix.h.

template<typename T >
Matrix<T> crn::operator* ( double  d,
Matrix< T > &&  m 
)

Definition at line 715 of file CRNMatrix.h.

template<typename T >
Matrix<T> crn::operator* ( const Matrix< T > &  m1,
const Matrix< T > &  m2 
)

Definition at line 728 of file CRNMatrix.h.

template<typename T >
Matrix<T> crn::operator* ( Matrix< T > &&  m1,
const Matrix< T > &  m2 
)

Definition at line 730 of file CRNMatrix.h.

String crn::operator+ ( const String &  s1,
const String &  s2 
)
inline

Adds two strings.

Definition at line 299 of file CRNString.h.

template<typename T >
Matrix<T> crn::operator+ ( const Matrix< T > &  m1,
const Matrix< T > &  m2 
)

Definition at line 697 of file CRNMatrix.h.

template<typename T >
Matrix<T> crn::operator+ ( Matrix< T > &&  m1,
const Matrix< T > &  m2 
)

Definition at line 699 of file CRNMatrix.h.

template<typename T >
Matrix<T> crn::operator+ ( const Matrix< T > &  m1,
Matrix< T > &&  m2 
)

Definition at line 701 of file CRNMatrix.h.

template<typename T >
Matrix<T> crn::operator- ( const Matrix< T > &  m1,
const Matrix< T > &  m2 
)

Definition at line 704 of file CRNMatrix.h.

template<typename T >
Matrix<T> crn::operator- ( Matrix< T > &&  m1,
const Matrix< T > &  m2 
)

Definition at line 706 of file CRNMatrix.h.

template<typename T >
Matrix<T> crn::operator/ ( const Matrix< T > &  m,
double  d 
)

Definition at line 718 of file CRNMatrix.h.

template<typename T >
Matrix<T> crn::operator/ ( Matrix< T > &&  m,
double  d 
)

Definition at line 720 of file CRNMatrix.h.

template<typename T >
Matrix<T> crn::operator/ ( double  d,
const Matrix< T > &  m 
)

Definition at line 722 of file CRNMatrix.h.

template<typename T >
Matrix<T> crn::operator/ ( double  d,
Matrix< T > &&  m 
)

Definition at line 724 of file CRNMatrix.h.

bool crn::operator< ( const String &  s1,
const String &  s2 
)
inline

Compares two strings.

Definition at line 291 of file CRNString.h.

bool crn::operator<= ( const String &  s1,
const String &  s2 
)
inline

Compares two strings.

Definition at line 295 of file CRNString.h.

bool crn::operator== ( const String &  s1,
const String &  s2 
)
inline

Tests equality of two strings.

Definition at line 287 of file CRNString.h.

bool crn::operator> ( const String &  s1,
const String &  s2 
)
inline

Compares two strings.

Definition at line 293 of file CRNString.h.

bool crn::operator>= ( const String &  s1,
const String &  s2 
)
inline

Compares two strings.

Definition at line 297 of file CRNString.h.

template<typename R , typename T >
Image<R> crn::RhoChannel ( const Image< pixel::Polar2D< R, T >> &  img)

Extracts the rho channel

Parameters
[in]thesource image
Returns
the rho channel

Definition at line 55 of file CRNImage2D.h.

xml::Element crn::Serialize ( const Object obj,
xml::Element parent 
)

Writes an object to XML if possible.

Writes an object to XML if possible

Exceptions
ExceptionProtocolnot a serializable object

Definition at line 110 of file CRNObject.cpp.

xml::Element crn::Serialize ( const UCObject &  obj,
xml::Element parent 
)

Writes an object to XML if possible

Exceptions
ExceptionProtocolnot a serializable object

Definition at line 118 of file CRNObject.cpp.

xml::Element crn::Serialize ( const SCObject &  obj,
xml::Element parent 
)

Writes an object to XML if possible

Exceptions
ExceptionProtocolnot a serializable object

Definition at line 128 of file CRNObject.cpp.

size_t crn::Size ( const Stroke &  s)
inlinenoexcept

Size of a stroke.

Definition at line 123 of file CRNStroke.h.

size_t crn::Size ( const Vector &  v)
inlinenoexcept

Size of a vector.

Definition at line 169 of file CRNVector.h.

size_t crn::Size ( const Document &  doc)
inlinenoexcept

Number of views in a document.

Definition at line 215 of file CRNDocument.h.

size_t crn::Size ( const Histogram &  h)
inlinenoexcept

Size of an histogram.

Definition at line 306 of file CRNHistogram.h.

size_t crn::Size ( const String &  s)
inlinenoexcept

Size of a string.

Definition at line 308 of file CRNString.h.

void crn::Swap ( Map &  m1,
Map &  m2 
)
inlinenoexcept

Definition at line 151 of file CRNMap.h.

void crn::Swap ( Vector &  v1,
Vector &  v2 
)
inlinenoexcept

Swaps two vectors.

Definition at line 171 of file CRNVector.h.

void crn::Swap ( String &  s1,
String &  s2 
)
inlinenoexcept

Swaps two strings.

Definition at line 305 of file CRNString.h.

template<typename R , typename T >
Image<typename Unit<T>::type> crn::ThetaChannel ( const Image< pixel::Polar2D< R, T >> &  img)

Extracts the theta channel

Parameters
[in]thesource image
Returns
the theta channel

Definition at line 67 of file CRNImage2D.h.