diff --git a/unstructured/partition/utils/ocr_models/tesseract_ocr.py b/unstructured/partition/utils/ocr_models/tesseract_ocr.py index a92540a018..b028ef48ef 100644 --- a/unstructured/partition/utils/ocr_models/tesseract_ocr.py +++ b/unstructured/partition/utils/ocr_models/tesseract_ocr.py @@ -253,8 +253,9 @@ def zoom_image(image: PILImage.Image, zoom: float = 1) -> PILImage.Image: interpolation=cv2.INTER_CUBIC, ) - kernel = np.ones((1, 1), np.uint8) - new_image = cv2.dilate(new_image, kernel, iterations=1) - new_image = cv2.erode(new_image, kernel, iterations=1) + # Skip dilation and erosion for 1x1 kernel as they are no-ops + # kernel = np.ones((1, 1), np.uint8) + # new_image = cv2.dilate(new_image, kernel, iterations=1) + # new_image = cv2.erode(new_image, kernel, iterations=1) return PILImage.fromarray(new_image)