WO2016192664A1 - 手写表识别方法和设备 - Google Patents

手写表识别方法和设备 Download PDF

Info

Publication number
WO2016192664A1
WO2016192664A1 PCT/CN2016/084680 CN2016084680W WO2016192664A1 WO 2016192664 A1 WO2016192664 A1 WO 2016192664A1 CN 2016084680 W CN2016084680 W CN 2016084680W WO 2016192664 A1 WO2016192664 A1 WO 2016192664A1
Authority
WO
WIPO (PCT)
Prior art keywords
line
handwriting
table line
point
lines
Prior art date
Application number
PCT/CN2016/084680
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
Application filed by 夏普株式会社, 张庆久 filed Critical 夏普株式会社
Publication of WO2016192664A1 publication Critical patent/WO2016192664A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means

Definitions

  • the present invention relates to a handwriting table recognition technology, and more particularly to a handwriting table recognition method and apparatus capable of efficiently and accurately identifying a handwriting table and extracting content therein.
  • the input methods of these electronic devices can be roughly divided into two categories: keyboard input and handwriting input.
  • the keyboard input mode uses a keyboard on the electronic device, and the user clicks each button in the keyboard to input.
  • the handwriting input method receives the user's input through the touch screen of the electronic device, and processes the input to recognize the content input by the user. This requires the electronic device to have a higher recognition ability, that is, a higher requirement for the accuracy of its recognition.
  • Chinese patent application 200710178961.1 proposes a handwriting recognition device.
  • the device can extract the handwritten form from the input.
  • the size of the table is assumed to be greater than a certain threshold, and it is assumed that there are no irregular table cells.
  • the present disclosure proposes a handwriting table recognition method and apparatus capable of efficiently and highly accurately recognizing a handwriting table and extracting content in a table.
  • a handwriting table recognition method comprising: detecting a table line; calculating a boundary rectangle that covers exactly all of the table lines; and extending for each table line on the boundary rectangle to obtain a corresponding virtual table line ; calculating the position of the center point of the frame divided by the virtual table line and the table line; dividing each center point into an inner point and an outer point, Wherein the inner point is a center point surrounded by a table line; the inner points are grouped, and if the path between adjacent inner points is not blocked by the table line, the inner points belong to the same group; the inner points that will belong to the same group
  • the corresponding frame combination is formed into a cell; and the handwritten content in each cell is identified.
  • detecting the table line comprises: calculating the size of the average stroke; and identifying the stroke whose length is much larger than the average stroke size as the table line.
  • detecting the table line further comprises: detecting whether the table line has an inflection point on the path; and dividing the table line having the inflection point into a single table line at the inflection point.
  • calculating the bounding rectangle that covers exactly all of the table lines comprises: determining the longest vertical table line intersecting and the longest horizontal table line; calculating the longest vertical form line and the longest horizontal form line that exactly cover the intersection Boundary rectangle.
  • the two table lines are considered to intersect.
  • dividing each center point into an inner point and an outer point further comprises: changing an internal point separated from the adjacent external point by the virtual table line to an external point; and performing the above steps until no internal point is changed to an external point until.
  • a handwriting recognition device comprising: a table line detection module configured to detect a table line; a table area detection module configured to calculate a boundary rectangle that covers exactly all of the table lines; a structure identification module, for each table line, extending on a boundary rectangle calculated by the table area detecting module to obtain a corresponding virtual table line; calculating a position of a center point of the frame divided by the virtual table line and the table line; The center point is divided into an inner point and an outer point, wherein the inner point is a center point surrounded by a table line; the inner points are grouped, and if the path between adjacent inner points is not blocked by the table line, the inner point belongs to the same a group; a combination of boxes corresponding to internal points belonging to the same group, formed into cells; and a table cell content extraction module configured to identify handwritten content within each cell.
  • the handwriting table recognition method and device improve the performance of handwriting recognition in a plurality of aspects, including at least:
  • FIG. 1 is a schematic block diagram showing a handwriting table recognition device according to an embodiment of the present invention.
  • Figure 2 shows an example table in which only the table lines are shown.
  • Figure 3 shows the table shown in Figure 2, showing the virtual table lines.
  • Fig. 4 shows the structure of the table shown in Fig. 2.
  • Fig. 5 shows the result of center point division of the table shown in Fig. 2.
  • Figure 6 shows the final analysis results for the table shown in Figure 2.
  • Fig. 7 shows the result of division of the center point of the table of another example.
  • FIG. 8 shows a flow chart of a handwriting table recognition method according to an embodiment of the present invention.
  • FIG. 1 is a schematic block diagram showing a handwriting recognition device 100 in accordance with an embodiment of the present invention.
  • the handwriting recognition device 100 includes a handwriting input capture module 110, a table line detection module 120, a table area detection module 130, a table structure identification module 140, and a table cell content extraction module 150.
  • the handwriting input capture module 110 is used to capture the user's handwritten input content.
  • the online data capture module may be a touch screen and a processor of the handwriting recognition device, the user inputs directly on the touch screen using a stylus or a finger, and the processor records the stroke input by the user in real time.
  • the table line detection module 120 is configured to detect a table line.
  • the table lines can be identified based on the size of the strokes. For example, calculate the average stroke size. If some strokes are much larger than the average stroke size, then the strokes are considered to be table lines. This is because the length of the horizontal form line in the horizontal direction is at least greater than the length of one stroke, and the length of the vertical form line in the vertical direction is at least greater than the length of one stroke. Therefore, the table line can be identified by comparing the size/length of the stroke.
  • the table area detection module 130 is configured to detect a table area, that is, to calculate a boundary rectangle that just covers the table line.
  • the horizontal table lines and the vertical table lines are sorted according to the length of the detected table line, respectively. Select the longest vertical table line and the longest horizontal form line. Verify that the longest vertical table line intersects the longest horizontal table line. If the two intersect, it means there is a table. The calculation can cover the boundary rectangle of the longest vertical table line and the longest horizontal table line that intersect, and the resulting boundary rectangle is the table area where the table exists.
  • the table is an area defined by vertically intersecting table lines, and therefore, by detecting whether there is an intersecting table line, it is possible to determine whether or not there is a table, and by detecting the longest intersecting table line, the area of the table can be determined. Due to the randomness of handwriting, the two table lines may not intersect exactly. Thus, according to one embodiment, if the top ends of the two table lines are less than a predetermined number of pixels, then the two table lines are considered to intersect. For example, a predetermined number of pixels may be 10 pixels. Further, in the present embodiment, the mentioned “horizontal” and “vertical” do not have to be completely horizontal and vertical, and the detected form lines do not have to be straight lines.
  • the line drawn by the user cannot be a complete straight line, nor can it be completely horizontal and vertical.
  • the lines in the range of about "10%" in the vertical are vertical lines
  • the lines in the range of about "15%" in the horizontal are horizontal lines.
  • the table area can be detected by detecting the coordinates of the table line. For example, detecting the leftmost and rightmost table lines as the horizontal extent of the table, detecting the top and bottom table lines as the vertical extent of the table, then calculating the top, bottom, left, and right of the overlay table The bounding rectangle of the table line, as the area of the table.
  • the table structure identification module 140 is configured to identify the structure of the table. First, for all the table lines L, the boundary rectangle is extended to obtain the corresponding virtual table line Lv.
  • the virtual table line Lv has the same direction as its corresponding table line L. For example, if the virtual table line is a horizontal line, it is a line from left to right in the input space. If the virtual table line is vertical A straight line is a line from top to bottom in the input space.
  • Fig. 2 shows an example table in which thick lines indicate detected table lines.
  • Figure 3 shows the table shown in Figure 2, showing corresponding virtual table lines, with thin lines representing virtual table lines.
  • the corresponding virtual table line is a line extending at the same vertical position on the boundary rectangle, respectively extending leftward and rightward.
  • the corresponding virtual table line is a line extending at the same horizontal position on the boundary rectangle and extending upward and downward respectively.
  • the table line is extended on the boundary rectangle to obtain the corresponding virtual table line. Therefore, the boundary rectangle is divided into a plurality of frames by virtual table lines or table lines. Then, based on the position of each frame, the position of the center point of each frame is calculated.
  • Fig. 4 shows the structure of an exemplary table in which the center points of the respective blocks are shown. Next, the center point is divided into an internal point and an external point.
  • a center point is surrounded by the table line in four directions, that is, there is a table line on its top, bottom, left, and right, the center point is considered to be an internal point.
  • whether or not the center point has a table line in one direction is not limited to the table line/virtual table line of the frame in which it is located, but refers to whether or not there is a table line in the direction and in the boundary rectangle. If there is no form line in at least one direction of a center point, that is, it has only a virtual table line in at least one direction, the center point is considered to be an external point.
  • Fig. 5 shows the result of division of the center point of the table of one example. Then, group the center points.
  • the table cell content extraction module 150 identifies the handwritten content within the identified individual cells.
  • FIG. 1 also shows display 160.
  • the handwriting recognition device 100 can display the recognition result on the display 160.
  • different cells can be represented in different background colors so that the user can easily distinguish the individual cells.
  • the display is also the touch screen of the device.
  • the table line detection module 120 further includes a stroke segmentation module 1210 configured to split the table line of the continuation pen into a single table line. Users sometimes write adjacent table lines with a pen. These connected table lines need to be separated before handwriting recognition. Check whether the table lines have inflection points on their paths. If there are inflection points, these table lines are considered to be continuous table lines, and the table lines are divided at the inflection points to obtain a plurality of single table lines.
  • a stroke segmentation module 1210 configured to split the table line of the continuation pen into a single table line. Users sometimes write adjacent table lines with a pen. These connected table lines need to be separated before handwriting recognition. Check whether the table lines have inflection points on their paths. If there are inflection points, these table lines are considered to be continuous table lines, and the table lines are divided at the inflection points to obtain a plurality of single table lines.
  • the table structure identification module 140 is further configured to perform an adjustment for the identified interior and exterior points to change an interior point that is separated from the external point by the virtual table line to an external point.
  • FIG. 7 shows the result of division of the center point of the table of one example.
  • the table in this example differs from the table shown in Figure 5 only in that the rightmost table line is not closed, so the result of dividing the internal point and the outer point obtained by whether the center point is surrounded by the table line is as shown in Fig. 7 (a). ) shown.
  • the table structure identification module 140 adjusts the division result to change an internal point separated from the adjacent external point by the virtual table line to an external point.
  • the table structure identification module 140 performs a plurality of adjustments for the division result until no internal points are changed to the external points, that is, all the center points are adjusted.
  • FIG. 8 shows a flow chart of a handwritten table recognition method 800 in accordance with an embodiment of the present invention.
  • a handwriting table recognition method according to an embodiment of the present invention is applied to a handwriting input device, and a user performs handwriting input on a handwriting input device.
  • the handwriting table recognition method according to an embodiment of the present invention is activated when it is required to recognize user input.
  • a table line is detected.
  • a boundary rectangle that exactly covers all of the table lines is calculated.
  • the boundary rectangle covering the longest vertical table line and the longest horizontal table line can be calculated by determining the longest vertical table line and the longest horizontal table line intersecting, and a boundary rectangle covering all the table lines is obtained.
  • step S830 for each table line, extending on the boundary rectangle, a corresponding virtual table line is obtained, and the position of the center point of the frame divided by the virtual table line and the table line is calculated.
  • Each center point is divided into an inner point and an outer point, where the inner point is a center point surrounded by a table line.
  • the internal points are grouped, and if the paths between adjacent internal points are not blocked by the table lines, the internal points belong to the same group. Frames corresponding to internal points belonging to the same group are combined to form a cell.
  • step S840 handwritten content within each cell is identified.
  • the table line can be identified according to the size of the stroke. For example, Calculate the average stroke size. If some strokes are much larger than the average stroke size, then the strokes are considered to be table lines. This is because the length of the horizontal form line in the horizontal direction is at least greater than the length of one stroke, and the length of the vertical form line in the vertical direction is at least greater than the length of one stroke. Therefore, the table line can be identified by comparing the size/length of the stroke. According to this embodiment, tables having different sizes can be identified. Because the content in different sized tables has different stroke sizes. Detecting a table line based on comparison with the average stroke size does not require any threshold to be set in advance, nor is it necessary to know the set threshold.
  • the horizontal table line and the vertical table line may be sorted according to the length of the detected table line, and then the longest vertical table line and the longest horizontal table line intersected are identified. Due to the randomness of handwriting, the two table lines may not intersect exactly. Thus, according to one embodiment, if the top ends of the two table lines are less than a predetermined number of pixels, then the two table lines are considered to intersect. For example, a predetermined number of pixels may be 10 pixels.
  • the table line detected in step S810 may be a plurality of connected table lines. Therefore, the step of dividing the table line of the continuous pen into a single form line is further included in step S810. Users sometimes write adjacent table lines with a pen. These connected table lines need to be separated before handwriting recognition. Check whether the table lines have inflection points on their paths. If there are inflection points, these table lines are considered to be continuous table lines, and the table lines are divided at the inflection points to obtain a plurality of single table lines.
  • the internal point and the external point obtained in step S830 may require further adjustment.
  • the internal point separated from the external point by the virtual table line is changed to the external point.
  • Multiple adjustments are made to the division result until no internal points are changed to external points.
  • the handwriting table recognition method and apparatus can be applied to an online handwriting input device, including a tablet PC, a desktop PC with a touch screen, a mobile phone, a PDA, and the like having an online handwriting input function. Users can perform handwriting input and editing on such electronic devices.
  • the electronic device can recognize the handwriting table efficiently and with high precision.
  • the handwriting table recognition method according to an embodiment of the present invention may further identify the handwritten space after identifying a table to identify other tables that may exist. Since the table line is identified by the stroke size, there is no limit to the size of the table. Compared with the prior art, the threshold is used, and the stroke larger than the threshold is regarded as a table line, according to the present invention.
  • the method of the embodiment can identify tables of different sizes without setting any thresholds. In addition, by analyzing the structure of the table, even if there are irregular cells in the table, the cells may be correctly identified.
  • the computer program product is an embodiment having a computer readable medium encoded with computer program logic, the computer program logic providing related operations when provided on a computing device to provide The above technical solution.
  • the computer program logic When executed on at least one processor of a computing system, the computer program logic causes the processor to perform the operations (methods) described in the embodiments of the present invention.
  • Such an arrangement of the present invention is typically provided as software, code and/or other data structures, or such as one or more, that are arranged or encoded on a computer readable medium such as an optical medium (e.g., CD-ROM), floppy disk, or hard disk.
  • Software or firmware or such a configuration may be installed on the computing device such that one or more processors in the computing device perform the techniques described in this embodiment of the invention.
  • Software devices in accordance with the present invention may also be provided in connection with a software process that operates in conjunction with a computing device in a set of data communications or other entities.
  • the device according to the invention may also be distributed between multiple software processes on multiple data communication devices, or all software processes running on a small set of dedicated computers, or all software processes running on a single computer.
  • embodiments of the invention may be implemented as software programs, software and hardware on a computer device, or as separate software and/or separate circuits.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)

