00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00020 #ifndef CMotion2DWarping_h
00021 #define CMotion2DWarping_h
00022
00023 #include <stdio.h>
00024 #include <Motion2D.h>
00025 #include <CMotion2DModel.h>
00026
00027
00028 #if defined (WIN32)
00029 # if defined MOTION2D_DLL_EXPORTS
00030 # define MOTION2D_API __declspec( dllexport )
00031 # elif defined MOTION2D_DLL_IMPORTS
00032 # define MOTION2D_API __declspec( dllimport )
00033 # else
00034 # define MOTION2D_API
00035 # endif
00036 #else
00037 # define MOTION2D_API
00038 #endif
00039
00040
00041
00042
00043 class MOTION2D_API CMotion2DWarping
00044 {
00045 public:
00046 CMotion2DWarping();
00047 ~CMotion2DWarping();
00048
00049 bool initBackWarp(int dst_nrows, int dst_ncols,
00050 int dst_row_offset, int dst_col_offset);
00051 bool backWarp(unsigned char *src, int src_nrows, int src_ncols,
00052 unsigned char *dst, CMotion2DModel model);
00053 bool backWarp(short *src, int src_nrows, int src_ncols,
00054 short *dst, CMotion2DModel model);
00055 void getBackWarpPosition(int row, int col, float &d_row, float &d_col);
00056 bool warp(unsigned char *src, unsigned char *dst,
00057 int nrows, int ncols, CMotion2DModel model);
00058
00059 int Nbli_ima_out;
00060 int Nbcol_ima_out;
00061 int Offset_li;
00062 int Offset_co;
00063 float Ivariation;
00064
00065 TImageFloat imFx;
00066
00067 TImageFloat imFy;
00068
00069
00070 };
00071
00072
00073 #endif