This invention is related to a method for calibrating a 3D camera that assists in applications in computed or digital radiography, wherein an accurate measurement of distances is required. The method is based on the measurement of the size of a reference object in the field-of-view of the visual part of the depth camera which is then matched to the distance measurements to said reference object by the depth measuring part of the depth camera. The method may be applied for the determination of the distance between an X-ray source and an image detector.