Abstract

手写表识别方法和设备。该方法包括:检测表格线;确定相交的最长的垂直表格线和最长的水平表格线;计算恰好覆盖所有表格线的边界矩形;针对每个表格线,在边界矩形上延伸,得到对应的虚拟表格线;计算由虚拟表格线和表格线划分的框的中心点的位置;将各个中心点分为内部点和外部点,其中内部点是由表格线包围的中心点;将内部点分组,如果相邻内部点之间的路径未被表格线所阻挡,则所述内部点属于相同的组;将属于相同组的内部点所对应的框组合,形成为单元格;以及识别各个单元格内的手写内容。根据手写表识别方法和设备,能够高效且高精确地对手写表进行识别。

Description

手写表识别方法和设备 技术领域
本发明涉及手写表识别技术,更具体地,涉及一种手写表识别方法和设备,能够高效且高精确地识别手写表并提取其中的内容。
背景技术
随着信息技术的发展,电子设备(例如,个人数字助理、手持电脑、手机)等的使用在人们的生活中越来越普及。这些电子设备的输入方式大致可以划分为键盘输入和手写输入两大类。键盘输入方式采用电子设备上的键盘,使用者点击键盘中的各个按键进行输入。手写输入方式通过电子设备的触摸屏接收使用者的输入,对输入进行处理以识别用户输入的内容。这需要电子设备具有较高的识别能力,即对其识别的准确率提出了较高的要求。
中国专利申请200710178961.1提出了一种手写表识别设备。该设备可以从输入内容中提取手写表。但是,该没备假定表的大小大于某个阈值,并且假定不存在不规则的表单元格。
因此,现有技术的方法存在过多的参数限制,而这将严重影响所能够应用的场景。例如,多数现有方法根据特定的表格线的线宽度和线长度来提取表格线。此外,现有技术的方法无法识别不规则的单元格。这些方法仅能够处理形状规则的单元格。
因此,需要一种能够高效且高精确地对手写表进行识别的机制。
发明内容
本公开提出了一种手写表识别方法和设备,能够高效且高精确地识别手写表并提取表中的内容。
根据本发明的一个方面,提出了一种手写表识别方法,包括:检测表格线;计算恰好覆盖所有表格线的边界矩形;针对每个表格线,在边界矩形上延伸,得到对应的虚拟表格线;计算由虚拟表格线和表格线划分的框的中心点的位置;将各个中心点分为内部点和外部点, 其中内部点是由表格线包围的中心点;将内部点分组,如果相邻内部点之间的路径未被表格线所阻挡,则所述内部点属于相同的组;将属于相同组的内部点所对应的框组合,形成为单元格;以及识别各个单元格内的手写内容。
优选地,检测表格线包括:计算平均笔画的大小;将长度远大于平均笔画大小的笔画识别为表格线。
优选地,检测表格线还包括:检测表格线在路径上是否存在拐点;以及将存在拐点的表格线在拐点处分割为单根表格线。
优选地,计算恰好覆盖所有表格线的边界矩形包括:确定相交的最长的垂直表格线和最长的水平表格线;计算恰好覆盖相交的最长的垂直表格线和最长的水平表格线的边界矩形。
优选地,如果两根表格线的顶端相距小于预定数目的像素,则认为两根表格线相交。
优选地,将各个中心点分为内部点和外部点还包括:将与相邻外部点由虚拟表格线分隔的内部点改变为外部点;以及执行上述步骤,直到没有内部点被改变为外部点为止。
根据本发明的第二方面,提供了一种手写表识别设备,包括:表格线检测模块,被配置为检测表格线;表格区域检测模块,被配置为计算恰好覆盖所有表格线的边界矩形;表结构识别模块,针对每个表格线,在表格区域检测模块所计算的边界矩形上延伸,得到对应的虚拟表格线;计算由虚拟表格线和表格线所划分的框的中心点的位置;将各个中心点分为内部点和外部点,其中内部点是由表格线包围的中心点;将内部点分组,如果相邻内部点之间的路径未被表格线所阻挡,则所述内部点属于相同的组;将属于相同组的内部点所对应的框组合,形成为单元格;以及表单元格内容提取模块,被配置为识别各个单元格内的手写内容。
与现有技术不同,根据本发明实施例的手写表识别方法和设备在多个方面改善了手写表识别的性能,至少包括:
1.即使在样本空间中存在不同大小的表,也可以检测这些不同大 小的表;
2.即使存在不规则的单元格,也能够正确地识别表的结构;
3.对于表的方向和预先设置的阈值没有要求。例如,对于字符大小没有限制,而且也不需要关于阈值的先验知识。
附图说明
通过下面结合附图说明本发明的优选实施例,将使本发明的上述及其它目的、特征和优点更加清楚,其中:
图1是示出了根据本发明实施例的手写表识别设备的示意框图。
图2示出了一个示例的表,其中仅示出了表格线。
图3示出了图2所示的表,其中示出了虚拟表格线。
图4示出了图2所示的表的结构。
图5示出了图2所示的表的中心点划分结果。
图6示出了对图2所示的表的最终分析结果。
图7示出了另一个示例的表的中心点的划分结果。
图8示出了根据本发明实施例的手写表识别方法的流程图。
具体实施方式
以下参照附图,对本发明的示例实施例进行详细描述。在以下描述中,一些具体实施例仅用于描述目的,而不应该理解为对本发明有任何限制,而只是本发明的示例。在可能导致对本发明的理解造成混淆时,将省略常规结构或构造。
图1是示出了根据本发明实施例的手写表识别设备100的示意框图。该手写表识别设备100包括:手写输入捕获模块110、表格线检测模块120、表格区域检测模块130、表结构识别模块140和表单元格内容提取模块150。
手写输入捕获模块110用于捕获用户的手写输入内容。例如,在线数据捕获模块可以是手写表识别设备的触摸屏和处理器,用户利用手写笔或者手指直接在触摸屏上进行输入,处理器实时地记录用户输入的笔画。
表格线检测模块120被配置为检测表格线。根据一个实施例,可以根据笔画的大小来识别表格线。例如,计算平均笔画大小。如果一些笔画的大小远大于平均笔画大小,则认为这些笔画是表格线。这是因为水平的表格线在水平方向上的长度至少大于一个笔画的长度,垂直的表格线在垂直方向上的长度至少大于一个笔画的长度。因此,通过比较笔画的大小/长度可以识别表格线。
表格区域检测模块130被配置为检测表格区域,即,计算恰好覆盖表格线的边界矩形。在一个实施例中,根据检测的表格线的长度分别对水平的表格线和垂直的表格线进行排序。选择最长的垂直表格线和最长的水平表格线。检验最长的垂直表格线和最长的水平表格线之间是否相交。如果两者相交,则意味着存在一个表。计算恰好能够覆盖相交的最长的垂直表格线和最长的水平表格线的边界矩形,所得到的边界矩形即为表所存在的表格区域。表是由垂直相交的表格线限定的区域,因此,通过检测是否存在相交的表格线,可以确定是否存在表,以及通过检测最长的相交的表格线,可以确定表的区域。由于手写的随意性,两个表格线可能不会恰好相交。因此,根据一个实施例,如果两根表格线的顶端相距小于预定数目的像素,则认为两根表格线相交。例如,预定数目的像素可以是10个像素。此外,在本实施例中,所提到的“水平”和“垂直”也不必是完全的水平和垂直,而且检测到的表格线也不必是直线。实际中,用户手画的线不可能是完全的直线,也不可能是完全的水平和垂直。例如,可以认为在垂直的“10%”左右范围内的线均为垂直线,在水平的“15%”左右范围内的线均为水平线。在另一个实施例中,可以通过检测表格线的坐标,来检测表格区域。例如,检测位于最左和最右的表格线,作为表的水平范围,检测位于最上和最下的表格线,作为表的垂直范围,然后计算覆盖表的最上、最下、最左和最右的表格线的边界矩形,作为表的区域。
表结构识别模块140被配置为识别表的结构。首先,针对所有的表格线L,在边界矩形上延伸,得到对应的虚拟表格线Lv。虚拟表格线Lv与其对应的表格线L具有相同的方向。例如,如果虚拟表格线是水平线,则其是在输入空间中从左到右的线。如果虚拟表格线是垂 直线,则其是在输入空间中从上到下的线。图2示出了一个示例的表,其中粗线条表示检测到的表格线。图3示出了图2所示的表,其中示出了对应的虚拟表格线,其中细线条表示虚拟表格线。例如,针对水平表格线,其对应的虚拟表格线是边界矩形上相同垂直位置处、分别向左和向右延伸得到的线。针对垂直表格线,其对应的虚拟表格线是边界矩形上相同水平位置处、分别向上和向下延伸得到的线。换言之,将表格线在边界矩形上延伸,可得到对应的虚拟表格线。因此,边界矩形被虚拟表格线或表格线划分为多个框。然后,根据各个框的位置,计算各个框的中心点的位置。图4示出了一个示例的表的结构,其中示出了各个框的中心点。接着,将中心点分为内部点和外部点。如果一个中心点被表格线在四个方向上包围,即在其上下左右均存在表格线,则认为该中心点是内部点。在此,中心点在一个方向上是否存在表格线并不局限于其所在框的表格线/虚拟表格线,而是指其在该方向上、在边界矩形内是否存在表格线。如果一个中心点的至少一个方向上不存在表格线,即,其在至少一个方向上仅存在虚拟表格线,则认为该中心点是外部点。图5示出了一个示例的表的中心点的划分结果。然后,将中心点分组。如果两个相邻的中心点之间的路径未被表格线所阻挡,即,两个中心点之间是虚拟表格线,则认为这两个中心点属于相同的组。将属于相同组的内部点所对应的框组合为一个单元格,即使得到的单元格是不规则形状。图6示出了对图2所示的表的最终分析结果。
表单元格内容提取模块150对所识别的各个单元格内的手写内容进行识别。
图1还示出了显示器160。手写表识别设备100可以将识别结果显示在显示器160上。例如,可以以不同的背景色表示不同的单元格,使得用户容易地辨别各个单元格。在一些示例中,显示器也是该设备的触摸屏。
根据一个实施例,表格线检测模块120还包括笔画分割模块1210,被配置为将连笔的表格线分割为单个表格线。用户有时会连笔写出相邻的表格线。在进行手写表识别之前需要将这些相连的表格线分隔开。 检测表格线在它们的路径上是否存在拐点,如果存在拐点,则认为这些表格线是连笔的表格线,将这些表格线在拐点处分割,得到多个单根表格线。
根据一个实施例,表结构识别模块140还被配置为针对识别的内部点和外部点执行调整,将与外部点由虚拟表格线分隔的内部点改变为外部点。例如,图7示出了一个示例的表的中心点的划分结果。该示例中的表与图5所示的表的区别仅在于最右边的表格线并未封闭,因此,根据中心点是否被表格线所包围得到的内部点和外部点划分结果如图7(a)所示。在该实施例中,表结构识别模块140针对划分结果进行调整,将与相邻外部点由虚拟表格线分隔的内部点改变为外部点。即,针对图7(a)中的第二行第一列的框的中心点,将其改变为外部点,得到图7(b)所示的划分结果。这是因为在该示例中,表的左下角的L形区域并未形成一个封闭的单元格,因此,并不是表的一部分。表结构识别模块140针对划分结果执行多次调整,直到没有内部点被改变为外部点为止,即,所有的中心点都被调整好了。
图8示出了根据本发明实施例的手写表识别方法800的流程图。根据本发明实施例的手写表识别方法应用于手写输入设备,用户在手写输入设备上进行手写输入。当需要识别用户输入时,根据本发明实施例的手写表识别方法启动。首先,在步骤S810处,检测表格线。然后,在步骤S820处,计算恰好覆盖所有表格线的边界矩形。可以通过确定相交的最长的垂直表格线和最长的水平表格线,计算恰好覆盖相交的最长的垂直表格线和最长的水平表格线的边界矩形,得到覆盖所有表格线的边界矩形。在步骤S830处,针对每个表格线,在边界矩形上延伸,得到对应的虚拟表格线,计算由虚拟表格线和表格线划分的框的中心点的位置。将各个中心点分为内部点和外部点,其中内部点是由表格线包围的中心点。将内部点分组,如果相邻内部点之间的路径未被表格线所阻挡,则所述内部点属于相同的组。将属于相同组的内部点所对应的框组合,形成为单元格。最后,在步骤S840处,识别各个单元格内的手写内容。
在步骤S810中,可以根据笔画的大小来识别表格线。例如,计 算平均笔画大小。如果一些笔画的大小远大于平均笔画大小,则认为这些笔画是表格线。这是因为水平的表格线在水平方向上的长度至少大于一个笔画的长度,垂直的表格线在垂直方向上的长度至少大于一个笔画的长度。因此,通过比较笔画的大小/长度可以识别表格线。根据该实施例,可以识别具有不同大小的表。因为不同大小的表内的内容具有不同的笔画大小。根据与平均笔画大小的比较来检测表格线不需要预先设置任何阈值,也不需要知晓所设置的阈值。
在步骤S820中,可以根据检测的表格线的长度分别对水平的表格线和垂直的表格线进行排序,然后识别相交的最长的垂直表格线和最长的水平表格线。由于手写的随意性,两个表格线可能不会恰好相交。因此,根据一个实施例,如果两根表格线的顶端相距小于预定数目的像素,则认为两根表格线相交。例如,预定数目的像素可以是10个像素。
在步骤S810中检测到的表格线可能是连接的多根表格线。因此,在步骤S810中还包括将连笔的表格线分割为单个表格线的步骤。用户有时会连笔写出相邻的表格线。在进行手写表识别之前需要将这些相连的表格线分隔开。检测表格线在它们的路径上是否存在拐点,如果存在拐点,则认为这些表格线是连笔的表格线,将这些表格线在拐点处分割,得到多个单根表格线。
在步骤S830得到的内部点和外部点可能需要进一步调整。在这种情况下,将与外部点由虚拟表格线分隔的内部点改变为外部点。针对划分结果执行多次调整,直到没有内部点被改变为外部点为止。
根据本发明实施例的手写表识别方法和设备可以应用于在线手写输入设备,包括平板PC、具有触摸屏的桌面PC、移动电话、PDA等具有在线手写输入功能的电子设备。用户可以在这种电子设备上进行手写输入和编辑。电子设备可以高效且高精确地对手写表进行识别。例如,根据本发明实施例的手写表识别方法在识别了一个表之后,可以针对手写空间进行进一步识别,以识别可能存在的其他的表。由于利用笔画大小来识别表格线,所以对于表的大小没有限制。与现有技术中采用阈值、将大于阈值的笔画视为表格线的技术相比,根据本发 明实施例的方法可以识别不同大小的表而不需要设置任何阈值。此外,通过对表的结构进行分析,即使表中存在不规则的单元格,也可能正确地识别单元格。
这里所公开的本发明实施例的其他设置包括执行在先概述的方法实施例的步骤和操作的软件程序。更具体地,计算机程序产品是如下的一种实施例:具有计算机可读介质,计算机可读介质上编码有计算机程序逻辑,当在计算设备上执行时,计算机程序逻辑提供相关的操作,从而提供上述技术方案。当在计算***的至少一个处理器上执行时,计算机程序逻辑使得处理器执行本发明实施例所述的操作(方法)。本发明的这种设置典型地提供为设置或编码在例如光介质(例如CD-ROM)、软盘或硬盘等的计算机可读介质上的软件、代码和/或其他数据结构、或者诸如一个或多个ROM或RAM或PROM芯片上的固件或微代码的其他介质、或专用集成电路(ASIC)、或一个或多个模块中的可下载的软件图像、共享数据库等。软件或固件或这种配置可安装在计算设备上,以使得计算设备中的一个或多个处理器执行本发明实施例所述的技术。结合诸如一组数据通信没备或其他实体中的计算设备进行操作的软件过程也可以提供根据本发明的设备。根据本发明的设备也可以分布在多个数据通信设备上的多个软件过程、或者在一组小型专用计算机上运行的所有软件过程、或者单个计算机上运行的所有软件过程之间。
应该理解,严格地讲,本发明的实施例可以实现为计算机设备上的软件程序、软件和硬件、或者单独的软件和/或单独的电路。
应当注意的是,在以上的描述中,仅以示例的方式,示出了本发明的技术方案,但并不意味着本发明局限于上述步骤和单元结构。在可能的情形下,可以根据需要对步骤和单元结构进行调整和取舍。因此,某些步骤和单元并非实施本发明的总体发明思想所必需的元素。因此,本发明所必需的技术特征仅受限于能够实现本发明的总体发明思想的最低要求,而不受以上具体实例的限制。
至此已经结合优选实施例对本发明进行了描述。应该理解,本领域技术人员在不脱离本发明的精神和范围的情况下,可以进行各种其 它的改变、替换和添加。因此,本发明的范围不局限于上述特定实施例,而应由所附权利要求所限定。

