Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table Extraction

This is a project for extracting cells from images of tables based on this article.

Running the Progam

Setup

python3.8 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

# After completion
deactivate

Run

Make sure you are in the parent directory.

python extract_cells.py [tables_dir] [results_dir]

By default, tables_dir is "./tables" and results_dir is "./results". If any code is changed it is best to delete results_dir before re-running the program.

File Structure

lib/ -> contains all neccessary functions for extracting cells

lib/helper.py -> contains methods to display image (with and without contours)

lib/kernel.py -> contains methods related to creating structuring elements (kernels)

lib/image_processing.py -> contains methods for processing images (e.g., threshold, finding contours)

lib/table_contour.py -> file that separates logic for getting the corners of the table

lib/get_cells.py -> file contains the logic for extracting the cells by using the other files in lib/

About

table-cell-extraction

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages