1. A binary image encoding method using an adaptive template, the method comprising: applying a window having a predetermined size and shape to a predetermined number of previous pixels and peripheral pixels of the previous pixels, and acquiring correlations between the previous pixels and the peripheral pixels within the window; determining relative locations having high correlation with the previous pixels within the window based on the acquired correlations; generating a template based on the determined relative locations; and performing binary arithmetic encoding on a current pixel by using the generated template.