WO2022182104A1 - 테이블 생성 방법 및 시스템, 그리고 테이블이 포함된 이미지 보정 방법 및 시스템 - Google Patents

테이블 생성 방법 및 시스템, 그리고 테이블이 포함된 이미지 보정 방법 및 시스템 Download PDF

Info

Publication number
WO2022182104A1
WO2022182104A1 PCT/KR2022/002601 KR2022002601W WO2022182104A1 WO 2022182104 A1 WO2022182104 A1 WO 2022182104A1 KR 2022002601 W KR2022002601 W KR 2022002601W WO 2022182104 A1 WO2022182104 A1 WO 2022182104A1
Authority
WO
WIPO (PCT)
Prior art keywords
lines
image
rotation
corner
line
Prior art date
Application number
PCT/KR2022/002601
Other languages
English (en)
French (fr)
Inventor
백영민
신승
남대현
서재흥
김성현
왕효선
최승범
Original Assignee
네이버 주식회사
라인 가부시키가이샤
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020210024039A external-priority patent/KR102707927B1/ko
Priority claimed from KR1020210037220A external-priority patent/KR102642095B1/ko
Application filed by 네이버 주식회사, 라인 가부시키가이샤 filed Critical 네이버 주식회사
Publication of WO2022182104A1 publication Critical patent/WO2022182104A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition

