A position and orientation (pose) measurement system is being developed. The system, called PosEye, is based on a camera and by using the information in the image, the pose of the camera taking the image can be calculated. The system is aimed to be placed on an industrial robot for welding, but it is flexible and can also be used in many other applications. The accuracy has been measured, and it is concluded that the accuracy needs to be improved for welding applications. To make the pose measurement, reference points, that can be recognized in the image, are distributed in the working area. The positions of the reference points and the parameters in a camera model are initially computed automatically from sample images from a number of directions to the reference points. After this calibration, the pose can be calculated at each sample image. For high accuracy there is a need to have a camera model that takes into account a number of distortion effects, which are further developed in this paper. The new model is used to express an optimization cost function that can be used for both the pose calculation, and the extensive calibration, that determines camera parameters in the camera model and the positions of the reference points