Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

HighQuality2Magnifier.hpp

00001 #ifndef _HighQuality2Magnifier_H
00002 #define _HighQuality2Magnifier_H
00003 
00004 
00028 #include <stdio.h>
00029 
00030 #include "AnImageInterpolator.hpp"
00031 
00032 class HighQuality2Magnifier : public AnImageInterpolator
00033 {
00034 private:
00035 
00036 const static float p[4][9];
00037 
00038 double d1, d2, d3;                              // used diferences
00039 double q[4];
00040 double eps;
00041 
00042 double y1, y2, y3, y4;                          // x5 pixel expands to y1,y2,y3,y4
00043 
00044 protected:
00045 
00046 double computeY1(int x, int y, int c);
00047 double computeY2(int x, int y, int c);
00048 double computeY3(int x, int y, int c);
00049 double computeY4(int x, int y, int c);
00050 
00051 public:
00052 
00053 HighQuality2Magnifier(AnImage* animage=0);
00054 virtual ~HighQuality2Magnifier(){}
00055 
00056 virtual int igetR(double x, double y, int c=0);                         // integer rounding
00057 virtual double getR(double x, double y, int c=0);                       // interpolated value
00058 
00059 virtual AnImage* magnify(double factor=2.0, AnImage* dest=0){ return magnify2(dest); }
00060 virtual AnImage* magnify2(AnImage* dest=0);
00061 };
00062 
00063 #endif
SourceForge.net Logo
Restoreinpaint sourceforge project `C++/Java Image Processing, Restoration, Inpainting Project'.

Bernard De Cuyper: Open Project Leader: Concept, design and development.
Bernard De Cuyper & Eddy Fraiha 2002, 2003. Bernard De Cuyper 2004. Open and free, for friendly usage only.
Modifications on Belgium ground of this piece of artistic work, by governement institutions or companies, must be notified to Bernard De Cuyper.
bern_bdc@hotmail.com