1. A method of tracking a marker by an electronic device, the method comprising: detecting a position of a marker in a first frame; tracking a position of the marker in a second frame based on the position of the marker detected in the first frame; and estimating a 3D position based on the tracked position of the marker.