#include "Image/CutPaste.H"
#include "Image/Image.H"
#include "Image/Pixels.H"
#include "Util/Assert.H"
#include "Util/safecopy.H"
#include "rutz/trace.h"
#include "Image/vec2.h"
#include <algorithm>
#include "inst/Image/CutPaste.I"
Go to the source code of this file.
Functions | |
template<class T > | |
Image< T > | concatX (const Image< T > &left, const Image< T > &right) |
template<class T > | |
Image< T > | concatY (const Image< T > &top, const Image< T > &bottom) |
template<class T > | |
Image< T > | concatLooseY (const Image< T > &topImg, const Image< T > &bottomImg, const T &bgColor) |
template<class T > | |
Image< T > | concatLooseX (const Image< T > &leftImg, const Image< T > &rightImg, const T &bgColor) |
template<class T > | |
Image< T > | crop (const Image< T > &src, const Point2D< int > &pt, const Dims &dims, const bool zerofill) |
template<class T > | |
Image< T > | crop (const Image< T > &src, const Rectangle &rect, const bool zerofill) |
template<class T > | |
Image< T > | shift (const Image< T > &srcImg, const int dx, const int dy) |
template<class T > | |
Image< T > | shiftImage (const Image< T > &srcImg, const float dx, const float dy) |
template<class T > | |
Image< T > | shiftClean (const Image< T > &srcImg, const int dx, const int dy, const T bgval) |
template<class T > | |
void | inplacePaste (Image< T > &dst, const Image< T > &img, const Point2D< int > &pos) |
template<class T > | |
void | inplaceClearRegion (Image< T > &dst, const Rectangle ®ion1, const T &val) |
template<class T > | |
void | inplaceEmbed (Image< T > &dst, const Image< T > &img, const Rectangle &r, const T background, const bool keep_aspect) |
template<class T > | |
Rectangle | findBoundingRect (const Image< T > &src, const T threshold) |
Find the smallest bounding rectangle around pixels greater than the threshold. | |
Rectangle | findBoundingRect (const std::vector< Point2D< int > > &poly, const Dims imgDims) |
Find the smallest bounding rectangle around the polygon. | |
template Image< double > | crop (const Image< double > &, const Point2D< int > &, const Dims &, bool) |
template Image< PixRGB < unsigned short > > | crop (Image< PixRGB< unsigned short > > const &, Point2D< int > const &, Dims const &, bool) |
template Image< unsigned short > | concatX (Image< unsigned short > const &, Image< unsigned short > const &) |
template void | inplacePaste (Image< double > &, const Image< double > &, const Point2D< int > &) |
template Image< int > | shiftClean (const Image< int > &srcImg, const int dx, const int dy, const int bgval) |
template Image< geom::vec2f > | shiftClean (const Image< geom::vec2f > &srcImg, const int dx, const int dy, const geom::vec2f bgval) |
template void | inplacePaste (Image< geom::vec2f > &, const Image< geom::vec2f > &, const Point2D< int > &) |
template void | inplaceEmbed (Image< uint16 > &, const Image< uint16 > &, const Rectangle &, const uint16 background, const bool) |
template Image< uint16 > | crop (const Image< uint16 > &, const Rectangle &, const bool) |
template Image< double > | crop (const Image< double > &, const Rectangle &, const bool) |
Cut+paste operations from/to Image subregions
Definition in file CutPaste.C.
Rectangle findBoundingRect | ( | const std::vector< Point2D< int > > & | poly, | |
const Dims | imgDims | |||
) |
Find the smallest bounding rectangle around the polygon.
Definition at line 565 of file CutPaste.C.
References Dims::h(), height, Point2D< T >::i, and Dims::w().
Rectangle findBoundingRect | ( | const Image< T > & | src, | |
const T | threshold | |||
) | [inline] |
Find the smallest bounding rectangle around pixels greater than the threshold.
Definition at line 527 of file CutPaste.C.
References ASSERT, Image< T >::getHeight(), Image< T >::getVal(), Image< T >::getWidth(), Image< T >::initialized(), and Rectangle::tlbrI().
Referenced by InferoTemporalSIFT::attentionShift(), and XMLInput::readFrame().