Claims (14)

  1. 一种手写表识别方法,包括:
    检测表格线;
    计算恰好覆盖所有表格线的边界矩形;
    针对每个表格线,在边界矩形上延伸,得到对应的虚拟表格线;
    计算由虚拟表格线和表格线划分的框的中心点的位置;
    将各个中心点分为内部点和外部点,其中内部点是由表格线包围的中心点;
    将内部点分组,如果相邻内部点之间的路径未被表格线所阻挡,则所述内部点属于相同的组;
    将属于相同组的内部点所对应的框组合,形成为单元格;以及
    识别各个单元格内的手写内容。
  2. 根据权利要求1所述的手写表识别方法,其中,检测表格线包括:
    计算平均笔画的大小;以及
    将长度远大于平均笔画大小的笔画识别为表格线。
  3. 根据权利要求1或2所述的手写表识别方法,其中,检测表格线还包括:
    检测表格线在路径上是否存在拐点;以及
    将存在拐点的表格线在拐点处分割为单根表格线。
  4. 根据权利要求1或2所述的手写表识别方法,其中,计算恰好覆盖所有表格线的边界矩形包括:
    确定相交的最长的垂直表格线和最长的水平表格线;
    计算恰好覆盖相交的最长的垂直表格线和最长的水平表格线的边界矩形。
  5. 根据权利要求1或2所述的手写表识别方法,其中,如果两根表格线的顶端相距小于预定数目的像素,则认为两根表格线相交。
  6. 根据权利要求1或2所述的手写表识别方法,其中,将各个中心点分为内部点和外部点还包括:
    将与相邻外部点由虚拟表格线分隔的内部点改变为外部点;以及
    执行上述步骤,直到没有内部点被改变为外部点为止。
  7. 根据权利要求3所述的手写表识别方法,其中,所述方法应用于在线手写输入设备。
  8. 一种手写表识别设备,包括:
    表格线检测模块,被配置为检测表格线;
    表格区域检测模块,被配置为计算恰好覆盖所有表格线的边界矩形;
    表结构识别模块,被配置为针对每个表格线,在表格区域检测模块所计算的边界矩形上延伸,得到对应的虚拟表格线;计算由虚拟表格线和表格线所划分的框的中心点的位置;将各个中心点分为内部点和外部点,其中内部点是由表格线包围的中心点;将内部点分组,如果相邻内部点之间的路径未被表格线所阻挡,则所述内部点属于相同的组;将属于相同组的内部点所对应的框组合,形成为单元格;以及
    表单元格内容提取模块,被配置为识别各个单元格内的手写内容。
  9. 根据权利要求8所述的手写表识别方法,其中,所述表格线检测模块被配置为:
    计算平均笔画的大小;
    将长度远大于平均笔画大小的笔画识别为表格线。
  10. 根据权利要求8或9所述的手写表识别设备,其中所述表格线检测模块包括:
    笔画分割模块,被配置为检测表格线在路径上是否存在拐点;以及将存在拐点的表格线在拐点处分割为单根表格线。
  11. 根据权利要求8或9所述的手写表识别设备,其中,所述表格区域检测模块被配置为通过以下方式计算恰好覆盖所有表格线的边界矩形:
    确定相交的最长的垂直表格线和最长的水平表格线,以及
    计算恰好覆盖相交的最长的垂直表格线和最长的水平表格线的边界矩形。
  12. 根据权利要求8或9所述的手写表识别设备,其中,如果两根表格线的顶端相距小于预定数目的像素,则认为两根表格线相交。
  13. 根据权利要求8或9所述的手写表识别设备,其中,表结构识别模块还被配置为:
    将与相邻外部点由虚拟表格线分隔的内部点改变为外部点;以及
    执行上述步骤,直到没有内部点被改变为外部点为止。
  14. 根据权利要求10所述的手写表识别设备,还包括:
    手写输入捕获模块,用于捕获用户的手写输入内容。
