An apparatus and method for dynamically calibrating a computed-tomography (CT) scanner that includes a rotating X-ray source and a plurality of stationary energy-discriminating detectors configured to capture incident X-ray photons emitted from the X-ray source. A bowtie filter with a unique geometry and material composition is used to generate reference beams of a desired intensity. The apparatus includes a processor that is configured to remove a scattering background based on data obtained from the reference beams and compute a change in a predetermined calibration function.