17. A non-transitory computer readable storage medium storing one or more programs configured for execution by a computer, the one or more programs comprising instructions for: receiving a visual query from a client system; performing optical character recognition (OCR) on the visual query to produce text recognition data representing a plurality of textual characters, including a plurality of textual characters in a contiguous region of the visual query; scoring each textual character in the plurality of textual characters based on at least high quality textual character scores and low quality textual character scores of other textual characters surrounding the textual character, wherein the scoring of each textual character is based, in part, on a transition cost associated with each textual character such that each textual character will score more similarly to the other textual characters surrounding the textual character as the transition cost increases; identifying one or more high quality text segments in the contiguous region of the visual query in accordance with a determination that a respective high quality text segment of the one or more high quality text segments comprises a plurality of high scoring textual characters; identifying, a document containing at least one high quality text segment; retrieving the document containing at least one high quality text segment; and sending at least a portion of the document to the client system.
17. A non-transitory computer readable storage medium storing one or more programs configured for execution by a computer, the one or more programs comprising instructions for: receiving a visual query from a client system; performing optical character recognition (OCR) on the visual query to produce text recognition data representing a plurality of textual characters, including a plurality of textual characters in a contiguous region of the visual query; scoring each textual character in the plurality of textual characters based on at least high quality textual character scores and low quality textual character scores of other textual characters surrounding the textual character, wherein the scoring of each textual character is based, in part, on a transition cost associated with each textual character such that each textual character will score more similarly to the other textual characters surrounding the textual character as the transition cost increases; identifying one or more high quality text segments in the contiguous region of the visual query in accordance with a determination that a respective high quality text segment of the one or more high quality text segments comprises a plurality of high scoring textual characters; identifying, a document containing at least one high quality text segment; retrieving the document containing at least one high quality text segment; and sending at least a portion of the document to the client system. 18. The computer readable storage medium of claim 17 , wherein the instructions for identifying high quality text segments include instructions for: scoring a plurality of words each in accordance with the textual character scores of the textual characters comprising a respective word; and identifying, in accordance with the word scores, one or more high quality text segments, each comprising a plurality of high quality words.