PCT/CN2016/084680 2015-06-05 2016-06-03 手写表识别方法和设备 WO2016192664A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510305645.0A CN106293185A (zh) 2015-06-05 2015-06-05 手写表识别方法和设备
CN201510305645.0 2015-06-05

Publications (1)

Publication Number Publication Date
WO2016192664A1 true WO2016192664A1 (zh) 2016-12-08

Family

ID=57440288

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/084680 WO2016192664A1 (zh) 2015-06-05 2016-06-03 手写表识别方法和设备

Country Status (2)

Country Link
CN (1) CN106293185A (zh)
WO (1) WO2016192664A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019070762A (ja) * 2017-10-10 2019-05-09 シャープ株式会社 電子機器、制御装置、電子機器の制御方法、および制御プログラム
CN109522805B (zh) * 2018-10-18 2020-12-08 成都中科信息技术有限公司 一种用于社区选举中表格型选票的表格处理方法
CN109934160B (zh) * 2019-03-12 2023-06-02 天津瑟威兰斯科技有限公司 基于表格识别的表格文字信息提取的方法及***

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0863610A (ja) * 1994-08-18 1996-03-08 Mitsubishi Electric Corp 文書処理装置
US7412094B2 (en) * 2004-09-21 2008-08-12 Microsoft Corporation System and method for editing a hand-drawn table in ink input
CN101366020A (zh) * 2005-12-21 2009-02-11 微软公司 墨水笔记中的表格检测
CN101452523A (zh) * 2007-12-07 2009-06-10 汉王科技股份有限公司 一种识别手写表格的方法及装置
CN101981583A (zh) * 2008-03-28 2011-02-23 智能技术Ulc公司 用于识别手绘表格的方法和工具
CN103902098A (zh) * 2012-12-27 2014-07-02 株式会社东芝 整形装置和整形方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0863610A (ja) * 1994-08-18 1996-03-08 Mitsubishi Electric Corp 文書処理装置
US7412094B2 (en) * 2004-09-21 2008-08-12 Microsoft Corporation System and method for editing a hand-drawn table in ink input
CN101366020A (zh) * 2005-12-21 2009-02-11 微软公司 墨水笔记中的表格检测
CN101452523A (zh) * 2007-12-07 2009-06-10 汉王科技股份有限公司 一种识别手写表格的方法及装置
CN101981583A (zh) * 2008-03-28 2011-02-23 智能技术Ulc公司 用于识别手绘表格的方法和工具
CN103902098A (zh) * 2012-12-27 2014-07-02 株式会社东芝 整形装置和整形方法

