  We consider a natural extension of the Petitot-Citti-Sarti model of the
primary visual cortex. In the extended model, the curvature of contours is
taking into account such that occluded contours are completed using
sub-Riemannian geodesics in the four-dimensional space M of positions,
orientations, and curvatures. Here, M=R^2 x SO(2) x R models the configuration
space of neurons of the visual cortex. We study the problem of sub-Riemannian
geodesics on M via methods of geometric control theory. We prove complete
controllability of the system and the existence of optimal controls. By
application of Pontryagin maximum principle, we derive a Hamiltonian system
that describes the geodesics. We obtain explicit parametrization of abnormal
extremals. In the normal case, we provide three functionally independent first
integrals. Numerical simulations indicate the existence of one more first
integral that results in Liouville integrability of the system.
