A computer-implemented method of determining which portion of a document having a pattern that uniquely identifies different positions in the document corresponds to a captured image of the portion if the captured image comprises an area, referred to as obscured area, in which the pattern is too obscured to provide reliable position information, comprising: obtaining the captured image of the portion of the document, the document having the pattern that uniquely identifies different positions in the document; analyzing an electronic version of the document to determine obscured areas of the document in which the pattern is obscured by a first threshold amount; designating a reference pixel in the captured image; determining a rotation and a scale of the captured image relative to the document; determining an offset distance between the reference pixel and a closest cell of the representation of the pattern in the captured image; warping the captured image using the determined rotation and scale; for each location in the obscured areas, determining if the location is a matching location, wherein the location is a matching location if an offset of the location to the closest pattern cell matches the offset of the reference pixel by a second threshold amount; comparing the warped captured image with different portions of the electronic version of the document, such that the reference pixel in the warped captured image is compared with each matching location and the reference pixel in the warped captured image is only compared to matching locations; determining a correlation value for each comparison of the warped captured image with a portion of the electronic version of the document; identifying comparisons that have a correlation value of 0.5 or greater; identifying a comparison with a highest correlation value; and if the highest correlation value is higher than all other correlation values by a third threshold amount, determining that the captured image is an image of the document portion used in the comparison with the highest correlation value. obtaining the captured image of the portion of the document, the document having the pattern that uniquely identifies different positions in the document; analyzing an electronic version of the document to determine obscured areas of the document in which the pattern is obscured by a first threshold amount; designating a reference pixel in the captured image; determining a rotation and a scale of the captured image relative to the document; determining an offset distance between the reference pixel and a closest cell of the representation of the pattern in the captured image; warping the captured image using the determined rotation and scale; for each location in the obscured areas, determining if the location is a matching location, wherein the location is a matching location if an offset of the location to the closest pattern cell matches the offset of the reference pixel by a second threshold amount; comparing the warped captured image with different portions of the electronic version of the document, such that the reference pixel in the warped captured image is compared with each matching location and the reference pixel in the warped captured image is only compared to matching locations; determining a correlation value for each comparison of the warped captured image with a portion of the electronic version of the document; identifying comparisons that have a correlation value of 0.5 or greater; identifying a comparison with a highest correlation value; and if the highest correlation value is higher than all other correlation values by a third threshold amount, determining that the captured image is an image of the document portion used in the comparison with the highest correlation value.