I wanted to extract tables from images.This python module https://pypi.org/project/ExtractTable/ with their website https://www.extracttable.com/pro.html doing the job very well but they have limited free trials. I did tried many things but result was very unsatisfactory. How is that website/python module generatring 100% accurate tables. The solution should work on these 3 images available on this drive link https://drive.google.com/drive/folders/1v3UDuR7dUFVMR1im7VHTXKqkxTIV9px9?usp=sharing
This is what I have tried which perform poor. Help me extract tables like that module.
import cv2 as cv
import numpy as np
import pytesseract
from pytesseract import Output
import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = (120,16)
ebl='data/manu.png'
ROI_number=0
image = cv.imread(ebl)
original=image
gray = cv.cvtColor(image, cv.COLOR_BGR2GRAY)
custom_config = r'--oem 3 --psm 6'
details = pytesseract.image_to_data(gray, output_type=Output.DICT, config=custom_config, lang='eng')
total_boxes = len(details['text'])
for sequence_number in range(total_boxes):
if int(details['conf'][sequence_number]) >30:
(x, y, w, h) = (details['left'][sequence_number], details['top'][sequence_number], details['width'][sequence_number], details['height'][sequence_number])
threshold_img = cv.rectangle(original, (x, y), (x + w, y + h), (0, 255, 0), 2)
plotting = plt.imshow(threshold_img)
plt.show()