WO2017041588A1 - 擦除框的范围确定方法和系统 - Google Patents

擦除框的范围确定方法和系统 Download PDF

Info

Publication number
WO2017041588A1
WO2017041588A1 PCT/CN2016/090734 CN2016090734W WO2017041588A1 WO 2017041588 A1 WO2017041588 A1 WO 2017041588A1 CN 2016090734 W CN2016090734 W CN 2016090734W WO 2017041588 A1 WO2017041588 A1 WO 2017041588A1
Authority
WO
WIPO (PCT)
Prior art keywords
width
height
erase
characters
range
Prior art date
Application number
PCT/CN2016/090734
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 WO2017041588A1 publication Critical patent/WO2017041588A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Definitions

  • the present invention relates to the field of computer technology, and in particular, to a method and system for determining a range of an erase frame. Background technique
  • erasing is to define an erase box based on a selected size/pixel value. For example: When erasing written text, there are usually multiple range of erase frames to choose from, for example, 1 X 1, 2 X 2 . However, these erase frame sizes generally do not match the size of the content, resulting in poor erase. Summary of the invention
  • a method for determining a range of an erase frame includes the following steps:
  • the coverage of the object to be erased is determined according to the selection operation
  • the erase range of the erase frame is determined according to the height and width of the object.
  • the range determining method of the above-mentioned erasure frame obtains the content of the object by the track recognition after determining the coverage of the object to be erased, and then detects the height and width of the object by means of edge detection, and finally based on the height and width of the object.
  • the erasing range of the erasing frame is determined, so that the range of the erasing frame can be determined according to the size of the object to be erased, and the erasing effect is good.
  • the step of performing edge detection on the content of the object is further included Includes:
  • the object contains text, and the shape of the object is determined by optical character recognition to detect bright and dark patterns, and the shape of the object is converted into text.
  • the object When the object contains text, the object is detected by optical character recognition, and the text in the object can be recognized. At the same time, other track disturbances around the text can be excluded, so that the converted text is only the complete text in the coverage area, such as "using the eraser. In the trajectory, if the coverage includes the entire word of the rubber and the part of the use and the skin, there is only one oak after the recognition conversion, so that the content that does not need to be erased can be avoided by mistake.
  • the object is a single text
  • the step of determining an erase range of the erase frame according to the height and width of the object includes:
  • the height of the text is the height of the erase frame, and the width of the text is the width of the erase frame; or
  • the object is a plurality of characters, and the step of determining the erasing range of the erasing frame according to the height and width of the object includes:
  • the height and width of the erased frame are calculated based on the text arrangement, the height and width of each text.
  • the step of calculating the height and width of the erased frame according to the text arrangement, the height and the width of each of the characters includes:
  • the steps of calculating the height and width of the erased frame according to the arrangement of the characters, the height and the width of each of the characters include:
  • the total height and the average width of the plurality of characters are calculated, and the total height of the plurality of characters is the height of the erased frame, and the average width of the plurality of characters is the width of the erased frame.
  • the average value is used as the height or width of the erase frame, and when the handwritten characters are erased, it is possible to avoid erroneously erasing the characters that are not required to be erased.
  • the determining the erase of the erase frame according to the height and width of the object also includes:
  • the adjusted erase box can cover as much of the content as possible without erasing the content that does not need to be erased.
  • a range determining system for an erase box comprising:
  • a selection module configured to determine an object coverage range to be erased according to the selection operation after the trigger is erased
  • An identification module configured to perform trajectory recognition on the coverage of the determined object, to obtain content of the object
  • a detecting module configured to perform edge detection on the content of the object to obtain a height and a width of the object
  • a determining module configured to determine an erase range of the erase frame according to the height and width of the object.
  • the range determining system of the above-mentioned erasure frame obtains the content of the object by the track recognition after determining the coverage of the object to be erased, and then detects the height and width of the object by means of edge detection, and finally based on the height and width of the object.
  • the erasing range of the erasing frame is determined, so that the range of the erasing frame can be determined according to the size of the object to be erased, and the erasing effect is good.
  • the method further includes:
  • the conversion module is configured to: if the object contains text, determine the shape of the object by optical character recognition to detect a bright or dark mode, and convert the shape of the object into text.
  • the object When the object contains text, the object is detected by optical character recognition, and the text in the object can be recognized. At the same time, other track disturbances around the text can be excluded, so that the converted text is only the complete text in the coverage area, such as "using the eraser. "The track, if the coverage includes the entire word of the rubber and the part of the use, the skin, there is only one oak after the recognition conversion, so as to avoid accidentally erasing the content that does not need to be erased.
  • the object is a single text
  • the determining module performs the process of determining an erasure range of the erase frame according to the height and width of the object.
  • the height of the text is the height of the erase frame
  • the width of the text is the width of the erase frame; or
  • the object is a plurality of characters, and the determining module performs the process of determining an erasure range of the erase frame according to the height and the width of the object.
  • the height and width of the erased frame are calculated based on the text arrangement, the height and width of each text.
  • the determining module performs the process of calculating the height and width of the erased frame according to the text arrangement, the height and the width of each character, and further used for:
  • the determining module performs the process of calculating the height and width of the erased frame according to the text arrangement manner, the height and the width of each of the characters, and further used to: calculate the total height of the plurality of characters and The average width, and the total height of the plurality of characters is the height of the erased frame, and the average width of the plurality of characters is the width of the erased frame.
  • the method further includes:
  • An adjustment module configured to adjust a height and a width of the erase frame according to the preset adjustment value; wherein the preset adjustment value is a sum of heights of 2 or 3 pixels, and the width is 2 or 3 pixels wide with.
  • the adjusted erase box covers all content that needs to be erased without overwriting the content that does not need to be erased.
  • 1 is a flow chart of a method for determining a range of an erase frame according to an embodiment
  • FIG. 2 is a schematic flow chart of a method for determining a range of an erase frame according to another embodiment
  • 3 is a schematic diagram showing the range of erasing characters in an embodiment
  • FIG. 4 is a schematic structural diagram of a range determining system of an erase frame according to an embodiment. detailed description
  • FIG. 1 is a flow chart of a method for determining the range of an erase frame according to an embodiment.
  • a method for determining a range of an erase frame includes the following steps:
  • Step S101 After triggering the erasure, determining the coverage of the object to be erased according to the selection operation; in step S101, if the selection operation is performed on the touch screen, the range may be selected when the user touches the finger, or may be passed A finger or other tool that draws a range of circles on the screen; objects can include text and/or images.
  • Step S103 Perform trajectory recognition on the coverage of the determined object to obtain the content of the object.
  • the step of performing edge detection on the content of the object may further include: detecting, by using optical character recognition, light and dark The pattern determines the shape of the object and converts the shape of the object to text; wherein the object contains text.
  • the object When the object contains text, the object is detected by optical character recognition, and the text in the object can be recognized. At the same time, other track disturbances around the text can be excluded, so that the converted text is only the complete text in the coverage area, such as "using the eraser. "The track, if the coverage includes the entire word of the rubber and the part of the use, the skin, there is only one oak after the recognition conversion, so as to avoid accidentally erasing the content that does not need to be erased.
  • Step S105 Perform edge detection on the content of the object to obtain the height and width of the object.
  • obtaining the height and width of the object by means of edge detection provides a basis for subsequently determining the scope of the erase frame.
  • Step S107 Determine an erase range of the erase frame according to the height and width of the object.
  • the object is a single text
  • the step of determining an erasure range of the erase frame according to the height and width of the object may include:
  • the height of the text is the height of the erase frame, and the width of the text is the width of the erase frame; or
  • the object is a plurality of characters, and the erasing frame rubbing is determined according to the height and width of the object
  • the steps in addition to the range may include:
  • the height and width of the erased frame are calculated based on the text arrangement, the height and width of each text.
  • the step of calculating the height and width of the erase frame according to the text arrangement manner and the height and width of each of the characters may include: calculating a plurality of characters The average height and the total width, and the average height of the plurality of characters is the height of the erase frame, and the total width of the plurality of characters is the width of the erase frame;
  • the step of calculating the height and width of the erase frame according to the text arrangement, the height and the width of each of the characters may include:
  • the total height and the average width of the plurality of characters are calculated, and the total height of the plurality of characters is the height of the erased frame, and the average width of the plurality of characters is the width of the erased frame.
  • the average value is used as the height or width of the erase frame, and when the handwritten characters are erased, it is possible to avoid erroneously erasing the characters that are not required to be erased.
  • the step of determining an erasure range of the erase frame according to the height and the width of the object may further include:
  • the adjusted erase box covers all content that needs to be erased without overwriting the content that does not need to be erased.
  • the range determining method of the above-mentioned erasure frame obtains the content of the object by the track recognition after determining the coverage of the object to be erased, and then detects the height and width of the object by means of edge detection, and finally based on the height and width of the object.
  • the erasure range of the erase frame is determined, so that the range of the erase frame can be determined according to the size of the object to be erased, and the erasure effect is good.
  • FIG. 2 is a schematic flowchart of a method for determining a range of an erase frame according to another embodiment.
  • Step S201 The user selects an eraser (ie, an erase frame), and clicks on the track of the handwriting to prepare for an erase operation;
  • an eraser ie, an erase frame
  • Step S202 Taking the current position and size of the eraser as the detection range, by OCR (Optical)
  • Step S203 If the text is recognized, further determining whether it is a single text or a plurality of characters; Step S204: If it is a single text, calculating the handwriting range of the text by edge detection, and then passing the height and width of the text The adjustment value of 2 to 3 pixels is adjusted to obtain a new eraser coverage area, thereby adjusting the position and size of the eraser to match the text, wherein the adjustment value can be set according to different application environments.
  • Step S205 If it is a plurality of characters, determine whether the text is arranged horizontally or vertically;
  • Step S206 If it is a horizontal arrangement of a plurality of characters, calculate the average height of the characters and the center coordinates of the vertical direction, and set the height and vertical position of the eraser. It is also possible to calculate the average height and total width of multiple words, with the average height as the height of the eraser and the total width as the width of the eraser.
  • the text that covers the "cover" of the eraser can be moved up and down during the dragging of the eraser to accommodate fluctuations in the position of the text; otherwise it ends.
  • Step S207 If there are a plurality of characters and are arranged in the longitudinal direction, the average width of the characters and the central coordinates of the horizontal method are calculated, and the width and horizontal position of the eraser are set thereby. It is also possible to calculate the average width and total height of multiple characters, with the average width as the width of the eraser and the total height as the height of the eraser.
  • Step S208 Adjust the size of the eraser.
  • the width and height of the eraser slightly according to the adjustment value, such as the height adjustment range of 2 to 3 pixels, and the width adjustment range of 2 to 3 pixels.
  • FIG. 3 is a schematic diagram showing the range of erasing text in an embodiment, wherein the light rectangular frame area is the initial size of the eraser, the dark rectangular frame is the reconfirmed size, and the writing area of the light color area is passed through the OCR.
  • the recognition can remove the interference of the surrounding handwriting, and judge that the middle part is a complete text "use”; on this basis, the range of the middle handwriting is calculated by edge detection, and then the size of the eraser is adjusted. After adjustment, it can prevent the notes around "use” from being erased by mistake, especially when the erase operation is performed on the touch screen, because there is no mouse movement event, the size of the eraser cannot be previewed, without automatically adjusting the eraser. It is easy to accidentally erase.
  • FIG. 4 is a schematic structural diagram of a range determining system of an erase frame according to an embodiment.
  • a range determining system for an erase box comprising:
  • the selecting module 310 is configured to determine, after the trigger is erased, the coverage of the object to be erased according to the selecting operation;
  • the identification module 330 is configured to perform trajectory recognition on the coverage of the determined object to obtain content of the object;
  • the detecting module 350 is configured to perform edge detection on the content of the object to obtain a height and a width of the object;
  • the determining module 370 is configured to determine an erase range of the erase frame according to the height and the width of the object.
  • the range determining system of the above-mentioned erasure frame obtains the content of the object by the track recognition after determining the coverage of the object to be erased, and then detects the height and width of the object by means of edge detection, and finally based on the height and width of the object.
  • the erasing range of the erasing frame is determined, so that the range of the erasing frame can be determined according to the size of the object to be erased, and the erasing effect is good.
  • the range determination system of the erase frame of the embodiment may further include: a conversion module, configured to determine a shape of the object by optical character recognition to detect a light and dark mode, and convert the shape of the object into a text. Wherein the object contains text.
  • the object When the object contains text, the object is detected by optical character recognition, and the text in the object can be recognized. At the same time, other track disturbances around the text can be excluded, so that the converted text is only the complete text in the coverage area, such as "using the eraser. "The track, if the coverage includes the entire word of the rubber and the part of the use, the skin, there is only one oak after the recognition conversion, so as to avoid accidentally erasing the content that does not need to be erased.
  • the object is a single text
  • the determining module 370 performs the The process of determining the erasure range of the erase frame by the height and width of the object may be further used to: use the height of the text as the height of the erase frame, and the width of the text as the width of the erase frame; or
  • the object is a plurality of characters, and the determining module 370 performs the process of determining the erasure range of the erase frame according to the height and width of the object, which may be further used for:
  • the height and width of the erased frame are calculated based on the text arrangement, the height and width of each text.
  • the determining module 370 performs the process of calculating the height and width of the erased frame according to the text arrangement, the height and the width of each of the characters, and further can be used for:
  • the determining module 370 performs the process of calculating the height and width of the erased frame according to the text arrangement, the height and the width of each of the characters, and can be further used for:
  • the total height and the average width of the plurality of characters are calculated, and the total height of the plurality of characters is the height of the erased frame, and the average width of the plurality of characters is the width of the erased frame.
  • the average value is used as the height or width of the erase frame, and when the handwritten characters are erased, it is possible to avoid erroneously erasing the characters that are not required to be erased.
  • the range determination system of the erase frame of the embodiment may further include: an adjustment module, configured to adjust a height and a width of the erase frame according to the preset adjustment value; wherein the preset adjustment The value is the sum of the height of 2 or 3 pixels, and the width is the sum of 2 or 3 pixel widths.
  • the adjusted erase box covers all content that needs to be erased without overwriting the content that does not need to be erased.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Character Input (AREA)
  • Image Analysis (AREA)

