1. An X-ray imaging apparatus comprising: an X-ray generator configured to generate and radiate X-rays to a subject; an X-ray detector configured to detect and convert X-rays transmitted through the subject into an image signal; and a controller configured to analyze the image signal of the subject and set gain of the X-ray detector for each of detection regions of the X-ray detector.