The user selects an image of a table (.jpeg / png) and the program converts it to an Excel file (.xlsx).
Use of libraries: tkinter, pandas, opencv.
Tkinter: creating the GUI.
Pandas: handling data and storing it in an Excel file.
Opencv: image processing.
Summary of the project:\
- Importing all necessary libraries, including tkinter, pandas, OpenCV and other libraries.
- Creating a screen - Tkinter's user interface and designing a screen so that the screen includes:
• Button that opens a dialog box for selecting an image.
• A GIF used as a loading animation while the image is being processed.
• Button to save the prepared Excel cube.\ - Functionality to select a file, save it as a JPEG and display it on the screen.
- The code reads the image and converts it to a binary image, and then it detects the horizontal and vertical lines in the image.
- The code identifies all the bounding boxes for each cell in the table and by its row and column.
- The OCR is performed on each of the cells using pytesseract, and the output is stored in a list.
- The data is then stored in a Pandas DataFrame and written to an Excel file with a save button to save the file, which opens a dialog to save the file to a selected directory. The project is documented in code - for each function, and a code block. You can also see the steps of the execution by pictures that were created, and saved in the pics folder, for example: