00001 #ifndef _BicubicImInterpolator_H
00002 #define _BicubicImInterpolator_H
00003
00024 #include <stdio.h>
00025
00026 #include "AnImageInterpolator.hpp"
00027
00028 class BicubicImInterpolator : public AnImageInterpolator
00029 {
00030 private:
00031
00032 int ix, iy;
00033 int ichannel;
00034
00035 float y[4];
00036 float y1[4];
00037 float y2[4];
00038 float y12[4];
00039
00040 float c[4][4];
00041
00042 public:
00043
00044 const static int wt[16][16];
00045
00046 protected:
00047
00048 void computeBoxAndGradients(double x, double y, int c=0);
00049 void computeCoefficients();
00050
00051 public:
00052
00053 BicubicImInterpolator(AnImage* animage=0):AnImageInterpolator(animage){ix=-1; iy=-1; ichannel=-1;}
00054 virtual ~BicubicImInterpolator(){}
00055
00056 virtual int igetR(double x, double y, int c=0);
00057 virtual double getR(double x, double y, int c=0);
00058 };
00059
00060 #endif