對數極座標圖像幾何學首先是從生物視覺系統的視網膜生理結構得到靈感的,具備數據壓縮特性。在人工視覺系統中,與常見的笛卡爾座標系中的圖像對比,在沒有減少視域大小和視網膜中心部分圖像的分辨率的狀況下,對數極座標圖像容許更加快速的採樣率。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; }