1. A method comprising: performing, by a processing device, connected component analysis on a scanned image of an object comprising a plurality of characters, the connected component analysis identifying pixel connections in the image; identifying, by the processing device, a first set of characters in the image of the object based on the pixel connections; estimating, by the processing device, a character size for the first set of characters; performing, by the processing device, an optical character recognition (OCR) process on the image of the object to identify a second set of characters; merging, by the processing device, the first set of characters with the second set of characters based on the estimated character size to generate a third set of characters, the merging using one or more merging criteria, wherein the merging criteria comprises at least one of: a distance between two adjacent character components being below a first predetermined fraction of the estimated character size, or a size of a combined character component being below a second predetermined fraction of the estimated character size; and generating, by the processing device, an electronic document comprising the third set of characters.