The paper investigates the geometric calibration of a rotating gamma camera for pinhole (PH) single photon emission computed tomography (SPECT) imaging. Most calibration methods previously applied in PH-SPECT assume that the motion of the camera around the object belongs to a well-defined class described by a small number of geometric parameters, for instance seven parameters for a circular acquisition with a single pinhole camera. The proposed new method refines an initial parametric calibration by applying to each position of the camera a rigid body transformation that is determined to improve the fit between the measured and calculated projections of the calibration sources. A stable estimate of this transformation can be obtained with only three calibration sources by linearizing the equations around the position estimated by the initial parametric calibration. The performance of the method is illustrated using simulated and measured micro-SPECT data.