Abstract

本发明涉及一种擦除框的范围确定方法和系统,方法包括以下步骤:在触发擦除后,根据选择操作确定需要擦除的对象覆盖范围;对所述确定对象覆盖范围进行轨迹识别,得到对象;对所述对象进行边缘检测,得到所述对象的高度和宽度;根据所述对象的高度和宽度确定擦除框的擦除范围。上述擦除框的范围确定方法和系统,在确定需要擦除的对象覆盖范围后通过轨迹识别得到对象的内容,然后以边缘检测的方式检测得到对象的高度和宽度,最后以对象的高度和宽度为基础确定擦除框的擦出范围,从而可以根据需要擦除的对象大小确定擦除框的范围,擦除效果较好。

Description

擦除框的范围确定方法和系统
技术领域
本发明涉及计算机技术领域,特别是涉及擦除框的范围确定方法和系统。 背景技术
计算机技术领域中, 在用户对生成的图像、 文字等内容不满意时, 需要 对其进行擦除。 例如, 人们在手机、 电子白板、 平板电脑等设备上通过书写 软件书写的文字, 或通过画图软件创作的图画, 如果遇到写错字或者对屏上 的创作对象不满意, 用户一般会擦除相应内容。
擦除的一般做法是根据一个选择尺寸 /像素值来限定一个擦除框, 例如: 擦除书写文字时, 一般有多个范围大小的擦除框可以选择, 比如, 1 X 1, 2 X 2。 然而, 这些擦除框大小一般与内容的大小并不匹配, 导致擦除效果差。 发明内容
基于此, 有必要提供一种擦除框的范围确定方法和系统, 能够提高擦除 效果。
一种擦除框的范围确定方法, 包括以下步骤:
在触发擦除后, 根据选择操作确定需要擦除的对象覆盖范围;
对所述确定对象覆盖范围进行轨迹识别, 得到对象的内容;
对对象的内容进行边缘检测, 得到对象的高度和宽度;
根据所述对象的高度和宽度确定擦除框的擦除范围。
上述擦除框的范围确定方法, 在确定需要擦除的对象覆盖范围后通过轨 迹识别得到对象的内容,然后以边缘检测的方式检测得到对象的高度和宽度, 最后以对象的高度和宽度为基础确定擦除框的擦出范围, 从而可以根据需要 擦除的对象大小确定擦除框的范围, 擦除效果较好。
在其中一个实施例中, 所述对对象的内容进行边缘检测的步骤之前还包 括:
所述对象包含文字, 则通过光学字符识别以检测亮、 暗的模式确定对象 的形状, 并将对象的形状转换为文字。
对象包含文字时, 通过光学字符识别的方式检测对象, 可以识别出对象 中的文字, 同时可以排除该文字周围的其他轨迹干扰, 使转换出来的文字只 是覆盖范围中的完整文字, 比如 "用橡皮" 的轨迹中, 若覆盖范围包括橡的 整个字和用、 皮的部分内容, 识别转换之后就只有一个橡字了, 从而可以避 免误擦除不需要擦除的内容。
在其中一个实施例中, 所述对象为单个文字, 所述根据所述对象的高度 和宽度确定擦除框的擦除范围的步骤包括:
以该文字的高度为擦除框的高度, 以该文字的宽度为擦除框的宽度; 或
所述对象为多个文字, 所述根据所述对象的高度和宽度确定擦除框的擦 除范围的步骤包括:
根据文字排列方式、 每个文字的高度和宽度计算得到擦除框的高度和宽 度。
在其中一个实施例中,多个文字若是横向排列,所述根据文字排列方式、 每个文字的高度和宽度计算得到擦除框的高度和宽度的步骤包括:
计算得到多个文字的平均高度和总宽度, 并以多个文字的平均高度为擦 除框的高度, 以多个文字的总宽度为擦除框的宽度;
多个文字若是纵向排列, 所述根据文字排列方式、 每个文字的高度和宽 度计算得到擦除框的高度和宽度的步骤包括:
计算得到多个文字的总高度和平均宽度, 并以多个文字的总高度为擦除 框的高度, 以多个文字的平均宽度为擦除框的宽度。
针对排列的多个文字, 以平均值作为擦除框的高度或宽度, 在擦除手写 体文字时, 可以避免误擦除不需要擦除的文字。
在其中一个实施例中, 所述根据所述对象的高度和宽度确定擦除框的擦 除范围的步骤之后还包括:
根据预设的调整值调整擦除框的高度和宽度; 其中, 所述预设的调整值 为高度为 2或 3个像素高度的和, 宽度为 2或 3个像素宽度的和。
经过调整的擦除框可以在不覆盖不需要擦除的内容的基础上, 尽可能覆 盖所有需要擦除的内容。
一种擦除框的范围确定系统, 包括:
选择模块, 用于在触发擦除后, 根据选择操作确定需要擦除的对象覆盖 范围;
识别模块, 用于对所述确定对象覆盖范围进行轨迹识别, 得到对象的内 容;
检测模块, 用于对对象的内容进行边缘检测, 得到所述对象的高度和宽 度;
确定模块, 用于根据所述对象的高度和宽度确定擦除框的擦除范围。 上述擦除框的范围确定系统, 在确定需要擦除的对象覆盖范围后通过轨 迹识别得到对象的内容,然后以边缘检测的方式检测得到对象的高度和宽度, 最后以对象的高度和宽度为基础确定擦除框的擦出范围, 从而可以根据需要 擦除的对象大小确定擦除框的范围, 擦除效果较好。
在其中一个实施例中, 还包括:
转换模块, 用于所述对象包含文字, 则通过光学字符识别以检测亮、 暗 的模式确定对象的形状, 并将对象的形状转换为文字。
对象包含文字时, 通过光学字符识别的方式检测对象, 可以识别出对象 中的文字, 同时可以排除该文字周围的其他轨迹干扰, 使转换出来的文字只 是覆盖范围中的完整文字, 比如 "用橡皮" 的轨迹, 若覆盖范围包括橡的整 个字和用、 皮的部分内容, 识别转换之后就只有一个橡字了, 从而可以避免 误擦除不需要擦除的内容。
在其中一个实施例中, 所述对象为单个文字, 所述确定模块执行所述根 据所述对象的高度和宽度确定擦除框的擦除范围的过程进一步用于: 以该文字的高度为擦除框的高度, 以该文字的宽度为擦除框的宽度; 或
所述对象为多个文字, 所述确定模块执行所述根据所述对象的高度和宽 度确定擦除框的擦除范围的过程进一步用于:
根据文字排列方式、 每个文字的高度和宽度计算得到擦除框的高度和宽 度。
在其中一个实施例中, 多个文字若是横向排列, 所述确定模块执行所述 根据文字排列方式、 每个文字的高度和宽度计算得到擦除框的高度和宽度的 过程进一步用于:
计算得到多个文字的平均高度和总宽度, 并以多个文字的平均高度为擦 除框的高度, 以多个文字的总宽度为擦除框的宽度;
多个文字若是纵向排列, 所述确定模块执行所述根据文字排列方式、 每 个文字的高度和宽度计算得到擦除框的高度和宽度的过程进一步用于: 计算得到多个文字的总高度和平均宽度, 并以多个文字的总高度为擦除 框的高度, 以多个文字的平均宽度为擦除框的宽度。
在其中一个实施例中, 还包括:
调整模块, 用于根据预设的调整值调整擦除框的高度和宽度; 其中, 所 述预设的调整值为高度为 2或 3个像素高度的和, 宽度为 2或 3个像素宽度 的和。
经过调整的擦除框可以在不覆盖不需要擦除的内容的基础上, 覆盖所有 需要擦除的内容。 附图说明
图 1为一实施例擦除框的范围确定方法流程图;
图 2为另一实施例擦除框的范围确定方法流程示意图;
图 3为一实施例擦除文字的范围示意图;
图 4为一实施例擦除框的范围确定系统结构示意图。 具体实施方式
下面将结合附图对本发明的擦除框的范围确定方法和系统进行说明。 请参阅图 1, 图 1为一实施例擦除框的范围确定方法流程图。
一种擦除框的范围确定方法, 包括以下步骤:
步骤 S101 :在触发擦除后,根据选择操作确定需要擦除的对象覆盖范围; 在步骤 S101中,若是在触摸屏上进行选择操作,则可以是用户手指触摸 时形成的范围选择,也可以是通过手指或其他工具,在屏上画的一个范围圈; 对象可以包括文字和 /或图像。
步骤 S103 : 对所述确定对象覆盖范围进行轨迹识别, 得到对象的内容; 在一实施例中,所述对对象的内容进行边缘检测的步骤之前还可以包括: 通过光学字符识别以检测亮、 暗的模式确定对象的形状, 并将对象的形 状转换为文字; 其中, 所述对象包含文字。
对象包含文字时, 通过光学字符识别的方式检测对象, 可以识别出对象 中的文字, 同时可以排除该文字周围的其他轨迹干扰, 使转换出来的文字只 是覆盖范围中的完整文字, 比如 "用橡皮" 的轨迹, 若覆盖范围包括橡的整 个字和用、 皮的部分内容, 识别转换之后就只有一个橡字了, 从而可以避免 误擦除不需要擦除的内容。
步骤 S105 : 对对象的内容进行边缘检测, 得到所述对象的高度和宽度; 在步骤 S105中,通过边缘检测的方式得到对象的高度和宽度是为了后续 确定擦除框的范围提供依据。
步骤 S107: 根据所述对象的高度和宽度确定擦除框的擦除范围。
在一实施例中, 所述对象为单个文字, 所述根据所述对象的高度和宽度 确定擦除框的擦除范围的步骤可以包括:
以该文字的高度为擦除框的高度, 以该文字的宽度为擦除框的宽度; 或
所述对象为多个文字, 所述根据所述对象的高度和宽度确定擦除框的擦 除范围的步骤可以包括:
根据文字排列方式、 每个文字的高度和宽度计算得到擦除框的高度和宽 度。
对象为多个文字时, 不同的文字排列方式对应不同的计算得到擦除框范 围的方式。
进一步的, 在一实施例中, 多个文字若是横向排列, 所述根据文字排列 方式、每个文字的高度和宽度计算得到擦除框的高度和宽度的步骤可以包括: 计算得到多个文字的平均高度和总宽度, 并以多个文字的平均高度为擦 除框的高度, 以多个文字的总宽度为擦除框的宽度;
多个文字若是纵向排列, 所述根据文字排列方式、 每个文字的高度和宽 度计算得到擦除框的高度和宽度的步骤可以包括:
计算得到多个文字的总高度和平均宽度, 并以多个文字的总高度为擦除 框的高度, 以多个文字的平均宽度为擦除框的宽度。
针对排列的多个文字, 以平均值作为擦除框的高度或宽度, 在擦除手写 体文字时, 可以避免误擦除不需要擦除的文字。
在一实施例中, 所述根据所述对象的高度和宽度确定擦除框的擦除范围 的步骤之后还可以包括:
根据预设的调整值调整擦除框的高度和宽度; 其中, 所述预设的调整值 为高度为 2或 3个像素高度的和, 宽度为 2或 3个像素宽度的和。
经过调整的擦除框可以在不覆盖不需要擦除的内容的基础上, 覆盖所有 需要擦除的内容。
上述擦除框的范围确定方法, 在确定需要擦除的对象覆盖范围后通过轨 迹识别得到对象的内容,然后以边缘检测的方式检测得到对象的高度和宽度, 最后以对象的高度和宽度为基础确定擦除框的擦除范围, 从而可以根据需要 擦除的对象大小确定擦除框的范围, 擦除效果较好。
为了更进一步的详细说明本发明的擦除框的范围确定方法, 下面将结合 具体应用实例进行说明。 本具体应用实例以用户擦除手写体文字的具体操作为例进行说明。
请参阅图 2, 图 2为另一实施例擦除框的范围确定方法流程示意图。 步骤 S201 : 用户选择橡皮擦 (即擦除框), 并在手写体的轨迹上点击, 准备进行擦除操作;
步骤 S202 : 以橡皮擦的当前位置和大小为检测范围, 通过 OCR (Optical
Character Recognition, 光学字符识别)识别点击的范围包括的对象是否包 含文本;
步骤 S203 : 如果识别到文本, 则进一步判断是单个文字还是多个文字; 步骤 S204: 如果是单个文字, 则通过边缘检测, 计算出该文字的笔迹范 围, 可以以该文字的高度和宽度再通过 2至 3个像素的调整值进行调整, 得 到新的橡皮擦覆盖区域,以此将橡皮擦的位置和大小调整为与该文字相匹配, 其中调整值可以根据不同应用环境进行设定。
步骤 S205 : 如果是多个文字, 判断文本是横向还是纵向排列;
步骤 S206: 如果是多个文字的横向排列, 则计算出文字的平均高度和垂 直方向的中心坐标, 并以此设置橡皮擦的高度和垂直位置。 同时也可以计算 多个文字的平均高度和总宽度, 以平均高度作为橡皮擦的高度, 以总宽度作 为橡皮擦的宽度。 能够覆盖橡皮擦所 "盖住" 的文字, 用户在拖动橡皮擦的 过程中还可上下移动, 以适应文字位置的波动; 否则结束。
步骤 S207: 如果是多个文字, 且纵向排列, 则计算出文字的平均宽度和 水平方法的中心坐标, 并以此设置橡皮擦的宽度和水平位置。 同时也可以计 算多个文字的平均宽度和总高度, 以平均宽度作为橡皮擦的宽度, 以总高度 作为橡皮擦的高度。
步骤 S208: 调整橡皮擦的大小。
同时, 针对多个文字, 也可以将橡皮擦的宽度和高度按照调整值略微调 整, 比如高度调整 2至 3个像素的范围, 宽度调整 2至 3个像素的范围。
图 3为一实施例擦除文字的范围示意图, 其中浅色矩形框区域为橡皮擦 的初始大小,深色矩形框为重新确认的大小,浅色区域的书写笔迹,通过 OCR 的识别, 可以去除周围笔迹的干扰, 判断出中间部分是一个完整的文字 "用" ; 在此基础之上, 通过边缘检测计算中间笔迹的范围, 进而调整橡皮 擦的大小。 调整后能够避免 "用"周围的笔记被误擦除, 特别是在触摸屏上 进行擦除操作时, 由于没有鼠标移动事件, 即不能预览橡皮擦的大小, 在没 有自动调整橡皮擦的情况下, 很容易发生误擦除。
请参阅图 4, 图 4为一实施例擦除框的范围确定系统结构示意图。
一种擦除框的范围确定系统, 包括:
选择模块 310, 用于在触发擦除后, 根据选择操作确定需要擦除的对象 覆盖范围;
识别模块 330, 用于对所述确定对象覆盖范围进行轨迹识别, 得到对象 的内容;
检测模块 350, 用于对对象的内容进行边缘检测, 得到所述对象的高度 和宽度;
确定模块 370,用于根据所述对象的高度和宽度确定擦除框的擦除范围。 上述擦除框的范围确定系统, 在确定需要擦除的对象覆盖范围后通过轨 迹识别得到对象的内容,然后以边缘检测的方式检测得到对象的高度和宽度, 最后以对象的高度和宽度为基础确定擦除框的擦出范围, 从而可以根据需要 擦除的对象大小确定擦除框的范围, 擦除效果较好。
在一实施例中, 本实施例的擦除框的范围确定系统还可以包括: 转换模块,用于通过光学字符识别以检测亮、暗的模式确定对象的形状, 并将对象的形状转换为文字; 其中, 所述对象包含文字。
对象包含文字时, 通过光学字符识别的方式检测对象, 可以识别出对象 中的文字, 同时可以排除该文字周围的其他轨迹干扰, 使转换出来的文字只 是覆盖范围中的完整文字, 比如 "用橡皮" 的轨迹, 若覆盖范围包括橡的整 个字和用、 皮的部分内容, 识别转换之后就只有一个橡字了, 从而可以避免 误擦除不需要擦除的内容。
在一实施例中, 所述对象为单个文字, 所述确定模块 370执行所述根据 所述对象的高度和宽度确定擦除框的擦除范围的过程可以进一步用于: 以该文字的高度为擦除框的高度, 以该文字的宽度为擦除框的宽度; 或
所述对象为多个文字, 所述确定模块 370执行所述根据所述对象的高度 和宽度确定擦除框的擦除范围的过程可以进一步用于:
根据文字排列方式、 每个文字的高度和宽度计算得到擦除框的高度和宽 度。
在一实施例中, 多个文字若是横向排列, 所述确定模块 370执行所述根 据文字排列方式、 每个文字的高度和宽度计算得到擦除框的高度和宽度的过 程进一步可以用于:
计算得到多个文字的平均高度和总宽度, 并以多个文字的平均高度为擦 除框的高度, 以多个文字的总宽度为擦除框的宽度;
多个文字若是纵向排列,所述确定模块 370执行所述根据文字排列方式、 每个文字的高度和宽度计算得到擦除框的高度和宽度的过程可以进一步用 于:
计算得到多个文字的总高度和平均宽度, 并以多个文字的总高度为擦除 框的高度, 以多个文字的平均宽度为擦除框的宽度。
针对排列的多个文字, 以平均值作为擦除框的高度或宽度, 在擦除手写 体文字时, 可以避免误擦除不需要擦除的文字。
在其中一个实施例中, 本实施例的擦除框的范围确定系统还可以包括: 调整模块, 用于根据预设的调整值调整擦除框的高度和宽度; 其中, 所 述预设的调整值为高度为 2或 3个像素高度的和, 宽度为 2或 3个像素宽度 的和。
经过调整的擦除框可以在不覆盖不需要擦除的内容的基础上, 覆盖所有 需要擦除的内容。
以上所述实施例的各技术特征可以进行任意的组合, 为使描述简洁, 未 对上述实施例中的各个技术特征所有可能的组合都进行描述, 然而, 只要这 些技术特征的组合不存在矛盾, 都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本发明的几种实施方式, 其描述较为具体和详 细, 但并不能因此而理解为对发明专利范围的限制。 应当指出的是, 对于本 领域的普通技术人员来说, 在不脱离本发明构思的前提下, 还可以做出若干 变形和改进, 这些都属于本发明的保护范围。 因此, 本发明专利的保护范围 应以所附权利要求为准。

