Basic Image AlgorithmS Library
2.8.0
|
Maps image src to image sink with affine transformation. More...
#include <Image/AffineMapping.hh>
Public Member Functions | |
AffineMapping () | |
AffineMapping (const AffineMapping &src) | |
required because assignment is More... | |
int | BilinearGrey (const Image< InputStorageType > &src, Image< OutputStorageType > &sink) |
direct, fast implementation of affine backward mapping with bilinear filtering, one channel grey only More... | |
int | ComputeScales (double &large, double &smallN, double &cosphi, double &costheta) const |
computes local stretching factors, large >> 1 means that the sink image can contain significant aliasing when using bilinear More... | |
virtual int | GetBoundingBox (unsigned int srcwidth, unsigned int srcheight, unsigned int sinkwidth, unsigned int sinkheight, int &tlx, int &tly, int &brx, int &bry) |
calculates the bounding box in sink image, where to do the backward mapping. More... | |
int | GetJacobian (const HomgPoint2D &sink, Matrix2x2< double > &Jacobian) const |
get jacobian (including concatenated mappings) More... | |
int | GetSourceCoordinates (const HomgPoint2D &sink, HomgPoint2D &source) const |
wrapper function to allow the lookup implementation to be shared with other algorithms. More... | |
int | MapDirect (const Image< InputStorageType > &src, Image< OutputStorageType > &sink) |
direct, fast implementation of affine backward mapping with anisotropic filtering, one channel grey only More... | |
int | MapDirectAgain (Image< OutputStorageType > &sink) |
after first MapDirect, call this function to reuse last pyramid More... | |
AffineMapping < InputStorageType, OutputStorageType > & | operator= (const AffineMapping &src) |
required because of const members More... | |
void | SetAffineTransformation (const double &a11, const double &a12, const double &a21, const double &a22, const double &dx, const double &dy) |
set A (source = A * sink) before calling Map() More... | |
void | SetConcatenation (BIAS::BackwardMapping< InputStorageType, OutputStorageType > *pCon) |
avoid intermediate image and concatenate two backward mappings More... | |
void | SetPyramidSize (const int newsize) |
sets pyramid size to pyramid and updates if neccessary More... | |
int | TrilinearGrey (const Image< InputStorageType > &src, Image< OutputStorageType > &sink, double scale=-1.0) |
direct, fast implementation of affine backward mapping with bilinear filtering, one channel grey only More... | |
int | TrilinearGreyAgain (Image< OutputStorageType > &sink, double scale=-1.0) |
after first TrilinearGrey, call this function to reuse last pyramid More... | |
virtual void | UpdatePyramidSize (const ROI &ROIsink, int srcwidth, int srcheight) |
uses corners of sink roi (and few other sample points) to estimate maximum local scaling (and thus required pyramid level) More... | |
virtual | ~AffineMapping () |
User interfaces | |
int | Map (const Image< InputStorageType > &src, Image< OutputStorageType > &sink, InterpolationMethod=MapTrilinear, bool newSink=false, double SuperSampling=1.0) |
backward mapping with various interpolations More... | |
int | Map (Image< OutputStorageType > &sink) |
use this for subsequent calls to avoid pyramid recalculation when using tri-filtering More... | |
int | GetDisplacementMap (Image< float > &dismap, int width, int height) |
precomputes lookup coordinates and computes displacement map int TEXTURE coordinates, according to the size of src (or width,height) More... | |
int | GetDisplacementMap (Image< float > &dismap, Image< InputStorageType > &src) |
int | PrepareLookupTableMapping (const Image< InputStorageType > &src, Image< OutputStorageType > &sink, InterpolationMethod method, bool newSink=false) |
precomputes lookup coordinates for accessing src More... | |
int | MapWithLookupTable (const Image< InputStorageType > &src, Image< OutputStorageType > &sink, InterpolationMethod method) |
applies precomputed coordinates in src, fast for repeated usages of same mapping function More... | |
int | GetLookupTable (const std::string &filename, InterpolationMethod method) |
Returns the LUT generated by PrepareLookupTableMapping() as an file. More... | |
int | GetLookupTable (float *lutImageRow, InterpolationMethod method) |
int | GetLookupTableSize (unsigned int &width, unsigned int &channels, InterpolationMethod method) |
returns the size of the current LUT. More... | |
int | SetLookupTable (const std::string &filename, InterpolationMethod &method) |
Loads the LUT from a file, replaces the call to PrepareLookupTableMapping(). More... | |
int | SetLookupTable (const float *lutImageRow, unsigned int width, InterpolationMethod &method) |
Static Public Member Functions | |
static void | GenerateTestImage (Image< InputStorageType > &testimage, bool highFrequencyCross=true, InputStorageType dark=5, InputStorageType bright=127, const Matrix3x3< double > &Hinv=Matrix3x3< double >(MatrixIdentity)) |
generates a siemens star like test image with lots of different frequencies to test backward mapping More... | |
Protected Member Functions | |
virtual void | BuildPyramid_ (const Image< InputStorageType > &source, bool forceInit=true, int numlayers=-1) |
compute maximum number of pyramid levels needed More... | |
virtual int | CalcCoordOffset_ (const Image< OutputStorageType > &sink, const Image< InputStorageType > &source) |
result in offsetX_,offsetY_ More... | |
virtual int | ChangeImgSize_ (Image< OutputStorageType > &, const Image< InputStorageType > &) |
void | ClipBoundingBoxToROICorners_ (const BIAS::Image< OutputStorageType > &sink, int &tlx, int &tly, int &brx, int &bry) const |
clip computed region in dest image to roi More... | |
void | ClipValue_ (const double &value, OutputStorageType &newvalue) |
clip interpolated value to outputstoragetype and merge old and new value according to alpha More... | |
template<> | |
void | ClipValue_ (const double &value, unsigned char &newvalue) |
template<> | |
void | ClipValue_ (const double &value, float &newvalue) |
template<> | |
void | ClipValue_ (const double &value, unsigned char &newvalue) |
template<> | |
void | ClipValue_ (const double &value, float &newvalue) |
virtual int | GetJacobian_ (const HomgPoint2D &sink, Matrix2x2< double > &Jacobian) const |
analytic jacobian More... | |
virtual int | GetSourceCoordinates_ (const HomgPoint2D &sink, HomgPoint2D &source) const |
reimplementation for homography, takes sink and computes coords in source More... | |
geometrical coordinate mapping functions | |
void | ComputeLocalPyramidLayer_ (const HomgPoint2D &p_sink, double &localscale) |
computes pyramid layer for trilinear filtering, e.g. More... | |
pixel-value-mapping worker functions | |
int | MapTri_ (Image< OutputStorageType > &sink) |
map image avoiding aliasing More... | |
int | MapTrilinearGreySimple_ (Image< OutputStorageType > &sink) |
fast trilinear grey without special features More... | |
int | MapBi_ (const Image< InputStorageType > &source, Image< OutputStorageType > &sink, InterpolationMethod interpolationQuality) |
bilinear, bicubc and nearest neighbor interpolation More... | |
int | GetImageValue_ (const double &xsource, const double &ysource, const Image< InputStorageType > &im, unsigned int channel, double &result) |
worker function, which handles bilinear/bicubic interpolation, borders and weights More... | |
int | GetTrilinearImageValue_ (const double &xsource, const double &ysource, const double &scale, unsigned int channel, double &result) |
worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights More... | |
int | GetAnisotropicImageValue_ (const double &xsource, const double &ysource, Matrix2x2< double > &Jacobian, unsigned int channel, double &thereturnvalue) |
use jacobian of mapping function to do anisotropic antialiasing More... | |
Protected Attributes | |
double | a11_ |
the homography for backward mapping: run over sink and compute source = A * sink + d More... | |
double | a12_ |
double | a21_ |
double | a22_ |
bool | aliasing_ |
set to true if possibility of aliasing is detected during mapping More... | |
BIAS::Image< float > | alphaImg_ |
has same size as overlap region used for blending More... | |
bool | autoPyramidSize_ |
pyramid size set by user or computed automatically ? More... | |
double | dx_ |
double | dy_ |
double | height_ |
source image height More... | |
bool | incomplete_ |
set to true if not every pixel could be computed More... | |
InterpolationMethod | interpolationType_ |
which interpolation method are we using More... | |
int | offsetX_ |
needed for newDist More... | |
int | offsetY_ |
BackwardMapping < InputStorageType, OutputStorageType > * | pConcatenation_ |
BWM_LUT_Entry_Anisotropic * | pLUT_Ani_ |
NOT IMPLEMENTED (YET ?) More... | |
BWM_LUT_Entry_Bicubic * | pLUT_Bic_ |
BWM_LUT_Entry_Bilinear * | pLUT_Bil_ |
int | pLUT_Bil_size |
BWM_LUT_Entry_Nearest * | pLUT_Nea_ |
lookup-tables for precomputed positions in source, same size as dst.PixelCount More... | |
int | pLUT_Nea_size |
BWM_LUT_Entry_Trilinear * | pLUT_Tri_ |
int | pLUT_Tri_size |
PyramidImage< InputStorageType > | pyramid_ |
this contains a pyramid of the last source image for anti-aliasing More... | |
unsigned | pyramidSize_ |
bool | rangeChecked_ |
The interpolated value is computed in double; if clipped value is not specialized for your output storage type (e.g. More... | |
ROI | ROI_ |
the roi of the last source image More... | |
double | superSampling_ |
if larger than 1, super resolution is active More... | |
double | width_ |
source image width More... | |
Maps image src to image sink with affine transformation.
MapDirect takes care of correct filtering and texture preservation for grey images (efficient anisotropic filtering)
Definition at line 44 of file AffineMapping.hh.
|
virtual |
Definition at line 42 of file AffineMapping.cpp.
AffineMapping::AffineMapping | ( | ) |
Definition at line 48 of file AffineMapping.cpp.
|
inline |
required because assignment is
Definition at line 56 of file AffineMapping.hh.
int AffineMapping::BilinearGrey | ( | const Image< InputStorageType > & | src, |
Image< OutputStorageType > & | sink | ||
) |
direct, fast implementation of affine backward mapping with bilinear filtering, one channel grey only
Definition at line 300 of file AffineMapping.cpp.
References BIAS::Image< StorageType >::FastBilinearInterpolationGrey(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::IsPositionInImage().
|
protectedvirtualinherited |
compute maximum number of pyramid levels needed
Definition at line 219 of file BackwardMapping.cpp.
References BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().
|
protectedvirtualinherited |
result in offsetX_,offsetY_
Definition at line 1042 of file BackwardMapping.cpp.
References BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().
|
protectedvirtualinherited |
Definition at line 1070 of file BackwardMapping.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), and BIAS::ImageBase::SetZero().
|
protectedinherited |
clip computed region in dest image to roi
Definition at line 1026 of file BackwardMapping.cpp.
References BIAS::ImageBase::GetROICorners().
|
inlineprotectedinherited |
clip interpolated value to outputstoragetype and merge old and new value according to alpha
This function must be inplemented for diferent template types rather than for derived classes, e.g. if bicubic interpolation estimates the grey value 257.8 for an unsinged char image, this is rounded and clipped here to 255.0 since this is the maximum allowed uchar.
Definition at line 598 of file BackwardMapping.hh.
|
inlineprotectedinherited |
Definition at line 613 of file BackwardMapping.hh.
|
inlineprotectedinherited |
Definition at line 622 of file BackwardMapping.hh.
|
inlineprotectedinherited |
Definition at line 629 of file BackwardMapping.hh.
|
inlineprotectedinherited |
Definition at line 638 of file BackwardMapping.hh.
|
inlineprotectedinherited |
computes pyramid layer for trilinear filtering, e.g.
localscale 0.5 means best resolution and second best are averaged
Definition at line 366 of file BackwardMapping.hh.
int AffineMapping::ComputeScales | ( | double & | large, |
double & | smallN, | ||
double & | cosphi, | ||
double & | costheta | ||
) | const |
computes local stretching factors, large >> 1 means that the sink image can contain significant aliasing when using bilinear
cosphi | cosine of angle between x-axis and largest scale |
costheta | upper bound on rotation after scaling, cf HMatrix |
Definition at line 166 of file AffineMapping.cpp.
References BIAS::Matrix2x2< T >::EigenvalueDecomposition(), and BIAS::Matrix< T >::GetSystemMatrix().
|
staticinherited |
generates a siemens star like test image with lots of different frequencies to test backward mapping
testimage | initialized image of user defined size which will be filled |
highFrequencyCross | generates an additional high frequency line |
dark | black image value, e.g. close to 0 |
dark | white image value, e.g. close to 255 |
Hinv | homography to transform pattern (if desired) |
Definition at line 2004 of file BackwardMapping.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), and BIAS::ImageBase::IsEmpty().
|
protectedinherited |
use jacobian of mapping function to do anisotropic antialiasing
Definition at line 978 of file BackwardMapping.cpp.
References BIAS::Matrix2x2< T >::EigenvalueDecomposition(), and BIAS::Matrix< T >::GetSystemMatrix().
|
virtual |
calculates the bounding box in sink image, where to do the backward mapping.
The resulting coordinates must be valid in sink, and the resulting br position should be outside the region.
Reimplemented from BIAS::BackwardMapping< InputStorageType, OutputStorageType >.
Definition at line 87 of file AffineMapping.cpp.
References BIAS::Matrix3x3< T >::GetInverse(), BIAS::HomgPoint2D::Homogenize(), and BIAS::MatrixIdentity.
|
inherited |
precomputes lookup coordinates and computes displacement map int TEXTURE coordinates, according to the size of src (or width,height)
Definition at line 1125 of file BackwardMapping.cpp.
|
inherited |
|
inlineprotectedinherited |
worker function, which handles bilinear/bicubic interpolation, borders and weights
Definition at line 548 of file BackwardMapping.hh.
References BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::Image< StorageType >::BilinearInterpolation(), BIAS::ROI::CheckBicubicInterpolation(), BIAS::ROI::CheckBilinearInterpolation(), and BIAS::ImageBase::GetROI().
|
inlineinherited |
get jacobian (including concatenated mappings)
Definition at line 302 of file BackwardMapping.hh.
|
protectedvirtual |
analytic jacobian
Reimplemented from BIAS::BackwardMapping< InputStorageType, OutputStorageType >.
Definition at line 65 of file AffineMapping.cpp.
References BIAS::Matrix< T >::GetData().
|
inherited |
Returns the LUT generated by PrepareLookupTableMapping() as an file.
Definition at line 1241 of file BackwardMapping.cpp.
References BIAS::MapBilinear, BIAS::MapNearestNeighbor, and BIAS::MapTrilinear.
|
inherited |
Definition at line 1334 of file BackwardMapping.cpp.
References BIAS::MapBilinear, BIAS::MapNearestNeighbor, and BIAS::MapTrilinear.
|
inherited |
returns the size of the current LUT.
Definition at line 1195 of file BackwardMapping.cpp.
References BIAS::MapBilinear, BIAS::MapNearestNeighbor, and BIAS::MapTrilinear.
|
inlineinherited |
wrapper function to allow the lookup implementation to be shared with other algorithms.
Definition at line 272 of file BackwardMapping.hh.
Referenced by BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::Disp2Depth().
|
protectedvirtual |
reimplementation for homography, takes sink and computes coords in source
Reimplemented from BIAS::BackwardMapping< InputStorageType, OutputStorageType >.
Definition at line 54 of file AffineMapping.cpp.
|
protectedinherited |
worker function, which handles bilinear/bicubic interpolation, pyramid levels, borders and weights
Definition at line 913 of file BackwardMapping.cpp.
|
inherited |
backward mapping with various interpolations
Sink must be initialized with correct size and background color for invalid pixels. This way you can call it several times to create a panorama from several source images. For each pixel in sink, GetSourceCoordinates is called and the value in source interpolated.
newSink,if | true a new sink image is created that is large enough to hold the old sink and the new mapped src img. |
SuperSampling | if > 1.0, intermediate image with isotropically enlarged width and height (by factor SuperSampling) is created and downsampled for the final image (most useful for nonlinear mappings) |
Definition at line 257 of file BackwardMapping.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsEmpty(), BIAS::ImageBase::IsPlanar(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map(), BIAS::MapAnisotropic, BIAS::MapBicubic, BIAS::MapBilinear, BIAS::MapNearestNeighbor, BIAS::MapTrilinear, BIAS::AffineMapping< InputStorageType, OutputStorageType >::SetAffineTransformation(), and BIAS::ImageBase::SetZero().
Referenced by BIAS::ImageBlender::BlendImages(), BIAS::PMDImageProc::FitDepthTo2DImageHomogr_(), BIAS::PMDImageProc::FitDepthTo2DImageKOnly_(), and BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map().
|
inherited |
use this for subsequent calls to avoid pyramid recalculation when using tri-filtering
Definition at line 362 of file BackwardMapping.cpp.
References BIAS::MapTrilinear.
|
protectedinherited |
bilinear, bicubc and nearest neighbor interpolation
Definition at line 382 of file BackwardMapping.cpp.
References BIAS::Image< StorageType >::BilinearInterpolationRGBInterleaved(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::MapBicubic, BIAS::MapBilinear, and BIAS::MapNearestNeighbor.
int AffineMapping::MapDirect | ( | const Image< InputStorageType > & | src, |
Image< OutputStorageType > & | sink | ||
) |
direct, fast implementation of affine backward mapping with anisotropic filtering, one channel grey only
Definition at line 340 of file AffineMapping.cpp.
References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetROI(), and BIAS::ImageBase::GetWidth().
Referenced by BIAS::TrackerBaseAffine2< StorageType >::TrackAffine_().
int AffineMapping::MapDirectAgain | ( | Image< OutputStorageType > & | sink | ) |
after first MapDirect, call this function to reuse last pyramid
Definition at line 352 of file AffineMapping.cpp.
References BIAS::Image< StorageType >::FastBilinearInterpolationGrey(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), BIAS::ImageBase::IsPositionInImage(), and BIAS::MatrixIdentity.
|
protectedinherited |
map image avoiding aliasing
This is almost correct regarding the sampling theorem, because it uses trilinear or anisotropic filtering over a pyramid. The local sampling frequency is estimated by analyzing the jacobian of the homography as a R^2->R^2 mapping. This is very slow. If possible, bicubic interpolation is done in the image, at borders (high pyramid levels) only bilinear.
In auto mode pyramid size is checked
Definition at line 527 of file BackwardMapping.cpp.
References BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), BIAS::MapTrilinear, BIAS::ROI::Resize(), and BIAS::ROI::SetCorners().
|
protectedinherited |
fast trilinear grey without special features
assumes one channel grey image, no alpha blending, no concatenation, no 2d offset (from auto image size) and no super sampling
Definition at line 741 of file BackwardMapping.cpp.
References BIAS::Image< StorageType >::BicubicInterpolation(), BIAS::Image< StorageType >::FastBilinearInterpolationGrey(), BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetChannelCount(), BIAS::ROI::GetCornerLowerRightX(), BIAS::ROI::GetCornerLowerRightY(), BIAS::ROI::GetCornerUpperLeftX(), BIAS::ROI::GetCornerUpperLeftY(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetROI(), BIAS::ROI::GetWidth(), and BIAS::ImageBase::GetWidth().
|
inherited |
applies precomputed coordinates in src, fast for repeated usages of same mapping function
Definition at line 1805 of file BackwardMapping.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::BWM_LUT_Entry_Nearest::index, BIAS::BWM_LUT_Entry_Bilinear::index_0_0, BIAS::BWM_LUT_Entry_Bilinear::index_0_1, BIAS::BWM_LUT_Entry_Bilinear::index_1_0, BIAS::BWM_LUT_Entry_Bilinear::index_1_1, BIAS::ImageBase::IsPlanar(), BIAS::MapAnisotropic, BIAS::MapBicubic, BIAS::MapBilinear, BIAS::MapNearestNeighbor, BIAS::BWM_LUT_Entry_Bilinear::mapped, BIAS::MapTrilinear, BIAS::BWM_LUT_Entry_Bilinear::xy_weight, BIAS::BWM_LUT_Entry_Bilinear::xY_weight, BIAS::BWM_LUT_Entry_Bilinear::Xy_weight, and BIAS::BWM_LUT_Entry_Bilinear::XY_weight.
|
inline |
required because of const members
Definition at line 64 of file AffineMapping.hh.
|
inherited |
precomputes lookup coordinates for accessing src
If you want to apply the same mapping function over and over again, e.g. radial undistortion for a series of images, call this function once and MapWithLookupTable every time. sink must be of correct size !
Definition at line 1483 of file BackwardMapping.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), BIAS::BWM_LUT_Entry_Nearest::index, BIAS::BWM_LUT_Entry_Bilinear::index_0_0, BIAS::BWM_LUT_Entry_Bilinear::index_0_1, BIAS::BWM_LUT_Entry_Bilinear::index_1_0, BIAS::BWM_LUT_Entry_Bilinear::index_1_1, BIAS::InterpolationMethod_UNKNOWN, BIAS::MapAnisotropic, BIAS::MapBicubic, BIAS::MapBilinear, BIAS::MapNearestNeighbor, BIAS::BWM_LUT_Entry_Nearest::mapped, BIAS::BWM_LUT_Entry_Bilinear::mapped, BIAS::BWM_LUT_Entry_Trilinear::mapped, BIAS::MapTrilinear, BIAS::BWM_LUT_Entry_Trilinear::pyr_diff, BIAS::BWM_LUT_Entry_Trilinear::pyr_diff_inv, BIAS::BWM_LUT_Entry_Trilinear::pyr_level_high, BIAS::BWM_LUT_Entry_Trilinear::pyr_level_low, BIAS::BWM_LUT_Entry_Trilinear::stage_0, BIAS::BWM_LUT_Entry_Trilinear::stage_1, BIAS::BWM_LUT_Entry_Bilinear::xy_weight, BIAS::BWM_LUT_Entry_Bilinear::xY_weight, BIAS::BWM_LUT_Entry_Bilinear::Xy_weight, and BIAS::BWM_LUT_Entry_Bilinear::XY_weight.
|
inline |
set A (source = A * sink) before calling Map()
Definition at line 73 of file AffineMapping.hh.
Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::Map(), and BIAS::TrackerBaseAffine2< StorageType >::TrackAffine_().
|
inlineinherited |
avoid intermediate image and concatenate two backward mappings
Imagine that the source image is transformed with pcon into the intermediate image, which is then transformed by this into the sink
Definition at line 319 of file BackwardMapping.hh.
|
inherited |
Loads the LUT from a file, replaces the call to PrepareLookupTableMapping().
Definition at line 1387 of file BackwardMapping.cpp.
|
inherited |
Definition at line 1436 of file BackwardMapping.cpp.
References BIAS::MapBilinear, BIAS::MapNearestNeighbor, BIAS::MapTrilinear, BIAS::BWM_LUT_Entry_Bilinear::SerializedIn(), and BIAS::BWM_LUT_Entry_Trilinear::SerializedIn().
|
inherited |
sets pyramid size to pyramid and updates if neccessary
Definition at line 194 of file BackwardMapping.cpp.
int AffineMapping::TrilinearGrey | ( | const Image< InputStorageType > & | src, |
Image< OutputStorageType > & | sink, | ||
double | scale = -1.0 |
||
) |
direct, fast implementation of affine backward mapping with bilinear filtering, one channel grey only
Definition at line 215 of file AffineMapping.cpp.
References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetROI(), and BIAS::ImageBase::GetWidth().
int AffineMapping::TrilinearGreyAgain | ( | Image< OutputStorageType > & | sink, |
double | scale = -1.0 |
||
) |
after first TrilinearGrey, call this function to reuse last pyramid
Definition at line 231 of file AffineMapping.cpp.
References BIAS::Image< StorageType >::FastBilinearInterpolationGrey(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::ImageBase::IsPositionInImage().
|
virtualinherited |
uses corners of sink roi (and few other sample points) to estimate maximum local scaling (and thus required pyramid level)
Definition at line 99 of file BackwardMapping.cpp.
References BIAS::ROI::GetCorners(), and BIAS::Random::GetUniformDistributed().
|
protected |
the homography for backward mapping: run over sink and compute source = A * sink + d
Definition at line 144 of file AffineMapping.hh.
|
protected |
Definition at line 145 of file AffineMapping.hh.
|
protected |
Definition at line 146 of file AffineMapping.hh.
|
protected |
Definition at line 147 of file AffineMapping.hh.
|
protectedinherited |
set to true if possibility of aliasing is detected during mapping
Definition at line 509 of file BackwardMapping.hh.
|
protectedinherited |
has same size as overlap region used for blending
Definition at line 538 of file BackwardMapping.hh.
|
protectedinherited |
pyramid size set by user or computed automatically ?
Definition at line 491 of file BackwardMapping.hh.
|
protected |
Definition at line 148 of file AffineMapping.hh.
|
protected |
Definition at line 149 of file AffineMapping.hh.
|
protectedinherited |
source image height
Definition at line 535 of file BackwardMapping.hh.
|
protectedinherited |
set to true if not every pixel could be computed
Definition at line 512 of file BackwardMapping.hh.
|
protectedinherited |
which interpolation method are we using
Definition at line 495 of file BackwardMapping.hh.
|
protectedinherited |
needed for newDist
Definition at line 529 of file BackwardMapping.hh.
|
protectedinherited |
Definition at line 529 of file BackwardMapping.hh.
|
protectedinherited |
Definition at line 540 of file BackwardMapping.hh.
|
protectedinherited |
NOT IMPLEMENTED (YET ?)
Definition at line 525 of file BackwardMapping.hh.
|
protectedinherited |
Definition at line 526 of file BackwardMapping.hh.
|
protectedinherited |
Definition at line 517 of file BackwardMapping.hh.
|
protectedinherited |
Definition at line 521 of file BackwardMapping.hh.
|
protectedinherited |
lookup-tables for precomputed positions in source, same size as dst.PixelCount
Definition at line 516 of file BackwardMapping.hh.
|
protectedinherited |
Definition at line 520 of file BackwardMapping.hh.
|
protectedinherited |
Definition at line 518 of file BackwardMapping.hh.
|
protectedinherited |
Definition at line 522 of file BackwardMapping.hh.
|
protectedinherited |
this contains a pyramid of the last source image for anti-aliasing
Definition at line 486 of file BackwardMapping.hh.
|
protectedinherited |
Definition at line 492 of file BackwardMapping.hh.
|
protectedinherited |
The interpolated value is computed in double; if clipped value is not specialized for your output storage type (e.g.
ushort), this boolean indicates that the generic conversion (e.g. double->ushort) could have introduced artefacts (65536.0 -> 1).
Definition at line 505 of file BackwardMapping.hh.
|
protectedinherited |
the roi of the last source image
Definition at line 488 of file BackwardMapping.hh.
|
protectedinherited |
if larger than 1, super resolution is active
Definition at line 498 of file BackwardMapping.hh.
|
protectedinherited |
source image width
Definition at line 532 of file BackwardMapping.hh.