1. An X-ray imaging apparatus comprising: an X-ray source configured to generate and emit X-rays having a preset broadband; an X-ray detector including a plurality of raw pixels, each of the plurality of raw pixels being configured to detect photons in response to the emitted X-rays, and convert the detected photons into electrical signals; and an image processor configured to generate a plurality of single-energy images corresponding to respective energy bands, by separating the plurality of raw pixels for the respective energy bands based on the electrical signals, and generate a multi-energy image using the plurality of single-energy images, wherein the X-ray detector is configured to detect the photons according to a charge integration mode in which charges introduced into the raw pixels for a given time are accumulated and thereafter, the electrical signals are acquired from the accumulated charges, wherein the image processor is configured to generate the plurality of single-energy images by grouping the plurality of raw pixels into a plurality of virtual pixels, and estimating a number of the photons for each of the plurality of virtual pixels as a number of the plurality of raw pixels separated for each of the plurality of virtual pixels.