Claims

权利要求书
1、 一种擦除框的范围确定方法, 其特征在于, 包括以下步骤: 在触发擦除后, 根据选择操作确定需要擦除的对象覆盖范围; 对所述确定对象覆盖范围进行轨迹识别, 得到对象的内容;
对对象的内容进行边缘检测, 得到对象的高度和宽度;
根据所述对象的高度和宽度确定擦除框的擦除范围。
2、根据权利要求 1所述的擦除框的范围确定方法, 其特征在于, 所述对 对象的内容进行边缘检测的步骤之前还包括:
通过光学字符识别以检测亮、 暗的模式确定对象的形状, 并将对象的形 状转换为文字; 其中, 所述对象包含文字。
3、根据权利要求 2所述的擦除框的范围确定方法, 其特征在于, 所述对 象为单个文字, 所述根据所述对象的高度和宽度确定擦除框的擦除范围的步 骤包括:
以该文字的高度为擦除框的高度, 以该文字的宽度为擦除框的宽度; 或
所述对象为多个文字, 所述根据所述对象的高度和宽度确定擦除框的擦 除范围的步骤包括:
根据文字排列方式、 每个文字的高度和宽度计算得到擦除框的高度和宽 度。
4、根据权利要求 3所述的擦除框的范围确定方法, 其特征在于, 多个文 字若是横向排列, 所述根据文字排列方式、 每个文字的高度和宽度计算得到 擦除框的高度和宽度的步骤包括:
计算得到多个文字的平均高度和总宽度, 并以多个文字的平均高度为擦 除框的高度, 以多个文字的总宽度为擦除框的宽度;
多个文字若是纵向排列, 所述根据文字排列方式、 每个文字的高度和宽 度计算得到擦除框的高度和宽度的步骤包括:
计算得到多个文字的总高度和平均宽度, 并以多个文字的总高度为擦除 框的高度, 以多个文字的平均宽度为擦除框的宽度。
5、根据权利要求 1所述的擦除框的范围确定方法, 其特征在于, 所述根 据所述对象的高度和宽度确定擦除框的擦除范围的步骤之后还包括:
根据预设的调整值调整擦除框的高度和宽度; 其中, 所述预设的调整值 为高度为 2或 3个像素高度的和, 宽度为 2或 3个像素宽度的和。
6、 一种擦除框的范围确定系统, 其特征在于, 包括:
选择模块, 用于在触发擦除后, 根据选择操作确定需要擦除的对象覆盖 范围;
识别模块, 用于对所述确定对象覆盖范围进行轨迹识别, 得到对象的内 容;
检测模块, 用于对对象的内容进行边缘检测, 得到所述对象的高度和宽 度;
确定模块, 用于根据所述对象的高度和宽度确定擦除框的擦除范围。
7、根据权利要求 6所述的擦除框的范围确定系统,其特征在于,还包括: 转换模块,用于通过光学字符识别以检测亮、暗的模式确定对象的形状, 并将对象的形状转换为文字; 其中, 所述对象包含文字。
8、根据权利要求 7所述的擦除框的范围确定系统, 其特征在于, 所述对 象为单个文字, 所述确定模块执行所述根据所述对象的高度和宽度确定擦除 框的擦除范围的过程进一步用于:
以该文字的高度为擦除框的高度, 以该文字的宽度为擦除框的宽度; 或
所述对象为多个文字, 所述确定模块执行所述根据所述对象的高度和宽 度确定擦除框的擦除范围的过程进一步用于:
根据文字排列方式、 每个文字的高度和宽度计算得到擦除框的高度和宽 度。
9、根据权利要求 8所述的擦除框的范围确定系统, 其特征在于, 多个文 字若是横向排列, 所述确定模块执行所述根据文字排列方式、 每个文字的高 度和宽度计算得到擦除框的高度和宽度的过程进一步用于:
计算得到多个文字的平均高度和总宽度, 并以多个文字的平均高度为擦 除框的高度, 以多个文字的总宽度为擦除框的宽度;
多个文字若是纵向排列, 所述确定模块执行所述根据文字排列方式、 每 个文字的高度和宽度计算得到擦除框的高度和宽度的过程进一步用于: 计算得到多个文字的总高度和平均宽度, 并以多个文字的总高度为擦除 框的高度, 以多个文字的平均宽度为擦除框的宽度。
10、 根据权利要求 6所述的擦除框的范围确定系统, 其特征在于, 还包 括:
调整模块, 用于根据预设的调整值调整擦除框的高度和宽度; 其中, 所 述预设的调整值为高度为 2或 3个像素高度的和, 宽度为 2或 3个像素宽度 的和。
PCT/CN2016/090734 2015-09-07 2016-07-20 擦除框的范围确定方法和系统 WO2017041588A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510564625.5A CN105183473A (zh) 2015-09-07 2015-09-07 擦除框的范围确定方法和系统
CN201510564625.5 2015-09-07

