1. A method for determining a path of a pen tip of a pen within a document, the method comprising: (A) calibrating the pen in order to obtain a calibration parameter; (B) analyzing a watermarked document image in order to determine areas where x-y positions cannot be uniquely determined by m-array decoding; (C) segmenting a maze pattern from an obstruction component of a captured image, wherein the obstruction component comprises document content that occludes the maze pattern; (D) analyzing the maze pattern to extract bits from the maze pattern of the captured image; (E) in response to (D), determining a transform that transforms image position coordinates to actual position coordinates, wherein the actual position coordinates identify a location of the pen tip in relation to the document; (F) decoding the extracted bits associated with the captured image; (G) in response to (F), if the image position coordinates of the captured image cannot be determined, matching the captured image with image information, comprising: (i) warping the captured image to create a warped image; and (ii) matching the warped image with an area of the document, where a corresponding x-y position cannot be uniquely determined by m-array decoding; (H) determining image position coordinates of other image frames that are associated with a pen stroke, comprising: (i) matching a corresponding captured image with a neighboring area of the image position coordinates of an image whose image position coordinates have been determined previously; and (ii) repeating (i) until all image frames of the pen stroke are processed; and (I) mapping the path of the pen tip from the transform, the calibration parameter, and the image position coordinates.