CudaCutPaste.H File Reference

#include "Image/PixelsTypes.H"
Include dependency graph for CudaCutPaste.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

CudaImage< float > cudaCrop (const CudaImage< float > &src, const Point2D< int > &upperLeft, const Dims &size, const bool zerofill=false)
 Extract a subimage from the input image.
CudaImage< float > cudaCrop (const CudaImage< float > &src, const Rectangle &rect, const bool zerofill=false)
 Overload of crop() using a Rectangle instead of a Point2D<int>+Dims.
CudaImage< float > cudaShiftImage (const CudaImage< float > &src, const float dx, const float dy)
 Shift an image by a non even amount of pixels, need to interpolate.
void cudaInplacePaste (CudaImage< float > &dst, const CudaImage< float > &img, const Point2D< int > &pos)
 Paste an image onto an existing image.
void cudaInplacePaste (CudaImage< PixRGB< float > > &dst, const CudaImage< PixRGB< float > > &img, const Point2D< int > &pos)
 Paste a PixRGB image onto an existing image.
void cudaInplaceOverlay (CudaImage< float > &dst, const CudaImage< float > &img, const Point2D< int > &pos)
 Overlay an image onto an existing image, only overwriting an old pixel if new pixel is nonzero.
void cudaInplaceOverlay (CudaImage< PixRGB< float > > &dst, const CudaImage< PixRGB< float > > &img, const Point2D< int > &pos)
 Overlay a PixRGB image onto an existing image, only overwriting an old pixel if new pixel is nonzero.

Detailed Description

Cut+paste operations from/to CudaImage subregions

Definition in file CudaCutPaste.H.


Function Documentation

CudaImage<float> cudaCrop ( const CudaImage< float > &  src,
const Rectangle rect,
const bool  zerofill = false 
)

Overload of crop() using a Rectangle instead of a Point2D<int>+Dims.

Definition at line 73 of file CudaCutPaste.C.

References cudaCrop(), Rectangle::height(), Rectangle::left(), Rectangle::top(), and Rectangle::width().

CudaImage<float> cudaCrop ( const CudaImage< float > &  src,
const Point2D< int > &  upperLeft,
const Dims size,
const bool  zerofill = false 
)

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).

Definition at line 46 of file CudaCutPaste.C.

References ASSERT, CudaImage< T >::coordsOk(), CudaImage< T >::getCudaArrayPtr(), CudaImage< T >::getDims(), CudaImage< T >::getHeight(), CudaImage< T >::getMemoryDevice(), CudaImage< T >::getMemoryPolicy(), CudaImage< T >::getWidth(), Dims::h(), HOST_MEMORY, Point2D< T >::i, min(), NO_INIT, and Dims::w().

Referenced by cudaCrop(), CudaHmaxFLSal::extractRandC1Patches(), and CudaHmaxFL::extractRandC1Patches().

void cudaInplaceOverlay ( CudaImage< PixRGB< float > > &  dst,
const CudaImage< PixRGB< float > > &  img,
const Point2D< int > &  pos 
)

Overlay a PixRGB image onto an existing image, only overwriting an old pixel if new pixel is nonzero.

Definition at line 180 of file CudaCutPaste.C.

References ASSERT, Dims::h(), Point2D< T >::i, and Dims::w().

void cudaInplaceOverlay ( CudaImage< float > &  dst,
const CudaImage< float > &  img,
const Point2D< int > &  pos 
)

Overlay an image onto an existing image, only overwriting an old pixel if new pixel is nonzero.

Definition at line 168 of file CudaCutPaste.C.

References ASSERT, CudaImage< T >::getCudaArrayPtr(), CudaImage< T >::getHeight(), CudaImage< T >::getMemoryDevice(), CudaImage< T >::getWidth(), Dims::h(), Point2D< T >::i, and Dims::w().

void cudaInplacePaste ( CudaImage< PixRGB< float > > &  dst,
const CudaImage< PixRGB< float > > &  img,
const Point2D< int > &  pos 
)

Paste a PixRGB image onto an existing image.

Definition at line 155 of file CudaCutPaste.C.

References ASSERT, Dims::h(), Point2D< T >::i, and Dims::w().

void cudaInplacePaste ( CudaImage< float > &  dst,
const CudaImage< float > &  img,
const Point2D< int > &  pos 
)
CudaImage<float> cudaShiftImage ( const CudaImage< float > &  src,
const float  dx,
const float  dy 
)
Generated on Sun May 8 08:42:39 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3