R
R
Ruslan Malkhozov2019-12-16 21:24:19
C++ / C#
Ruslan Malkhozov, 2019-12-16 21:24:19

What needs to be learned to convert a table schedule into a convenient json file?


5df7c3a5dc24e608180912.jpeg
A sample file to work with (the layout of the table, as well as the cell
5df7c3ab45749662647113.jpeg
sizes , is the same for everyone, except for cases where the cell width is 2-3 times wider than the standard one) . find out what books you would recommend in order to solve such a problem.
Explanation of work:
Writing a program that would convert such a picture with a schedule into a json file, with which it would be possible to perform separate operations
Sample .json file:

"title" "Трёхмерное графическое моделирование"
"lecturer" "Крутов А.В."
"type" "Laboratory"
"subgroup" "(А)"
"classroom" "ТехП 11"
"start" "16:00"
"end" "19:30"
"frequency" "throught"
"date" "2019.09.10-2019.12.03"

How I imagine the solution to this problem:
1. Recognize the table in the picture, draw straight lines, if I'm not mistaken, the Canny method can search for the boundaries of objects, by the way, the first row and the first column are not needed at all (the time depends on the width and location of the cell, no matter how it didn’t sound strange, but what day of the week doesn’t matter at all)
2. We look at what nearest points the lines intersect, in accordance with them we can select a rectangular area from which we can perform text recognition, with subsequent conversion to a json file, and when working with text, there are also a number of questions about how to classify it correctly , since there are several records of classes in the mb tablet, dates may be indicated different for several intervals, some information may not be quite typical, like other subjects, etc.
3. In accordance with the location of this rectangular area, we determine what time should be assigned to all classes in this cell
4. The most text recognition and classification depending on the data
5. We approach the next rectangular area (from left to right and from top to bottom)
I have little programming experience, I only know C ++ from languages, I know basic things from OPP (although everything is subjective)), as I understand it, the OpenCV C ++ library will help me a lot in solving this problem, as far as I understand that I will have to recognize text using another library (on based on OCR), plus there will most likely be some surprises

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question