25 #include "Image/LogPolarMapping.hh"
26 #include <Base/Geometry/HomgPoint2D.hh>
32 template <
class InputStorageType,
class OutputStorageType>
37 template <
class InputStorageType,
class OutputStorageType>
42 template <
class InputStorageType,
class OutputStorageType>
49 template <
class InputStorageType,
class OutputStorageType>
59 template <
class InputStorageType,
class OutputStorageType>
68 for(
int i=0;i<2*x;i++){
69 for(
int j=0;j<2*y;j++){
71 a = 0.5*M_PI*(double)j/(
double)YCenter_;
73 r = (double) pow((
double)XCenter_,(double)i/(
double)(2*XCenter_));
75 _XYMap[i+j*2*x][0] = sin(a) * r;
76 _XYMap[i+j*2*x][1] = YCenter_ + cos(a) * r;
82 template <
class InputStorageType,
class OutputStorageType>
97 source[0] = _XYMap[(int)sink[0]+2*XCenter_*(
int)sink[1]][0];
98 source[1] = _XYMap[(int)sink[0]+2*XCenter_*(
int)sink[1]][1];
108 #if defined(BUILD_IMAGE_CHAR)
114 #if defined(BUILD_IMAGE_USHORT)
118 #if defined(BUILD_IMAGE_SHORT)
122 #if defined(BUILD_IMAGE_SHORT)&&defined(BUILD_IMAGE_USHORT)
126 #if defined(BUILD_IMAGE_INT)
130 #if defined(BUILD_IMAGE_USHORT)
134 #if defined(BUILD_IMAGE_USHORT) && defined(BUILD_IMAGE_INT)
138 #if defined(BUILD_IMAGE_DOUBLE)
Maps cartesian source coordinates to log-polar sink coordinates.
virtual int GetSourceCoordinates_(const HomgPoint2D &sink, HomgPoint2D &source) const
reimplementation for Pixel transformation, takes sink and computes coords in source ...
LogPolarMapping< InputStorageType, OutputStorageType > & operator=(const LogPolarMapping &src)
required because of const members
class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates.
void SetImageCenter(const int &x, const int &y)
set your image center before calling Map().
virtual ~LogPolarMapping()