Wondercoll
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Typedefs | Functions | Variables
cvimgwarp.cpp File Reference
#include "_cv.h"

Classes

struct  CvResizeAlpha
 
struct  CvDecimateAlpha
 

Macros

#define ICV_WARP_MUL_ONE_8U(x)   ((x) << ICV_WARP_SHIFT)
 
#define ICV_WARP_DESCALE_8U(x)   CV_DESCALE((x), ICV_WARP_SHIFT*2)
 
#define ICV_WARP_CLIP_X(x)
 
#define ICV_WARP_CLIP_Y(y)
 
#define ICV_CUBIC_1(x)   (((A + 2)*(x) - (A + 3))*(x)*(x) + 1)
 
#define ICV_CUBIC_2(x)   (((A*(x) - 5*A)*(x) + 8*A)*(x) - 4*A)
 
#define ICV_DEF_RESIZE_BILINEAR_FUNC(flavor, arrtype, worktype, alpha_field,mul_one_macro, descale_macro)
 
#define ICV_DEF_RESIZE_AREA_FAST_FUNC(flavor, arrtype, worktype, cast_macro)
 
#define ICV_DEF_RESIZE_AREA_FUNC(flavor, arrtype, load_macro, cast_macro)
 
#define ICV_DEF_RESIZE_BICUBIC_FUNC(flavor, arrtype, worktype, load_macro,cast_macro1, cast_macro2)
 
#define ICV_DEF_WARP_AFFINE_BILINEAR_FUNC(flavor, arrtype, worktype,scale_alpha_macro, mul_one_macro, descale_macro, cast_macro)
 
#define ICV_WARP_SCALE_ALPHA(x)   ((x)*(1./(ICV_WARP_MASK+1)))
 
#define ICV_DEF_WARP_PERSPECTIVE_BILINEAR_FUNC(flavor, arrtype, load_macro, cast_macro)
 
#define ICV_WARP_SCALE_ALPHA(x)   ((x)*(1./(ICV_WARP_MASK+1)))
 
#define ICV_DEF_REMAP_BILINEAR_FUNC(flavor, arrtype, load_macro, cast_macro)
 
#define ICV_DEF_REMAP_BICUBIC_FUNC(flavor, arrtype, worktype,load_macro, cast_macro1, cast_macro2)
 
#define CV_REMAP_SHIFT   5
 
#define CV_REMAP_MASK   ((1 << CV_REMAP_SHIFT) - 1)
 
#define align(x)
 

Typedefs

typedef struct CvResizeAlpha CvResizeAlpha
 
typedef struct CvDecimateAlpha CvDecimateAlpha
 
typedef int srcstep
 
typedef int CvSize ssize
 
typedef int CvSize void * dst
 
typedef int CvSize void int dststep
 
typedef int CvSize void int CvSize dsize
 
typedef int CvSize void int
CvSize int 
cn
 
typedef int CvSize void int
CvSize int int 
xmax
 
typedef int CvSize void int
CvSize int int const
CvResizeAlpha
xofs
 
typedef int CvSize void int
CvSize int int const
CvResizeAlpha const
CvResizeAlpha
yofs
 
typedef int CvSize void int
CvSize int int const
CvResizeAlpha const
CvResizeAlpha float
buf0
 
typedef int CvSize void int
CvSize int int const
CvResizeAlpha const
CvResizeAlpha float float
buf1
 
typedef int CvSize void int
CvSize int int 
xmin
 
typedef int CvSize void int
CvSize int int int const
CvResizeAlpha float ** 
buf
 
typedef int CvSize void int
CvSize int const int
ofs
 
typedef int CvSize void int
CvSize int const
CvDecimateAlpha int 
xofs_count
 
typedef int CvSize void int
CvSize int const
CvDecimateAlpha int float
float
sum
 
typedef CvSize srcsize
 
typedef CvSize int CvRect srcroi
 
typedef CvSize int CvRect void
int CvSize 
dstroi
 
typedef CvSize int CvRect void
int CvSize double 
xfactor
 
typedef CvSize int CvRect void
int CvSize double double 
yfactor
 
typedef CvSize int CvRect void
int CvSize double double int 
interpolation
 
typedef CvSize int CvRect void
int CvRect const double
coeffs
 
typedef CvStatus(CV_STDCALLCvWarpPerspectiveFunc )(const void *src, int srcstep, CvSize ssize, void *dst, int dststep, CvSize dsize, const double *matrix, int cn, const void *fillval)
 
