Peter Murray-Rust edited Interpreting pixel maps.md  almost 10 years ago

Commit id: 8eb3fa89cd0c173281256f2df82783d91f850b35

deletions | additions      

       

## **Interpreting pixel maps**  Factors which lead to success include: We have tried many methods including Hough line transforms, erosion (BoofCV), histogram equalisation. The following are those that work best for scientific articles.  1. Colours. **Colours**.  Binary (black and white only) are simplest; gradients, gradients and  dotted regionscan regions can  cause problems. AMI separates colours into complementary pixel maps and can process each separately. Recombination is at the domain level (e.g. differently coloured subtrees)  2. Noise **Noise**  (common in scanned documents), grayscales and antialiasing (very common) mean that background / threshold levels are critical and sometimes critical.  AMI can adjust these either from human control or a simple adaptive optimisation.  3. Bleeding **Bleeding  and cavitation. cavitation**.  Graphics primitives which are close ofetn often  "bleed" into a single object and for characters we object; faint primitives may  have heuristic rules holes. Where glyphs interbleed we separate them heuristically (by comparion with target gylphs)  4. Thinning. **Thinning**.  AMI reduces lines and strokes to single pixel width using the Zhang-Suen approach  and then applies a topological approach tidies some redundant pixels.  5. Character recognition **Character recognition**  (OCR). Traditional OCR  methods (MachineLearning, correlations, moments and Mahalanobis)  don't work well with scientific characters which are often rotated, isolated, have variable fonts, italic and/bold and/or bold  and cover a wide range of Unicode (maths, Greek, symbols). We have developed a topological approach which is robust to distortion and scaling and can be combined with classical methods (bitwise correlation). 6. Separation of objects. We identify objects by floodfill, by expanding borders or convex hulls. Overlap of different colours is often tractable especially where these are primitives (lines, circles); we can sometimes resolve overlapping objects by creatng a dictionary of primitives (e.g. symbols).  7. Segmentation. AMI uses Douglas-Peuckert segmentation to approximate curved strokes and where possible tries to fit them to circles