Publications (1)

Publication Number Publication Date
WO2017041588A1 true WO2017041588A1 (zh) 2017-03-16

Family

ID=54905572

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/090734 WO2017041588A1 (zh) 2015-09-07 2016-07-20 擦除框的范围确定方法和系统

Country Status (2)

Country Link
CN (1) CN105183473A (zh)
WO (1) WO2017041588A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183473A (zh) * 2015-09-07 2015-12-23 广州视睿电子科技有限公司 擦除框的范围确定方法和系统
CN105955756A (zh) * 2016-05-18 2016-09-21 广州视睿电子科技有限公司 图像擦除方法和系统
CN109032463B (zh) * 2018-07-19 2019-11-05 掌阅科技股份有限公司 笔记擦除方法、电子设备及计算机存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662558A (zh) * 2012-03-13 2012-09-12 中兴通讯股份有限公司 文字选中方法与装置及电子设备
CN102737238A (zh) * 2011-04-01 2012-10-17 洛阳磊石软件科技有限公司 基于手势动作的字符识别系统、方法、及其应用
CN103677637A (zh) * 2013-12-06 2014-03-26 上海斐讯数据通信技术有限公司 删除显示在触摸屏上的文字的方法及电子设备
CN104503660A (zh) * 2014-12-18 2015-04-08 厦门美图移动科技有限公司 一种图标整理方法、设备及移动终端
CN104679408A (zh) * 2015-03-20 2015-06-03 联想(北京)有限公司 一种数据处理方法和装置
CN105183473A (zh) * 2015-09-07 2015-12-23 广州视睿电子科技有限公司 擦除框的范围确定方法和系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4244614B2 (ja) * 2002-10-31 2009-03-25 株式会社日立製作所 手書き入力装置、プログラムおよび手書き入力方法システム
CN101676838B (zh) * 2008-09-16 2012-05-23 夏普株式会社 输入装置
KR20140049228A (ko) * 2012-10-17 2014-04-25 삼성전자주식회사 사용자 입력에 따른 단말의 제어 방법 및 그 단말

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737238A (zh) * 2011-04-01 2012-10-17 洛阳磊石软件科技有限公司 基于手势动作的字符识别系统、方法、及其应用
CN102662558A (zh) * 2012-03-13 2012-09-12 中兴通讯股份有限公司 文字选中方法与装置及电子设备
CN103677637A (zh) * 2013-12-06 2014-03-26 上海斐讯数据通信技术有限公司 删除显示在触摸屏上的文字的方法及电子设备
CN104503660A (zh) * 2014-12-18 2015-04-08 厦门美图移动科技有限公司 一种图标整理方法、设备及移动终端
CN104679408A (zh) * 2015-03-20 2015-06-03 联想(北京)有限公司 一种数据处理方法和装置
CN105183473A (zh) * 2015-09-07 2015-12-23 广州视睿电子科技有限公司 擦除框的范围确定方法和系统

