The next generation of synchrotrons and free electron lasers requires x-ray optical systems with extremely high-performance, generally, of diffraction limited quality. Fabrication and use of such optics requires highly accurate metrology. In the present paper, we discuss a way to improve the performance of the Long Trace Profiler (LTP), a slope measuring instrument widely used at synchrotron facilities to characterize x-ray optics at high-spatial-wavelengths from approximately 2 mm to 1 m. One of the major sources of LTP systematic error is the detector. For optimal functionality, the detector has to possess the smallest possible pixel size/spacing, a fast method of shuttering, and minimal non-uniformity of pixel-to-pixel photoresponse. While the first two requirements are determined by choice of detector, the non-uniformity of photoresponse of typical detectors such as CCD cameras is around 2-3%. We describe a flat-field calibration setup specially developed for calibration of CCD camera photo-response and dark current with an accuracy of better than 0.5%. Such accuracy is adequate for use of a camera as a detector for an LTP with performance of ～0.1 microradian (rms). We also present the design details of the calibration system and results of calibration of a DALSA CCD camera used for upgrading our LTP-U instrument at the ALS Optical Metrology Laboratory.