typedef CvStatus(CV_STDCALLCvRemapFunc )(const void *src, int srcstep, CvSize ssize, void *dst, int dststep, CvSize dsize, const float *mapx, int mxstep, const float *mapy, int mystep, int cn, const void *fillval)
 
typedef CvStatus(CV_STDCALLCvRemapIPPFunc )(const void *src, CvSize srcsize, int srcstep, CvRect srcroi, const float *xmap, int xmapstep, const float *ymap, int ymapstep, void *dst, int dststep, CvSize dstsize, int interpolation)
 

Functions

void icvInitLinearCoeffTab ()
 
void icvInitCubicCoeffTab ()
 
 ICV_DEF_RESIZE_BILINEAR_FUNC (8u, uchar, int, ialpha, ICV_WARP_MUL_ONE_8U, ICV_WARP_DESCALE_8U) static void icvInitResizeTab(CvFuncTable *bilin_tab
 
typedef CvStatus (CV_STDCALL *CvResizeBilinearFunc)(const void *src
 
CV_IMPL void cvResize (const CvArr *srcarr, CvArr *dstarr, int method)
 
 ICV_DEF_WARP_AFFINE_BILINEAR_FUNC (8u, uchar, int, CV_NOP, ICV_WARP_MUL_ONE_8U, ICV_WARP_DESCALE_8U, CV_NOP) ICV_DEF_WARP_AFFINE_BILINEAR_FUNC(16u
 
cvRound ICV_DEF_WARP_AFFINE_BILINEAR_FUNC (32f, float, double, ICV_WARP_SCALE_ALPHA, CV_NOP, CV_NOP, CV_NOP) typedef CvStatus(CV_STDCALL *CvWarpAffineFunc)(const void *src
 
CV_IMPL void cvWarpAffine (const CvArr *srcarr, CvArr *dstarr, const CvMat *matrix, int flags, CvScalar fillval)
 
CV_IMPL CvMatcv2DRotationMatrix (CvPoint2D32f center, double angle, double scale, CvMat *matrix)
 
CV_IMPL void cvWarpPerspective (const CvArr *srcarr, CvArr *dstarr, const CvMat *matrix, int flags, CvScalar fillval)
 
CV_IMPL CvMatcvGetPerspectiveTransform (const CvPoint2D32f *src, const CvPoint2D32f *dst, CvMat *matrix)
 
CV_IMPL CvMatcvGetAffineTransform (const CvPoint2D32f *src, const CvPoint2D32f *dst, CvMat *map_matrix)
 
CV_IMPL void cvRemap (const CvArr *srcarr, CvArr *dstarr, const CvArr *_mapx, const CvArr *_mapy, int flags, CvScalar fillval)
 
CV_IMPL void cvConvertMaps (const CvArr *arrx, const CvArr *arry, CvArr *arrxy, CvArr *arra)
 
CV_IMPL void cvLogPolar (const CvArr *srcarr, CvArr *dstarr, CvPoint2D32f center, double M, int flags)
 

Variables

float icvLinearCoeffs [(ICV_LINEAR_TAB_SIZE+1)*2]
 
float icvCubicCoeffs [(ICV_CUBIC_TAB_SIZE+1)*2]
 
CvFuncTablebicube_tab
 
CvFuncTable CvFuncTableareafast_tab
 
CvFuncTable CvFuncTable
CvFuncTable
area_tab
 
bilin_tab fn_2d [CV_16U] = (void*)icvResize_Bilinear_16u_CnR
 
icvResize_8u_C1R_t icvResize_8u_C1R_p = 0
 
icvResize_8u_C3R_t icvResize_8u_C3R_p = 0
 
icvResize_8u_C4R_t icvResize_8u_C4R_p = 0
 
icvResize_16u_C1R_t icvResize_16u_C1R_p = 0
 
icvResize_16u_C3R_t icvResize_16u_C3R_p = 0
 
icvResize_16u_C4R_t icvResize_16u_C4R_p = 0
 
icvResize_32f_C1R_t icvResize_32f_C1R_p = 0
 
icvResize_32f_C3R_t icvResize_32f_C3R_p = 0
 
icvResize_32f_C4R_t icvResize_32f_C4R_p = 0
 
 ushort
 
 double
 
 ICV_WARP_SCALE_ALPHA
 
 CV_NOP
 
cvRound int CvSize void int
CvSize const double
matrix
 
cvRound int CvSize void int
CvSize const double int const
void * 
fillval
 
icvWarpAffineBack_8u_C1R_t icvWarpAffineBack_8u_C1R_p = 0
 
icvWarpAffineBack_8u_C3R_t icvWarpAffineBack_8u_C3R_p = 0
 
icvWarpAffineBack_8u_C4R_t icvWarpAffineBack_8u_C4R_p = 0
 
icvWarpAffineBack_32f_C1R_t icvWarpAffineBack_32f_C1R_p = 0
 
icvWarpAffineBack_32f_C3R_t icvWarpAffineBack_32f_C3R_p = 0
 
icvWarpAffineBack_32f_C4R_t icvWarpAffineBack_32f_C4R_p = 0
 
icvWarpPerspectiveBack_8u_C1R_t icvWarpPerspectiveBack_8u_C1R_p = 0
 
icvWarpPerspectiveBack_8u_C3R_t icvWarpPerspectiveBack_8u_C3R_p = 0
 
icvWarpPerspectiveBack_8u_C4R_t icvWarpPerspectiveBack_8u_C4R_p = 0
 
icvWarpPerspectiveBack_32f_C1R_t icvWarpPerspectiveBack_32f_C1R_p = 0
 
icvWarpPerspectiveBack_32f_C3R_t icvWarpPerspectiveBack_32f_C3R_p = 0
 
icvWarpPerspectiveBack_32f_C4R_t icvWarpPerspectiveBack_32f_C4R_p = 0
 
icvWarpPerspective_8u_C1R_t icvWarpPerspective_8u_C1R_p = 0
 
icvWarpPerspective_8u_C3R_t icvWarpPerspective_8u_C3R_p = 0
 
icvWarpPerspective_8u_C4R_t icvWarpPerspective_8u_C4R_p = 0
 
icvWarpPerspective_32f_C1R_t icvWarpPerspective_32f_C1R_p = 0
 
icvWarpPerspective_32f_C3R_t icvWarpPerspective_32f_C3R_p = 0
 
icvWarpPerspective_32f_C4R_t icvWarpPerspective_32f_C4R_p = 0
 
icvRemap_8u_C1R_t icvRemap_8u_C1R_p = 0
 
icvRemap_8u_C3R_t icvRemap_8u_C3R_p = 0
 
icvRemap_8u_C4R_t icvRemap_8u_C4R_p = 0
 
icvRemap_32f_C1R_t icvRemap_32f_C1R_p = 0
 
icvRemap_32f_C3R_t icvRemap_32f_C3R_p = 0
 
icvRemap_32f_C4R_t icvRemap_32f_C4R_p = 0
 

Macro Definition Documentation

#define align (   x)
#define CV_REMAP_MASK   ((1 << CV_REMAP_SHIFT) - 1)
#define CV_REMAP_SHIFT   5
#define ICV_CUBIC_1 (   x)    (((A + 2)*(x) - (A + 3))*(x)*(x) + 1)
#define ICV_CUBIC_2 (   x)    (((A*(x) - 5*A)*(x) + 8*A)*(x) - 4*A)
#define ICV_DEF_REMAP_BICUBIC_FUNC (   flavor,
  arrtype,
  worktype,
  load_macro,
  cast_macro1,
  cast_macro2 
)
#define ICV_DEF_REMAP_BILINEAR_FUNC (   flavor,
  arrtype,
  load_macro,
  cast_macro 
)
#define ICV_DEF_RESIZE_AREA_FAST_FUNC (   flavor,
  arrtype,
  worktype,
  cast_macro 
)
#define ICV_DEF_RESIZE_AREA_FUNC (   flavor,
  arrtype,
  load_macro,
  cast_macro 
)
#define ICV_DEF_RESIZE_BICUBIC_FUNC (   flavor,
  arrtype,
  worktype,
  load_macro,
  cast_macro1,
  cast_macro2 
)
#define ICV_DEF_RESIZE_BILINEAR_FUNC (   flavor,
  arrtype,
  worktype,
  alpha_field,
  mul_one_macro,
  descale_macro 
)
#define ICV_DEF_WARP_AFFINE_BILINEAR_FUNC (   flavor,
  arrtype,
  worktype,
  scale_alpha_macro,
  mul_one_macro,
  descale_macro,
  cast_macro 
)
#define ICV_DEF_WARP_PERSPECTIVE_BILINEAR_FUNC (   flavor,
  arrtype,
  load_macro,
  cast_macro 
)
#define ICV_WARP_CLIP_X (   x)
Value:
((unsigned)(x) < (unsigned)ssize.width ? \
(x) : (x) < 0 ? 0 : ssize.width - 1)
#define ICV_WARP_CLIP_Y (   y)
Value:
((unsigned)(y) < (unsigned)ssize.height ? \
(y) : (y) < 0 ? 0 : ssize.height - 1)
#define ICV_WARP_DESCALE_8U (   x)    CV_DESCALE((x), ICV_WARP_SHIFT*2)
#define ICV_WARP_MUL_ONE_8U (   x)    ((x) << ICV_WARP_SHIFT)
#define ICV_WARP_SCALE_ALPHA (   x)    ((x)*(1./(ICV_WARP_MASK+1)))
#define ICV_WARP_SCALE_ALPHA (   x)    ((x)*(1./(ICV_WARP_MASK+1)))

