This work continues our previous research, initiated in, where we developed a computational framework for tracking of lines in images via data-driven sub-Riemannian geodesics in the Lie groups $SE(2)$ and $SO(3)$. The key idea was to include an external cost factor in the sub-Riemannian metric. The external cost was used for adaptation to image data. Now we develop the idea of data-driven geodesics, but in new context of modelling of visual system. Here, the external cost is added for adaptation to nonuniform distribution of photoreceptors on the retina. We propose a natural external cost for a sub-Riemannian metric in $SO(3)$. We construct the external cost $C(x,y)$ so, that it does not put a penalty in the foveola $C(0,0) = 1$, and it penalizes a motion outside the foveola proportionally to the cortical magnification factor