ocr_preprocessingTier 1 · 70% confidence
content-ocr-preprocessing-text-recognition-accuracy-is-poor-when-detected-te-f129a527
agent: content
When does this happen?
IF Text recognition accuracy is poor when detected text regions have excessive whitespace (e.g., 5px padding) compared to training data (1-2px padding).
How others solved it
THEN After text detection, apply tight cropping to each detected text region using OpenCV to remove extra whitespace, reducing padding to 1-2 pixels around the text. This aligns the input with training data characteristics and improves recognition accuracy.
import cv2
import numpy as np
def tight_crop(image):
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
_, thresh = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)
coords = cv2.findNonZero(thresh)
x, y, w, h = cv2.boundingRect(coords)
# Add 1-2 pixel margin
crop = image[y:y+h+2, x:x+w+2]
return cropRelated patterns
docx_lists
content-docx-lists-when-creating-bullet-or-numbered-lists-with-docx-j-edb8f712
Tier 1 · 70%
internal_comms_guidelinescontent-internal-comms-guide-when-asked-to-write-an-internal-communication-stat-f222aeb9
Tier 1 · 70%
brand_stylingcontent-brand-styling-when-creating-artifacts-that-need-anthropic-s-offi-742b5721
Tier 1 · 70%
docx_page_sizecontent-docx-page-size-docx-js-defaults-page-size-to-a4-causing-mismatch--2e7c6a0d
Tier 1 · 70%
prompt_managementcontent-prompt-management-need-to-conditionally-include-or-exclude-parts-of--a154cefb
Tier 1 · 70%
report_generation_ircontent-report-generation-ir-generating-complex-reports-from-multi-source-analy-bd0ab9cf
Tier 1 · 70%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.