A method for determining a composition of an object using a spectral x-ray system is provided. X-ray photons of at least two different energies are transmitted through the object. The energy of each detected x-ray photon using a detector in the x-ray system is estimated.