1. A method for recognizing markers printed on a material, comprising: sampling an image of the material; grouping the sampled image of pixels into a first image group and a second image group based on a threshold; calculating medians of the first image group and the second image group to update the threshold with a first average value of the calculated medians; repeating the grouping and calculating until a difference between a previous threshold and an updated threshold is equal to or smaller than a reference value; binarizing the image captured by a camera based on the updated threshold; detecting the markers based on the binary image sampling a region including the detected markers to thereby produce a second sampled image of pixels, when the markers are detected based on the binary image; and grouping the second sampled image of pixels into groups based on the threshold to update the threshold with a second average value of medians of the groups.