Forum Discussion
Nayaoh
Nov 06, 2025Iron Contributor
Any free tool available to remove text from image or picture?
Hi, I have dozens of images where I need to cleanly remove some text from the pictures. The text is overlaid on a relatively simple background, but I'm struggling to get a good result without it loo...
Damk
Nov 06, 2025Iron Contributor
Here's a comprehensive guide to command-line approaches for removing text from images, ranging from simple automated tools to advanced AI-powered solutions.
Method 1: Using Region Based Filling
This is a very simple way to remove text from pictures.
# For text on solid backgrounds - replace specific color regions
convert input.jpg -fill "#FFFFFF" -draw "rectangle 100,100,300,150" output.jpg
# Using blur/morphology to hide text (works for small text)
convert input.jpg -morphology close square:3 -blur 0x2 output.jpgMethod 2: Python with OpenCV & Computer Vision
Create a Python script for more sophisticated text detection and removal.
#!/usr/bin/env python3
import cv2
import numpy as np
import sys
from skimage import restoration
def remove_text_simple(input_path, output_path):
img = cv2.imread(input_path)
# Method 1: Inpainting (if you know text coordinates)
mask = np.zeros(img.shape[:2], np.uint8)
# Define text region (you'll need to adjust these coordinates)
cv2.rectangle(mask, (x1, y1), (x2, y2), 255, -1)
# Use inpainting to remove text
result = cv2.inpaint(img, mask, 3, cv2.INPAINT_TELEA)
cv2.imwrite(output_path, result)
if __name__ == "__main__":
remove_text_simple(sys.argv[1], sys.argv[2])For simple cases: Use ImaageMagick with region blurring
For precise removal: Use OpenCV inpainting with manually defined regions
For AI-powered quality: Use Lama Cleaner or similar ML tools
For batch processing: Create wrapper scripts around any of these tools