I have two coordinate frames moving with respect to each other. One frame is attached to a camera such that the $z$-vector is in the direction of the axis of the camera. The other frame is attached to an image such that the $xy$-plane contains the plane of the image.
What would be the most intuitive way to represent the orientation of the image plane w.r.t the camera without any jumps between the angles? My goal is to train a neural network to learn the image orientation and I want to avoid the output jumps near $0.2π$. Intuitively, $0$ and $2π$ are close but very far on terms of a loss function of a neural network.