Typedef Documentation

typedef CvSize int CvRect void int CvRect const double * coeffs
typedef CvStatus(CV_STDCALL * CvRemapFunc)(const void *src, int srcstep, CvSize ssize, void *dst, int dststep, CvSize dsize, const float *mapx, int mxstep, const float *mapy, int mystep, int cn, const void *fillval)
typedef CvStatus(CV_STDCALL * CvRemapIPPFunc)(const void *src, CvSize srcsize, int srcstep, CvRect srcroi, const float *xmap, int xmapstep, const float *ymap, int ymapstep, void *dst, int dststep, CvSize dstsize, int interpolation)
typedef struct CvResizeAlpha CvResizeAlpha
typedef CvStatus(CV_STDCALL * CvWarpPerspectiveFunc)(const void *src, int srcstep, CvSize ssize, void *dst, int dststep, CvSize dsize, const double *matrix, int cn, const void *fillval)
typedef CvSize int CvRect void* dst
typedef CvSize int CvRect void int CvRect dstroi
typedef CvSize int CvRect void int dststep
cvRound int CvSize void int CvSize const double int const void const int * ofs
typedef CvSize srcsize
typedef CvSize int srcstep
const CvArr * sum
typedef int CvSize void int CvSize int int int xmax
typedef int CvSize void int CvSize int int xmin
typedef int CvSize void int CvSize int const CvDecimateAlpha * xofs
typedef int CvSize void int CvSize int int const CvResizeAlpha const CvResizeAlpha* yofs

