libcrn
3.9.5
A document image processing library
|
#include <CRNMath/CRNMath.h>
#include <CRNException.h>
#include <CRNString.h>
#include <CRNImage/CRNSummedAreaTable.h>
#include <vector>
#include <type_traits>
#include <CRNImage/CRNImageFormats.h>
#include <CRNImage/CRNImage.hpp>
Go to the source code of this file.
Classes | |
class | crn::ImageBase |
Base class for images. More... | |
struct | crn::BoolNotBool< T > |
struct | crn::BoolNotBoolDummy |
struct | crn::BoolNotBool< bool > |
class | crn::Image< T > |
Abstract class for images. More... | |
Namespaces | |
crn | |
crn::impl | |
Macros | |
#define | FOREACHPIXEL(x, y, img) for (size_t y = 0; y < (img).GetHeight(); y++) for (size_t x = 0; x < (img).GetWidth(); x++) |
Convenience macro to sweep an image. More... | |
Typedefs | |
using | crn::SImage = std::shared_ptr< ImageBase > |
using | crn::SCImage = std::shared_ptr< const ImageBase > |
using | crn::WImage = std::weak_ptr< ImageBase > |
using | crn::WCImage = std::weak_ptr< const ImageBase > |
using | crn::UImage = std::unique_ptr< ImageBase > |
using | crn::UCImage = std::unique_ptr< const ImageBase > |
Functions | |
UImage | crn::NewImageFromFile (const Path &fname) |
Loads an image from a file. More... | |
BoolNotBoolDummy | crn::operator+ (const BoolNotBoolDummy &, const BoolNotBoolDummy &) |
BoolNotBoolDummy | crn::operator- (const BoolNotBoolDummy &, const BoolNotBoolDummy &) |
BoolNotBoolDummy | crn::operator* (const BoolNotBoolDummy &, const BoolNotBoolDummy &) |
BoolNotBoolDummy | crn::operator/ (const BoolNotBoolDummy &, const BoolNotBoolDummy &) |
template<typename T > | |
bool | crn::IsBitonal (const Image< T > &img) |
Is the image binary (black & white)? More... | |
template<typename T , typename CMP = std::less<T>> | |
std::pair< T, T > | crn::MinMax (const Image< T > &img, CMP cmp=CMP{}) |
Returns min and max pixel values. More... | |
template<typename T > | |
Rect | crn::AutoCrop (const Image< T > &img, const T &bgval) |
Estimates the ideal crop for the image. More... | |
template<typename T > | |
Image< T > | crn::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 | crn::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 | crn::Downgrade (const Image< T > &img) |
Converts the image to a type that has a smaller pixel range. More... | |
template<typename T > | |
SummedAreaTable< SumType< T > > | crn::MakeSummedAreaTable (const Image< T > &img) |
Creates a summed area table of the image. More... | |
template<typename T > | |
Image< T > | crn::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 > | crn::Make90Rotation (const Image< T > &img) |
Creates a rotated version of the image. More... | |
template<typename T > | |
Image< T > | crn::Make180Rotation (const Image< T > &img) |
Creates a rotated version of the image. More... | |
template<typename T > | |
Image< T > | crn::Make270Rotation (const Image< T > &img) |
Creates a rotated version of the image. More... | |
template<typename T > | |
auto | crn::Size (const Image< T > &img) noexcept(noexcept(img.Size())) -> decltype(img.Size()) |
template<typename T1 , typename T2 > | |
crn::Image< crn::SumType < typename std::common_type < T1, T2 >::type > > | operator+ (const crn::Image< T1 > &i1, const crn::Image< T2 > &i2) |
template<typename T1 , typename T2 > | |
crn::Image< crn::DiffType < typename std::common_type < T1, T2 >::type > > | operator- (const crn::Image< T1 > &i1, const crn::Image< T2 > &i2) |
template<typename T1 , typename T2 > | |
crn::Image< crn::SumType < typename std::common_type < T1, T2 >::type > > | operator* (const crn::Image< T1 > &i1, const crn::Image< T2 > &i2) |
template<typename T > | |
crn::Image< crn::SumType < typename std::common_type< T, double >::type > > | operator* (double d, const crn::Image< T > &i) |
template<typename T > | |
crn::Image< crn::SumType < typename std::common_type< T, double >::type > > | operator* (const crn::Image< T > &i, double d) |
template<typename T1 , typename T2 > | |
crn::Image< crn::SumType < typename std::common_type < T1, T2 >::type > > | operator/ (const crn::Image< T1 > &i1, const crn::Image< T2 > &i2) |
UImageRGB | crn::NewImageRGBFromFile (const Path &fname) |
Loads an image from a file and converts it if necessary. More... | |
UImageGray | crn::NewImageGrayFromFile (const Path &fname) |
Loads an image from a file and converts it if necessary. More... | |
UImageBW | crn::NewImageBWFromFile (const Path &fname) |
Loads an image from a file and converts it if necessary. More... | |
template<typename IMG , typename T > | |
IMG | crn::Downgrade (const Image< pixel::RGB< T >> &img) |
void | crn::impl::SavePNG (const ImageBW &img, const Path &fname) |
Saves as PNG file. More... | |
void | crn::impl::SaveJPEG (const ImageBW &img, const Path &fname, unsigned int qual) |
Saves as JPEG file. More... | |
void | crn::impl::SavePNG (const ImageGray &img, const Path &fname) |
Saves as PNG file. More... | |
void | crn::impl::SaveJPEG (const ImageGray &img, const Path &fname, unsigned int qual) |
Saves as JPEG file. More... | |
void | crn::impl::SavePNG (const ImageRGB &img, const Path &fname) |
Saves as PNG file. More... | |
void | crn::impl::SaveJPEG (const ImageRGB &img, const Path &fname, unsigned int qual) |
Saves as JPEG file. More... | |
template<typename T > | |
void | crn::impl::SavePNG (const Image< pixel::RGB< T >> &img, const Path &fname) |
template<typename T > | |
void | crn::impl::SaveJPEG (const Image< pixel::RGB< T >> &img, const Path &fname, unsigned int qual) |
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) |
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) |
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) |
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) |