我想将具有图像纹理的双曲庞加莱圆盘(https://www.flickr.com/photos/gbachelier/albums/72157676467905456中的示例)转换为布拉托夫带模型,并在https://www.slideshare.net/中找到chamb3rlain/a-poor-mans-hyperbolic-square-mapping(幻灯片 25)基于反双曲 tan 的函数应该这样做:f(z) = 2*pi*atanh(z)。但是将它插入基于网格网格的框架中,以使用复杂的值函数进行图像扭曲,我得到的结果与预期的能带结构不同。
那么如何映射到波段模型呢?
wh_out = num2cell([1000,2000]); [w_o,h_o] = wh_out{:};
[h_i, w_i, d] = size(img);
% GENERATE OUTPUT-GRID AND NORMALIZE [-1 1]
[xo1,yo1] = meshgrid(1:w_o,1:h_o);
xo1 = (xo1/w_o)*2 - 1;
yo1 = (yo1/h_o)*2 - 1;
% WARP OUTPUT-GRID WITH f(z) AND SEPARATE REAL AND IMAGINARY PARTS
fxiy = 2 * pi * atanh(deg2rad(xo1+1i*y_o1)));
xo1=real(fxiy);
yo1=imag(fxiy);
% NORMALIZE OUTPUT-GRID [0 1]
xo1 = (xo1+1)/2;
yo1 = (yo1+1)/2;
% GENERATE INPUT-GRID AND NORMALIZE [0 1]
[xi,yi] = meshgrid(linspace(0,w_i+1,w_i),linspace(0,h_i+1,h_i));
xi = xi / w_i;
yi = yi / h_i;
% INTERPOLATION OF OUTPUT-IMAGE
img = double(img);
img_out = zeros(h_o,w_o,d);
for k = 1:d; img_out(:,:,k) = uint8(interp2(xi, yi, img(:,:,k), xo1, yo1, interpol_meth)); end