Function Documentation

CV_IMPL CvMat* cv2DRotationMatrix ( CvPoint2D32f  center,
double  angle,
double  scale,
CvMat matrix 
)
CV_IMPL void cvConvertMaps ( const CvArr arrx,
const CvArr arry,
CvArr arrxy,
CvArr arra 
)
CV_IMPL CvMat* cvGetAffineTransform ( const CvPoint2D32f src,
const CvPoint2D32f dst,
CvMat map_matrix 
)
CV_IMPL CvMat* cvGetPerspectiveTransform ( const CvPoint2D32f src,
const CvPoint2D32f dst,
CvMat matrix 
)
CV_IMPL void cvLogPolar ( const CvArr srcarr,
CvArr dstarr,
CvPoint2D32f  center,
double  M,
int  flags 
)
CV_IMPL void cvRemap ( const CvArr srcarr,
CvArr dstarr,
const CvArr _mapx,
const CvArr _mapy,
int  flags,
CvScalar  fillval 
)
CV_IMPL void cvResize ( const CvArr srcarr,
CvArr dstarr,
int  method 
)
typedef CvStatus ( CV_STDCALL CvResizeBilinearFunc) const
CV_IMPL void cvWarpAffine ( const CvArr srcarr,
CvArr dstarr,
const CvMat matrix,
int  flags,
CvScalar  fillval 
)
CV_IMPL void cvWarpPerspective ( const CvArr srcarr,
CvArr dstarr,
const CvMat matrix,
int  flags,
CvScalar  fillval 
)
ICV_DEF_RESIZE_BILINEAR_FUNC ( 8u  ,
uchar  ,
int  ,
ialpha  ,
ICV_WARP_MUL_ONE_8U  ,
ICV_WARP_DESCALE_8U   
)
ICV_DEF_WARP_AFFINE_BILINEAR_FUNC ( 8u  ,
uchar  ,
int  ,
CV_NOP  ,
ICV_WARP_MUL_ONE_8U  ,
ICV_WARP_DESCALE_8U  ,
CV_NOP   
)
cvRound ICV_DEF_WARP_AFFINE_BILINEAR_FUNC ( 32f  ,
float  ,
double  ,
ICV_WARP_SCALE_ALPHA  ,
CV_NOP  ,
CV_NOP  ,
CV_NOP   
) const
void icvInitCubicCoeffTab ( )
void icvInitLinearCoeffTab ( )