Definitions

  • the present invention relates to a method and system for generating a table by performing an analysis on an image.
  • the dictionary meaning of artificial intelligence is a technology that realizes human learning ability, reasoning ability, perceptual ability, and natural language understanding ability through computer programs. Such artificial intelligence made a leap forward due to deep learning, which added a neural network that mimics the human brain to machine learning.
  • Deep learning is a technology that allows a computer to judge and learn like a human, and to cluster or classify objects or data through this. It is actively used in the industrial field.
  • Korean Patent Registration No. 1907029 (Table Generating Apparatus and Method for Automated Formatting) discloses a method for recognizing a table from an image and reproducing the recognized table, but this is a line segment (line) included in the table. ))), so there is a limit to analyzing a table including cells in which the visual display of line segments is omitted.
  • An object of the present invention is to provide a table creation method and system capable of creating a table having the same configuration as a table included in an image.
  • an object of the present invention is to provide a table creation method and system capable of generating a table in consideration of non-visual characteristics that do not appear in an image.
  • an object of the present invention is to provide a method and system for correcting an image including a table, which can increase the recognition performance of the table included in the image.
  • the present invention is to provide a method and system for correcting an image including a table that can improve the recognition performance of the table in order to reproduce a table having the same configuration as the table included in the image.
  • the method for generating a table includes the steps of receiving an image including a table, each corner of a cell included in the table, and a plurality of tables constituting the table. extracting a line, projecting the plurality of lines on a coordinate plane, specifying the coordinate value of each corner on the coordinate plane based on the projection result, and the coordinate value of each corner Based on this, the method may include generating a table having the same cell configuration as that of the table included in the image.
  • the table generating system extracts a storage unit, a receiving unit for receiving an image including a table, and each corner of a cell included in the table and a plurality of lines constituting the table and a control unit, wherein the control unit projects the plurality of lines on a coordinate plane, specifies a coordinate value of each corner on the coordinate plane based on the projection result, and sets the coordinate value of each corner. Based on this, it is possible to create a table having the same cell configuration as the table included in the image.
  • the program that is executed by one or more processes in the electronic device and can be stored in a computer-readable recording medium includes the steps of: receiving an image including a table; extracting each corner of a cell and a plurality of lines constituting the table; projecting the plurality of lines on a coordinate plane; based on the projection result, the angle on the coordinate plane It may include instructions to perform the steps of specifying the coordinate values of the corners and generating a table having the same cell configuration as the table included in the image based on the coordinate values of each corner.
  • the method of correcting an image including a table includes the steps of receiving an image including a table, and, from the image, a plurality of lines constituting the table It may include extracting, calculating the degree of rotation of the plurality of lines based on a reference line, and correcting the image so that rotation of the table is performed based on the degree of rotation.
  • the system for correcting an image including a table includes a storage unit, a receiver for receiving an image including a table, and a control unit for extracting a plurality of lines constituting the table from the image Including, the control unit may calculate the degree of rotation of the plurality of lines based on a reference line, and correct the image so that the rotation of the table is performed based on the degree of rotation.
  • the program that is executed by one or more processes in the electronic device and can be stored in a computer-readable recording medium includes the steps of: receiving an image including a table; extracting lines of , calculating the degree of rotation of the plurality of lines based on a reference line, and correcting the image so that rotation of the table is performed based on the degree of rotation It may contain instructions.
  • the method and system for generating a table according to the present invention extracts the components of a table included in an image according to each characteristic, and based on the relationship between the extracted components, the table included in the image and You can understand the table structure. Through this, even if it is not known in which region the table is located in the image, it is possible to accurately detect the table from the image based on the constituent elements of the table. As a result, the present invention can significantly reduce the probability of failure in the process of detecting a table included in an image by recognizing and detecting a table from an image based on the constituent elements of the table.
  • the table generating method and system according to the present invention may extract each of the components of a table included in an image based on line characteristics and corner characteristics, and project the extracted components on a coordinate plane.
  • the structure of the table included in the image can be accurately determined based on the relationship between the coordinate values of the constituent components projected on the coordinate plane.
  • the present invention makes it possible to create a table having the same structure as a table included in an image by considering even an invisible component (eg, implicit line).
  • the recognition performance of the table can be improved by correcting the rotation.
  • the image correction method and system including the table according to the present invention can extract a plurality of lines constituting the table, and calculate the degree of rotation thereof. Furthermore, the table recognition method and system according to the present invention determine how much the table is rotated relative to the reference line based on this degree of rotation, and based on the determined result, the table rotation is corrected for the image. Calibration may be performed.
  • Such image correction may correspond to a pre-processing process for increasing the recognition rate of information constituting the table, and as a result, the image correction method and system including the table according to the present invention has the recognition performance of the table included in the image. can increase Furthermore, when the recognition performance for a table is improved by the image correction method and system including the table according to the present invention, it is possible to create a table having the same structure as the table included in the image.
  • FIG. 1 is a conceptual diagram illustrating a table creation system according to the present invention.
  • FIG. 2 is a flowchart illustrating a method for generating a table according to the present invention.
  • 3, 4, 5A, and 5B are conceptual diagrams for explaining a method of extracting characteristic information of a table.
  • 6, 7, 8 and 9 are conceptual diagrams for explaining a method of projecting a table onto a coordinate plane.
  • FIG. 10 is a conceptual diagram illustrating a reconstructed table.
  • FIG. 11 is a conceptual diagram for explaining an image correction system including a table according to the present invention.
  • FIG. 12 is a conceptual diagram for explaining a table.
  • FIG. 13 is a flowchart for explaining an image correction method including a table according to the present invention.
  • FIGS. 17, 18, and 19 are conceptual diagrams for explaining an image correction method including a table according to the present invention.
  • the present invention is to provide a table generating method and system capable of generating a table having the same configuration as a table included in an image, and relates to a table generating method and system capable of considering non-visual characteristics that do not appear in an image. .
  • a “table” referred to in the present specification may also be referred to as a table, and may mean that certain contents are displayed in a certain format or order.
  • the table 2200 may include at least one cell 2210 . That is, the table 2200 includes at least one cell or space (or region), and the table is configured to include information in the cell 2210 .
  • the number of cells included in the table, the size of the cells, or the positions of the cells may be variously modified, and the cells typically have a rectangular shape.
  • a cell 210 included in the table may be defined by at least four line segments. That is, a cell included in the table may be formed of a rectangle surrounded by four line segments. segment)” may be understood as at least a part of a line or line. Line segments constituting each cell may be extended to form a line or line.
  • At least four line segments are required, which are two horizontal lines constituting the table, or a line in the row direction.
  • edges 2201 and 2202 and two vertical lines, or lines in a column direction, or edges, 2203 and 2204 may be formed by at least a portion.
  • the rectangular cell may be formed by at least a portion of two horizontal lines 2201 and 2202 and two vertical lines 2203 and 2204 intersecting each other.
  • the table 2200 includes at least four lines, and the number of cells, the size of the cells, the position of the cells, etc. are defined according to the number of horizontal lines, the number of vertical lines, the spacing between lines, and the arrangement position of the lines. can be
  • the plurality of lines constituting the table 2200 may be divided into any one type among different first and second types, which may be specified according to which direction the corresponding line extends.
  • the lines 2201 and 2202 extending in the horizontal direction may be defined as a first type, and the lines 2203 and 2204 extending in the vertical direction may be defined as the second type.
  • the first type of line may be variously named as a horizontal line, a horizontal line, a row line, a horizontal line, etc. as terms having the same or similar meaning.
  • the second type of line may be variously named as a term having the same or similar meaning as a vertical line, a vertical line, a column line, a vertical line, and the like.
  • the number of cells included in the table 2200, the size of the cells, the positions of cells, etc. may be variously modified based on the number of horizontal and vertical lines, arrangement relationships, etc., and may be variously modified by merging between cells can be
  • the components constituting the table described in the present invention are a corner (or vertex, reference numeral) formed while the lines constituting the table (horizontal lines and vertical lines) and the lines constituting the table intersect. “e, f, g, h”).
  • the table may include two horizontal lines, two vertical lines, and four corners.
  • All tables have at least 4 corners, which may be corners included in the outermost edge of the table. Furthermore, the number of corners included in the table depends on the number of cells included in the table.
  • the image may be an image obtained by scanning a paper document, an image obtained by photographing, or an image obtained by various other methods.
  • FIG. 1 is a conceptual diagram illustrating a table creation system according to the present invention
  • FIG. 2 is a flowchart illustrating a table creation method according to the present invention.
  • 3, 4, 5A and 5B are conceptual diagrams for explaining a method of extracting characteristic information of a table
  • FIGS. 6, 7, 8, and 9 are diagrams for explaining a method of projecting a table onto a coordinate plane conceptual diagrams for
  • FIG. 10 is a conceptual diagram for explaining a reconstructed table.
  • the table creation system 100 extracts components constituting the table 1100 from the table 1100 included in the image 1000, and based on the relationship between the extracted components, the image The same table as the table 1100 included in 1000 may be created.
  • the table generating system 100 may include at least one of a receiving unit 110 , a storage unit 120 , an OCR unit 130 , and a control unit 140 . .
  • the receiving unit 110 is a means for receiving the image 1000 including the table 1100 , and includes at least one of a communication unit, a scan unit, and an input unit, or other means for receiving the image 1000 . can
  • the table generating system 100 may analyze the table 1100 included in the image 1000 received through the receiver 110 to generate the same table as the table 1100 included in the image 1000 . As described above, the operation of creating the same table as the table 1100 included in the image 1000 may also be expressed as reconstructing or restoring the table.
  • the storage unit 120 may be configured to store various information according to the present invention.
  • the types of the storage unit 120 may be very diverse, and at least some of them may mean an external server 150 (at least one of the cloud server 151 and the database (DB, 152 )). That is, it can be understood that the storage unit 120 is sufficient as long as a space in which information related to the present invention is stored, and there is no restriction on the physical space.
  • the storage unit 120 i) the image 1000 including the table 1100 and data related thereto, ii) components (lines, corners, etc.) of the table 1100 extracted from the image 1000 and related data , iii) at least one of content (eg, text, image, etc.) data included in the table 1100 may be stored.
  • content eg, text, image, etc.
  • the OCR (Optical Character Reader, 130) unit is a means for recognizing the content included in the image 1000, and may recognize the content included in the image 1000 through at least one of various content recognition algorithms.
  • the OCR unit 130 may recognize the content by using an algorithm based on artificial intelligence.
  • the controller 140 may be configured to control the overall operation of the table generating system 100 related to the present invention.
  • the controller 140 may include a processor (or artificial intelligence processor) capable of processing an artificial intelligence algorithm. Based on the deep learning algorithm, the controller 140 may recognize the table 1100 from the image 1000 and generate a table having the same cell configuration as the table 1100 included in the image 1000 .
  • a process of receiving an image 1000 (refer to FIG. 1 ) including a table 1100 may be performed ( S210 ).
  • the image 1000 including the table 1100 may be received through various routes.
  • a process of extracting each corner of a cell included in the table 1100 and a plurality of lines constituting the table 1100 may be performed next (S220) .
  • the characteristic (feature, or characteristic) information is about components (or components) constituting the table 1100 , and the control unit 140 is configured to configure the table 1100 from the image 1000 . It is possible to extract characteristic information of components. This process can also be expressed as “performing low-level feature extraction”.
  • the table 1100 includes at least one cell (cell, or space (or region), refer to reference numerals 411, 412, and 413 in FIG. 4) of a rectangular shape, and the table contains information in these cells. is configured to include
  • the constituent elements of the table 1100 are formed by lines dividing (or defining, or dividing) these cells (or line segments constituting each cell, refer to reference numerals 310 and 320 in FIG. 4 ) and the intersection of these lines. corners (or vertices, refer to reference numerals 501 to 507 of FIG. 5A ) may be included.
  • At least four lines are required, which are two horizontal lines (or row-direction lines, or edges) and two vertical lines. , or a line in a column direction, or an edge).
  • the square-shaped cell may be formed by intersecting at least a portion of two horizontal lines and two vertical lines. And, a corner may be formed by crossing any one horizontal line and any one vertical line.
  • the controller 140 may extract the vertical lines 310 , 311 , 312 , 312a , and 313 included in the table 1100 as shown in FIG. 3A .
  • reference numerals are given only to some vertical lines 311 , 312 , 312a , and 313 , but the actual controller 140 extracts all vertical lines included in the table 1100 .
  • the table 1100 shown in FIG. 3A includes seven vertical lines, and the control unit 140 extracts all seven vertical lines. Meanwhile, as illustrated, the controller 140 may detect vertical lines 312 and 312a on the same line as one line. As shown, the vertical lines 312 and 312a on the same line may be represented as separate lines by merging cells, but may be the same line in essence.
  • the controller 140 may extract all vertical lines 310 included in the image 1000 from the image 1000 based on the image recognition technique. “Extracting a vertical line” from the table 1100 may mean recognizing a component corresponding to a vertical line in the table 1100 and determining that the component is a vertical line. As shown in (a) of FIG. 3 , the controller 140 displays components corresponding to the vertical line in a visual display method matching the vertical line (eg, a first display method (ex: thick solid line)) can be displayed in the table 1100. As a result, as shown in (a) of FIG. 3 , all vertical lines 310 included in the table 1100 may be displayed as thick solid lines.
  • a visual display method matching the vertical line eg, a first display method (ex: thick solid line)
  • the controller 140 may extract the horizontal lines 320 , 321 , 322 , and 323 included in the table 1100 as shown in FIG. 3B .
  • reference numerals are given only to some of the horizontal lines 321 , 322 , and 323 , but the actual controller 140 extracts all the horizontal lines included in the table 1100 .
  • the controller 140 may extract all the horizontal lines 320 included in the image 1000 from the image 1000 based on the image recognition technique. “Extracting a horizontal line” from the table 1100 may mean recognizing a component corresponding to a horizontal line in the table 1100 and determining that the component is a horizontal line.
  • the table 1100 shown in FIG. 3B includes 22 horizontal lines, and the controller 140 extracts all 22 horizontal lines. Meanwhile, the controller 140 may detect a horizontal line on the same line as one horizontal line. Horizontal lines on the same line may be represented as separate lines by merging cells, but the essence may be the same line.
  • the controller 140 converts the components corresponding to the horizontal line to a visual display method (eg, a second display method (ex: dotted line)) matched to the horizontal line. It can be displayed in table 1100 . As a result, as shown in (b) of FIG. 3 , all horizontal lines 320 included in the table 1100 may be displayed as dotted lines.
  • a visual display method eg, a second display method (ex: dotted line)
  • the vertical line 310 and the horizontal line 320 are displayed in a corresponding visual display method, respectively.
  • the vertical line 310 may be indicated by a thick solid line as the first display method
  • the horizontal line 320 may be indicated by a dotted line as the second display method.
  • the controller 140 may extract a corner (or corner information) of the table 1100 .
  • the corner of the table 1100 is a vertex of the cells 411 , 412 , 413 included in the table 110 , as shown in FIG. 4 , and the vertical line 310 and the horizontal line 320 are It can be formed by crossing.
  • the controller 140 may extract corners of all cells included in the table 1100 .
  • the corner of the cell is extracted may mean recognizing a point where a horizontal line and a vertical line intersect in the table 1100 and determining the corresponding point as a “corner”.
  • a corner of a cell may have different location characteristics with respect to each cell.
  • any one cell 511 will be described as an example. As shown, each cell 511 is made to have four different corners 501 , 502 , 503 , 504 . Any one of these four corners 501, 502, 503, and 504 has a relative positional characteristic with respect to the other corners.
  • the first corner 501 may be located at a top-left (tl) of the other corners 502 to 504 .
  • the first corner 501 may be the tl corner 501 of the cell 511 including the corresponding corner 501 .
  • the second corner 502 may be located at a top-right (tr) of the other corners 501 , 503 , and 504 .
  • This second corner 502 may be the tr corner 502 of the cell 511 including the corresponding corner 502 .
  • the third corner 503 may be located at a lower left (bottom-left: bl) than the other corners 501 , 502 , and 504 .
  • the third corner 503 may be the bl corner 503 of the cell 511 including the corresponding corner 503 .
  • the fourth corner 504 may be located at a lower right (bottom-right: br) than the other corners 501 , 502 , and 503 .
  • This fourth corner 504 may be a br corner 504 of the cell 511 including the corresponding corner 504 .
  • the table 1100 includes a plurality of cells 511 , 512 , and 513 , and any one cell may be located adjacent to (or adjacent to) at least one other cell.
  • at least one corner 503 may be shared.
  • a corner 503 shared between different cells 511 and 512 may be defined with different location characteristics based on each cell. For example, a specific corner 503 is a corner located at the lower left (bl) with respect to any cell 511, but may be a corner located at the upper left (tl) with respect to another cell 512. have. Accordingly, the location characteristics of the corners included in the table 1100 may be different depending on which cell is used as a reference.
  • the controller 140 may recognize and extract all corners 501 to 509 constituting the table 1100 (only some corners are given reference numerals for convenience of description).
  • the controller 140 may extract, from the image 1000 , components including vertical lines, horizontal lines, and corners having different positional characteristics for each cell.
  • a process of projecting a plurality of lines on coordinates (or coordinate planes) may proceed (S230).
  • This process may also be called an edge projection & grouping process.
  • This process may further include a process of labeling each of the plurality of lines on the coordinate plane.
  • the controller 140 projects a plurality of vertical lines 310 and a plurality of horizontal lines 320 included in the table 1100 on different planes (or coordinate planes). (projection) is possible.
  • the different coordinate planes may be two-dimensional coordinate planes defined by first and second axes orthogonal to each other.
  • the controller 140 may project the plurality of vertical lines 310 onto a first plane (eg, an x-plane or an x-axis plane) corresponding to the first axis. .
  • a first plane eg, an x-plane or an x-axis plane
  • the controller 140 may project the plurality of horizontal lines 320 onto a second plane (eg, a y plane or a y-axis plane) corresponding to the second axis. have.
  • a second plane eg, a y plane or a y-axis plane
  • each vertical line and horizontal line when each vertical line and horizontal line is projected on a coordinate (or coordinate plane), each vertical line and horizontal line may have different coordinate values for each plane.
  • seven different vertical lines may be projected to respectively correspond to seven different points on the first plane. Accordingly, as a result of the projection, different vertical lines may have different coordinate values on the first plane.
  • 22 different horizontal lines may be projected to correspond to 22 different points on the second plane, respectively. Accordingly, as a result of the projection, different horizontal lines may have different coordinate values on the second plane.
  • the projection of the lines is made on the coordinate plane, it may be projected so that the mutual spacing between the lines and the positions of the lines correspond to each other.
  • controller 140 Since the controller 140 performs projection on the coordinate plane based on the positions of the respective lines in the table 1100 , information on the positional relationship between the lines may be displayed on the coordinate plane.
  • the interval between the first vertical line 311 and the second vertical line 312 and the interval between the second vertical line 312 and the third vertical line 313 are different from each other. different As a result, even on the first plane, the distance between the point 0 on which the first vertical line 311 is projected and the point 1 on which the second vertical line 312 is projected, and the second vertical line 312 are It can be seen that the distance between the projected point 1 and the point 2 on which the third vertical line 313 is projected is different.
  • control unit 140 projects the lines onto the coordinate plane so that the spacing and position characteristics between the lines included in the table 1100 can be maintained as they are, so that the table 1100 and the table 1100 included in the image 1000 and You can create tables with the same configuration.
  • the controller 140 may perform labeling on each line based on the result projected on the coordinate plane.
  • the control unit 140 performs labeling on each of the plurality of vertical lines and the plurality of horizontal lines so that label values of each of the plurality of vertical lines 310 and the plurality of horizontal lines 320 are specified on the coordinate plane. can do.
  • the plurality of vertical lines 310 may be labeled to have label values (0 to 6) for the first axis, based on the result of the projection onto the first plane.
  • the number of label values labeled on the first axis may be determined based on the number of vertical lines included in the table 1100 . As shown in FIG. 6 , when 7 vertical lines are included in the table 1100 , 7 label values for the first axis may be included.
  • the plurality of horizontal lines 320 may be labeled to have label values (0 to 21) for the second axis, based on the projection result on the second plane.
  • the number of label values labeled on the second axis may be determined based on the number of horizontal lines included in the table 1100 .
  • the label values for the second axis may be composed of 22 .
  • label values for a plurality of vertical lines and horizontal lines may be sequentially assigned to increase by a natural number n.
  • the label value is expressed as a natural number increasing by n.
  • these line values may also be expressed by alphabets or other methods.
  • a plurality of vertical lines 310 have different label values (eg, from 0 to 6) increasing by n (eg, by 1) on the first plane according to the order in which they are listed. , a label value that sequentially increases by 1).
  • the plurality of horizontal lines 320 have different label values (eg, from 0 to 21, sequentially by 1) increasing by n on the second plane according to the order in which they are listed. The label value increases with ).
  • the label value of each of the vertical and horizontal lines may also be expressed as an identification, identification number (ID) of each line.
  • the controller 140 projects all the lines existing in the table on the coordinate plane, so that the table is divided into sub-cells based on all the lines present in the table, regardless of the actual cells present in the table. can be divided into units. For example, in the case of 7 vertical lines and 22 horizontal lines, 6x21 sub-cells (126) may exist in the corresponding table. The number of sub-cells may be obtained by (number of vertical lines-1) x (number of horizontal lines-1).
  • the process of specifying the coordinate values of each corner on the coordinate plane may be performed based on the projection result (S240) .
  • This process can also be expressed as “Corners to edges matching” process.
  • controller 140 may specify the coordinate value of each corner by using the label value for each of the plurality of lines.
  • each corner constituting the cell is formed by the intersection of different lines, the coordinate value of each corner is, as shown in FIG. 8, the label value (i) of the vertical line and the horizontal line. It can be represented by the label value (j) of the line.
  • each corner is included in any one horizontal line and any one vertical line, and each corner may have a coordinate value (i, j) corresponding to the label value of each line on the coordinate plane. .
  • the controller 140 specifies a two-dimensional coordinate value of each corner based on which line among the plurality of vertical lines and the plurality of horizontal lines extracted from the image 1000 is included in each corner constituting the cell. can do.
  • the coordinate values of each corner include a first label value (i) on a first plane of a specific vertical line including each corner among a plurality of vertical lines, and a specific horizontal line including each corner among a plurality of horizontal lines. may include a second label value (j) on the second plane of .
  • all corners included in the table may have different coordinate values.
  • the controller 140 may assign coordinate values to all corners extracted from the table to be analyzed using label values assigned to each of the horizontal line and the vertical line.
  • This process can also be expressed as a process of matching corners and lines. That is, since the coordinate value of the specific corner is the label value of the specific vertical line and the horizontal line, it is possible to know which horizontal line and vertical line the specific corner is included in only with the coordinate value of the specific corner.
  • the process of generating a table having the same cell configuration as that of the table included in the image may proceed (S250).
  • the structure of the cells constituting the table is identified, and the controller 140 may identify the merge relationship between the cells and generate a table having the same cell configuration as the table included in the image.
  • the process of identifying the merging relationship between cells can also be expressed as a “Cell merging” process.
  • n a label value sequentially increasing by n is assigned to the lines.
  • the controller 140 may determine whether a merged cell exists in the table based on this rule.
  • corners eg, tl (top left), bl ( The coordinate value of the lower left)
  • a specific line e.g. a vertical line
  • a coordinate having a difference of n for each other perpendicular line eg, a horizontal line
  • the coordinate values for the first and second planes of two corners (eg, tl, bl) included in the same vertical line are the coordinate values of the first plane (label values of the vertical line).
  • the coordinate values for the second plane (label values of the horizontal line) are different from each other, which has a difference of n.
  • the control unit 140 determines that the specific cell is at least two cells. It can be considered that these have been merged. This is because, in the present invention, all lines have a label value that increases by n.
  • the controller 140 may determine the number of cells in which the specific cell is merged according to the degree of difference in the coordinate values.
  • the merged cell may be a cell in which at least two cells divided into a minimum unit by all lines included in the table (eg, may be referred to as “sub-cells”) are merged.
  • the controller 140 calculates the difference between the respective coordinate values in the vertical and horizontal directions for all corners extracted from the table based on these rules, and based on the result of the operation, the specific corners including the corresponding corners are calculated.
  • a cell may determine whether sub-cells are merged in a vertical direction or a horizontal direction.
  • the controller 140 may determine that adjacent corners among corners extracted from the table are corners included in the same cell. Accordingly, the controller 140 determines whether the cell including the neighboring corners is a cell in which the sub-cells are merged or the sub-cell itself by performing an operation between the coordinate values of the neighboring corners.
  • the controller 140 corresponds to the horizontal direction (or row direction) among the coordinate values of two adjacent corners in the vertical direction.
  • An operation is performed between coordinate values of a plane (second plane).
  • the controller 140 performs an operation between the coordinate values of the plane (first plane) corresponding to the vertical direction among the coordinate values of two corners in the horizontal direction adjacent to each other.
  • the controller 140 may extract a cell in which sub-cells are merged by performing a corresponding operation on all the neighboring corners included in the table.
  • controller 140 may determine whether sub-cells are merged in each of the vertical and horizontal directions.
  • n 1
  • control unit 140 can calculate the difference between the coordinate values of the plane (second plane) corresponding to the horizontal lines 921 and 922 (here, the neighboring corners are on the same line in either the vertical direction or the horizontal direction) corners included).
  • the controller 140 may determine that the corresponding cell is not merged with another cell in the vertical direction.
  • the specific cell 920 including the tl corner 901, coordinate value: (0, 0)) and the bl corner 903, coordinate value: (0, 1)) adjacent to each other is in the vertical direction (column direction). ), it can be determined that the merged sub-cell does not exist.
  • the controller 140 controls the corresponding cell to be a sub-cell in the vertical direction. It can be determined that they are merged cells.
  • the controller 140 may determine that the number of sub-cells obtained by dividing the difference between the coordinate values by n is merged. For example, when the difference between the coordinate values is 5, the controller 140 performs an operation of dividing 5 by 1 (in the above, since n is assumed to be 1), the cell including the corresponding corners 901 and 903 In this vertical direction (column direction), it can be determined that five sub-cells are merged cells.
  • control unit ( 140 may calculate the difference between the coordinate values of the planes (first planes) corresponding to the vertical lines 923 and 924 (here, adjacent corners are the same in either the vertical direction or the horizontal direction) corners included in the line).
  • the controller 140 may determine that the cell including the corresponding corners 901 and 902 is a cell in which at least two sub-cells are merged. have.
  • the controller 140 controls the corresponding It may be determined that the cell is not merged with another cell in the horizontal direction.
  • the controller 140 may determine whether at least two cells (sub-cells) of the cells included in the table are merged using the coordinate values of each corner. Then, the controller 140 determines whether the specific cell is a cell in which at least two sub-cells are merged, based on a difference between the coordinate values of at least two corners among a plurality of corners constituting the specific cell among the plurality of cells. can do. In addition, when the same line including two corners of an operation target corresponds to a vertical line, the control unit 140 determines a difference between coordinate values corresponding to the second axis (second plane) among the coordinate values of the two corners. Based on , it may be determined whether there is a cell in which the specific cell is vertically merged.
  • control unit 140 determines a difference between coordinate values corresponding to the first axis (first plane) among the coordinate values of the two corners. Based on , it may be determined whether there is a cell in which the specific cell is merged in the horizontal direction.
  • the controller 140 may determine whether the specific cell is a cell formed by merging how many cells (or sub-cells) are merged according to a difference between the coordinate values of at least two corners.
  • the controller 140 may estimate the structure of the table included in the image 1000 by performing an operation between all the extracted corners.
  • the number of corners included on (or on the same line) adjacent to each other may be the same.
  • FIG. 8 when all cells are divided into 4 vertical lines and 4 horizontal lines, 9 cells exist, 4 corners exist in every vertical line, and every horizontal line There may also be four corners. That is, when there are no merged cells in the table, corners corresponding to the number of horizontal lines exist in all vertical lines, and conversely, corners corresponding to the number of vertical lines exist in all horizontal lines. .
  • the controller 140 may determine that the cell 920 associated with the first horizontal line 921 is merged with at least one sub-cell.
  • control unit 140 determines how many sub-cells the cell related to the specific line is. Of course, it is possible to calculate whether it is merged by
  • the table is divided into sub-cells based on all lines present in the table 1100, and through comparison of the coordinate values of the corners extracted from the table, the cell included in the table is the cell in which the sub-cells are merged. It is possible to determine which sub-cell is merged in which part of the table.
  • the controller 140 may also extract location information including the text from the image. In addition, it may be determined that there is an implicit line in the table based on the location information including the text. And, by projecting all the lines included in the table on the coordinate plane, the controller 140 may extract the lines of the specific cell by the lines included in the surrounding cells even if the line of the specific cell is not visually visible. have. In this way, the control unit 140 can extract even a visually invisible line based on the location information of the text and the labeling value of the line projected on the coordinate plane.
  • the controller 140 determines the structure of cells included in the table based on the coordinate values of the corners included in the table, and based on the determined result, in FIGS. As shown in b), the table 1200 having the same cell structure as the table 1100 included in the image 1000 may be generated.
  • the controller 140 may generate a table included in an actual image and a more accurate table by repeatedly analyzing and learning different images having the same table structure.
  • FIG. 10(b) is data of an Excel (xlsx) structure, and as shown in FIG. 10(b) , the controller 140 may generate structure information of cells in an Excel structure data format. Such structured data (or information) may be stored in the storage unit 120 .
  • the controller 140 projected the positions of the lines included in the table, the relative positions between the lines, and the spacing between the lines to appear on the coordinate plane. Information on these lines may be stored in the storage unit 120 . Based on the information on the lines stored in the storage unit 120 , the controller 140 determines the positions of the lines included in the actual image 1000 in the generated table (or the reconstructed table 1200 ), the relative positions between the lines, and the lines The table 1200 may be created to reflect the interval between them.
  • controller 140 may place the text extracted from the OCR unit 130 in the generated table 1200 .
  • the method and system for generating a table according to the present invention extracts the components of a table included in an image according to each characteristic, and based on the relationship between the extracted components, the table included in the image and You can understand the table structure. Through this, even if it is not known in which region the table is located in the image, it is possible to accurately detect the table from the image based on the constituent elements of the table. As a result, the present invention can significantly reduce the probability of failure in the process of detecting a table included in an image by recognizing and detecting a table from an image based on the constituent elements of the table.
  • the table generating method and system according to the present invention may extract each of the components of a table included in an image based on line characteristics and corner characteristics, and project the extracted components on a coordinate plane.
  • the structure of the table included in the image can be accurately determined based on the relationship between the coordinate values of the constituent components projected on the coordinate plane.
  • the present invention makes it possible to create a table having the same structure as a table included in an image by considering even an invisible component (eg, implicit line).
  • a technology for creating or reproducing a table having the same configuration as a table included in an image is being actively developed, and the technology for creating and reproducing the table is based on various elements (eg, text) surrounding the table. , it is very important to accurately recognize the position of the text, the composition of the cell, the position of the cell, the relation between the cells, etc.).
  • the present invention provides an image correction method and system including a table that can increase the recognition performance of the table included in the image.
  • FIG. 11 is a conceptual diagram for explaining an image correction system including a table according to the present invention
  • FIG. 13 is a flowchart for explaining an image correction method including a table according to the present invention
  • FIGS. 14, 15 and 16A , 16B, 17, 18 and 19 are conceptual views for explaining an image correction method including a table according to the present invention.
  • the table recognition system 2100 recognizes a table included in an image, extracts a line or a line constituting the recognized table, and extracts the extracted line Based on the , it can be determined whether the table included in the image is rotated.
  • the image 21000 may include one or more tables 21100 , 21200 , and 21300 , and in the present invention, regardless of the number of tables included in the image 21000 , the image 21000 includes It is possible to recognize all tables.
  • the table recognition system 2100 may include at least one of a receiving unit 2110 , a storage unit 2120 , an OCR unit 2130 , and a control unit 2140 . .
  • the receiving unit 2110 is a means for receiving the image 21000 including the tables 21100, 21200, and 21300, and is configured to include at least one of a communication unit, a scan unit, and an input unit, or can receive other images 21000 It can be done by any means available.
  • the table recognition system 2100 analyzes the tables 21100, 21200, and 21300 included in the image 21000 received through the receiver 2110, and data (or information) included in the tables 21100, 21200, and 21300 It is possible to perform a pre-processing process to accurately extract .
  • recognizing the tables 21100, 21200, and 21300 included in the image 21000, and correcting the image 21000 or the tables 21100, 21200, and 21300 based on the recognition result is to the image 21000. It may be understood as a part of a process for restoring the included tables 21100 , 21200 , and 21300 .
  • the table recognition system 2100 may be understood as a concept included in a table creation (or restoration) system.
  • the restoration of the tables 21100, 21200, and 21300 included in the image 21000 is performed on the image 21000 or the tables 21100, 21200, and 21300 through the table recognition system 2100 according to the present invention. This can be done after the correction has been made.
  • the storage unit 2120 may be configured to store various information according to the present invention.
  • the types of the storage unit 2120 may be very diverse, and at least some of them may mean an external server 2150 , at least one of a cloud server 2151 and a database (DB, 2152 ). That is, it can be understood that the storage unit 2120 is a space in which information related to the present invention is stored, and there is no restriction on the physical space.
  • the storage unit 2120 i) the image 21000 including the tables 21100, 21200, and 21300 and related data, ii) the components (lines) of the tables 21100, 21200, and 21300 extracted from the image 21000 , corner, etc.) and related data, and iii) content (eg, text, image, etc.) data included in the tables 21100 , 21200 , and 21300 may be stored.
  • the OCR (Optical Character Reader, 2130) unit may recognize the content included in the image 21000 as a means for recognizing the content included in the image 21000, and may recognize the content included in the image 21000 through at least one of various content recognition algorithms.
  • the OCR unit 2130 may recognize content by using an algorithm based on artificial intelligence.
  • the content may include text (characters).
  • the OCR unit may extract text included in the image and location information of the text.
  • the position information of the text may include information on where the text is located in the image 21000 input through the receiver 2110 or where the text is located in the tables 21100, 21200, and 21300. have.
  • the controller 2140 may be configured to control the overall operation of the table recognition system 2100 related to the present invention.
  • the controller 2140 may include a processor (or artificial intelligence processor) capable of processing an artificial intelligence algorithm.
  • the controller 2140 may recognize the tables 21100 , 21200 , and 21300 from the image 21000 based on a deep learning algorithm, and extract a plurality of lines constituting the tables 21100 , 21200 , and 21300 . Then, the controller 2140 calculates the degree of rotation of the plurality of lines based on the reference line, and based on the calculated degree of rotation, the image 21000 so that the rotation of the tables 21100 , 21200 , and 21300 is performed. can be corrected.
  • the controller 2140 controls the tables 21100 , 21200 , and 21300 as the image 21000 is rotated as shown in FIG. 11 so that accurate information can be extracted from the tables 21100 , 21200 , and 21300 . ) is rotated, correction can be performed to correct it.
  • the control unit 2140 performs a correction to rotate the image 21000 to the right by the predetermined angle, and the table included in the image 21000 ( 21100, 21200, and 21300) may be positioned in the forward direction.
  • control unit 2140 determines in which direction and by what angle to rotate the image 21000 based on the plurality of lines constituting the tables 21100 , 21200 , and 21300 included in the image 21000 . can judge
  • a process of receiving an image 21000 (refer to FIG. 11 ) including tables 21100 , 21200 , and 21300 may be performed ( S310 ).
  • the image 21000 including the tables 21100 , 21200 , and 21300 may be received through various routes.
  • the image 21000 may be transmitted through a communication unit, scanned through a scan unit, or received through an input unit.
  • a process of extracting a plurality of lines constituting the tables 21100 , 21200 , and 21300 may be performed ( S320 ).
  • the controller 2140 recognizes an area in which horizontal and vertical lines constituting the tables 21100, 21200, and 21300 are located from the image 21000 based on the machine learning (ML) method, and the table 21100, 21200 and 21300), the horizontal lines and vertical lines constituting them may be extracted.
  • the controller 2140 may extract a plurality of lines from the image 21000 by using various image processing methods (eg, Hough transform, etc.).
  • the image 21000 may include a plurality of tables 21100 , 21200 , and 21300 .
  • the controller 2140 may extract a plurality of lines from the first table 21100 , the second table 21200 , and the third table 21300 included in the image 21000 , respectively.
  • the control unit 2140 from the first table 21100, the second table 21200, and the third table 21300, in Figure 14 (b) As illustrated, the first type of lines, that is, horizontal lines 21100a, 21200a, and 21300c, may be extracted, respectively.
  • control unit 2140 controls the first table 21100 , the second table 21200 , and the third table 21300 as shown in FIG. 15 ( b ).
  • the second type of line that is, the vertical lines 21100b, 21200b, and 21300b, may be extracted, respectively.
  • Information on the horizontal lines 21100a, 21200a, and 21300c and the vertical lines 21100b, 21200b, and 21300b extracted in this way may be stored in the storage unit 2120 .
  • the controller 2140 may calculate the degree of rotation of the plurality of lines based on the reference line 2600 .
  • the reference line 2600 is a concept serving as a reference for determining the degree of rotation of a plurality of lines, and may be replaced with various terms such as a reference line, a reference, a specific reference, and a 0 degree line.
  • the controller 2140 may calculate the degree of rotation based on an angle formed by each of the plurality of lines with the reference line 2600 .
  • the degree of rotation may be related to at least one of a rotation angle and a rotation direction formed by each of the plurality of lines with respect to the reference line 2600 .
  • control unit 2140 extracts the rotation direction of the lines 2610 and 2620 extracted from the table based on the reference line 2600, and the reference line ( 2600) and the lines 2610 and 2620 extracted from the table form angles ⁇ 1 and ⁇ 2 can be calculated.
  • the controller 2140 may perform the above process for all lines extracted from the tables 21100 , 21200 , and 21300 .
  • controller 2140 may perform the above process with respect to at least some of all lines extracted from the tables 21100 , 21200 , and 21300 .
  • the rotation direction of the lines 2610 and 2620 extracted from the table is a counterclockwise direction as shown in (a) of FIG. 16B and that shown in (b) of FIG. 16B It may be any one of the same clockwise direction.
  • control unit 2140 considers the angle (or the angle between the lines, ⁇ 1, ⁇ 2) between the reference line 2600 and the lines 2610 and 2620 extracted from the table within a preset range (-90 degrees to +90 degrees). can That is, within a preset range (or angle range), the controller 2140 may extract an angle (interval angle) between the reference line 2600 and the lines 2610 and 2620 extracted from the table.
  • the reference line 2600 and the line 2610 extracted from the table form a rotation angle within a range of up to 90 degrees counterclockwise, or within a range of up to 90 degrees clockwise (corresponding to -90 degrees). It is possible to achieve an angle between
  • the controller 2140 controls the plurality of lines 21100a, 21200a, 21300a, 21100b, 21200b, and 21300b extracted from the tables 21100, 21200, and 21300 in which direction (for example, It is possible to extract (or calculate) how many degrees rotated counterclockwise or clockwise), which can be expressed within the range of -90 degrees to +90 degrees.
  • Such, -90 degrees to +90 degrees may be a range of the angle between the angles. That is, the angle between the angles may represent the rotated angle and the rotation direction together.
  • the sign of + or - indicates whether the extracted lines 21100a, 21200a, 21300a, 21100b, 21200b, 21300b are rotated counterclockwise or clockwise with respect to the reference line 2600. have.
  • the controller 2140 calculates the degree of rotation of each of the plurality of lines with respect to the reference line through the process of calculating the rotation angle and the rotation direction of each of the plurality of lines with respect to the reference line (or can be extracted).
  • the reference line may correspond to the first type of line, that is, a horizontal line.
  • the controller 2140 may calculate the degree of rotation by performing different calculations according to which type of the first type and the second type each of the plurality of lines extracted from the table corresponds to.
  • the controller 2140 performs the same method as described above, and the degree of rotation of the first type of lines can be extracted.
  • control unit 2140 is the reference line 2600 and the first type of lines (21100a, 21200a, 21300a) within a preset range (or a preset angle range) formed by each of the angle (angle of intersections)
  • the degree of rotation of the first type of lines 21100a , 21200a , and 21300a may be extracted through the obtained operation.
  • the controller 2140 extracts the degree of rotation of the first type of lines 21100b, 21200b, and 21300b of the second type of lines 21100b, 21200b, and 21300b having a different type from the reference line 2600 among the plurality of lines. In the operation to be performed, additional operations may be performed.
  • the control unit 2140 includes a first operation for calculating angles of intersections within a preset range formed by each of the reference line 2600 and the second type of lines 21100b, 21200b, and 21300b, and the first A second operation may be performed by adding a preset angle to an angle corresponding to the result of the operation.
  • the preset angle may correspond to +90 degrees.
  • the controller 2140 adds 90 degrees (+90 degrees) counterclockwise to the angle between the reference line 2600 and the second type lines 21100b, 21200b, and 21300b within a preset range, respectively. , to obtain the corrected angle of inclination.
  • Such a corrected angle between the angles may also be expressed as “a degree of rotation of the second type of lines”.
  • the corrected interstitial angle may be +20 degrees.
  • the rotation degree of the specific second type of line is rotated by 20 degrees counterclockwise with respect to the reference line.
  • This second operation may be understood as an operation for converting the lines of the second type to the same type as the line type (first type) of the reference line, which is a plurality of This is to consider the degree of rotation of the lines together.
  • the controller 2140 may control the degree of rotation of each of the first type of lines 21100a , 21200a , and 21300a with respect to the reference line 2600 and the second type of lines 21100b , 21200b and 21300b with respect to the reference line 2600 calculated in the manner described above. ) in consideration of the respective rotational degrees, the median value (or median) can be calculated.
  • the process of calculating the intermediate value includes the degree of rotation (or angle between the angles) of each of the first-type lines 21100a, 21200a, and 21300a and the degree of rotation of the second-type lines 21100b, 21200b, and 21300b ( Alternatively, it may be understood as a process of calculating an intermediate value for the corrected angle of indentation).
  • the median value is the rotation degree (or angle between each of the lines 21100a, 21200a, 21300a of the first type) and the degree of rotation (or angle between the angles) of the second type of lines 21100b, 21200b, and 21300b, respectively. It may mean a value located in the center of the corresponding value.
  • the control unit 2140 controls the intermediate values (hereinafter, ““ Intermediate angle”) can be calculated.
  • first type lines 21100a, 21200a, and 21300a eight angles between them may exist.
  • second type lines 21100b, 21200b, and 21300b eight corrected intervening angles may exist.
  • the 8 angles and the 8 corrected angles are +20, +17, +18, +15, +20, +20, +15, +15, +15, +25, +15, +15, respectively. Assume +16, +15, +13, +20.
  • the intermediate angle between the eight angles and the eight corrected angles may be calculated as +15.5.
  • control unit 2140 is an intermediate angle between each of the first-type lines 21100a, 21200a, and 21300a and the corrected angles between the second-type lines 21100b, 21200b, and 21300b, respectively (or median value) can be used to correct the image.
  • the control unit 2140 may correct the image 21000 including the tables 21100 , 21200 , and 21300 so that rotation of the tables 21100 , 21200 , and 21300 is performed based on the intermediate angle.
  • the controller 2140 may perform a correction in which the image 21000 is rotated in one direction by a specific angle corresponding to the degree of rotation with respect to the reference line corresponding to the intermediate angle.
  • the one direction may be a rotation direction opposite to the rotation direction corresponding to the intermediate angle.
  • one direction may be a clockwise direction.
  • control unit 2140 controls the image 21000 by an angle corresponding to the intermediate angle in the rotation direction (counterclockwise or clockwise) opposite to the rotation direction (clockwise or counterclockwise) corresponding to the intermediate angle. can be rotated.
  • the intermediate angle between the plurality of lines of the tables 21100 , 21200 , 21300 ( 21100 , 21200 , 21300 ) included in the image 21000 shown in FIGS. 14A and 14B is + In the case of 20 degrees, this may mean that the tables 21100, 21200, and 21300 (21100, 21200, and 21300) are rotated by about 20 degrees counterclockwise with respect to the reference line.
  • the controller 2140 rotates the image by 20 degrees in the clockwise direction as shown in FIG. You can correct the image. That is, the controller 2130 may rotate the image by -20 degrees.
  • rotating the image 21000 by an angle corresponding to the intermediate angle means the tables 21100 , 21200 , and 21300 included in the image 21000 , that is, the first type of lines 21100a and 21200a included in the image. , 21300a) and the second type of lines 21100b, 21200b, and 21300b may have the same meaning as rotating.
  • the control unit 2140 corresponds to the first type of lines corresponding to the first table 21100 and the second table 21200 . It is possible to rotate the first type of lines and the first type of lines corresponding to the third table 21300 by an angle corresponding to an intermediate angle. More specifically, the controller 2140 may rotate the lines in a direction opposite to the rotation direction corresponding to the intermediate angle. As a result, the first type of lines 21100a ′ corresponding to the first table 21100 , the first type of lines 21200a ′ corresponding to the second table 21200 , and the third table 21300 ) The first type of lines 21300a ′ corresponding to may be disposed parallel to or similar to the reference line 2600 .
  • the control unit 2140 controls the second type of lines corresponding to the first table 21100 and the second table 21200 .
  • the second type of lines corresponding to , and the second type of lines corresponding to the third table 21300 may be rotated by an angle corresponding to the intermediate angle. More specifically, the controller 2140 may rotate the lines in a direction opposite to the rotation direction corresponding to the intermediate angle.
  • the corresponding first type of lines 21300b ′ may be disposed perpendicular to or similar to the reference line 2600 .
  • the controller 2140 receives the images 1000 ′ from the tables 21100 ′ and 21200 ′. , 21300') may extract at least one of an information characteristic and a structure characteristic.
  • controller 2140 may process at least one of the structure of the table and information included in the table from the rotated table.
  • the extraction of the information properties included in the tables 21100', 21200', 21300' is the text (or characters) included in the tables 21100', 21200', 21300', or the rotated table and the text It may include extracting the location information of
  • At least one cell included in the tables 21100', 21200', and 21300', or a rotated table is recognized and recognized It may include extracting the association between the cells.
  • information corresponding to these information characteristics and structure characteristics may be stored in the storage unit 2120 . Furthermore, information according to the information characteristics may be extracted through the above-described OCR unit 2130 .
  • control unit 130 based on the completion of the extraction of the information characteristics and the structural characteristics from the rotated tables (21100', 21200', 21300'), the rotated tables (21100', 21200', 21300') can be re-rotated again.
  • the control unit 2130 rotates the tables 21100', 21200', 21300' shown in FIG. 19(a) in a direction (eg, clockwise) corresponding to the angle between the middle angles in FIG. 19(b). As shown in , to be rotated again, the image (or rotated A correction may be performed to rotate the image, 21000').
  • the recognition performance of the table can be improved by correcting the rotation.
  • the image correction method and system including the table according to the present invention can extract a plurality of lines constituting the table, and calculate the degree of rotation thereof. Furthermore, the table recognition method and system according to the present invention determine how much the table is rotated relative to the reference line based on this degree of rotation, and based on the determined result, the table rotation is corrected for the image. Calibration may be performed.
  • Such image correction may correspond to a pre-processing process for increasing the recognition rate of information constituting the table, and as a result, the image correction method and system including the table according to the present invention has the recognition performance of the table included in the image. can increase Furthermore, when the recognition performance for a table is improved by the image correction method and system including the table according to the present invention, it is possible to create a table having the same structure as the table included in the image.
  • the present invention described above may be implemented as a program storable in a computer-readable medium (or recording medium), which is executed by one or more processes in a computer.
  • the present invention as seen above can be implemented as computer-readable codes or instructions on a medium in which a program is recorded. That is, the present invention may be provided in the form of a program.
  • the computer-readable medium includes all types of recording devices in which data readable by a computer system is stored.
  • Examples of computer-readable media include Hard Disk Drive (HDD), Solid State Disk (SSD), Silicon Disk Drive (SDD), ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc. There is this.
  • the computer-readable medium may be a server or a cloud storage that includes a storage and that an electronic device can access through communication.
  • the computer may download the program according to the present invention from a server or cloud storage through wired or wireless communication.
  • the computer described above is an electronic device equipped with a processor, that is, a CPU (Central Processing Unit, Central Processing Unit), and there is no particular limitation on the type thereof.
  • a processor that is, a CPU (Central Processing Unit, Central Processing Unit)
  • CPU Central Processing Unit

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