Also Published As

Publication number Publication date
CN105183473A (zh) 2015-12-23

Similar Documents

Publication Publication Date Title
US11042290B2 (en) Touch screen track recognition method and apparatus
CN110058782B (zh) 基于交互式电子白板的触摸操作方法及其系统
US9141134B2 (en) Utilization of temporal and spatial parameters to enhance the writing capability of an electronic device
JP5423525B2 (ja) 手書き入力装置、手書き入力方法及び手書き入力プログラム
CN106919333B (zh) 电子书写板上书写内容的记录方法和装置
CN108829327B (zh) 交互智能设备的书写方法和装置
US20170109917A1 (en) Method and device for erasing a writing path on an infrared electronic white board, and a system for writing on an infrared electronic white board
US20140368453A1 (en) Handwriting input apparatus, non-transitory computer-readable storage medium and control method
TWI497402B (zh) 手寫輸入識別系統及方法
US20140333585A1 (en) Electronic apparatus, information processing method, and storage medium
JP5910345B2 (ja) 文字入力プログラム、情報処理装置および文字入力方法
JP5389241B1 (ja) 電子機器および手書き文書処理方法
KR102075433B1 (ko) 필기 입력 장치 및 그 제어 방법
JP5306528B1 (ja) 電子機器および手書き文書処理方法
US20140219565A1 (en) Multiple-input handwriting recognition system and measure thereof
WO2017041588A1 (zh) 擦除框的范围确定方法和系统
US20160070467A1 (en) Electronic device and method for displaying virtual keyboard
JP6659210B2 (ja) 手書入力装置及び手書入力方法
JP2019067111A (ja) 表示制御装置及びプログラム
TW201423563A (zh) 手寫輸入識別系統及方法
WO2022160330A1 (zh) 手写体识别方法及装置
US20230343125A1 (en) Handwriting Recognition Method and Apparatus, Handwriting Recognition System and Interactive Display
CN113849106B (zh) 翻页笔迹处理方法、设备、电子设备及存储介质
JP6373664B2 (ja) 電子機器、方法及びプログラム
Kumar et al. User defined custom virtual keyboard

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

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

Country of ref document: EP

Kind code of ref document: A1