Variable Documentation

Initial value:
{
bilin_tab->fn_2d[CV_8U] = (void*)icvResize_Bilinear_8u_CnR
CvFuncTable CvFuncTable* areafast_tab
CvFuncTable* bicube_tab
CV_NOP
cvRound cvRound double
cvRound int CvSize void int CvSize const double int const void* fillval
area_tab fn_2d = (void*)icvResize_Bilinear_16u_CnR
ICV_WARP_SCALE_ALPHA
float icvCubicCoeffs[(ICV_CUBIC_TAB_SIZE+1)*2]
float icvLinearCoeffs[(ICV_LINEAR_TAB_SIZE+1)*2]
icvRemap_32f_C1R_t icvRemap_32f_C1R_p = 0
icvRemap_32f_C3R_t icvRemap_32f_C3R_p = 0
icvRemap_32f_C4R_t icvRemap_32f_C4R_p = 0
icvRemap_8u_C1R_t icvRemap_8u_C1R_p = 0
icvRemap_8u_C3R_t icvRemap_8u_C3R_p = 0
icvRemap_8u_C4R_t icvRemap_8u_C4R_p = 0
icvResize_16u_C1R_t icvResize_16u_C1R_p = 0
icvResize_16u_C3R_t icvResize_16u_C3R_p = 0
icvResize_16u_C4R_t icvResize_16u_C4R_p = 0
icvResize_32f_C1R_t icvResize_32f_C1R_p = 0
icvResize_32f_C3R_t icvResize_32f_C3R_p = 0
icvResize_32f_C4R_t icvResize_32f_C4R_p = 0
icvResize_8u_C1R_t icvResize_8u_C1R_p = 0
icvResize_8u_C3R_t icvResize_8u_C3R_p = 0
icvResize_8u_C4R_t icvResize_8u_C4R_p = 0
icvWarpAffineBack_32f_C1R_t icvWarpAffineBack_32f_C1R_p = 0
icvWarpAffineBack_32f_C3R_t icvWarpAffineBack_32f_C3R_p = 0
icvWarpAffineBack_32f_C4R_t icvWarpAffineBack_32f_C4R_p = 0
icvWarpAffineBack_8u_C1R_t icvWarpAffineBack_8u_C1R_p = 0
icvWarpAffineBack_8u_C3R_t icvWarpAffineBack_8u_C3R_p = 0
icvWarpAffineBack_8u_C4R_t icvWarpAffineBack_8u_C4R_p = 0
icvWarpPerspective_32f_C1R_t icvWarpPerspective_32f_C1R_p = 0
icvWarpPerspective_32f_C3R_t icvWarpPerspective_32f_C3R_p = 0
icvWarpPerspective_32f_C4R_t icvWarpPerspective_32f_C4R_p = 0
icvWarpPerspective_8u_C1R_t icvWarpPerspective_8u_C1R_p = 0
icvWarpPerspective_8u_C3R_t icvWarpPerspective_8u_C3R_p = 0
icvWarpPerspective_8u_C4R_t icvWarpPerspective_8u_C4R_p = 0
icvWarpPerspectiveBack_32f_C1R_t icvWarpPerspectiveBack_32f_C1R_p = 0
icvWarpPerspectiveBack_32f_C3R_t icvWarpPerspectiveBack_32f_C3R_p = 0
icvWarpPerspectiveBack_32f_C4R_t icvWarpPerspectiveBack_32f_C4R_p = 0
icvWarpPerspectiveBack_8u_C1R_t icvWarpPerspectiveBack_8u_C1R_p = 0
icvWarpPerspectiveBack_8u_C3R_t icvWarpPerspectiveBack_8u_C3R_p = 0
icvWarpPerspectiveBack_8u_C4R_t icvWarpPerspectiveBack_8u_C4R_p = 0
cvRound int CvSize void int CvSize const double* matrix