1. A method of detecting a repetitive pattern, the method comprising: obtaining one or more color layers comprised of the pixels included in each cluster by clustering pixels of an input image according to color; selecting one or more effective layers from the color layers, wherein each of the effective layers comprises at least a predetermined number of respective pixel components, each of the pixel components including a plurality of pixels and having at least one of a predetermined shape and a predetermined area size; selecting a unit pattern, repeatedly disposed at different locations in each of the effective layers, from the respective pixel components; in each effective layer, calculating distances between the unit patterns; and calculating a repetition cycle of each of the unit patterns of the input image, based on the calculated distances, wherein at least one of the clustering, obtaining, selecting, and calculating is implemented using a hardware processor.