Also Published As

Publication number Publication date
CN106293185A (zh) 2017-01-04

Similar Documents

Publication Publication Date Title
US20240119219A1 (en) Determining functional and descriptive elements of application images for intelligent screen automation
US11430265B2 (en) Video-based human behavior recognition method, apparatus, device and storage medium
WO2018103608A1 (zh) 一种文字检测方法、装置及存储介质
JP5211334B2 (ja) 手書き記号の認識方法及び装置
WO2017118356A1 (zh) 文本图像处理方法和装置
KR20160132842A (ko) 플로우 문서를 생성하기 위한 이미지 문서 컴포넌트 검출 및 추출 기법
US20140126830A1 (en) Information processing device, information processing method, and program
KR20180064371A (ko) 다수의 객체 입력을 인식하기 위한 시스템 및 그 방법 및 제품
US8417026B2 (en) Gesture recognition methods and systems
TWI665574B (zh) Method and device for registering identity
Shivakumara et al. New gradient-spatial-structural features for video script identification
US20140184610A1 (en) Shaping device and shaping method
WO2016192664A1 (zh) 手写表识别方法和设备
US11490164B2 (en) Method and electronic device for displaying video
JP6275840B2 (ja) 手書き文字の識別方法
CN113780098A (zh) 文字识别方法、装置、电子设备以及存储介质
US20230096921A1 (en) Image recognition method and apparatus, electronic device and readable storage medium
JP2022542578A (ja) テキスト行抽出
CN115461792A (zh) 手写文本识别方法、装置和***,手写文本搜索方法和***,以及计算机可读存储介质
JP2013246732A (ja) 手書き文書検索装置、方法及びプログラム
WO2022205634A1 (zh) 数据展示方法、装置、设备、存储介质及程序
CN111563453B (zh) 用于确定表格顶点的方法、装置、设备和介质
CN115578736A (zh) 证件信息提取方法、装置、存储介质及设备
US9330310B2 (en) Methods and devices for obtaining card information
TWI690857B (zh) 車牌辨識方法以及其系統

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: 16802587

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: 16802587

Country of ref document: EP

Kind code of ref document: A1