对数极坐标图像几何学首先是从生物视觉系统的视网膜生理结构得到灵感的,具备数据压缩特性。在人工视觉系统中,与常见的笛卡尔坐标系中的图像对比,在没有减少视域大小和视网膜中心部分图像的分辨率的状况下,对数极坐标图像容许更加快速的采样率。html
The log-polar image geometry was first motivated by its resemblance with the structure of the retina of some biological vision systems and by its data compression qualities. When compared to the usual cartesian images, the log-polar images allow faster sampling rates on artificial vision systems without reducing the size of the field of view and the resolution on the central part of the retina (fovea). In the last years, however, it has been noticed that the log-polar geometry also provides important algorithmic benefits. For instance in [AlexTRA99], it is shown that the use of log-polar images increases the size range of objects that can be tracked using a simple translation model. We expect that increasing the ``order" of the transformation towards the planar model, these advantages can still be observed.app
The log-polar transformation is a conformal mapping from the points on the cartesian plane (x,y) to points in the log-polar plane (x,h):ide
The mapping is described by:ui
x = M * log(sqrt(x.^2 + y .^ 2))spa
h = atan(y/x)code
OpenCV实现:orm
#include <cv.h> #include <highgui.h> int main(int argc, char** argv) { IplImage* src; //if( argc == 2 && (src=cvLoadImage(argv[1],1)) != 0 ) if(src = cvLoadImage(argc > 1? argv[1] : "fruits.jpg", 1)) { IplImage* dst = cvCreateImage( cvSize(256,256), 8, 3 ); IplImage* src2 = cvCreateImage( cvGetSize(src), 8, 3 ); cvLogPolar( src, dst, cvPoint2D32f(src->width/2,src->height/2), 40, CV_INTER_LINEAR + CV_WARP_FILL_OUTLIERS ); cvLogPolar( dst, src2, cvPoint2D32f(src->width/2,src->height/2), 40, CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS + CV_WARP_INVERSE_MAP ); cvNamedWindow( "log-polar", 1 ); cvShowImage( "log-polar", dst ); cvNamedWindow( "inverse log-polar", 1 ); cvShowImage( "inverse log-polar", src2 ); cvWaitKey(); } return 0; }