#include <vector>
Go to the source code of this file.
Functions | |
template<class T_or_RGB > | |
Image< T_or_RGB > | concatX (const Image< T_or_RGB > &left, const Image< T_or_RGB > &right) |
Horizontally concatenate two arrays of same height. | |
template<class T_or_RGB > | |
Image< T_or_RGB > | concatY (const Image< T_or_RGB > &top, const Image< T_or_RGB > &bottom) |
Vertically concatenate two arrays of same width. | |
template<class T_or_RGB > | |
Image< T_or_RGB > | concatLooseY (const Image< T_or_RGB > &topImg, const Image< T_or_RGB > &bottomImg, const T_or_RGB &bgColor=T_or_RGB()) |
Vertically concatenate topImg and bottomImg. | |
template<class T_or_RGB > | |
Image< T_or_RGB > | concatLooseX (const Image< T_or_RGB > &leftImg, const Image< T_or_RGB > &rightImg, const T_or_RGB &bgColor=T_or_RGB()) |
Horizontally concatenate leftImg and rightImg. | |
template<class T_or_RGB > | |
Image< T_or_RGB > | crop (const Image< T_or_RGB > &src, const Point2D< int > &upperLeft, const Dims &size, const bool zerofill=false) |
Extract a subimage from the input image. | |
template<class T_or_RGB > | |
Image< T_or_RGB > | crop (const Image< T_or_RGB > &src, const Rectangle &rect, const bool zerofill=false) |
Overload of crop() using a Rectangle instead of a Point2D<int>+Dims. | |
template<class T_or_RGB > | |
Image< T_or_RGB > | shift (const Image< T_or_RGB > &srcImg, const int dx, const int dy) |
Shift an image by (int dx, int dy), with horizontal wraparound. | |
template<class T_or_RGB > | |
Image< T_or_RGB > | shiftImage (const Image< T_or_RGB > &srcImg, const float dx, const float dy) |
Shift an image by (float dx, float dy). | |
template<class T_or_RGB > | |
Image< T_or_RGB > | shiftClean (const Image< T_or_RGB > &srcImg, const int dx, const int dy, const T_or_RGB bgval=T_or_RGB()) |
Shift an image by (int dx, int dy), without wraparound. | |
template<class T_or_RGB > | |
void | inplacePaste (Image< T_or_RGB > &dst, const Image< T_or_RGB > &img, const Point2D< int > &pos) |
Paste image into dst at given position. | |
template<class T_or_RGB > | |
void | inplaceClearRegion (Image< T_or_RGB > &dst, const Rectangle ®ion, const T_or_RGB &val) |
Set all pixels within a given region to the specified value. | |
template<class T_or_RGB > | |
void | inplaceEmbed (Image< T_or_RGB > &embed, const Image< T_or_RGB > &img, const Rectangle &r, const T_or_RGB background, const bool keep_aspect=true) |
Embed image into dst with position & size given in rectangle. | |
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. |
Cut+paste operations from/to Image subregions
Definition in file CutPaste.H.
Image<T_or_RGB> concatLooseX | ( | const Image< T_or_RGB > & | leftImg, | |
const Image< T_or_RGB > & | rightImg, | |||
const T_or_RGB & | bgColor = T_or_RGB() | |||
) | [inline] |
Horizontally concatenate leftImg and rightImg.
Like concatX(), but doesn't require the two images to have the same height.
Referenced by ColorSegmenterI::updateFrame().
Image<T_or_RGB> concatLooseY | ( | const Image< T_or_RGB > & | topImg, | |
const Image< T_or_RGB > & | bottomImg, | |||
const T_or_RGB & | bgColor = T_or_RGB() | |||
) | [inline] |
Vertically concatenate topImg and bottomImg.
Like concatY(), but doesn't require the two images to have the same width.
Image<T_or_RGB> concatX | ( | const Image< T_or_RGB > & | left, | |
const Image< T_or_RGB > & | right | |||
) | [inline] |
Horizontally concatenate two arrays of same height.
Referenced by colColCombo(), colGreyCombo(), SimulationViewerEyeHand::getTraj(), SimulationViewerHand::getTraj(), SimulationViewerEyeRegion::getTraj(), SimulationViewerCompress::getTraj(), SimulationViewerEyeMvt::getTraj(), and main().
Image<T_or_RGB> concatY | ( | const Image< T_or_RGB > & | top, | |
const Image< T_or_RGB > & | bottom | |||
) | [inline] |
Vertically concatenate two arrays of same width.
Referenced by colColCombo(), colGreyCombo(), SimulationViewerEyeHand::getTraj(), SimulationViewerEyeRegion::getTraj(), and SimulationViewerEyeMvt::getTraj().
Image<T_or_RGB> crop | ( | const Image< T_or_RGB > & | src, | |
const Rectangle & | rect, | |||
const bool | zerofill = false | |||
) | [inline] |
Overload of crop() using a Rectangle instead of a Point2D<int>+Dims.
Image<T_or_RGB> crop | ( | const Image< T_or_RGB > & | src, | |
const Point2D< int > & | upperLeft, | |||
const Dims & | size, | |||
const bool | zerofill = false | |||
) | [inline] |
Extract a subimage from the input image.
The upper left corner of the subimage is given by a Point2D<int>, and the size of the subimage is given by the Dims. If zerofill is false, then the rectangle given by Point2D<int>+Dims must be wholly contained within the bounds of the input image. If zerofill is true, then any output region that lies outside the bounds of the input will be zero-filled (where zero means the default value for type T).
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().
void inplaceClearRegion | ( | Image< T_or_RGB > & | dst, | |
const Rectangle & | region, | |||
const T_or_RGB & | val | |||
) | [inline] |
Set all pixels within a given region to the specified value.
Does nothing if the rectangle is invalid.
void inplaceEmbed | ( | Image< T_or_RGB > & | embed, | |
const Image< T_or_RGB > & | img, | |||
const Rectangle & | r, | |||
const T_or_RGB | background, | |||
const bool | keep_aspect = true | |||
) | [inline] |
Embed image into dst with position & size given in rectangle.
Referenced by SimulationViewerNerdCam::drawMegaCombo(), SDLdisplay::makeBlittableSurface(), InputMbariFrameSeries::readRGB(), and submain().
void inplacePaste | ( | Image< T_or_RGB > & | dst, | |
const Image< T_or_RGB > & | img, | |||
const Point2D< int > & | pos | |||
) | [inline] |
Paste image into dst at given position.
Image must fit within dst and no resizing/interpolation is done. See embed() for a more sophisticated version with interpolation and resizing.
Referenced by SingleChannel::combineSubMaps(), RawGistEstimatorStd::computeFeatureVector(), GistEstimatorFFT::computeGistFeatureVector(), LandmarkDB::display(), HippocampusI::displayMap(), dispResults(), SimulationViewerNerdCam::drawMegaCombo(), TestImages::generateScene(), Landmark::getActiveKeypoints(), GSlocalizer::getBeliefImage(), Beobot2_GistSalLocalizerMasterI::getBeliefImage(), GistEstimatorGen::getFeatureVector(), VisualObjectMatch::getMatchImage(), DPM::getModelImage(), RetinaAdapter::getOutput(), Landmark::getPosition(), getSalImage(), SimulationViewerCompress::getTraj(), main(), SDLdisplay::makeBlittableSurface(), normalizeFloat(), normalizeFloatRgb(), GameOfLifeInput::readFrame(), submain(), BeobotBrainMT::threadCompute(), and CINNIC::viewNeuronTemplate().
Image<T_or_RGB> shift | ( | const Image< T_or_RGB > & | srcImg, | |
const int | dx, | |||
const int | dy | |||
) | [inline] |
Shift an image by (int dx, int dy), with horizontal wraparound.
Image<T_or_RGB> shiftClean | ( | const Image< T_or_RGB > & | srcImg, | |
const int | dx, | |||
const int | dy, | |||
const T_or_RGB | bgval = T_or_RGB() | |||
) | [inline] |
Shift an image by (int dx, int dy), without wraparound.
Referenced by SpaceVariantModule::cropTransform(), RetinaAdapter::getOutput(), VectorHistField::shiftField(), SpaceVariantModule::transform(), and VectorHistField::updateField().
Image<T_or_RGB> shiftImage | ( | const Image< T_or_RGB > & | srcImg, | |
const float | dx, | |||
const float | dy | |||
) | [inline] |
Shift an image by (float dx, float dy).
Referenced by ReichardtPyrBuilder< T >::build(), and DisparityChannel::doInput().