A method and apparatus is disclosed for determining the central ray of scanning an object on a detector in a computer tomography system. The method comprises producing a fan beam of x-rays at a fixed x-ray source and detecting the x-rays at the detector. The scanning projection data of the object under examination is received and the object is rotated under examination using a manipulator. After calculating the opposite projection pixel position and projection angle for each pixel, a mismatching is measured between the grey levels of all pixels and their calculated opposite projection pixels with a set of assumed central ray, and identifying the minimum of the measurement as the true central ray.