1. An X-ray apparatus comprising: a collimator comprising a lamp, the collimator being configured to adjust an irradiation region of X-rays radiated from an X-ray source; an image acquirer configured to acquire an object image by imaging an object while the lamp illuminates the object; and a controller configured to determine an object distance based on the object image and determine a thickness of the object based on a detector distance and the object distance, wherein the object distance is a distance between the X-ray source and the object, and the detector distance is a distance between the X-ray source and an X-ray detector.