본 발명은 이미지에 대한 분석을 수행하여 테이블을 생성하는 방법 및 시스템에 관한 것이다. 나아가, 본 발명은 이미지에 대한 분석을 수행하여 테이블이 포함된 이미지를 보정하는 방법 및 시스템에 관한 것이다.

Description

테이블 생성 방법 및 시스템, 그리고 테이블이 포함된 이미지 보정 방법 및 시스템
본 발명은 이미지에 대한 분석을 수행하여 테이블을 생성하는 방법 및 시스템에 관한 것이다.
인공지능의 사전적 의미는, 인간의 학습능력과 추론능력, 지각능력, 자연언어의 이해능력 등을 컴퓨터 프로그램으로 실현한 기술이라 할 수 있다. 이러한 인공지능은 머신러닝에 인간의 뇌를 모방한 신경망 네트워크를 더한 딥러닝으로 인하여 비약적인 발전을 이루었다.
딥러닝(deep learning)이란, 컴퓨터가 인간처럼 판단하고 학습할 수 있도록 하고, 이를 통해 사물이나 데이터를 군집화하거나 분류하는 기술로서, 최근에는 텍스트 데이터 뿐만 아니라 영상 데이터에 대한 분석까지 가능해져, 매우 다양한 산업분야에 적극적으로 활용되고 있다.
이러한, 인공지능의 발달로 사무자동화(office automation) 분야에 있어서도 다양한 자동화가 이루어지고 있다. 특히, 사무자동화 분야에서는 종이(paper)에 인쇄된 콘텐츠를 인공지능을 활용한 영상 데이터 분석 기술에 기반하여 데이터화 하는데 많은 노력을 기울이고 있다. 그 일환으로서, 사무자동화 분야에서는 종이 문서를 이미지화 하여, 이미지에 포함된 콘텐츠를 분석하는 이미지 분석 기술(또는 영상 데이터에 대한 분석 기술)을 통하여, 문서에 포함된 콘텐츠를 데이터화하고 있으며, 이 경우 문서에 포함된 콘텐츠의 특성에 맞게 이미지를 분석하는 기술이 필요하다.
예를 들어, 테이블(table, 표)을 포함하는 문서를 데이터화 하는 경우, 테이블의 형식, 테이블 내에 포함된 텍스트의 내용 및 테이블에 포함된 텍스트의 위치 등과 같이, 테이블을 둘러싼 다양한 요소들에 대한 정확한 분석이 필요하다.
이에, 대한민국 등록특허1907029호(서식 자동화를 위한 테이블 생성 장치 및 방법)에서는, 이미지로부터 테이블을 인식하고, 인식된 테이블을 재현하는 방법에 대하여 개시하고 있으나, 이는 테이블에 포함된 선분(라인(line))을 기준으로 테이블을 재현하는 것이기에, 선분의 시각적인 표시가 생략된 셀을 포함한 테이블을 분석하는 데에 한계가 있다.
따라서, 이미지(예를 들어, 테이블이 포함된 종이문서)에 시각적인 특성 및 비시각적인 특성을 모두 고려하여, 테이블을 생성할 수 있는 방법에 대한 개선이 필요하다.
뿐만 아니라, 인식된 테이블을 재현하는 기술에 대한 다양한 개발이 이루어지고 있으며, 테이블을 둘러싼 다양한 요소들에 대한 정확한 인식을 위해서는, 이미지에 포함된 테이블의 인식 성능의 개선 또한 매우 중요하다.
본 발명은, 이미지에 포함된 테이블과 동일한 구성을 갖는 테이블을 생성할 수 있는 테이블 생성 방법 및 시스템을 제공하기 위한 것이다.
보다 구체적으로, 본 발명은 이미지에 나타나지 않는 비시각적 특성까지 고려하여 테이블을 생성할 수 있는 테이블 생성 방법 및 시스템을 제공하기 위한 것이다.
나아가, 본 발명은, 이미지에 포함된 테이블의 인식 성능을 높일 수 있는 테이블이 포함된 이미지의 보정 방법 및 시스템을 제공하기 위한 것이다.
보다 구체적으로, 본 발명은 이미지에 포함된 테이블과 동일한 구성을 갖는 테이블을 재현하기 위하여, 테이블의 인식 성능을 향상시킬 수 있는 테이블이 포함된 이미지의 보정 방법 및 시스템을 제공하기 위한 것이다.
위에서 살펴본 과제를 해결하기 위하여, 본 발명에 따른 테이블 생성 방법은, 테이블(table)을 포함하는 이미지를 수신하는 단계, 상기 테이블에 포함된 셀의 각 코너(corner) 및 상기 테이블을 구성하는 복수의 라인(line)을 추출하는 단계, 상기 복수의 라인을 좌표 평면 상에 투영하는 단계, 상기 투영 결과에 근거하여, 상기 좌표 평면 상에서 상기 각 코너의 좌표 값을 특정하는 단계 및 상기 각 코너의 좌표 값에 근거하여, 상기 이미지에 포함된 테이블과 동일한 셀 구성을 갖는 테이블을 생성하는 단계를 포함할 수 있다.
나아가, 본 발명에 따른 테이블 생성 시스템은, 저장부, 테이블을 포함하는 이미지를 수신하는 수신부 및 상기 테이블에 포함된 셀의 각 코너(corner) 및 상기 테이블을 구성하는 복수의 라인(line)을 추출하는 제어부를 포함하고, 상기 제어부는, 상기 복수의 라인을 좌표 평면 상에 투영하고, 상기 투영 결과에 근거하여, 상기 좌표 평면 상에서 상기 각 코너의 좌표 값을 특정하며, 상기 각 코너의 좌표 값에 근거하여, 상기 이미지에 포함된 테이블과 동일한 셀 구성을 갖는 테이블을 생성할 수 있다.
나아가, 본 발명에 따른, 전자기기에서 하나 이상의 프로세스에 의하여 실행되며, 컴퓨터로 판독될 수 있는 기록매체에 저장 가능한 프로그램은, 테이블(table)을 포함하는 이미지를 수신하는 단계, 상기 테이블에 포함된 셀의 각 코너(corner) 및 상기 테이블을 구성하는 복수의 라인(line)을 추출하는 단계, 상기 복수의 라인을 좌표 평면 상에 투영하는 단계, 상기 투영 결과에 근거하여, 상기 좌표 평면 상에서 상기 각 코너의 좌표 값을 특정하는 단계 및 상기 각 코너의 좌표 값에 근거하여, 상기 이미지에 포함된 테이블과 동일한 셀 구성을 갖는 테이블을 생성하는 단계를 수행하도록 하는 명령어들을 포함할 수 있다.
나아가, 위에서 살펴본 과제를 해결하기 위하여, 본 발명에 따른 테이블이 포함된 이미지의 보정 방법은, 테이블(table)을 포함하는 이미지를 수신하는 단계, 상기 이미지로부터, 상기 테이블을 구성하는 복수의 라인들을 추출하는 단계, 기준 라인을 기준으로, 상기 복수의 라인들의 회전 정도를 산출하는 단계 및 상기 회전 정도에 근거하여, 상기 테이블에 대한 회전이 수행되도록 상기 이미지를 보정하는 단계를 포함할 수 있다.
나아가, 본 발명에 따른 테이블이 포함된 이미지를 보정하기 위한 시스템은, 저장부, 테이블(table)을 포함하는 이미지를 수신하는 수신부 및 상기 이미지로부터, 상기 테이블을 구성하는 복수의 라인들을 추출하는 제어부를 포함하고, 상기 제어부는, 기준 라인을 기준으로, 상기 복수의 라인들의 회전 정도를 산출하고, 상기 회전 정도에 근거하여, 상기 테이블에 대한 회전이 수행되도록 상기 이미지를 보정할 수 있다.
나아가, 전자기기에서 하나 이상의 프로세스에 의하여 실행되며, 컴퓨터로 판독될 수 있는 기록매체에 저장 가능한 프로그램은, 테이블(table)을 포함하는 이미지를 수신하는 단계, 상기 이미지로부터, 상기 테이블을 구성하는 복수의 라인들을 추출하는 단계, 기준 라인을 기준으로, 상기 복수의 라인들의 회전 정도를 산출하는 단계 및 상기 회전 정도에 근거하여, 상기 테이블에 대한 회전이 수행되도록 상기 이미지를 보정하는 단계를 수행하도록 하는 명령어들을 포함할 수 있다.
위에서 살펴본 것과 같이, 본 발명에 따른 테이블 생성 방법 및 시스템은, 이미지에 포함된 테이블의 구성 성분들을 각각의 특성에 맞게 추출하고, 추출된 구성 성분들 간의 관계성에 근거하여, 이미지에 포함된 테이블 및 테이블의 구조를 파악할 수 있다. 이를 통해, 이미지 내에서 테이블이 어느 영역에 위치하는지 알지 못하는 경우이더라도, 테이블의 구성 성분들에 기반하여, 이미지로부터 테이블을 정확하게 검출할 수 있다. 결과적으로 본 발명은 테이블의 구성 성분에 기반하여, 이미지로부터 테이블을 인식 및 검출함으로써, 이미지에 포함된 테이블을 검출하는 과정에서의 실패 확률을 현저하게 낮출 수 있다.
나아가, 본 발명에 따른 테이블 생성 방법 및 시스템은, 이미지에 포함된 테이블의 구성 성분들을 라인 특성과 코너 특성에 근거하여 각각 추출하고, 추출된 구성 성분들을 좌표 평면에 투영할 수 있다.
그리고, 본 발명은 좌표 평면에 투영된 구성 성분들의 좌표 값 간의 관계성에 근거하여, 이미지에 포함된 테이블의 구조를 정확하게 파악할 수 있다. 이러한 관계성에 근거하여 테이블을 생성하는 경우, 본 발명은, 눈에 보이지 않는 성분(예를 들어, implicit line)까지 고려하여, 이미지에 포함된 테이블과 동일한 구조를 갖는 테이블을 생성하는 것이 가능하다.
나아가, 본 발명에 따른 테이블이 포함된 이미지 보정 방법 및 시스템은, 이미지에 포함된 테이블이 회전되어 있는 경우, 이를 바로잡는 보정을 통하여, 테이블에 대한 인식 성능을 높일 수 있다.
보다 구체적으로, 본 발명에 따른 테이블이 포함된 이미지 보정 방법 및 시스템은, 테이블을 구성하는 복수의 라인들 추출하고, 이들의 회전 정도를 산출할 수 있다. 나아가, 본 발명에 따른 테이블 인식 방법 및 시스템은, 이러한 회전 정도에 근거하여, 테이블이 기준 라인에 비하여 얼만큼 회전되어 있는지를 판단하고, 판단된 결과에 기반하여 테이블의 회전이 보정되도록 이미지에 대한 보정이 수행될 수 있다.
이러한 이미지의 보정은, 테이블을 구성하는 정보에 대한 인식률을 높이기 위한 전처리 과정에 해당할 수 있으며, 결과적으로, 본 발명에 따른 테이블이 포함된 이미지 보정 방법 및 시스템은 이미지에 포함된 테이블의 인식 성능을 높일 수 있다. 나아가, 본 발명에 따른 테이블이 포함된 이미지 보정 방법 및 시스템에 의하여, 테이블에 대한 인식 성능이 높아지는 경우, 이미지에 포함된 테이블과 동일한 구조를 갖는 테이블을 생성하는 것이 가능하다.
도 1은 본 발명에 따른 테이블 생성 시스템을 설명하기 위한 개념도이다.
도 2는 본 발명에 따른 테이블 생성 방법을 설명하기 위한 흐름도이다.
도 3, 도 4, 도 5a 및 도 5b는 테이블의 특성 정보를 추출하는 방법을 설명하기 위한 개념도들이다.
도 6, 도 7, 도 8 및 도 9는 테이블을 좌표 평면에 투영하는 방법을 설명하기 위한 개념도들이다.
도 10은 재구성된 테이블을 설명하기 위한 개념도이다.
도 11은 본 발명에 따른 테이블이 포함된 이미지 보정 시스템을 설명하기 위한 개념도이다.
도 12는 테이블을 설명하기 위한 개념도이다.
도 13은 본 발명에 따른 테이블이 포함된 이미지 보정 방법을 설명하기 위한 흐름도이다.
도 14, 도 15, 도 16a, 도 16b 도 17, 도 18 및 도 19는 본 발명에 따른 테이블이 포함된 이미지 보정 방법을 설명하기 위한 개념도들이다.
이하, 첨부된 도면을 참조하여 본 명세서에 개시된 실시 예를 상세히 설명하되, 도면 부호에 관계없이 동일하거나 유사한 구성요소에는 동일한 참조 번호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다. 이하의 설명에서 사용되는 구성요소에 대한 접미사 "모듈" 및 "부"는 명세서 작성의 용이함만이 고려되어 부여되거나 혼용되는 것으로서, 그 자체로 서로 구별되는 의미 또는 역할을 갖는 것은 아니다. 또한, 본 명세서에 개시된 실시 예를 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 명세서에 개시된 실시 예의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 또한, 첨부된 도면은 본 명세서에 개시된 실시 예를 쉽게 이해할 수 있도록 하기 위한 것일 뿐, 첨부된 도면에 의해 본 명세서에 개시된 기술적 사상이 제한되지 않으며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.
제1, 제2 등과 같이 서수를 포함하는 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되지는 않는다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다.
본 출원에서, "포함한다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.
본 발명은, 이미지에 포함된 테이블과 동일한 구성을 갖는 테이블을 생성할 수 있는 테이블 생성 방법 및 시스템을 제공하기 위한 것으로서, 이미지에 나타나지 않는 비시각적 특성까지 고려할 수 있는 테이블 생성 방법 및 시스템에 관한 것이다.
앞서 살펴본 것과 같이, 인공지능의 발달로 다양한 형태로 사무자동화(office automation)가 이루어지고 있으며, 업무의 효율을 위하여, 종이 문서에 포함된 테이블(table, 표)을, 종이 문서에 포함된 테이블 형식 그대로 디지털화(데이터화) 해야 하는 니즈가 점차적으로 높아지고 있다.
예를 들어, 다양한 종류의 영수증(領收證, receipt)과 같은 문서는 테이블을 포함하고 있으며, 보험사, 병원 등에서는 대량의 종이 문서에 포함된 테이블을 디지털화된 데이터로서 처리하여, 전산화할 필요가 있다.
한편, 본 발명에 대한 설명에 앞서, 본 명세서에서 언급되는 “테이블(table)”은, 표(表)라고도 명명될 수 있으며, 어떤 내용을 일정한 형식 또는 순서에 따라 나타낸 것을 의미할 수 있다. 도 12를 참조하여 테이블의 구성 요소에 대하여 살펴보면, 테이블(2200)은 적어도 하나의 셀(2210)을 포함하여 구성될 수 있다. 즉, 테이블(2200)은 적어도 하나의 셀(cell) 또는 공간(또는 영역)을 포함하고 있으며, 테이블은 이러한 셀(2210) 내에 정보를 포함하도록 구성된다.
테이블에 포함되는 셀의 개수, 셀의 크기 또는 셀의 위치 등은 다양하게 변형될 수 있으며, 통상적으로 셀의 형상은 직사각형(rectangular)의 형상으로 이루어진다.
테이블에 포함된 셀(210)은, 적어도 4개의 선분(line segment에 의해 정의될 수 있다. 즉, 테이블에 포함된 셀은 4개의 선분으로 둘러싸인 사각형으로 이루어질 수 있다. 본 발명에서 “선분(line segment)”은 선 또는 라인(line)의 적어도 일부로 이해되어질 수 있다. 각 셀을 구성하는 선분들이 연장되어 선 또는 라인을 이룰 수 있다.
이와 같이, 하나의 사각 형상의 셀을 형성하기 위해서는, 최소 4개의 선분(a, b, c, d)이 필요하며, 이는, 테이블을 구성하는 2개의 수평 라인(horizontal line, 또는 행 방향의 라인, 또는 모서리(edge), 2201, 2202) 및 2개의 수직 라인(vertical line, 또는 열 방향의 라인, 또는 모서리(edge), 2203, 2204) 중 적어도 일부에 의해 이루어질 수 있다. 보다 구체적으로, 직사각 형상의 셀은, 2개의 수평 라인(2201, 2202) 및 2개의 수직 라인(2203, 2204)의 적어도 일부가 상호 교차하는 것에 의하여 형성될 수 있다.
따라서, 테이블(2200)은 최소 4개의 라인을 포함하며, 수평 라인의 수, 수직 라인의 수, 라인 간의 간격, 라인의 배열 위치에 따라, 셀의 개수, 셀의 크기, 셀의 위치 등이 정의될 수 있다.
한편, 테이블(2200)을 구성하는 복수의 라인들은 서로 다른 제1 타입 및 제2 타입 중 어느 하나의 타입으로 구분될 수 있으며, 이는 해당 라인이 어느 방향으로 연장되었는지에 따라 특정될 수 있다.
도시와 같이, 수평 방향으로 연장되는 라인(2201, 2202)은, 제1 타입으로 정의되고, 수직 방향으로 연장되는 라인(2203, 2204)은 제2 타입으로 정의될 수 있다.
제1 타입의 라인은 가로 라인, 수평 라인, 행 라인, 가로 방향의 라인 등으로 그 의미가 동일 또는 유사한 용어로서 다양하게 명명될 수 있다.
나아가, 제2 타입의 라인은 세로 라인, 수직 라인, 열 라인, 세로 방향의 라인 등으로 그 의미가 동일 또는 유사한 용어로서 다양하게 명명될 수 있다.
한편, 테이블(2200)에 포함되는 셀의 개수, 셀의 크기 또는 셀의 위치 등은 가로 라인 및 세로 라인의 수, 배치 관계 등에 근거하여 다양하게 변형될 수 있으며, 셀들 간의 병합에 의해서도 다양하게 변형될 수 있다.
나아가, 본 발명에서 설명되는 테이블을 구성하는 구성 성분들은, 테이블을 구성하는 라인(가로 라인 및 세로 라인) 및 테이블을 구성하는 라인들이 교차(交叉)하면서 형성되는 코너(corner, 또는 꼭지점, 도면 부호 “e, f, g, h” 참조)를 포함할 수 있다. 예를 들어, 테이블이 1개의 셀을 가진 경우, 테이블은 2개의 수평 라인, 2개의 수직 라인 및 4개의 코너를 포함할 수 있다.
모든 테이블은 최소 4개의 코너를 가지며, 이는 테이블의 가장 바깥쪽 테두리에 포함되는 코너일 수 있다. 나아가, 테이블에 포함된 코너의 개수는 테이블에 포함된 셀의 개수에 따라 달라진다.
본 발명에서, 이미지는 종이 문서를 스캔한 것에 의하여 획득되는 이미지이거나 사진 촬영에 의하여 획득된 이미지이거나, 기타 다른 다양한 방법으로 획득된 이미지일 수 있다.
이하에서는, 종이 문서에 포함된 테이블과 동일한 구성을 갖는 테이블을 생성하는 방법 및 시스템에 대하여 첨부된 도면과 함께 보다 구체적으로 살펴본다. 도 1은 본 발명에 따른 테이블 생성 시스템을 설명하기 위한 개념도이고, 도 2는 본 발명에 따른 테이블 생성 방법을 설명하기 위한 흐름도이다. 도 3, 도 4, 도 5a 및 도 5b는 테이블의 특성 정보를 추출하는 방법을 설명하기 위한 개념도들이며, 도 6, 도 7, 도 8 및 도 9는 테이블을 좌표 평면에 투영하는 방법을 설명하기 위한 개념도들이다. 나아가, 도 10은 재구성된 테이블을 설명하기 위한 개념도이다.
본 발명에 따른 테이블 생성 시스템(100)은, 이미지(1000)에 포함된 테이블(1100)로부터, 테이블(1100)을 구성하는 구성 성분들을 추출하고, 추출된 구성 성분들 간의 관계에 기반하여, 이미지(1000)에 포함된 테이블(1100)과 동일한 테이블을 생성할 수 있다.
한편, 도 1에 도시된 것과 같이, 본 발명에 따른 테이블 생성 시스템(100)은 수신부(110), 저장부(120), OCR부(130) 및 제어부(140) 중 적어도 하나를 포함할 수 있다.
수신부(110)는 테이블(1100)이 포함된 이미지(1000)를 수신하는 수단으로서, 통신부, 스캔부 및 입력부 중 적어도 하나를 포함하여 구성되거나, 기타 이미지(1000)를 수신할 수 있는 수단으로 이루어질 수 있다.
테이블 생성 시스템(100)은 수신부(110)를 통해 수신한 이미지(1000)에 포함된 테이블(1100)을 분석하여, 이미지(1000)에 포함된 테이블(1100)과 동일한 테이블을 생성할 수 있다. 이와 같이, 이미지(1000)에 포함된 테이블(1100)과 동일한 테이블을 생성하는 작업은, 테이블을 재구성 또는 복원(reconstruction, restoration)한다고도 표현될 수 있다.
다음으로 저장부(120)는, 본 발명에 따른 다양한 정보를 저장하도록 이루어질 수 있다. 저장부(120)의 종류는 매우 다양할 수 있으며, 적어도 일부는, 외부 서버(150, 클라우드 서버(151) 및 데이터베이스(database: DB, 152) 중 적어도 하나)를 의미할 수 있다. 즉, 저장부(120)는 본 발명과 관련된 정보가 저장되는 공간이면 충분하며, 물리적인 공간에 대한 제약은 없는 것으로 이해될 수 있다.
저장부(120)에는 i)테이블(1100)을 포함하는 이미지(1000) 및 이와 관련된 데이터, ii)이미지(1000)로부터 추출된 테이블(1100)의 구성 성분(라인, 코너 등) 및 이와 관련된 데이터, iii) 테이블(1100)에 포함된 콘텐츠(예를 들어, 텍스트, 이미지 등) 데이터 중 적어도 하나가 저장될 수 있다.
다음으로, OCR(Optical Character Reader, 130)부는 이미지(1000)에 포함된 콘텐츠를 인식하는 수단으로서, 다양한 콘텐츠 인식 알고리즘 중 적어도 하나를 통하여 이미지(1000)에 포함된 콘텐츠를 인식할 수 있다. OCR부(130)는 인공지능에 기반한 알고리즘을 이용하여, 콘텐츠를 인식할 수 있다.
다음으로 제어부(140)는 본 발명과 관련된 테이블 생성 시스템(100)의 전반적인 동작을 제어하도록 이루어질 수 있다. 제어부(140)는 인공지능 알고리즘을 처리 가능한 프로세서(processor, 또는 인공지능 프로세서)를 포함할 수 있다. 제어부(140)는 딥러닝 알고리즘에 기반하여, 이미지(1000)로부터 테이블(1100)을 인식하고, 이미지(1000)에 포함된 테이블(1100)과 동일한 셀의 구성을 갖는 테이블을 생성할 수 있다.
이하에서는, 위에서 살펴본 본 발명에 따른 테이블 생성 시스템의 구성에 기반하여, 테이블을 생성하는 방법에 대하여 보다 구체적으로 살펴본다.
도 2에 도시된 것과 같이, 본 발명에 따른 테이블 생성 방법에서는, 테이블(1100)을 포함하는 이미지(1000, 도 1 참조)를 수신하는 과정이 진행될 수 있다(S210).
앞서, 살펴본 것과 같이, 테이블(1100)이 포함된 이미지(1000)는 다양한 루트를 통하여 수신될 수 있다.
이미지(1000)가 수신되면, 다음으로, 테이블(1100)에 포함된 셀의 각 코너(corner) 및 테이블(1100)을 구성하는 복수의 라인(line)을 추출하는 과정이 진행될 수 있다(S220).
이는, 테이블(1100)로부터 특성 정보를 추출하는 과정이라고 이해되어 질 수 있다. 여기에서, 특성(feature, 또는 특징) 정보는, 테이블(1100)을 구성하는 성분(또는 구성 성분)들에 대한 것으로서, 제어부(140)는 이미지(1000)로부터, 테이블(1100)을 구성하는 구성 성분들의 특성 정보를 추출할 수 있다. 이러한 과정은 “Low-level feature extraction을 수행한다”라고도 표현될 수 있다.
테이블(1100)은, 사각 형상의 적어도 하나의 셀(cell, 또는 공간(또는 영역), 도 4의 도면부호 411, 412, 413 참조)을 포함하고 있으며, 테이블은 이러한 셀(cell) 내에 정보를 포함하도록 구성된다.
테이블(1100)의 구성 성분은, 이러한 셀을 구획(또는 정의, 또는 구분)하는 라인(또는 각 셀을 구성하는 선분, 도 4의 도면부호 310, 320 참조) 및 이러한 라인들이 교차하는 것에 의하여 형성되는 코너(또는 꼭지점, 도 5a의 도면부호 501 내지 507 참조)를 포함할 수 있다.
하나의 사각 형상의 셀을 형성하기 위해서는, 최소 4개의 라인이 필요하며, 이는, 2개의 수평 라인(horizontal line, 또는 행 방향의 라인, 또는 모서리(edge))) 및 2개의 수직 라인(vertical line, 또는 열 방향의 라인, 또는 모서리(edge))을 포함하도록 구성될 수 있다.
보다 구체적으로, 사각 형상의 셀은, 2개의 수평 라인 및 2개의 수직 라인의 적어도 일부가 상호 교차하는 것에 의하여 형성될 수 있다. 그리고, 코너(corner)는, 어느 하나의 수평 라인과 어느 하나의 수직 라인이 교차하는 것에 의하여 형성될 수 있다.
테이블(1100)의 구성 성분들을 추출하는 것에 대하여 보다 구체적으로 살펴본다. 이하에서, 순차적으로 설명되는 구성 성분들을 추출하는 순서는 자유롭게 변형 가능하다.
제어부(140)는 도 3의 (a)에 도시된 것과 같이, 테이블(1100)에 포함된 수직 라인(310, 311, 312, 312a, 313)을 추출할 수 있다. 본 명세서에서는, 설명의 편의상 일부의 수직 라인(311, 312, 312a, 313)에 대해서만 도면부호를 부여하였으나, 실제 제어부(140)는 테이블(1100)에 포함된 모든 수직 라인을 추출하도록 이루어진다. 도 3의 (a)에 도시된 테이블(1100)에는 7개의 수직 라인을 포함하고 있으며, 제어부(140)는 7개의 수직 라인을 모두 추출하도록 이루어진다. 한편, 제어부(140)는 도시된 것과 같이, 동일 선상에 있는 수직 라인(312, 312a)을 하나의 라인으로서 검출할 수 있다. 도시와 같이, 동일 선상에 있는 수직 라인(312, 312a)은, 셀들의 병합(merge)에 의하여, 분리된 라인으로 나타내어질 수 있으나, 그 본질은 동일한 라일 수 있다.
제어부(140)는 이미지 인식 기법에 기반하여, 이미지(1000)로부터, 이미지(1000)에 포함된 모든 수직 라인(310)을 추출할 수 있다. 테이블(1100)에서 “수직 라인을 추출”한다는 것은, 테이블(1100)에서 수직 라인에 해당하는 구성 성분을 인식하고, 해당 구성 성분을 수직 라인이라고 판단하는 것을 의미할 수 있다. 제어부(140)는 도 3의 (a)에 도시된 것과 같이, 수직 라인에 해당하는 성분들을, 수직 라인에 매칭된 시각적인 표시 방법(예를 들어, 제1 표시 방법(ex: 두꺼운 실선))으로 테이블(1100)에서 표시할 수 있다. 그 결과, 도 3의 (a)에 도시된 것과 같이, 테이블(1100)에 포함된 모든 수직 라인(310)은 두꺼운 실선으로 표시될 수 있다.
마찬가지로, 제어부(140)는 도 3의 (b)에 도시된 것과 같이, 테이블(1100)에 포함된 수평 라인(320, 321, 322, 323)을 추출할 수 있다. 본 명세서에서는, 설명의 편의상 일부의 수평 라인(321, 322, 323)에 대해서만 도면부호를 부여하였으나, 실제 제어부(140)는 테이블(1100)에 포함된 모든 수평 라인을 추출하도록 이루어진다.
제어부(140)는 이미지 인식 기법에 기반하여, 이미지(1000)로부터, 이미지(1000)에 포함된 모든 수평 라인(320)을 추출할 수 있다. 테이블(1100)에서 “수평 라인을 추출”한다는 것은, 테이블(1100)에서 수평 라인에 해당하는 구성 성분을 인식하고, 해당 구성 성분을 수평 라인이라고 판단하는 것을 의미할 수 있다.
도 3의 (b)에 도시된 테이블(1100)에는 22개의 수평 라인을 포함하고 있으며, 제어부(140)는 22개의 수평 라인을 모두 추출하도록 이루어진다. 한편, 제어부(140)는 동일 선상에 있는 수평 라인을 하나의 수평 라인으로서 검출할 수 있다. 동일 선상에 있는 수평 라인은, 셀들의 병합(merge)에 의하여, 분리된 라인으로 나타내어질 수 있으나, 그 본질은 동일한 라일 수 있다.
제어부(140)는 도 3의 (b)에 도시된 것과 같이, 수평 라인에 해당하는 성분들을, 수평 라인에 매칭된 시각적인 표시 방법(예를 들어, 제2 표시 방법(ex: 점선))으로 테이블(1100)에서 표시할 수 있다. 그 결과, 도 3의 (b)에 도시된 것과 같이, 테이블(1100)에 포함된 모든 수평 라인(320)은 점선으로 표시될 수 있다.
이미지(1000)에 포함된 특성 정보 중 라인 특성 정보의 추출이 완료되면, 도 4에 도시된 것과 같이, 수직 라인(310) 및 수평 라인(320)에는, 각각 대응되는 시각적인 표시 방법으로, 표시가 될 수 있다. 수직 라인(310)은 제1 표시 방법인 두꺼운 실선으로 표시되고, 수평 라인(320)은 제2 표시 방법인 점선으로 표시될 수 있다.
나아가, 제어부(140)는 테이블(1100)의 코너(또는 코너 정보)를 추출할 수 있다. 여기에서, 테이블(1100)의 코너는, 도 4에 도시된 것과 같이, 테이블(110)에 포함된 셀(411, 412, 413)의 꼭지점으로서, 수직 라인(310)과 수평 라인(320)이 교차되는 것에 의하여 형성될 수 있다. 제어부(140)는 테이블(1100)에 포함된 모든 셀의 코너를 추출할 수 있다.
본 발명에서 “셀의 코너가 추출”된다는 것은 테이블(1100)에서 수평 라인과 수직 라인이 교차되는 지점을 인식하고, 해당 지점을 “코너”라고 판단하는 것을 의미할 수 있다.
한편, 셀의 코너는, 각각의 셀을 기준으로 서로 다른 위치 특성을 가질 수 있다. 도 5a에서 임의의 하나의 셀(511)을 예를 들어 설명하도록 한다. 도시와 같이, 각각의 셀(511)은 서로 다른 4개의 코너(501, 502, 503, 504)를 갖도록 이루어진다. 이러한 4개의 코너(501, 502, 503, 504) 중 어느 하나의 코너는 나머지 코너에 대하여 상대적인 위치 특성을 갖는다.
예를 들어, 제1 코너(501)는 나머지 코너(502 내지 504) 보다 좌측 상단(top-left: tl)에 위치할 수 있다. 이러한 제1 코너(501)는 해당 코너(501)가 포함된 셀(511)의 tl 코너(501)가 될 수 있다.
그리고, 제2 코너(502)는 나머지 코너(501, 503, 504) 보다 우측 상단(top-right: tr)에 위치할 수 있다. 이러한 제2 코너(502)는 해당 코너(502)가 포함된 셀(511)의 tr 코너(502)가 될 수 있다.
그리고, 제3 코너(503)는 나머지 코너(501, 502, 504) 보다 좌측 하단(bottom-left: bl)에 위치할 수 있다. 이러한 제3 코너(503)는 해당 코너(503)가 포함된 셀(511)의 bl 코너(503)가 될 수 있다.
마지막으로, 제4 코너(504)는 나머지 코너(501, 502, 503) 보다 우측 하단(bottom-right: br)에 위치할 수 있다. 이러한 제4 코너(504)는 해당 코너(504)가 포함된 셀(511)의 br 코너(504)가 될 수 있다.
이와 같이, 셀의(511)을 구성하는 각 코너는 서로 다른 위치 특성을 가지면, 이러한 위치 특성은 뒤에서 설명되는 셀의 병합여부를 판단하는데 활용된다.
한편, 테이블(1100)에는 복수의 셀(511, 512, 513)을 포함하여, 이러한 어느 하나의 셀은 적어도 하나의 다른 셀과 서로 이웃(또는 인접)하게 위치할 수 있다. 서로 다른 2개의 셀(511, 512)이 서로 이웃하게 배치된 경우, 적어도 하나의 코너(503를) 공유할 수 있다. 서로 다른 셀들(511, 512) 간에 공유되는 코너(503)는 각각의 셀을 기준으로 서로 다른 위치 특성으로 정의될 수 있다. 예를 들어, 특정 코너(503)는 어느 나의 셀(511)을 기준으로 좌측 하단(bl)에 위치하는 코너이지만, 다른 셀(512)을 기준으로는 좌측 상단(tl)에 위치하는 코너일 수 있다. 이에, 테이블(1100)에 포함된 코너의 위치 특성은 어느 셀을 기준으로 판단하느냐에 따라, 서로 달라질 수 있다.
한편, 제어부(140)는 도 5b에 도시된 것과 같이, 테이블(1100)을 구성하는 모든 코너(501 내지 509, 설명의 편의상 일부 코너에만 도면 부호를 부여함)를 인식 및 추출할 수 있다.
이와 같이, 제어부(140)는 이미지(1000)로부터, 수직 라인, 수평 라인 및 각각의 셀에 대해 서로 다른 위치 특성을 갖는 코너들을 포함하는 구성 성분을 추출할 수 있다.
이와 같이, 구성 성분의 추출이 이루어지면, 본 발명에서는 복수의 라인을 좌표 (또는 좌표 평면) 상에 투영하는 과정이 진행될 수 있다(S230).
이러한 과정은, Edge projection& grouping 과정이라고도 명명될 수 있다.
본 과정에서는, 좌표 평면 상에서 복수의 라인 각각에 대한 라벨링(labelling)을 수행하는 과정을 더 포함할 수 있다.
제어부(140)는 도 6 및 도 7에 도시된 것과같이, 테이블(1100)에 포함된 복수의 수직 라인(310) 및 복수의 수평 라인(320)을 서로 다른 평면(또는 좌표 평면) 상에 투영(projection)할 수 있다.
여기에서, 서로 다른 좌표 평면은 서로 직교하는 제1 축 및 제2 축에 의해 정의되는 2차원 좌표 평면일 수 있다.
도 6에 도시된 것과 같이, 제어부(140)는 복수의 수직 라인(310)을, 상기 제1 축에 대응되는 제1 평면(예를 들어, x 평면 또는 x 축 평면) 상에 투영할 수 있다.
그리고, 도 7에 도시된 것과 같이, 제어부(140)는 복수의 수평 라인(320)을 상기 제2 축에 대응되는 제2 평면(예를 들어, y 평면 또는 y 축 평면) 상에 투영할 수 있다.
이와 같이, 각각의 수직 라인 및 수평 라인이 좌표(또는 좌표 평면) 상에 투영되는 경우, 각각의 수직 라인 및 수평 라인은 각각의 평면에 대해 서로 다른 좌표 값을 가질 수 있다.
도 6에 도시된 것과 같이, 서로 다른 7개의 수직 라인은, 제1 평면 상에서, 서로 다른 7개의 지점에 각각 대응되도록 투영될 수 있다. 따라서, 투영 결과, 서로 다른 수직 라인들은 제1 평면 상에서 서로 다른 좌표 값을 가질 수 있다.
마찬가지로, 도 7에 도시된 것과 같이, 서로 다른 22개의 수평 라인은, 제2 평면 상에서 서로 다른 22개의 지점에 각각 대응되도록 투영될 수 있다. 따라서, 투영 결과, 서로 다른 수평 라인들은 제2 평면 상에서 서로 다른 좌표 값을 가질 수 있다.
한편, 좌표 평면 상에, 라인들의 투영이 이루어지는 경우, 라인들 간의 상호 간격 및 라인의 위치 들이 서로 대응되도록 투영될 수 있다.
제어부(140)는 테이블(1100)에서 각각의 라인들의 위치를 기준으로, 좌표 평면 상에 대한 투영을 수행하므로, 라인들 간의 위치 관계 정보가, 좌표 평면 상에 나타내어질 수 있다.
예를 들어, 도 6에 도시된 것과 같이, 제1 수직 라인(311)과 제2 수직 라인(312)간의 간격과, 제2 수직 라인(312)과 제3 수직 라인(313)의 간격이 서로 상이하다. 그 결과, 제1 평면 상에도, 제1 수직 라인(311)이 투영된 지점(0)과 제2 수직 라인(312)이 투영된 지점(1) 간의 간격과, 제2 수직 라인(312)이 투영된 지점(1)과 제3 수직 라인(313)이 투영된 지점(2) 간의 간격이 상이함을 알 수 있다.
이와 같이, 제어부(140)는 테이블(1100)에 포함된 라인들 간의 간격, 위치 특성이 그대로 유지될 수 있도록, 라인들을 좌표 평면상에 투영함으로써, 이미지(1000)에 포함된 테이블(1100)과 동일한 구성을 갖는 테이블을 생성할 수 있다.
한편, 제어부(140)는, 좌표 평면 상에 투영된 결과를 기반으로, 각각의 라인에 대해 라벨링을 수행할 수 있다. 제어부(140)는 좌표 평면 상에서 복수의 수직 라인(310) 및 복수의 수평 라인(320) 각각의 라벨 값이 특정되도록, 복수의 수직 라인 및 상기 복수의 수평 라인 각각에 대한 라벨링(labeling)을 수행할 수 있다.
도 6에 도시된 것과 같이. 복수의 수직 라인(310)은, 제1 평면 상으로의 투영 결과에 근거하여, 제1 축에 대한 라벨 값(0 내지 6)을 갖도록 라벨링(labeling)될 수 있다. 제1 축에 라벨링 되는 라벨 값의 개수는, 테이블(1100)에 포함된 수직 라인의 개수에 근거하여 결정될 수 있다. 도 6에 도시된 것과 같이, 테이블(1100)에 7개의 수직 라인이 포함된 경우, 제1 축에 대한 라벨 값은, 7개로 구성될 수 있다.
마찬가지로, 도 7에 도시된 것과 같이. 복수의 수평 라인(320)은, 제2 평면 상으로의 투영 결과에 근거하여, 제2 축에 대한 라벨 값(0 내지 21)을 갖도록 라벨링(labeling)될 수 있다. 제2 축에 라벨링 되는 라벨 값의 개수는, 테이블(1100)에 포함된 수평 라인의 개수에 근거하여 결정될 수 있다. 도 7에 도시된 것과 같이, 테이블(1100)에 22개의 수직 라인이 포함된 경우, 제2 축에 대한 라벨 값은, 22개로 구성될 수 있다.
한편, 본 발명에서는 복수의 수직 라인 및 수평 라인에 대한 라벨 값은, 순차적으로 자연수 n 만큼씩 증가하도록 부여될 수 있다.
제어부(140)는 수직 라인 및 수평 라인의 간격 및 위치 특성을 고려하여, 좌표 평면 상에, 수직 라인 및 수평 라인을 투영하였으므로, 데이터 처리의 편의를 위하여, 라벨 값을 n씩 증가하는 자연수로 표현할 수 있다. 또한, 이러한 라인 값은 알파벳 또는 기타 다른 방법으로도 표현될 수 있음은 물론이다.
도 6에 도시된 것과 같이, 복수의 수직 라인(310)은, 나열된 순서에 따라 제1 평면 상에서 n씩(예를 들어, 1씩) 증가하는 서로 다른 라벨 값(예를 들어, 0 부터 6까지, 1씩 순차적으로 증가하는 라벨 값)을 가질 수 있다. 그리고, 도 7에 도시된 것과 같이, 복수의 수평 라인(320)은, 나열된 순서에 따라, 상기 제2 평면 상에서 n씩 증가하는 서로 다른 라벨 값(예를 들어, 0 부터 21까지, 1씩 순차적으로 증가하는 라벨 값)을 가질 수 있다. 이러한 수직 라인 및 수평 라인 각각의 라벨 값은, 라인 각각의 ID(identification, identification number)라고도 표현될 수 있다.
한편, 위와 같이, 제어부(140)는 테이블에 존재하는 모든 라인을 좌표 평면상에 투영함으로써, 테이블을, 테이블에 존재하는 실제 셀과 관계없이, 테이블에 존재하는 모든 라인에 근거하여 구분되는 서브 셀 단위로 분할할 수 있다. 예를 들어, 7개의 수직 라인과 22개의 수평 라인의 경우, 해당 테이블에는 6x21개의 서브 셀(126개)이 존재할 수 있다. 서브 셀의 개수는 (수직 라인의 수-1) x (수평 라인의 수-1)에 의하여 구해질 수 있다.
이와 같이, 테이블(1100)에 포함된 라인에 대한 라벨링이 완료되면, 다음으로는, 상기 투영 결과에 근거하여, 상기 좌표 평면 상에서 상기 각 코너의 좌표 값을 특정하는 과정이 진행될 수 있다(S240). 이러한 과정은, “Corners to edges matching” 과정이라고도 표현될 수 있다.
보다 구체적으로, 제어부(140)는, 복수의 라인 각각에 대한 라벨 값을 이용하여, 각 코너의 좌표 값을 특정할 수 있다.
앞서 살펴본 것과 같이, 셀을 구성하는 각각의 코너는 서로 다른 라인의 교차에 의하여 형성되는 것이므로, 각각의 코너의 좌표 값은, 도 8에 도시된 것과 같이, 수직 라인의 라벨 값(i)과 수평 라인의 라벨 값(j)으로 나타내어질 수 있다.
즉, 각 코너는, 어느 하나의 수평 라인 및 어느 하나의 수직 라인에 포함되는 것으로서, 각 코너는, 좌표 평면 상에서, 각각의 라인의 라벨 값에 해당하는 좌표 값(i, j)을 가질 수 있다.
따라서, 제어부(140)는 셀을 구성하는 각 코너가, 이미지(1000)로부터 추출된 복수의 수직 라인 및 복수의 수평 라인 중 어느 라인에 포함되는지에 근거하여 각 코너의 2차원의 좌표 값을 특정할 수 있다.
각 코너의 좌표 값은, 복수의 수직 라인 중 상기 각 코너가 포함된 특정 수직 라인의 제1 평면 상에서의 제1 라벨 값(i)과, 복수의 수평 라인 중 상기 각 코너가 포함된 특정 수평 라인의 제2 평면 상에서의 제2 라벨 값(j)을 포함할 수 있다.
따라서, 도 8에 도시된 것과 같이, 테이블에 포함된 모든 코너는, 서로 다른 좌표 값을 가질 수 있다.
제어부(140)는 도 9에 도시된 것과 같이, 분석 대상의 테이블에서 추출된 모든 코너에 대해, 수평 라인 및 수직 라인 각각에 대해 부여된 라벨 값을 이용하여, 좌표 값을 부여할 수 있다.
이러한 과정은, 코너와 라인을 매칭하는 과정이라고도 표현할 수 있다. 즉, 특정 코너의 좌표 값은 곧 특정 수직 라인 및 수평 라인의 라벨 값이므로, 특정 코너의 좌표 값만으로, 특정 코너가 어느 수평 라인 및 수직 라인에 포함되는지 알 수 있기 때문이다.
이와 같이, 각 코너에 대한 좌표 값이 특정되면, 다음으로, 이미지에 포함된 테이블과 동일한 셀 구성을 갖는 테이블을 생성하는 과정이 진행될 수 있다(S250). 이러한 과정은, 테이블을 구성하는 셀의 구조를 파악하는 것으로서, 제어부(140)는 셀들 간의 병합 관계를 파악하여, 이미지에 포함된 테이블과 동일한 셀 구성을 갖는 테이블을 생성할 수 있다. 이와 같이, 셀 들 간의 병합 관계를 파악하는 과정은 “Cell merging” 과정이라고도 표현될 수 있다.
앞서 본 발명에서는, 라인들에 대하여 순차적으로 n씩 증가하는 라벨 값을 부여했다.
따라서, 테이블을 구성하는 모든 라인을 기준으로, 셀을 최소 단위로 분할하는 경우, 코너의 좌표 값 및 코너의 개수는 일정한 규칙을 가질 수 있다. 제어부(140)는 이러한 규칙에 기반하여, 테이블 내에서 병합된 셀이 존재하는지를 판단할 수 있다.
먼저, 테이블을 구성하는 모든 라인을 기준으로, 셀을 최소 단위로 분할하는 경우, 특정 셀에서 특정 라인 상(또는 특정 선상)에 포함된 코너들(예를 들어, tl(좌측 상단), bl(좌측 하단))의 좌표 값은, 특정 라인(예를 들어, 수직 라인)에 대해서는 동일한 좌표 값을 가지고, 이와 수직하는 각각 다른 라인(예를 들어, 수평 라인)에 대해서는 n만큼의 차이를 갖는 좌표 값을 가질 수 있다.
예를 들어, 특정 셀에서 동일 수직 라인에 포함된 2개의 코너(예를 들어, tl, bl)의 제1 및 제2 평면에 대한 좌표 값은, 제1 평면의 좌표 값(수직 라인의 라벨 값)에 있어서는 동일하고, 제2 평면에 대한 좌표 값(수평 라인의 라벨 값)은 서로 다르며, 이는 n의 차이를 갖는다.
따라서, 제어부(140)는, 특정 셀의 코너들의 좌표 값의 차이가 0(동일 선상에 있는 경우, 해당 라인의 좌표 값은 항상 동일함) 또는 n이 아닌 경우, 해당 특정 셀은 적어도 2개의 셀이 병합되었다고 판단할 수 있다. 이는 본 발명에서, 모든 라인들이 n씩 증가하는 라벨 값을 갖기 때문이다. 그리고, 제어부(140)는 좌표 값의 차이 정도에 따라, 해당 특정 셀이 몇 개의 셀이 병합된 셀인지를 판단할 수 있다. 여기에서, 병합되는 셀은, 테이블에 포함된 모든 라인에 의해 최소 단위로 분할된 셀(예를 들어, “서브 셀”이라고 명명될 수 있음)이 적어도 2개 병합된 셀일 수 있다.
따라서, 제어부(140)는 이러한 규칙에 근거하여, 테이블에서 추출된 모든 코너에 대하여, 수직 방향 및 수평 방향으로 각각의 좌표 값들의 차이를 연산하고, 연산 결과에 기반하여, 해당 코너들이 포함된 특정 셀이 수직 방향 또는 수평 방향으로 서브 셀이 병합되었는지를 판단할 수 있다.
한편, 제어부(140)는 테이블에서 추출된 코너들 중 서로 이웃하는 코너들은 동일한 셀에 포함된 코너라고 판단할 수 있다. 따라서, 제어부(140)는 서로 이웃하는 코너들의 좌표 값 간의 연산을 수행하여, 서로 이웃하는 코너들이 포함된 셀이 서브 셀들이 병합된 셀인지 또는 서브 셀 그 자체인지를 판단한다.
예를 들어, 제어부(140)는 수직 방향(또는 열 방향)으로 서브 셀들이 병합되었는지 판단하기 위해서, 서로 이웃하는 수직 방향의 2개의 코너의 좌표 값 중, 수평 방향(또는 행 방향)에 대응되는 평면(제2 평면)의 좌표 값 간의 연산을 수행한다. 그리고, 제어부(140)는 수평 방향으로 서브 셀들이 병합되었는지 판단하기 위해서는, 서로 이웃하는 수평 방향의 2개의 코너의 좌표 값 중, 수직 방향에 대응되는 평면(제1 평면)의 좌표 값 간의 연산을 수행한다. 제어부(140)는 테이블에 포함된 모든 서로 이웃하는 코너들에 대하여, 해당 연산을 수행함으로써, 서브 셀들이 병합된 셀을 추출할 수 있다.
나아가, 제어부(140)는 수직 방향 및 수평 방향 각각에 대하여 서브 셀들이 병합되었는지를 판단할 수 있다.
예를 들어, 수직 또는 수평 방향으로 서브 셀이 병합되었는지 판단하는 것에 대하여 살펴보기 위하여, n=1이이라고 가정한다.
도 9에 도시된 것과 같이, 수직 방향으로 서로 이웃하는 tl 코너(901, 좌표 값: (0, 0)) 및 bl 코너(903, 좌표 값: (0, 1))에 대해, 제어부(140)는 수평 라인(921, 922)에 해당하는 평면(제2 평면)의 좌표 값 간의 차이를 산출할 수 있다(여기에서, 서로 이웃하는 코너들은, 수직 방향 또는 수평 방향 중 어느 하나에 대해 동일 라인에 포함된 코너들이다).
이 경우, 제1 라인(921)에 해당하는 좌표 값이 0이고, 제2 라인(922)에 해당하는 좌표 값은 1(또는 n)이므로, 두 좌표 값 간의 차이는 1이다. 제어부(140)는, 서로 다른 수평 라인(921, 922)에 대한 좌표 값의 차이가, 1(또는 n)인 경우, 해당 셀이, 수직 방향으로 다른 셀과 병합되지 않았다고 판단할 수 있다. 이 경우, 서로 이웃하는 상기 tl 코너(901, 좌표 값: (0, 0)) 및 bl 코너(903, 좌표 값: (0, 1))가 포함된 특정 셀(920)은 수직 방향(열 방향)으로 병합된 서브 셀이 존재하지 않는다고 판단할 수 있다.
만약, 도 9의 예와 다르게, 서로 다른 수평 라인(921, 922)에 대한 좌표 값의 차이가, 1(또는 n)을 초과한 경우, 제어부(140)는 해당 셀이, 수직 방향으로 서브 셀들이 병합된 셀이라고 판단할 수 있다. 제어부(140)는 좌표 값 간의 차이를 n으로 나눈 수만큼의 서브 셀이 병합되었다고 판단할 수 있다. 예를 들어, 좌표 값의 차이가 5인 경우, 제어부(140)는 5를 1(위에서, n 은 1로 가정하였으므로)로 나누는 연산을 수행하여, 해당 코너들(901, 903)이 포함된 셀이 수직 방향(열 방향)으로 5개의 서브 셀이 병합된 셀이라고 판단할 수 있다.
또한, 도 9에 도시된 것과 같이, 수평 방향으로 서로 이웃하는 tl 코너(901, 좌표 값: (0, 0)) 및 tr 코너(902, 좌표 값: (6, 0))에 대해, 제어부(140)는 수직 라인(923, 924)에 해당하는 평면(제1 평면)의 좌표 값 간의 차이를 산출할 수 있다(여기에서, 서로 이웃하는 코너들은, 수직 방향 또는 수평 방향 중 어느 하나에 대해 동일 라인에 포함된 코너들이다).
이 경우, 제3 라인(923)에 해당하는 좌표 값이 0이고, 제4 라인(924)에 해당하는 좌표 값은 6이므로, 두 좌표 값 간의 차이는 6이다. 이와 같이, 두 좌표 값 간의 차이가 1(또는 n)이 아닌 경우, 제어부(140)는, 해당 코너들(901, 902)이 포함된 셀은 적어도 2개의 서브 셀이 병합된 셀이라고 판단할 수 있다.
앞서 살펴본 것과 같이, 제어부(140)는 좌표 값 간의 차이를 n으로 나눈 수만큼의 서브 셀이 병합되었다고 판단할 수 있다. 예를 들어, 좌표 값의 차이가 6인 경우, 제어부(140)는 6을 1(“n=1”인 것으로 가정하였으므로)로 나누는 연산을 수행하여, 해당 코너들이 포함된 셀이 수평 방향(행 방향)으로 6개의 서브 셀이 병합된 셀이라고 판단할 수 있다.
한편, 위의 예와 다르게, 제어부(140)는, 수평 방향으로의 서로 다른 라인에 대한 좌표 값의 차이가, 1(“n=1”인 것으로 가정하였으므로)인 경우, 제어부(140)는 해당 셀이, 수평 방향으로 다른 셀과 병합되지 않았다고 판단할 수 있다.
이와 같이, 제어부(140)는 각 코너의 좌표 값을 이용하여, 테이블에 포함된 셀이 중 적어도 두개의 셀(서브 셀)이 병합된 셀인지를 판단할 수 있다. 그리고, 제어부(140)는 복수의 셀 중 특정 셀을 구성하는 복수의 코너 중 적어도 두개의 코너들의 좌표 값 간의 차이에 근거하여, 상기 특정 셀이 적어도 두개의 서브 셀이 병합된 셀인지 여부를 판단할 수 있다. 그리고, 제어부(140)는 연산 대상의 두개의 코너들이 포함된 동일 라인이 수직 라인에 해당하는 경우, 상기 두개의 코너들의 좌표 값 중 상기 제2 축(제2 평면)에 대응되는 좌표 값 간의 차이에 근거하여, 상기 특정 셀이 수직 방향으로 병합된 셀이 존재하는지 판단할 수 있다. 그리고, 제어부(140)는 연상 대상의 두개의 코너들이 포함된 동일 라인이 수평 라인에 해당하는 경우, 상기 두개의 코너들의 좌표 값 중 상기 제1 축(제1 평면)에 대응되는 좌표 값 간의 차이에 근거하여, 상기 특정 셀이 수평 방향으로 병합된 셀이 존재하는지 판단할 수 있다.
그리고, 제어부(140)는 위에서 살펴본 것과 같이, 적어도 두개의 코너들의 좌표 값 간의 차이에 따라, 상기 특정 셀이 몇 개의 셀(또는 서브 셀)의 병합에 의해 이루어진 셀인지를 판단할 수 있다.
이와 같은 규칙으로, 제어부(140)는 추출된 모든 코너들 간에 연산을 수행하여, 이미지(1000)에 포함된 테이블의 구조를 추정할 수 있다.
한편, 테이블을 구성하는 모든 라인을 기준으로, 셀을 최소 단위로 분할하는 경우, 서로 이웃하는 라인 상(또는 동일 선상)에 포함된 코너의 개수는 모두 동일할 수 있다. 예를 들어, 도 8에 도시된 것과 같이, 4개의 수직라인과 4개의 수평 라인으로 셀이 모두 분할되는 경우, 9개의 셀이 존재하며, 모든 수직 라인에는 4개의 코너가 존재하고, 모든 수평 라인 역시 4개의 코너가 존재할 수 있다. 즉, 테이블에서 병합된 셀이 존재하지 않는 경우, 모든 수직 라인에는, 수평 라인의 수 만큼에 해당하는 코너가 존재하고, 이와 반대로 모든 수평 라인에는 수직 라인의 수 만큼에 해당하는 코너가 존재할 수 있다.
예를 들어, 도 9에 도시된 것과 같이, 7개의 수직 라인에 존재하는 경우, 각각의 수평 라인에는 7개의 코너가 존재할 수 있다. 그러나, 도시와 같이, 제1 수평 라인(921)에는 2개의 코너(tl(921), tr(902))만 존재한다. 이 경우, 제어부(140)는 제1 수평 라인(921)과 관련된 셀(920)이 적어도 하나의 서브 셀과 병합되었다고 판단할 수 있다.
나아가, 제어부(140)는 테이블에 포함된 라인의 수에 근거하여 특정될 수 있는 코너의 개수 대비, 특정 라인에 포함된 코너의 개수에 근거하여, 해당 특정 라인과 관련된 셀이 몇 개의 서브 셀에 의하여 병합되었는지를 연산할 수 있음은 물론이다.
한편, 본 발명에서는, 테이블(1100)에 존재하는 모든 라인을 기준으로 테이블을 서브 셀로 구분하고, 테이블에서 추출된 코너들의 좌표 값의 비교를 통하여, 테이블에 포함된 셀이 서브 셀들이 병합된 셀인지, 테이블의 어느 부분에서 어느 서브 셀이 병합되었는지를 판단할 수 있다.
한편, 제어부(140)는 OCR부(130)를 통하여, 테이블에 포함된 텍스트를 추출할 때, 이미지에서 텍스트가 포함된 위치 정보를 함께 추출할 수 있다. 그리고, 이러한 텍스트가 포함된 위치 정보에 기반하여, 테이블에 시각적으로 보이지 않는 라인(implicit line)이 존재한다고 판단할 수 있다. 그리고, 제어부(140)는 테이블에 포함된 모든 라인들을 좌표 평면 상에 투영함으로써, 특정 셀의 라인이 시각적으로 보이지 않는 라인이더라도, 주변 셀에 포함된 라인에 의해, 특정 셀의 라인이 추출될 수 있다. 이와 같이, 제어부(140)는 텍스트의 위치 정보 및 좌표 평면 상에 투영된 라인의 라벨링 값에 근거하여, 시각적으로 보이지 않는 라인까지 추출하는 것이 가능하다.
한편, 위에서 살펴본 것과 같이, 제어부(140)는, 테이블에 포함된 코너의 좌표 값을 기준으로 테이블에 포함된 셀들의 구조를 판단하고, 판단된 결과에 기반하여, 도 10의 (a) 및 (b)에 도시된 것과 같이, 이미지(1000)에 포함된 테이블(1100)과 동일한 셀의 구조를 갖는 테이블(1200)을 생성할 수 있다.
제어부(140)는 동일한 테이블 구조를 갖는 서로 다른 이미지들을 반복하여 분석 및 학습함으로써, 실제 이미지에 포함된 테이블과 더욱 정확한 테이블을 생성할 수 있다.
도 10의 (b)는 엑셀(xlsx)구조의 데이터이며, 제어부(140)는 도 10의 (b)에 도시된 것과 같이, 엑셀 구조의 데이터 형식으로, 셀들의 구조 정보를 생성할 수 있다. 이러한 구조화된 데이터(또는 정보)는 저장부(120)에 저장될 수 있다.
나아가, 앞서 제어부(140)는 테이블에 포함된 라인의 위치, 라인 간의 상대적인 위치, 라인 간의 간격이 좌표 평면 상에 나타나도록 투영하였다. 이러한 라인에 대한 정보는 저장부(120)에 저장될 수 있다. 제어부(140)는 저장부(120)에 저장된 라인에 대한 정보에 기반하여, 생성되는 테이블(또는 재구성되는 테이블, 1200)에 실제 이미지(1000)에 포함된 라인의 위치, 라인 간의 상대적인 위치, 라인 간의 간격이 반영되도록, 테이블(1200)을 생성할 수 있다.
그리고, 제어부(140)는 생성된 테이블(1200)에 OCR부(130)로부터 추출된 텍스트를 위치시킬 수 있다.
위에서 살펴본 것과 같이, 본 발명에 따른 테이블 생성 방법 및 시스템은, 이미지에 포함된 테이블의 구성 성분들을 각각의 특성에 맞게 추출하고, 추출된 구성 성분들 간의 관계성에 근거하여, 이미지에 포함된 테이블 및 테이블의 구조를 파악할 수 있다. 이를 통해, 이미지 내에서 테이블이 어느 영역에 위치하는지 알지 못하는 경우이더라도, 테이블의 구성 성분들에 기반하여, 이미지로부터 테이블을 정확하게 검출할 수 있다. 결과적으로 본 발명은 테이블의 구성 성분에 기반하여, 이미지로부터 테이블을 인식 및 검출함으로써, 이미지에 포함된 테이블을 검출하는 과정에서의 실패 확률을 현저하게 낮출 수 있다.
나아가, 본 발명에 따른 테이블 생성 방법 및 시스템은, 이미지에 포함된 테이블의 구성 성분들을 라인 특성과 코너 특성에 근거하여 각각 추출하고, 추출된 구성 성분들을 좌표 평면에 투영할 수 있다.
그리고, 본 발명은 좌표 평면에 투영된 구성 성분들의 좌표 값 간의 관계성에 근거하여, 이미지에 포함된 테이블의 구조를 정확하게 파악할 수 있다. 이러한 관계성에 근거하여 테이블을 생성하는 경우, 본 발명은, 눈에 보이지 않는 성분(예를 들어, implicit line)까지 고려하여, 이미지에 포함된 테이블과 동일한 구조를 갖는 테이블을 생성하는 것이 가능하다.
한편, 이미지에 포함된 테이블과 동일한 구성을 갖는 테이블을 생성 또는 재현하는 기술에 대한 개발이 활발하게 이루어지고 있으며, 테이블을 생성 및 재현하는 기술은, 테이블을 둘러싼 다양한 요소들(예를 들어, 텍스트, 텍스트의 위치, 셀의 구성, 셀의 위치, 셀들 간의 연관 관계 등)을 정확하게 인식하는 것이 매우 중요하다.
이를 위해서는, 이미지에 포함된 테이블 자체의 인식 성능을 개선하는 것이 중요하며, 본 발명은, 이미지에 포함된 테이블의 인식 성능을 높일 수 있는 테이블이 포함된 이미지 보정 방법 및 시스템을 제공한다.
이하에서는, 테이블의 인식 성능을 높일 수 있는 테이블이 포함된 이미지 보정 방법 및 시스템에 대하여, 첨부된 도면과 함께 보다 구체적으로 살펴본다.
도 11은 본 발명에 따른 테이블이 포함된 이미지 보정 시스템을 설명하기 위한 개념도이고, 도 13은 본 발명에 따른 테이블이 포함된 이미지 보정 방법을 설명하기 위한 흐름도이고, 도 14, 도 15, 도 16a, 도 16b, 도 17, 도 18 및 도 19는 본 발명에 따른 테이블이 포함된 이미지 보정 방법을 설명하기 위한 개념도들이다.
먼저, 도 11에 도시된 것과 같이, 본 발명에 따른 테이블 인식 시스템(2100)은, 이미지에 포함된 테이블을 인식하고, 인식된 테이블을 구성하는 라인(line) 또는 선을 추출하고, 추출된 라인에 근거하여 이미지에 포함된 테이블이 회전되어 있는지를 판단할 수 있다.
도시와 같이, 이미지(21000)에는 하나 또는 그 이상의 테이블(21100, 21200, 21300)이 포함될 수 있으며, 본 발명은 이미지(21000)에 포함된 테이블의 수에 관계없이, 이미지(21000)에 포함된 모든 테이블을 인식하는 것이 가능하다.
한편, 도 11에 도시된 것과 같이, 본 발명에 따른 테이블 인식 시스템(2100)은 수신부(2110), 저장부(2120), OCR부(2130) 및 제어부(2140) 중 적어도 하나를 포함할 수 있다.
수신부(2110)는 테이블(21100, 21200, 21300)이 포함된 이미지(21000)를 수신하는 수단으로서, 통신부, 스캔부 및 입력부 중 적어도 하나를 포함하여 구성되거나, 기타 이미지(21000)를 수신할 수 있는 수단으로 이루어질 수 있다.
테이블 인식 시스템(2100)은 수신부(2110)를 통해 수신한 이미지(21000)에 포함된 테이블(21100, 21200, 21300)을 분석하여, 테이블(21100, 21200, 21300)에 포함된 데이터(또는 정보)가 정확하게 추출되도록 하는 전처리 과정을 수행할 수 있다.
본 명세서에서 이미지(21000)에 포함된 테이블(21100, 21200, 21300)을 인식하고, 인식 결과를 바탕으로 이미지(21000) 또는 테이블(21100, 21200, 21300)을 보정하는 것은, 이미지(21000)에 포함된 테이블(21100, 21200, 21300)을 복원하기 위한 과정의 일부로 이해되어질 수 있다.
즉, 본 발명에 따른 테이블 인식 시스템(2100)은 테이블 생성(또는 복원) 시스템에 포함되는 개념으로도 이해되어 질 수 있다.
한편, 이미지(21000)에 포함된 테이블(21100, 21200, 21300)에 대한 복원은, 본 발명에 따른 테이블 인식 시스템(2100)을 통하여, 이미지(21000) 또는 테이블(21100, 21200, 21300)에 대한 보정이 이루어진 후 이루어질 수 있다.
다음으로 저장부(2120)는, 본 발명에 따른 다양한 정보를 저장하도록 이루어질 수 있다. 저장부(2120)의 종류는 매우 다양할 수 있으며, 적어도 일부는, 외부 서버(2150, 클라우드 서버(2151) 및 데이터베이스(database: DB, 2152) 중 적어도 하나)를 의미할 수 있다. 즉, 저장부(2120)는 본 발명과 관련된 정보가 저장되는 공간이면 충분하며, 물리적인 공간에 대한 제약은 없는 것으로 이해될 수 있다.
저장부(2120)에는 i)테이블(21100, 21200, 21300)을 포함하는 이미지(21000) 및 이와 관련된 데이터, ii)이미지(21000)로부터 추출된 테이블(21100, 21200, 21300)의 구성 성분(라인, 코너 등) 및 이와 관련된 데이터, iii) 테이블(21100, 21200, 21300)에 포함된 콘텐츠(예를 들어, 텍스트, 이미지 등) 데이터 중 적어도 하나가 저장될 수 있다.
다음으로, OCR(Optical Character Reader, 2130)부는 이미지(21000)에 포함된 콘텐츠를 인식하는 수단으로서, 다양한 콘텐츠 인식 알고리즘 중 적어도 하나를 통하여 이미지(21000)에 포함된 콘텐츠를 인식할 수 있다. OCR부(2130)는 인공지능에 기반한 알고리즘을 이용하여, 콘텐츠를 인식할 수 있다. 여기에서 콘텐츠는 텍스트(문자)를 포함할 수 있다.
OCR부는, 이미지에 포함된 텍스트 및 텍스트의 위치 정보를 추출할 수 있다. 여기에서, 텍스트의 위치 정보는 수신부(2110)를 통해 입력된 이미지(21000) 내에서 텍스트가 어디에 위치하는지 또는 테이블(21100, 21200, 21300) 내에서 텍스트가 어디에 위치하는지에 대한 정보를 포함할 수 있다.
다음으로 제어부(2140)는 본 발명과 관련된 테이블 인식 시스템(2100)의 전반적인 동작을 제어하도록 이루어질 수 있다. 제어부(2140)는 인공지능 알고리즘을 처리 가능한 프로세서(processor, 또는 인공지능 프로세서)를 포함할 수 있다. 제어부(2140)는 딥러닝 알고리즘에 기반하여, 이미지(21000)로부터 테이블(21100, 21200, 21300)을 인식하고, 테이블(21100, 21200, 21300)을 구성하는 복수의 라인들을 추출할 수 있다. 그리고, 제어부(2140)는 기준 라인을 기준으로, 상기 복수의 라인들의 회전 정도를 산출하고, 산출된 회전 정도에 근거하여, 테이블(21100, 21200, 21300)에 대한 회전이 수행되도록 이미지(21000)를 보정할 수 있다.
즉, 제어부(2140)는 테이블(21100, 21200, 21300)로부터 정확한 정보가 추출될 수 있도록, 도 11에 도시된 것과 같이, 이미지(21000)가 회전되어 있음에 따라, 테이블(21100, 21200, 21300)이 회전된 경우, 이를 바로잡는 보정을 수행할 수 있다.
도시와 같이, 좌측으로 소정각도 만큼 이미지(21000)가 회전된 경우, 제어부(2140)는 우측으로 상기 소정 각도만큼 이미지(21000)를 회전하는 보정을 수행하여, 이미지(21000)에 포함된 테이블(21100, 21200, 21300)이 정방향에 위치하도록 할 수 있다.
이때, 제어부(2140)는, 이미지(21000)에 포함된 테이블(21100, 21200, 21300)을 구성하는 복수의 라인들에 근거하여, 이미지(21000)를 어느 방향으로 얼마만큼의 각도로 회전시켜야 하는지를 판단할 수 있다.
이하에서는, 위에서 살펴본 본 발명에 따른 테이블 인식 시스템의 구성에 기반하여, 테이블을 생성하는 방법에 대하여 보다 구체적으로 살펴본다.
도 13을 참조하면, 본 발명에 따른 테이블 인식 방법에서는, 먼저 테이블(21100, 21200, 21300)을 포함하는 이미지(21000, 도 11 참조)를 수신하는 과정이 진행될 수 있다(S310).
앞서, 살펴본 것과 같이, 테이블(21100, 21200, 21300)이 포함된 이미지(21000)는 다양한 루트를 통하여 수신될 수 있다. 예를 들어, 상기 이미지(21000)는 통신부를 통하여 전송되거나, 스캔부를 통하여 스캔되거나, 입력부를 통하여 입력되는 방식 등을 통하여 수신될 수 있다.
이미지(21000)가 수신되면, 다음으로 본 발명에서는 테이블(21100, 21200, 21300)을 구성하는 복수의 라인(line)을 추출하는 과정이 진행될 수 있다(S320).
제어부(2140)는 Machine learning(ML) 방식을 기반으로 이미지(21000)로부터 테이블(21100, 21200, 21300)을 구성하는 수평 라인 및 수직 라인이 위치한 영역을 인식하고, 인식된 영역으로부터 테이블(21100, 21200, 21300)을 구성하는 수평 라인 및 수직 라인을 추출할 수 있다. 제어부(2140)는 다양한 이미지 처리 방식(예를 들어, Hough transform 등을 이용하여, 이미지(21000)로부터, 복수의 라인들을 각각 추출할 수 있다.
한편, 도 14의 (a) 및 도 15의 (a)에 도시된 것과 같이, 이미지(21000)에는 복수의 테이블(21100, 21200, 21300)이 포함될 수 있다. 이 경우, 제어부(2140)는 이미지(21000)에 포함된 제1 테이블(21100), 제2 테이블(21200) 및 제3 테이블(21300)로부터 복수의 라인을 각각 추출할 수 있다.
보다 구체적으로, 제어부(2140)는 도 14의 (a)에 도시된 것과 같이, 제1 테이블(21100), 제2 테이블(21200) 및 제3 테이블(21300)로부터, 도 14의 (b)에 도시된 것과 같이, 제1 타입의 라인, 즉, 수평 라인(21100a, 21200a, 21300c)을 각각 추출할 수 있다.
나아가, 제어부(2140)는 도 15의 (a)에 도시된 것과 같이, 제1 테이블(21100), 제2 테이블(21200) 및 제3 테이블(21300)로부터, 도 15의 (b)에 도시된 것과 같이, 제2 타입의 라인, 즉, 수직 라인(21100b, 21200b, 21300b)을 각각 추출할 수 있다.
이렇게 추출된 수평 라인(21100a, 21200a, 21300c) 및 수직 라인(21100b, 21200b, 21300b)에 대한 정보는 저장부(2120)에 저장될 수 있다.
이와 같이, 테이블(21100, 21200, 21300)로부터 복수의 라인들이 추출된 경우, 본 발명에서는 복수의 라인들의 회전 정도를 추출하는 과정을 진행할 수 있다(S2330).
보다 구체적으로, 제어부(2140)는 도 16a의 (a) 및 (b)에 도시된 것과 같이, 기준 라인(2600)을 기준으로, 상기 복수의 라인들의 회전 정도를 산출할 수 있다.
기준 라인(2600)은 복수의 라인들의 회전 정도를 판단하기 위한 기준이되는 개념으로서, 기준선, 기준, 특정 기준, 0도 라인 등의 용어와 같이, 다양한 용어로도 대체 가능하다.
제어부(2140)는 테이블로부터 추출된 복수의 라인들 각각이 기준 라인(2600)과 교차되었을 경우, 복수의 라인 각각이 기준 라인(2600)과 이루는 각도에 근거하여, 회전 정도를 산출할 수 있다.
여기에서, 회전 정도는, 기준 라인(2600)에 대해 복수의 라인들 각각이 이루는 회전 각도 및 회전 방향 중 적어도 하나와 관련될 수 있다.
제어부(2140)는 도 16b의 (a) 및 (b)에 도시된 것과 같이, 기준 라인(2600)을 기준으로, 테이블로부터 추출된 라인(2610, 2620)의 회전 방향을 추출하고, 기준 라인(2600)과 테이블로부터 추출된 라인(2610, 2620)이 이루는 각도(θ1, θ2)를 산출할 수 있다.
제어부(2140)는 테이블(21100, 21200, 21300)로부터 추출된 모든 라인에 대하여, 위의 과정을 수행할 수 있다.
이와 달리, 제어부(2140)는 테이블(21100, 21200, 21300)로부터 추출된 모든 라인 등 중 적어도 일부에 대하여, 위의 과정을 수행할 수 있다.
한편, 기준 라인(2600)을 기준으로, 테이블로부터 추출된 라인(2610, 2620)의 회전 방향은 도 16b의 (a)에 도시된 것과 같은 반시계 방향 및 도 16b의 (b)에 도시된 것과 같은 시계 방향 중 어느 하나일 수 있다.
나아가, 제어부(2140)는 기준 라인(2600)과 테이블로부터 추출된 라인(2610, 2620)이 이루는 각도(또는 사잇각, θ1, θ2)를 기 설정된 범위(-90도에서 +90도) 내에서 고려할 수 있다. 즉, 제어부(2140)는 기 설정된 범위(또는 각도 범위) 내에서, 기준 라인(2600)과 테이블로부터 추출된 라인(2610, 2620)이 이루는 각도(사잇각)를 추출할 수 있다.
기준 라인(2600)과 테이블로부터 추출된 라인(2610)은 반시계 방향으로 90도까지의 범위 내에서의 회전 각도를 이루거나, 시계 방향으로의 90도(-90도에 해당)까지의 범위 내에서의 사잇각을 이룰 수 있다.
예를 들어, 도 16b의 (a)에 도시된 것과 같이, 추출된 라인(2610)의 회전 각도(θ1)가 +30도(사잇각이 +30도인 경우)인 경우, 이는 추출된 라인(2610)이 기준 라인(2600)에 대해 반시계 방향으로 30도 회전되어 있다는 것을 의미할 수 있다.
나아가, 도 16b의 (b)에 도시된 것과 같이, 추출된 라인(2620)의 회전 각도(θ2)가 -30도(사잇각이 -30도인 경우)인 경우, 이는 추출된 라인(2620)이 기준 라인(2600)에 대해 시계 방향으로 30도 회전되어 있다는 것을 의미할 수 있다.
이와 같이, 제어부(2140)는 테이블(21100, 21200, 21300)로부터 추출된 복수의 라인들(21100a, 21200a, 21300a, 21100b, 21200b, 21300b)이 기준 라인(2600) 대비 어느 방향(예를 들어, 반시계 방향 또는 시계 방향)으로 몇도 회전되었는지를 추출(또는 산출)할 수 있으며, 이는 -90도에서 +90도의 범위 내에서 표현될 수 있다.
이러한, -90도에서 +90도는 사잇각이 갖는 범위일 수 있다. 즉, 사잇각은 회전된 각도 및 회전 방향을 함께 나타낼 수 있다.
즉, + 또는 -의 부호는, 추출된 라인들(21100a, 21200a, 21300a, 21100b, 21200b, 21300b)이 기준 라인(2600)에 대해 반시계방향으로 회전되었는지 또는 시계 방향으로 회전되었는지를 의미할 수 있다.
이와 같이, 제어부(2140)는 기준 라인에 대해 복수의 라인들 각각이 회전된 회전 각도 및 회전 방향을 산출하는 과정을 통해, 기준 라인에 대해 복수의 라인들 각각이 회전된 회전 정도를 산출(또는 추출)할 수 있다.
한편, 본 발명에서, 기준 라인은 제1 타입의 라인, 즉 수평 라인에 해당할 수 있다. 이 경우, 제어부(2140)는, 테이블로부터 추출된 복수의 라인들 각각이 제1 타입 및 제2 타입 중 어느 타입에 해당하는지에 따라 서로 다른 연산을 수행함으로써, 회전 정도를 산출할 수 있다.
먼저, 제어부(2140)는 복수의 라인들 중 기준 라인과 동일한 타입을 갖는 제1 타입의 라인들(21100a, 21200a, 21300a)에 대해서는, 위에서 살펴본 것과 같은 방법으로, 제1 타입의 라인들의 회전 정도를 추출할 수 있다.
즉, 제어부(2140)는 기준 라인(2600)과 상기 제1 타입의 라인들(21100a, 21200a, 21300a) 각각이 이루는 기 설정된 범위(또는 기 설정된 각도 범위) 이내에서의 사잇각(angle of intersections)을 구하는 연산을 통해, 상기 제1 타입의 라인들(21100a, 21200a, 21300a)의 회전 정도를 추출할 수 있다.
다음으로, 제어부(2140)는 복수의 라인들 중 기준 라인(2600)과 다른 타입 타입을 갖는 제2 타입의 라인들(21100b, 21200b, 21300b)에 대해서는, 제1 타입의 라인들의 회전 정도를 추출하는 연산에서, 추가적인 연산을 수행할 수 있다.
제어부(2140)는 기준 라인(2600)과 상기 제2 타입의 라인들(21100b, 21200b, 21300b) 각각이 이루는 기 설정된 범위 이내에서의 사잇각(angle of intersections)을 산출하는 제1 연산 및 상기 제1 연산의 결과에 해당하는 사잇각에 기 설정된 각도를 더하는 제2 연산을 수행할 수 있다. 여기에서, 기 설정된 각도는 +90도에 해당할 수 있다.
즉, 제어부(2140)는 기준 라인(2600)과 제2 타입의 라인들(21100b, 21200b, 21300b)각각이 이루는 기 설정된 범위 이내에서의 사잇각에 반시계 방향으로 90도(+90도)를 더하여, 보정된 사잇각을 구할 수 있다. 이러한 보정된 사잇각은, “제2 타입의 라인들의 회전 정도”라고도 표현될 수 있다.
예를 들어, 특정 제2 타입의 라인의 제1 연산의 결과에 해당하는 사잇각이 -70도인 경우, 보정된 사잇각은 +20도일 수 있다. 이 경우, 상기 특정 제2 타입의 라인의 회전 정도는, 기준 라인에 대해 반시계 방향으로 20도 회전되었다고 이해되어질 수 있다.
이러한 제2 연산은, 제2 타입의 라인들을 기준 라인의 라인 타입(제1 타입)과 동일한 타입으로 전환되도록 하는 연산으로 이해되어질 수 있으며, 이는 테이블(21100, 21200, 21300)에 포함된 복수의 라인들의 회전 정도를 함께 고려하기 위함이다.
한편, 제어부(2140)는 위에서 살펴본 방식으로 산출된 기준 라인(2600)에 대한 제1 타입의 라인들(21100a, 21200a, 21300a) 각각의 회전정도 및 제2 타입의 라인들(21100b, 21200b, 21300b) 각각의 회전 정도를 고려하여, 상기 제1 타입의 라인들(21100a, 21200a, 21300a)의 회전 정도 및 상기 제2 타입의 라인들(21100b, 21200b, 21300b)의 회전 정도에 대한 중간값(또는 중앙값, median)을 산출할 수 있다.
이러한, 중간값을 산출하는 과정은, 제1 타입의 라인들(21100a, 21200a, 21300a) 각각의 회전 정도(또는 사잇각) 및 상기 제2 타입의 라인들(21100b, 21200b, 21300b)의 회전 정도(또는 보정된 사잇각)에 대한 중간값을 산출하는 과정으로 이해되어질 수 있다.
중간값은 제1 타입의 라인들(21100a, 21200a, 21300a) 각각의 회전 정도(또는 사잇각) 및 상기 제2 타입의 라인들(21100b, 21200b, 21300b)의 회전 정도(또는 보정된 사잇각) 각각에 대응되는 값의 중앙에 위치하는 값을 의미할 수 있다. 제어부(2140)는 제1 타입의 라인들(21100a, 21200a, 21300a) 각각의 사잇각들 및 제2 타입의 라인들(21100b, 21200b, 21300b) 각각의 보정된 사잇각들에 대한 중간 값(이하, “중간 사잇각”으로 명명함)을 산출할 수 있다.
예를 들어, 제1 타입의 라인들(21100a, 21200a, 21300a)이 8개 존재하는 경우, 8개의 사잇각이 존재할 수 있다. 마찬가지로, 제2 타입의 라인들(21100b, 21200b, 21300b)이 8개 존재하는 경우, 8개의 보정된 사잇각이 존재할 수 있다.
이 경우, 8개의 사잇각 및 8개의 보정된 사잇각이 각각 +20, +17, +18, +15, +20, +20, +15, +15, +15, +25, +15, +15, +16, +15, +13, +20임을 가정해보자.
이 경우, 8개의 사잇각 및 8개의 보정된 사잇각의 중간 사잇각은, +15.5로 산출될 수 있다.
이와 같이, 복수의 라인들의 회전 정도가 산출된 경우, 본 발명에서는 회전 정도에 근거하여, 테이블에 대한 회전이 수행되도록 이미지를 보정하는 과정이 진행될 수 있다(S2340).
보다 구체적으로 제어부(2140) 제1 타입의 라인들(21100a, 21200a, 21300a) 각각의 사잇각들 및 제2 타입의 라인들(21100b, 21200b, 21300b) 각각의 보정된 사잇각들에 대한 중간 사잇각(또는 중간 값)을 이용하여, 이미지를 보정할 수 있다.
제어부(2140)는 상기 중간 사잇각에 근거하여, 테이블(21100, 21200, 21300) 에 대한 회전이 수행되도록 테이블(21100, 21200, 21300)이 포함된 이미지(21000)를 보정할 수 있다.
제어부(2140)는, 상기 중간 사잇각에 해당하는 기준 라인에 대한 회전 정도에 대응되는 특정 각도만큼 일 방향을 따라 이미지(21000)를 회전하는 보정을 수행할 수 있다. 여기에서, 일 방향은, 중간 사잇각에 해당하는 회전 방향과 반대되는 회전방향일 수 있다. 예를 들어, 중간 사잇각에 해당하는 회전 방향이 반시계 방향인 경우, 일 방향은 시계 방향일 수 있다.
보다 구체적으로, 제어부(2140)는 중간 사잇각에 해당하는 회전 방향(시계 방향 또는 반시계 방향)과 반대되는 회전방향(반시계 방향 또는 시계 방향)으로, 중간 사잇각에 해당하는 각도만큼 이미지(21000)를 회전시킬 수 있다. 예를 들어, 도 14의 (a) 및 도 14의 (b)에서 살펴본 이미지(21000)에 포함된 테이블(21100, 21200, 21300)(21100, 21200, 21300)의 복수의 라인들의 중간 사잇각이 +20도인 경우, 이는 테이블(21100, 21200, 21300)(21100, 21200, 21300)이 기준 라인 대비 반시계 방향으로 약 20도 정도 회전되어 있다는 것을 의미할 수 있다.
이 경우, 제어부(2140)는 도 19의 (a)에 도시된 것과 같이, 시계 방향으로 20도만큼 이미지를 회전시킴으로써, 테이블(21100’, 21200’, 21300’)이 기준 라인과 유사하게 놓여지도록 이미지를 보정할 수 있다. 즉, 제어부(2130)는 이미지를 -20도 만큼 회전시킬 수 있다.
한편, 중간 사잇각에 해당하는 각도만큼 이미지(21000)를 회전시킨다는 것은, 이미지(21000)에 포함된 테이블(21100, 21200, 21300), 즉, 이미지에 포함된 제1 타입의 라인들(21100a, 21200a, 21300a) 및 제2 타입의 라인들(21100b, 21200b, 21300b)을 회전하는 것과 동일한 의미를 가질 수 있다.
제어부(2140)는, 도 17의 (a), (b) 및 (c)에 도시된 것과 같이, 제1 테이블(21100)에 대응되는 제1 타입의 라인들, 제2 테이블(21200)에 대응되는 제1 타입의 라인들, 및 제3 테이블(21300)에 대응되는 제1 타입의 라인들을 중간 사잇각에 대응되는 각도만큼 회전시킬 수 있다. 보다 구체적으로, 제어부(2140)는 중간 사잇각에 해당하는 회전 방향과 반대되는 방향으로 라인들을 회전시킬 수 있다. 그 결과, 제1 테이블(21100)에 대응되는 제1 타입의 라인들(21100a’), 제2 테이블(21200)에 대응되는 제1 타입의 라인들(21200a’), 및 제3 테이블(21300)에 대응되는 제1 타입의 라인들(21300a’)은 기준 라인(2600)과 평행 또는 이와 유사하게 놓여질 수 있다.
마찬가지로, 제어부(2140)는, 도 18의 (a), (b) 및 (c)에 도시된 것과 같이, 제1 테이블(21100)에 대응되는 제2 타입의 라인들, 제2 테이블(21200)에 대응되는 제2 타입의 라인들, 및 제3 테이블(21300)에 대응되는 제2 타입의 라인들을 중간 사잇각에 대응되는 각도만큼 회전시킬 수 있다. 보다 구체적으로, 제어부(2140)는 중간 사잇각에 해당하는 회전 방향과 반대되는 방향으로 라인들을 회전시킬 수 있다. 그 결과 제1 테이블(21100)에 대응되는 제1 타입의 라인들(21100b’), 제2 테이블(21200)에 대응되는 제1 타입의 라인들(21200b’), 및 제3 테이블(21300)에 대응되는 제1 타입의 라인들(21300b’)은 기준 라인(2600)과 수직 또는 이와 유사하게 놓여질 수 있다.
한편, 도 19의 (a)에 도시된 것과 같이, 중간 사잇각에 근거하여, 이미지가 회전 보정된 경우(21000’), 제어부(2140)는, 이미지(1000’)로부터 테이블(21100’, 21200’, 21300’)에 포함된 정보 특성 및 구조 특성 중 적어도 하나를 추출할 수 있다.
즉, 제어부(2140)는, 회전된 테이블로부터 테이블의 구조 및 테이블에 포함된 정보 중 적어도 하나를 과정을 수행할 수 있다.
여기에서, 테이블(21100’, 21200’, 21300’)에 포함된 정보 특성의 추출은, 테이블(21100’, 21200’, 21300’, 또는 회전된 테이블)에 포함된 텍스트(또는 문자) 및 상기 텍스트의 위치 정보가 추출되는 것을 포함할 수 있다.
나아가, 테이블(21100’, 21200’, 21300’)에 포함된 구조 특성의 추출은, 테이블(21100’, 21200’, 21300’, 또는 회전된 테이블)에 포함된 적어도 하나의 셀이 인식되고, 인식된 셀 간의 연관성이 추출되는 것을 포함할 수 있다.
이러한, 정보 특성 및 구조 특성의 추출을 통하여, 테이블(21100’, 21200’, 21300’)는 다양한 정보들이 추출 및 데이터화될 수 있다.
한편, 이러한 정보 특성 및 구조 특성에 해당하는 정보들은 저장부(2120)에 저장될 수 있다. 나아가, 정보 특성에 따른 정보는 앞서 살펴본 OCR부(2130)를 통해 추출될 수 있다.
한편, 제어부(130)는 회전된 테이블(21100’, 21200’, 21300’)로부터 상기 정보 특성 및 상기 구조 특성의 추출이 완료되는 것에 근거하여, 회전된 테이블(21100’, 21200’, 21300’)을 다시 재회전시킬 수 있다.
제어부(2130)는 중각 사잇각에 해당하는 방향(예를 들어, 시계 방향)으로, 도 19의(a)에 도시된 회전된 테이블(21100’, 21200’, 21300’)이 도 19의 (b)에 도시된 것과 같이, 다시 회전되도록, 상기 일 방향(예를 들어, 시계 방향)과 반대되는 방향(예를 들어, 반시계 방향)으로 상기 중각 사잇각에 해당하는 특정 각도 만큼 상기 이미지(또는 회전된 이미지, 21000’)를 회전하는 보정을 수행할 수 있다.
이는, 이미지(21000)로부터 추출된 데이터에 대한 사용자의 심리적인 신뢰도를 위한 것으로서, 본 발명에서는 위의 과정을 통해 사용자에게, 스캔된 최초의 이미지(21000)로부터 데이터가 추출되었다는 심리적인 안정감 및 신뢰도를 줄 수 있다.
위에서 살펴본 것과 같이, 본 발명에 따른 테이블이 포함된 이미지 보정 방법 및 시스템은, 이미지에 포함된 테이블이 회전되어 있는 경우, 이를 바로잡는 보정을 통하여, 테이블에 대한 인식 성능을 높일 수 있다.
보다 구체적으로, 본 발명에 따른 테이블이 포함된 이미지 보정 방법 및 시스템은, 테이블을 구성하는 복수의 라인들 추출하고, 이들의 회전 정도를 산출할 수 있다. 나아가, 본 발명에 따른 테이블 인식 방법 및 시스템은, 이러한 회전 정도에 근거하여, 테이블이 기준 라인에 비하여 얼만큼 회전되어 있는지를 판단하고, 판단된 결과에 기반하여 테이블의 회전이 보정되도록 이미지에 대한 보정이 수행될 수 있다.
이러한 이미지의 보정은, 테이블을 구성하는 정보에 대한 인식률을 높이기 위한 전처리 과정에 해당할 수 있으며, 결과적으로, 본 발명에 따른 테이블이 포함된 이미지 보정 방법 및 시스템은 이미지에 포함된 테이블의 인식 성능을 높일 수 있다. 나아가, 본 발명에 따른 테이블이 포함된 이미지 보정 방법 및 시스템에 의하여, 테이블에 대한 인식 성능이 높아지는 경우, 이미지에 포함된 테이블과 동일한 구조를 갖는 테이블을 생성하는 것이 가능하다.
한편, 위에서 살펴본 본 발명은, 컴퓨터에서 하나 이상의 프로세스에 의하여 실행되며, 이러한 컴퓨터로 판독될 수 있는 매체(또는 기록 매체)에 저장 가능한 프로그램으로서 구현될 수 있다.
나아가, 위에서 살펴본 본 발명은, 프로그램이 기록된 매체에 컴퓨터가 읽을 수 있는 코드 또는 명령어로서 구현하는 것이 가능하다. 즉, 본 발명은 프로그램의 형태로 제공될 수 있다.
한편, 컴퓨터가 읽을 수 있는 매체는, 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 매체의 예로는, HDD(Hard Disk Drive), SSD(Solid State Disk), SDD(Silicon Disk Drive), ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장 장치 등이 있다.
나아가, 컴퓨터가 읽을 수 있는 매체는, 저장소를 포함하며 전자기기가 통신을 통하여 접근할 수 있는 서버 또는 클라우드 저장소일 수 있다. 이 경우, 컴퓨터는 유선 또는 무선 통신을 통하여, 서버 또는 클라우드 저장소로부터 본 발명에 따른 프로그램을 다운로드 받을 수 있다.
나아가, 본 발명에서는 위에서 설명한 컴퓨터는 프로세서, 즉 CPU(Central Processing Unit, 중앙처리장치)가 탑재된 전자기기로서, 그 종류에 대하여 특별한 한정을 두지 않는다.
한편, 상기의 상세한 설명은 모든 면에서 제한적으로 해석되어서는 아니되고 예시적인 것으로 고려되어야 한다. 본 발명의 범위는 첨부된 청구항의 합리적 해석에 의해 결정되어야 하고, 본 발명의 등가적 범위 내에서의 모든 변경은 본 발명의 범위에 포함된다.

Claims (30)

  1. 테이블(table)을 포함하는 이미지를 수신하는 단계;
    상기 테이블에 포함된 셀의 각 코너(corner) 및 상기 테이블을 구성하는 복수의 라인(line)을 추출하는 단계;
    상기 복수의 라인을 좌표 평면 상에 투영하는 단계;
    상기 투영 결과에 근거하여, 상기 좌표 평면 상에서 상기 각 코너의 좌표 값을 특정하는 단계; 및
    상기 각 코너의 좌표 값에 근거하여, 상기 이미지에 포함된 테이블과 동일한 셀 구성을 갖는 테이블을 생성하는 단계를 포함하는 것을 특징으로 하는 테이블 생성 방법.
  2. 제1항에 있어서,
    상기 복수의 라인은,
    복수의 수평 라인(horizontal line) 및 복수의 수직 라인(vertical line)을 포함하고,
    상기 투영하는 단계에서는,
    상기 복수의 수평 라인 및 상기 복수의 수직 라인을 서로 다른 좌표 평면 상에 투영하는 것을 특징으로 하는 테이블 생성 방법.
  3. 제2항에 있어서,
    상기 좌표 평면은 서로 직교하는 제1 축 및 제2 축에 의해 정의되는 2차원 좌표 평면이고,
    상기 복수의 수직 라인은, 상기 제1 축에 대응되는 제1 평면 상에 투영되고,
    상기 복수의 수평 라인은, 상기 제2 축에 대응되는 제2 평면 상에 투영되는 것을 특징으로 하는 테이블 생성 방법.
  4. 제3항에 있어서,
    상기 투영하는 단계는,
    상기 좌표 평면 상에서 상기 복수의 수직 라인 및 상기 복수의 수평 라인 각각의 라벨 값이 특정되도록,
    상기 복수의 수직 라인 및 상기 복수의 수평 라인 각각에 대한 라벨링(labeling)을 수행하는 단계를 포함하는 것을 특징으로 하는 테이블 생성 방법.
  5. 제4항에 있어서,
    상기 복수의 수직 라인은, 상기 제1 평면 상으로의 투영 결과에 근거하여, 상기 제1 축에 대한 라벨 값을 갖도록 라벨링(labeling)되고,
    상기 복수의 수평 라인은, 상기 제2 평면 상으로의 투영 결과에 근거하여, 상기 제2 축에 대한 라벨 값을 갖도록 라벨링(labeling)되는 것을 특징으로 하는 테이블 생성 방법.
  6. 제5항에 있어서,
    상기 복수의 수직 라인은, 나열된 순서에 따라 상기 제1 평면 상에서 n씩 증가하는 서로 다른 라벨 값을 가지고,
    상기 복수의 수평 라인은 나열된 순서에 따라 상기 제2 평면 상에서 n씩 증가하는 서로 다른 라벨 값을 갖는 것을 특징으로 하는 테이블 생성 방법.
  7. 제5항에 있어서,
    상기 각 코너의 좌표 값을 특정하는 단계에서는,
    상기 각 코너가 상기 복수의 수직 라인 및 상기 복수의 수평 라인 중 어느 라인에 포함되는지에 근거하여 상기 각 코너의 좌표 값을 특정하는 것을 특징으로 하는 테이블 생성 방법.
  8. 제7항에 있어서,
    상기 각 코너의 좌표 값은,
    상기 복수의 수직 라인 중 상기 각 코너가 포함된 특정 수직 라인의 상기 제1 평면 상에서의 제1 라벨 값과,
    상기 복수의 수평 라인 중 상기 각 코너가 포함된 특정 수평 라인의 상기 제2 평면 상에서의 제2 라벨 값을 포함하는 것을 특징으로 하는 테이블 생성 방법.
  9. 제6항에 있어서,
    상기 테이블이, 상기 복수의 수평 라인 및 상기 복수의 수직 라인에 의해 복수의 셀로 구분되는 경우,
    상기 테이블을 생성하는 단계에서는,
    상기 각 코너의 좌표 값을 이용하여, 상기 복수의 셀 중 적어도 두개의 셀이 병합되었는지를 판단하는 단계를 포함하는 것을 특징으로 하는 테이블 생성 방법.
  10. 제9항에 있어서,
    상기 판단하는 단계에서는,
    상기 복수의 셀 중 특정 셀을 구성하는 복수의 코너 중 적어도 두개의 코너들의 좌표 값 간의 차이에 근거하여, 상기 특정 셀이 적어도 두개의 셀이 병합된 셀인지 여부를 판단하는 것을 특징으로 하는 테이블 생성 방법.
  11. 제10항에 있어서,
    상기 적어도 두개의 코너들은,
    상기 복수의 수평 라인 및 상기 복수의 수직 라인 중 동일 라인에 포함된 코너들인 것을 특징으로 하는 테이블 생성 방법.
  12. 제11항에 있어서,
    상기 판단하는 단계에서는,
    상기 동일 라인이 수직 라인에 해당하는 경우,
    상기 두개의 코너들의 좌표 값 중 상기 제2 축에 대응되는 좌표 값 간의 차이에 근거하여, 상기 특정 셀이 수직 방향으로 병합된 셀이 존재하는지 판단하고,
    상기 동일 라인이 수평 라인에 해당하는 경우,
    상기 두개의 코너들의 좌표 값 중 상기 제1 축에 대응되는 좌표 값 간의 차이에 근거하여, 상기 특정 셀이 수평 방향으로 병합된 셀이 존재하는지 판단하는 것을 특징으로 하는 테이블 생성 방법.
  13. 제10항에 있어서,
    상기 판단하는 단계에서는,
    상기 적어도 두개의 코너들의 좌표 값 간의 차이에 따라, 상기 특정 셀이 몇 개의 셀의 병합에 의해 이루어진 셀인지를 판단하는 것을 특징으로 하는 테이블 생성 방법.
  14. 저장부;
    테이블을 포함하는 이미지를 수신하는 수신부; 및
    상기 테이블에 포함된 셀의 각 코너(corner) 및 상기 테이블을 구성하는 복수의 라인(line)을 추출하는 제어부를 포함하고,
    상기 제어부는,
    상기 복수의 라인을 좌표 평면 상에 투영하고, 상기 투영 결과에 근거하여, 상기 좌표 평면 상에서 상기 각 코너의 좌표 값을 특정하며,
    상기 각 코너의 좌표 값에 근거하여, 상기 이미지에 포함된 테이블과 동일한 셀 구성을 갖는 테이블을 생성하는 것을 특징으로 하는 테이블 생성 시스템.
  15. 전자기기에서 하나 이상의 프로세스에 의하여 실행되며, 컴퓨터로 판독될 수 있는 기록매체에 저장 가능한 프로그램으로서,
    상기 프로그램은,
    테이블(table)을 포함하는 이미지를 수신하는 단계;
    상기 테이블에 포함된 셀의 각 코너(corner) 및 상기 테이블을 구성하는 복수의 라인(line)을 추출하는 단계;
    상기 복수의 라인을 좌표 평면 상에 투영하는 단계;
    상기 투영 결과에 근거하여, 상기 좌표 평면 상에서 상기 각 코너의 좌표 값을 특정하는 단계; 및
    상기 각 코너의 좌표 값에 근거하여, 상기 이미지에 포함된 테이블과 동일한 셀 구성을 갖는 테이블을 생성하는 단계를 수행하도록 하는 명령어들을 포함하는 특징으로 하는 컴퓨터로 판독될 수 있는 기록매체에 저장 가능한 프로그램.
  16. 테이블(table)을 포함하는 이미지를 수신하는 단계;
    상기 이미지로부터, 상기 테이블을 구성하는 복수의 라인들을 추출하는 단계;
    기준 라인을 기준으로, 상기 복수의 라인들의 회전 정도를 산출하는 단계; 및
    상기 회전 정도에 근거하여, 상기 테이블에 대한 회전이 수행되도록 상기 이미지를 보정하는 단계를 포함하는 것을 특징으로 하는 이미지 보정 방법.
  17. 제16항에 있어서,
    상기 회전 정도를 산출하는 단계에서는,
    상기 기준 라인에 대해 상기 복수의 라인들 각각이 회전된 회전 각도 및 회전 방향을 산출하는 것을 특징으로 하는 이미지 보정 방법.
  18. 제17항에 있어서,
    상기 테이블을 구성하는 복수의 라인들 각각은,
    수평 방향을 따라 연장되는 제1 타입 및 수직 방향을 따라 연장되는 제2 타입 중 어느 하나의 타입으로 구분되고,
    상기 기준 라인에 대한 상기 복수의 라인들 각각의 회전 정도는,
    상기 복수의 라인들 각각이 상기 제1 타입 및 상기 제2 타입 중 어느 타입에 해당하는지에 따라 서로 다른 연산을 통해 산출되는 것을 특징으로 하는 이미지 보정 방법.
  19. 제18항에 있어서,
    상기 기준 라인이 수평 방향을 따라 연장된 수평 라인인 경우,
    상기 복수의 라인들 중 상기 제1 타입의 라인들의 회전 정도는,
    상기 기준 라인과 상기 제1 타입의 라인들 각각이 이루는 기 설정된 범위 이내에서의 사잇각(angle of intersections)을 구하는 연산을 통해 산출되는 것을 특징으로 하는 이미지 보정 방법.
  20. 제19항에 있어서,
    상기 복수의 라인들 중 상기 제2 타입의 라인들의 회전 정도는,
    상기 기준 라인과 상기 제2 타입의 라인들 각각이 이루는 기 설정된 범위 이내에서의 사잇각(angle of intersections)에 대하여 기 설정된 각도를 더하는 연산을 통해 산출되는 것을 특징으로 하는 이미지 보정 방법.
  21. 제20항에 있어서,
    상기 기 설정된 각도는,
    상기 제2 타입의 라인들이 상기 제1 타입의 라인들이 되도록 하는 각도인 것을 특징으로 하는 이미지 보정 방법.
  22. 제20항에 있어서,
    상기 회전 정도를 산출하는 단계에서는,
    상기 제1 타입의 라인들의 회전 정도 및 상기 제2 타입의 라인들의 회전 정도에 대한 중간값(median)을 산출하는 과정을 더 포함하고,
    상기 이미지를 보정하는 단계에서는,
    상기 중간값에 대응되는 회전 정도에 근거하여, 상기 테이블에 대한 회전이 수행되도록 상기 이미지를 보정하는 것을 특징으로 하는 이미지 보정 방법.
  23. 제16항에 있어서,
    상기 이미지에 복수의 테이블이 포함된 경우, 상기 복수의 테이블 각각을 구성하는 수평 라인 및 수직 라인이 추출되는 것을 특징으로 하는 이미지 보정 방법.
  24. 제16항에 있어서,
    상기 이미지를 보정하는 단계에서는,
    상기 회전 정도에 대응되는 특정 각도만큼 일 방향을 따라 상기 이미지를 회전하는 보정을 수행하는 것을 특징으로 하는 이미지 보정 방법.
  25. 제24항에 있어서,
    상기 회전된 테이블로부터, 상기 회전된 테이블에 포함된 정보 특성 및 구조 특성 중 적어도 하나를 추출하는 단계를 더 포함하는 것을 특징으로 하는 이미지 보정 방법.
  26. 제25항에 있어서,
    상기 정보 특성의 추출은,
    상기 회전된 테이블에 포함된 텍스트 및 상기 텍스트의 위치 정보가 추출되는 것을 포함하는 것을 특징으로 하는 이미지 보정 방법.
  27. 제26항에 있어서,
    상기 구조 특성의 추출은,
    상기 회전된 테이블에 포함된 적어도 하나의 셀이 인식되고, 인식된 셀 간의 연관성이 추출되는 것을 포함하는 것을 특징으로 하는 이미지 보정 방법.
  28. 제25항에 있어서,
    상기 회전된 테이블로부터 상기 정보 특성 및 상기 구조 특성의 추출이 완료되는 것에 근거하여, 상기 일 방향과 반대되는 방향으로 상기 특정 각도 만큼 상기 이미지를 회전하는 보정을 수행하는 단계를 더 포함하는 것을 특징으로 하는 이미지 보정 방법.
  29. 저장부;
    테이블(table)을 포함하는 이미지를 수신하는 수신부; 및
    상기 이미지로부터, 상기 테이블을 구성하는 복수의 라인들을 추출하는 제어부를 포함하고,
    상기 제어부는,
    기준 라인을 기준으로, 상기 복수의 라인들의 회전 정도를 산출하고, 상기 회전 정도에 근거하여, 상기 테이블에 대한 회전이 수행되도록 상기 이미지를 보정하는 것을 특징으로 하는 이미지 보정 시스템.
  30. 전자기기에서 하나 이상의 프로세스에 의하여 실행되며, 컴퓨터로 판독될 수 있는 기록매체에 저장 가능한 프로그램으로서,
    상기 프로그램은,
    테이블(table)을 포함하는 이미지를 수신하는 단계;
    상기 이미지로부터, 상기 테이블을 구성하는 복수의 라인들을 추출하는 단계;
    기준 라인을 기준으로, 상기 복수의 라인들의 회전 정도를 산출하는 단계; 및
    상기 회전 정도에 근거하여, 상기 테이블에 대한 회전이 수행되도록 상기 이미지를 보정하는 단계를 수행하도록 하는 명령어들을 포함하는 특징으로 하는 컴퓨터로 판독될 수 있는 기록매체에 저장 가능한 프로그램.
PCT/KR2022/002601 2021-02-23 2022-02-22 테이블 생성 방법 및 시스템, 그리고 테이블이 포함된 이미지 보정 방법 및 시스템 WO2022182104A1 (ko)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR1020210024039A KR102707927B1 (ko) 2021-02-23 테이블 생성 방법 및 시스템
KR10-2021-0024039 2021-02-23
KR10-2021-0037220 2021-03-23
KR1020210037220A KR102642095B1 (ko) 2021-03-23 2021-03-23 테이블이 포함된 이미지 보정 방법 및 시스템

Publications (1)

Publication Number Publication Date
WO2022182104A1 true WO2022182104A1 (ko) 2022-09-01

Family

ID=83049413

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2022/002601 WO2022182104A1 (ko) 2021-02-23 2022-02-22 테이블 생성 방법 및 시스템, 그리고 테이블이 포함된 이미지 보정 방법 및 시스템

Country Status (1)

Country Link
WO (1) WO2022182104A1 (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117912039A (zh) * 2024-03-20 2024-04-19 南昌航空大学 一种文档图像版面分析方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06131497A (ja) * 1992-10-16 1994-05-13 Fuji Xerox Co Ltd 表認識方式
KR100390264B1 (ko) * 1995-04-10 2003-09-22 리버스 테크놀로지, 인크. 폼처리중자동페이지등록및자동영역검출을위한시스템및방법
US20070140565A1 (en) * 2005-12-21 2007-06-21 Microsoft Corporation Table detection in ink notes
KR101811581B1 (ko) * 2016-11-15 2017-12-26 주식회사 셀바스에이아이 문서 이미지에서 표 인식을 위한 장치 및 방법
KR101907029B1 (ko) * 2017-08-24 2018-10-12 (주) 더존비즈온 서식 자동화를 위한 테이블 생성 장치 및 방법

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06131497A (ja) * 1992-10-16 1994-05-13 Fuji Xerox Co Ltd 表認識方式
KR100390264B1 (ko) * 1995-04-10 2003-09-22 리버스 테크놀로지, 인크. 폼처리중자동페이지등록및자동영역검출을위한시스템및방법
US20070140565A1 (en) * 2005-12-21 2007-06-21 Microsoft Corporation Table detection in ink notes
KR101811581B1 (ko) * 2016-11-15 2017-12-26 주식회사 셀바스에이아이 문서 이미지에서 표 인식을 위한 장치 및 방법
KR101907029B1 (ko) * 2017-08-24 2018-10-12 (주) 더존비즈온 서식 자동화를 위한 테이블 생성 장치 및 방법

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117912039A (zh) * 2024-03-20 2024-04-19 南昌航空大学 一种文档图像版面分析方法
CN117912039B (zh) * 2024-03-20 2024-05-24 南昌航空大学 一种文档图像版面分析方法

Similar Documents

Publication Publication Date Title
WO2018174603A1 (ko) 인공 지능 기술 기반의 머신 러닝을 사용하는 특허 도면 이미지에 도면 부호의 설명이 표시되도록 처리하는 방법 및 장치
WO2020138745A1 (en) Image processing method, apparatus, electronic device and computer readable storage medium
WO2017039287A1 (ko) 세그먼트 기반 수기서명 인증 시스템 및 방법
WO2021054589A1 (en) Electronic apparatus and controlling method thereof
WO2018201638A1 (zh) 基于图像识别的信息采集方法、移动终端及存储介质
WO2022182104A1 (ko) 테이블 생성 방법 및 시스템, 그리고 테이블이 포함된 이미지 보정 방법 및 시스템
WO2020060019A1 (ko) 글자 검출 장치, 방법 및 시스템
WO2021066541A1 (ko) 신분증 인식 방법 및 장치
WO2018093100A1 (en) Electronic apparatus and method for processing image thereof
WO2019039760A1 (ko) 전자 장치 및 그의 문자 인식 방법
WO2023055033A1 (en) Method and apparatus for enhancing texture details of images
WO2011087249A2 (ko) 객체 인식시스템 및 이를 이용하는 객체 인식 방법
WO2016080653A1 (en) Method and apparatus for image processing
WO2021172921A1 (ko) 의료 영상 장치 및 의료 영상 처리 방법
WO2015178716A1 (en) Search method and device
WO2022103195A1 (ko) 로봇 시스템
WO2021157880A1 (ko) 전자 장치 및 데이터 처리 방법
WO2021157804A1 (ko) 증강 현실 구현 방법 및 이를 수행하는 장치
WO2020224089A1 (zh) 图案码位置调整方法、装置及计算机可读存储介质
WO2020130708A1 (en) Method and apparatus for augmented reality
WO2022182111A1 (ko) 테이블 생성 방법 및 시스템, 그리고 테이블 인식 방법 및 시스템
WO2022019478A1 (ko) 전자 장치 및 이의 제어 방법
WO2022119136A1 (ko) 스크린샷 이미지로부터 태그 정보를 추출하는 방법 및 시스템
WO2015035705A1 (zh) 光学识别方法及移动设备
WO2019093763A1 (en) Display apparatus, control system for the same, and method for controlling the same

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22760020

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22760020

Country of ref document: EP

Kind code of ref document: A1