1. A method of removing blocking artifacts in an input image, the method comprising: detecting a first blocking artifact which is in a flat region of the input image; removing the first blocking artifact using a number of low frequency coefficients from among transformation coefficients for each transformation block of a plurality of transformation blocks of the input image, based on a result of detecting the first blocking artifact; detecting an edge region of the input image; and removing a second blocking artifact, which is in an edge region of an intermediate image obtained from the removing of the first blocking artifact of the input image, based on the detected edge region in the input image.