Week 4 Record
Week
4: Gravestone OCR & Final
Pipeline Integration
21/02/2025
Summary of Activities
1.
Applying the Pipeline to Gravestones
•
Received a set of gravestone
images and used our modular
functions to organize (IR vs. visual), enhance, segment, and then run OCR.
2.
OCR Challenges
•
Gravestones often have low contrast
and weathered text, causing Tesseract/Easy OCR to misinterpret partial
letters, moss, cracks, and unusual fonts.
•
Tried additional morphological operations and stricter threshold
parameters, but results still varied by image condition.
3.
Refined Code for OCR
•
Implemented a final function,
RefinedEdgeOverlayAndOCR, which merged thresholding + edge
detection and thickened letter boundaries in red.
•
This approach
slightly improved OCR performance but did not fully solve recognition errors
on heavily weathered stones.
Key Issues Encountered
•
High Noise on Gravestones: Weathering, moss, and stone texture introduced significant noise that
standard filtering struggled to remove.
•
Letters & Background in Same Color Range: The engraved text often had the
same or very similar tonal
range as the stone, making
segmentation highly challenging for OCR.
•
Partial or Merged Letters: Erosion created irregular shapes that standard OCR engines could not correctly interpret.
Final Observations
Unfortunately, the final results were not as satisfying as
we had hoped. The gravestones’ high noise levels,
combined with text having nearly the same
color as the background, severely impacted OCR accuracy. Despite
improved boundary detection and morphological filtering, many letters remained
indistinguishable from the stone surface.
Proposed Solutions
•
Short-Term: Further refine preprocessing (e.g. super-resolution,
advanced morpho- logical filters). Restrict
OCR to known character sets or specific page segmentation modes.
•
Long-Term: Train a custom deep learning
OCR model specifically for engraved text (e.g. CRNN, Vision Transformers). Investigate specialized imaging
methods (e.g. more IR captures)
that might reveal hidden or faint text more clearly.
Progress Assessment
1. We successfully built
a modular MATLAB pipeline:
• OrganizeImages.m for categorizing images by IR vs. Visual
vs. Identifiable.
•
EnhanceAndRestore.m for median filtering, histogram equalization, and sharpening.
•
FeatureExtractionAndSegmentation.m
for basic Canny edges and adaptive thresholding.
•
RefinedEdgeOverlayAndOCR.m to merge threshold
& edge data and attempt OCR.
• MainPipeline.m to tie it all together and automate the process.
2.
Demonstrated the pipeline on IR images
(GasTube detection) and on visual
gravestone images (OCR focus).
3. Learned the limitations of off-the-shelf OCR engines on weathered or low-contrast text.
Concluding Thoughts
& Future Work
Over four weeks, we progressed from initial planning to a functioning MATLAB-based im- age
processing/recognition pipeline. While
we had reasonable success with clearer subjects (like gas tubes in IR images),
weathered gravestones proved significantly more challenging, especially when stone and lettering shared similar color intensities.
What’s Next?
•
Advanced OCR Techniques: Custom-trained models on a representative dataset of engraved text.
•
Deeper Preprocessing: Try advanced de-shadowing, super-resolution, or specialized
morphological operations to separate text from background.
•
Larger, Diverse Dataset:
Gathering more gravestone images with varied lighting,
angles, and text styles could help improve OCR model robustness.
Comments
Post a Comment