Calibration of the x-ray apparatus is necessary for many applications. Most of the literature on the calibration of x-ray apparatus seem to ignore the imaging deformation. Our main concern is how to apply Tsai's nonlinear camera calibration technique to the calibration of a medical x-ray apparatus with deformation. In order to achieve this goal, two key problems should be solved: The first is how to calibrate some key intrinsic parameters, namely, the imaging center and sampling step of the detector, which are usually provided by the camera manufacturer but are unknown for the x-ray apparatus. The second is how to model the serious imaging deformation. Some practical schema are designed to solve these two problems, and the whole calibration procedure and experimental results are presented.