Energy sensitive photon counting x-ray detectors (PCXD)  have many advantages over energy-integrating x-ray detectors (EIXD) in x-ray computed tomography (CT), such as the ability to measure the spectrum of x-ray beams. When such PCXDs are operated under a high count rate in clinical scanners, coincident photons would distort the recorded energy spectrum due to the limited speed of the detector. To compensate for the spectrum distortions, we have developed analytical models for them  and integrated one such model into an image reconstruction process using a sinogram restoration framework . In this method, the attenuation of the object was modeled as a sum of line integrals of N basis functions, where N was fixed at 3 for the entire sinogram when a contrast agent is involved. The method allowed us to reconstruct accurate images, compensating for the effect of spectrum distortion of PCXD; however, the contrast-to-noise (CNR) of the images were only comparable to that obtained by EIXDs. We believe the main reason is an increased statistical uncertainty in the estimated line integrals introduced by the 3rd basis function. In this paper, we propose a method to improve the CNR by employing the fewest number of basis functions Nm (≤N) as necessary for an individual sinogram ray. Our simulation studies indicate that the CNR achieved for a Gd-based contrast agent by PCXDs could be 12% better than the conventional method of , and 28% better than EIXDs for scans with similar number of x-ray photons, which points to a dose reduction of 20% and 39% respectively.