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

Functions

void SavePNG (const ImageBW &img, const Path &fname)
 Saves as PNG file. More...
 
void SaveJPEG (const ImageBW &img, const Path &fname, unsigned int qual)
 Saves as JPEG file. More...
 
void SavePNG (const ImageGray &img, const Path &fname)
 Saves as PNG file. More...
 
void SaveJPEG (const ImageGray &img, const Path &fname, unsigned int qual)
 Saves as JPEG file. More...
 
void SavePNG (const ImageRGB &img, const Path &fname)
 Saves as PNG file. More...
 
void SaveJPEG (const ImageRGB &img, const Path &fname, unsigned int qual)
 Saves as JPEG file. More...
 
template<typename T >
void SavePNG (const Image< pixel::RGB< T >> &img, const Path &fname)
 
template<typename T >
void SaveJPEG (const Image< pixel::RGB< T >> &img, const Path &fname, unsigned int qual)
 
template<typename T >
void SavePNG (const Image< T > &img, const Path &fname, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
template<typename T >
void SaveJPEG (const Image< T > &img, const Path &fname, unsigned int qual, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
template<typename T >
void SavePNG (const Image< T > &img, const Path &fname, typename std::enable_if<!std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
template<typename T >
void SaveJPEG (const Image< T > &img, const Path &fname, unsigned int qual, typename std::enable_if<!std::is_arithmetic< T >::value >::type *dummy=nullptr)
 
template<typename T >
void ShiftCopyRow (Image< T > &dest, const Image< T > &src, size_t row, int offset, double prevWeight, const T &bgColor)
 Copies a row with a shift. More...
 
template<typename T >
void ShiftCopyColumn (Image< T > &dest, const Image< T > &src, size_t col, int offset, double prevWeight, const T &bgColor)
 Copies a column with a shift. More...
 
template<typename T >
Image< T > MakeSmallRotation (const Image< T > &img, const Angle< Degree > &angle, const T &bgColor)
 

Function Documentation

template<typename T >
Image<T> crn::impl::MakeSmallRotation ( const Image< T > &  img,
const Angle< Degree > &  angle,
const T &  bgColor 
)

Performs a fast small rotation

Parameters
[in]anglethe angle of the rotation
[in]bgColorthe fill color for the corners
Returns
a new rotated table

Definition at line 1744 of file CRNImage.hpp.

void crn::impl::SaveJPEG ( const ImageBW &  img,
const Path &  fname,
unsigned int  qual 
)

Saves as JPEG file.

void crn::impl::SaveJPEG ( const ImageGray img,
const Path fname,
unsigned int  qual 
)

Saves as JPEG file.

Saves the image to a JPEG file

Exceptions
ExceptionInvalidArgumentfname is empty
ExceptionRuntimeno way to save jpeg
Parameters
[in]fnamethe filename
[in]qualthe quality of the compression (from 0 to 100)

Definition at line 468 of file CRNImageGray.cpp.

void crn::impl::SaveJPEG ( const ImageRGB img,
const Path fname,
unsigned int  qual 
)

Saves as JPEG file.

Saves as JPEG file

Exceptions
ExceptionInvalidArgumentfname is empty
ExceptionRuntimeno way to save jpeg
Parameters
[in]imgthe image to save
[in]fnamefull path to the image to save
[in]qualcompression quality [0..100]

Definition at line 480 of file CRNImageRGB.cpp.

template<typename T >
void crn::impl::SaveJPEG ( const Image< pixel::RGB< T >> &  img,
const Path &  fname,
unsigned int  qual 
)

Saves as JPEG file

Parameters
[in]imgthe image to save
[in]fnamefull path to the image to save
[in]qualcompression quality [0..100]

Definition at line 465 of file CRNImage.h.

template<typename T >
void crn::impl::SaveJPEG ( const Image< T > &  img,
const Path &  fname,
unsigned int  qual,
typename std::enable_if< std::is_arithmetic< T >::value >::type *  dummy = nullptr 
)

Saves as JPEG file

Parameters
[in]imgthe image to save
[in]fnamefull path to the image to save
[in]qualcompression quality [0..100]

Definition at line 483 of file CRNImage.h.

template<typename T >
void crn::impl::SaveJPEG ( const Image< T > &  img,
const Path &  fname,
unsigned int  qual,
typename std::enable_if<!std::is_arithmetic< T >::value >::type *  dummy = nullptr 
)

Saves as JPEG file

Exceptions
ExceptionInvalidArgumentunsupported pixel format
Parameters
[in]imgthe image to save
[in]fnamefull path to the image to save
[in]qualcompression quality [0..100]

Definition at line 504 of file CRNImage.h.

void crn::impl::SavePNG ( const ImageBW &  img,
const Path &  fname 
)

Saves as PNG file.

void crn::impl::SavePNG ( const ImageGray img,
const Path fname 
)

Saves as PNG file.

Saves the image to a PNG file

Exceptions
ExceptionInvalidArgumentfname is empty or pixel format is not BW, Gray nor RGB.
ExceptionRuntimeno way to save png
Parameters
[in]fnamethe filename

Definition at line 277 of file CRNImageGray.cpp.

void crn::impl::SavePNG ( const ImageRGB img,
const Path fname 
)

Saves as PNG file.

Saves as PNG file

Exceptions
ExceptionInvalidArgumentfname is empty
ExceptionRuntimeno way to save png
Parameters
[in]imgthe image to save
[in]fnamefull path to the image to save

Definition at line 286 of file CRNImageRGB.cpp.

template<typename T >
void crn::impl::SavePNG ( const Image< pixel::RGB< T >> &  img,
const Path &  fname 
)

Saves as PNG file

Parameters
[in]imgthe image to save
[in]fnamefull path to the image to save

Definition at line 456 of file CRNImage.h.

template<typename T >
void crn::impl::SavePNG ( const Image< T > &  img,
const Path &  fname,
typename std::enable_if< std::is_arithmetic< T >::value >::type *  dummy = nullptr 
)

Saves as PNG file

Parameters
[in]imgthe image to save
[in]fnamefull path to the image to save

Definition at line 474 of file CRNImage.h.

template<typename T >
void crn::impl::SavePNG ( const Image< T > &  img,
const Path &  fname,
typename std::enable_if<!std::is_arithmetic< T >::value >::type *  dummy = nullptr 
)

Saves as PNG file

Exceptions
ExceptionInvalidArgumentunsupported pixel format
Parameters
[in]imgthe image to save
[in]fnamefull path to the image to save

Definition at line 493 of file CRNImage.h.

template<typename T >
void crn::impl::ShiftCopyColumn ( Image< T > &  dest,
const Image< T > &  src,
size_t  col,
int  offset,
double  prevWeight,
const T &  bgColor 
)

Copies a column with a shift.

Parameters
[in]destthe image to modify
[in]srcthe source image
[in]colthe abscissa of the column to copy
[in]offsetthe shift
[in]prevWeightthe weight of the previous pixel (for smoothing)
[in]bgColorthe fill color for the corners

Definition at line 1695 of file CRNImage.hpp.

template<typename T >
void crn::impl::ShiftCopyRow ( Image< T > &  dest,
const Image< T > &  src,
size_t  row,
int  offset,
double  prevWeight,
const T &  bgColor 
)

Copies a row with a shift.

Parameters
[in]destthe image to modify
[in]srcthe source image
[in]rowthe ordinate of the row to copy
[in]offsetthe shift
[in]prevWeightthe weight of the previous pixel (for smoothing)
[in]bgColorthe fill color for the corners

Definition at line 1642 of file CRNImage.hpp.