Pen stroke erasing processing method and device, infrared touch screen, computer and medium

CN121255047BActive Publication Date: 2026-09-22GUANGZHOU ZHONGYUAN INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511343179.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2026-09-22
Estimated Expiration
2045-09-19

AI Technical Summary

Technical Problem

[0003]常用的找点算法在触摸点点数过多时,如20~100点,由于遮挡光线过多,会导致查找触摸点的计算量成倍增加,极大影响了排笔划线的处理效率,特别是在红外触摸框中,MCU(Microcontroller Unit,微控制单元)算力有限,更加容易导致帧率迅速下降,而帧率的迅速变化以及帧率过低,会降低整个排笔画线的效果

Benefits of technology

[0018]上述排笔划线的处理方法、装置、红外触控屏、计算机设备及计算机可读存储介质的技术方案,当检测到触摸点符合排笔书写条件时,控制触控屏进入排笔模式,根据触控屏的遮挡光线对排笔进行搜索定位确定排笔位置,并在排笔位置上搜索部分目标点,若搜索到目标点在排笔位置上,对其余触摸点进行补点完成排笔划线的处理;该技术方案,可以降低找点算法的计算量,提升排笔划线的处理效率,确保整个排笔的画线效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121255047B_ABST
    Figure CN121255047B_ABST
Patent Text Reader

Abstract

The application relates to a pen line arrangement processing method and device, an infrared touch screen, computer equipment and a computer readable storage medium; the method comprises the following steps: when it is detected that a touch point meets pen arrangement writing conditions, a touch screen is controlled to enter a pen arrangement mode; the pen arrangement position is determined according to the search positioning of the pen arrangement by the light blocking of the touch screen; part of the touch points are selected as target points, and the target points are searched on the pen arrangement position; if the target points are searched on the pen arrangement position, the remaining touch points are supplemented according to the pen arrangement position to complete the pen line arrangement processing; the technical scheme can reduce the calculation amount of the point searching algorithm, improve the pen line arrangement processing efficiency, and ensure the effect of the whole pen line arrangement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of touch technology, and in particular to a method, apparatus, infrared touch screen, computer equipment, and computer-readable storage medium for processing lines drawn with a brush. Background Technology

[0002] In touchscreens, brush writing is a common writing mode. Brush writing has distinctive features. When processing brush lines, the algorithm usually finds touch points based on the detected light obstruction. If historical data shows that the current writing is brush writing, only some touch points need to be found. The remaining touch points can be obtained through prediction or inference to reduce computing resources.

[0003] When the number of touch points is too large, such as 20 to 100, the commonly used point-finding algorithm will cause the amount of calculation required to find the touch points to increase exponentially due to excessive light obstruction, which will greatly affect the processing efficiency of the brush line drawing. Especially in the infrared touch frame, the computing power of the MCU (Microcontroller Unit) is limited, which makes it easier for the frame rate to drop rapidly. The rapid change in frame rate and the low frame rate will reduce the overall effect of the brush line drawing. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, infrared touch screen, computer equipment, and computer-readable storage medium for processing lines with a brush, in order to address one of the aforementioned technical problems and improve the processing efficiency of lines with a brush.

[0005] A method for processing lines drawn with brushstrokes includes:

[0006] When the touch point is detected to meet the conditions for writing with a brush, the touch screen is controlled to enter the brush writing mode.

[0007] The brush is located and its position is determined by searching for and locating the brush based on the light obstruction caused by the touch screen.

[0008] Select a portion of the touch points as target points, and search for the target points at the brush position;

[0009] If the target point is found at the brush position, the remaining touch points are filled in according to the brush position to complete the brush line drawing process.

[0010] A brush-drawing processing device, comprising:

[0011] The mode detection module is used to control the touch screen to enter the brush writing mode when the touch point is detected to meet the conditions for brush writing.

[0012] The position prediction module is used to search for and locate the brush based on the light obstruction of the touch screen to determine the position of the brush.

[0013] The partial point-finding module is used to select a portion of touch points as target points and search for the target points at the brush position.

[0014] The remaining point filling module is used to fill in the remaining touch points according to the pen position if the target point is found at the pen position in order to complete the pen drawing process.

[0015] An infrared touch screen includes: a display screen, a motherboard, and an infrared touch frame; wherein the motherboard is configured to perform the steps of the brush drawing method.

[0016] A computer device includes a memory and a processor, the memory storing a computer program, characterized in that the processor executes the computer program to implement the steps of the brush-drawing method.

[0017] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the brush stroke processing method.

[0018] The aforementioned technical solution for processing brush strokes, including the method, device, infrared touchscreen, computer equipment, and computer-readable storage medium, involves controlling the touchscreen to enter brush stroke mode when a touch point is detected that meets the conditions for brush stroke writing. The brush stroke position is determined by searching for and locating the brush stroke based on the light obstruction of the touchscreen. A partial target point is searched at the brush stroke position. If a target point is found at the brush stroke position, the remaining touch points are supplemented to complete the brush stroke processing. This technical solution can reduce the computational load of the point-finding algorithm, improve the processing efficiency of brush strokes, and ensure the overall brush stroke drawing effect. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of an example touchscreen.

[0020] Figure 2 This is a flowchart of a method for processing lines drawn with a brush, as described in one embodiment.

[0021] Figure 3 This is a sample diagram illustrating point finding;

[0022] Figure 4 This is a flowchart of an example algorithm for processing lines drawn with a brush.

[0023] Figure 5 This is a schematic diagram of the structure of a brush-drawing processing device according to one embodiment;

[0024] Figure 6 This is a schematic diagram of the structure of an infrared touch screen according to one embodiment;

[0025] Figure 7 This is a schematic diagram of an example computer device structure. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0027] refer to Figure 1 As shown, Figure 1 This is a schematic diagram of an example touchscreen. The touchscreen uses an infrared touch frame for touch positioning. Users can perform touch writing operations on the touchscreen, such as the brush writing operation described in this application. The infrared touch frame includes an infrared emitting tube array 11 and an infrared receiving tube array 12 disposed around the display screen. The infrared emitting tubes in the infrared emitting tube array 11 emit infrared light towards the infrared receiving tube array 12. The infrared light is received by the infrared receiving tubes. When the user performs touch writing operations on the touchscreen display screen, it will block the light and generate corresponding touch data. The touchscreen is usually processed by the MCU to perform touch positioning calculations on the blocked light. The final calculation result is uploaded to the operating system to realize touch positioning and display the corresponding content on the display screen.

[0028] The technical solution of this application mainly addresses the improvement and optimization of the touch point finding algorithm when using the brush stroke mode on a touch screen. Although existing point finding algorithms can reduce the amount of computation by only finding some touch points and predicting or inferring the rest, when there are too many touch points, the computational workload will increase significantly due to the excessive amount of light blocking, which will affect the processing efficiency of brush stroke drawing. In particular, it is easy to cause the frame rate of the MCU platform to drop rapidly, affecting the overall brush stroke drawing effect. Therefore, this application provides an improved brush stroke drawing processing solution.

[0029] refer to Figure 2 As shown, Figure 2 This is a flowchart of a method for processing lines drawn with a brush, as described in one embodiment, including:

[0030] S10: When the touch point is detected to meet the conditions for brush writing, the touch screen is controlled to enter the brush writing mode.

[0031] This step involves detecting the current touch mode of the touchscreen. When the conditions for writing with a brush are met, the touchscreen is controlled to enter the brush mode, and the point-finding algorithm for brush writing is used to process the occlusion data.

[0032] In one embodiment, the brush-drawing method of this application can obtain the number of touch points and the flag of brush writing in two frames of the touch screen, and determine whether the touch points meet the conditions for brush writing based on the number of touch points and the flag.

[0033] Furthermore, determining whether a touch point meets the conditions for brush writing based on the number of dots and the flag position can include the following:

[0034] (1) If the number of points meets the minimum number of points requirement, perform linear fitting on the touch points and determine whether they are distributed on a straight line.

[0035] (2) Based on the identified touch points, confirm the length of the brush strokes, the spacing between adjacent brush strokes, and the total number of points;

[0036] (3) Based on the touch points detected by multiple historical scans, confirm whether the brush is stable.

[0037] Specifically, the number of touch points and the pen writing flag in the two consecutive frames are used to determine whether pen writing needs to be detected. When detecting pen writing, if the number of touch points meets the minimum number of touch points, the touch points are fitted with a straight line and it is determined whether they are distributed on a straight line. Based on the touch points found, the characteristics of the pen, such as the length of the pen, the spacing between adjacent pens, and the total number of points are confirmed. Then, based on the detection results of multiple frames in history, it is confirmed whether the pen is stable.

[0038] In the above embodiment, it is possible to detect whether the current touch screen meets the conditions for brush writing and accurately control the touch screen to enter the brush writing mode.

[0039] S20 uses the light blocking effect of the touchscreen to search for and locate the brush to determine its position.

[0040] In this step, the brush is searched and located by using the light blocking of each frame of the detected touch screen to determine the brush's position. The positioning process here is to locate the approximate position of the brush by prediction / inference.

[0041] In one embodiment, determining the position of the brush by searching and locating it based on the light obstruction of the touchscreen may include the following:

[0042] S201, Obtain the occlusion light of the current frame of the touch screen, and perform a brush search on the occlusion light.

[0043] As an example, when searching for the obstructing light, a scheme can be adopted to intensively search for the obstructing light at both the horizontal and vertical ends of the brush, and to discard or sparsely search for the obstructing light at other positions.

[0044] As in the above embodiment, by encrypting the occlusion light search at both ends of the horizontal and vertical axis of the brush and discarding or sparsely searching the light at other positions, the overall computational load can be reduced while maintaining the accuracy of the brush point finding.

[0045] S202, locate the preliminary position of the brush based on historical brush information and current frame occlusion information; wherein, the preliminary position refers to the approximate position of the brush.

[0046] As an example, step S202, which involves locating the initial position of the brush based on historical brush information and current frame occlusion light information, may include:

[0047] (1) Obtain historical information on the use of the touch screen pen; wherein, the historical information includes historical position information, historical movement speed, direction and other information;

[0048] (2) Extract the initial position of the brush based on the historical information and the occlusion light of the current frame.

[0049] Furthermore, the process of extracting the preliminary position of the brushstrokes described above can include the following:

[0050] a) Locate the endpoints of the brush on both sides based on the partial obstruction of light;

[0051] b) Use the direction of the parallel brush to block the light to determine the vertical position of the brush;

[0052] c) Based on the endpoint positioning and longitudinal position positioning, the preliminary position of the brush is obtained.

[0053] For example, the positioning methods used in endpoint positioning and longitudinal position positioning can include image algorithms, geometric algorithms, etc., based on image thresholding combined with convex hull search, or directly based on multi-segment intersections of computational geometry, or based on algorithms such as Hough transform to achieve pre-positioning, etc. These positioning algorithms are commonly used algorithms and will not be described in detail here.

[0054] S203, update the position of the brush in the current frame and the position information of the prediction point to which the brush belongs based on the preliminary position.

[0055] Specifically, the position of the touch point on the brush in the current frame can be predicted based on the touch point on the brush in the previous frame. After locating the initial position of the brush, the brush position in the current frame is updated based on the detected initial position, and the position information of the predicted point to which the brush belongs is determined for subsequent point finding processing.

[0056] S30, select a portion of the touch points as target points, and search for the target points at the brush position.

[0057] In this step, after obtaining the location information of the predicted point to which the brush belongs through prediction, some touch points are selected as target points among these touch points, and these target points are searched at the located brush position to determine whether these target points are at the predicted brush position.

[0058] For example, a portion of the touch points of the brush can be selected for a search. The selected portion of the touch points can be two or more touch points.

[0059] S40, if the target point is found at the brush position, fill in the remaining touch points according to the brush position to complete the brush line drawing process.

[0060] In this step, a point-finding algorithm is used to search for target points in the selected brush strokes. If these target points are found and are all located at the detected brush stroke positions, it indicates that the current brush strokes exist and the prediction method accurately determines the brush stroke positions. Based on this, the remaining touch points are supplemented, and finally the brush stroke drawing processing for the current frame is completed.

[0061] like Figure 3 As shown, Figure 3 This is an example diagram of point finding. In the diagram, the circle "●" represents the target point, the dashed box represents the range of the brush position, and the circle "○" represents the touch point for supplementary points. As can be seen from the diagram, the four circles "●" found are on the brush position, indicating that the prediction method determines the brush position accurately. Therefore, the data of the remaining touch points "○" can be processed by the supplementary point method, thereby reducing the computational load of the point finding algorithm.

[0062] As per the technical solution of this application, when a touch point is detected to meet the conditions for brush writing, the touch screen is controlled to enter the brush mode. The brush is searched and located based on the light obstruction of the touch screen to determine the brush position, and some target points are searched at the brush position. If a target point is found at the brush position, the remaining touch points are filled to complete the brush drawing process. This can reduce the computational load of the point finding algorithm, improve the processing efficiency of brush drawing, and ensure the overall brush drawing effect.

[0063] Based on the method for processing stroke lines proposed in this application, an algorithm example is provided below.

[0064] like Figure 4 As shown, Figure 4 This is a flowchart of an example algorithm for processing lines drawn with a brush, which mainly includes the following:

[0065] S101 detects the number of dots and the pen writing marker position in the two consecutive frames of the touch screen;

[0066] s102, Determine if the pen-painting mode has been entered? If yes, execute s103; otherwise, proceed to s107.

[0067] s103, Perform brush preprocessing to determine the brush position;

[0068] s104, Locate partial target points;

[0069] s105, Determine if the target point was successfully found? If yes, proceed to s106; otherwise, go to s107.

[0070] s106, fill in the remaining touch points according to the position of the brush;

[0071] S107, End of brush touch data processing.

[0072] As shown in the example above, the solution is fast when applying the point-finding algorithm. It only uses partial light blocking and only calculates local touch points to achieve point finding for a large number of points. It can significantly reduce the amount of computation and optimize point finding based on the characteristics of the brush, thus achieving more accurate brush searching. Especially with brushes with a large number of touch points, the effect is better, with fewer disconnections and a faster frame rate.

[0073] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0074] Based on the same inventive concept, this application also provides a brush-drawing processing device for implementing the above-mentioned brush-drawing processing method. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more brush-drawing processing device embodiments provided below can be found in the limitations of the brush-drawing processing method above, and will not be repeated here.

[0075] In one embodiment, such as Figure 5 As shown, Figure 5 This is a schematic diagram of a brush-drawing processing device according to one embodiment, including:

[0076] The mode detection module 10 is used to control the touch screen to enter the brush writing mode when the touch point is detected to meet the conditions for brush writing.

[0077] The position prediction module 20 is used to search for and locate the brush based on the light blocking effect of the touch screen to determine the position of the brush.

[0078] Partial point finding module 30 is used to select a portion of touch points as target points and search for the target points at the brush position;

[0079] The remaining point filling module 40 is used to fill in the remaining touch points according to the pen position if the target point is found at the pen position in order to complete the pen drawing process.

[0080] Each module in the aforementioned brush-drawing processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor in hardware form or independent of the processor, or stored in memory in software form, so that the processor can call and execute the corresponding operations of each module.

[0081] The following describes an embodiment of the infrared touch screen.

[0082] like Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of an infrared touch screen according to an embodiment, which includes: a display screen 03, a main board 03 and an infrared touch frame 01, wherein the infrared touch frame 01 includes an infrared emitting tube array 11 and an infrared receiving tube array 12 disposed around the display screen 03.

[0083] In practical applications, the motherboard 03 is connected to the display screen 03 and the infrared touch frame 01, and the motherboard 02 is configured to execute the steps of the brush line drawing method of any embodiment of this application.

[0084] As described in the above embodiment, the infrared touch screen is fast when applying the point-finding algorithm. It only uses partial light blocking and only calculates local touch points to achieve point finding for a large number of points. It can significantly reduce the amount of computation and optimize point finding based on the characteristics of the brush, thus achieving more accurate searching of the brush. Especially with brushes with a large number of touch points, the effect is better, with fewer broken lines and a faster frame rate.

[0085] In one embodiment, this application also provides a computer device including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the steps of the brush-drawing method of any of the above embodiments. (Reference) Figure 7 , Figure 7This is a schematic diagram of an example computer device structure, which may include a processor, memory, communication interface, etc., connected via a system bus. The processor of this computer device provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface can be used for wired or wireless communication with external devices. Wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements the steps of the line drawing processing method of any of the above embodiments.

[0086] Those skilled in the art will understand that the structure shown in the figure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the control module applied thereto. The specific control module may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0087] In one embodiment, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method embodiments.

[0088] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these. The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0089] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for processing lines drawn with a brush, characterized in that, include: When the touch point is detected to meet the conditions for writing with a brush, the touch screen is controlled to enter the brush writing mode. The brush is located by searching for and locating the brush based on the light blocking effect of the touch screen; the search for and location of the brush includes: intensively searching for the light blocking effect at the horizontal and vertical ends of the brush, and discarding or sparsely searching for the light blocking effect at other positions. Select a portion of the touch points as target points, and search for the target points at the brush position; If the target point is found at the brush position, the remaining touch points are filled in according to the brush position to complete the brush line drawing process.

2. The method for processing lines drawn with brushes according to claim 1, characterized in that, Also includes: The number of touch points and the flag of brush writing are obtained in the two frames before and after the touch screen. The touch points are then used to determine whether they meet the conditions for brush writing.

3. The method for processing lines drawn with brushes according to claim 2, characterized in that, Determining whether a touch point meets the conditions for brush writing based on the number of dots and the marker position includes: If the number of points meets the minimum number of points requirement, perform linear fitting on the touch points and determine whether they are distributed on a straight line. Based on the identified touch points, confirm the length of the brush strokes, the spacing between adjacent strokes, and the total number of points; Based on historical multi-frame scans of touch points, we can confirm whether the brush is stable.

4. The method for processing lines drawn with brushes according to claim 1, characterized in that, The brush is located and its position is determined based on the light obstruction caused by the touchscreen, including: Obtain the occlusion light of the current frame of the touch screen, and perform a brush search on the occlusion light; The initial position of the brushstrokes is located based on historical brushstroke information and the occlusion light in the current frame; wherein, the initial position refers to the approximate position of the brushstrokes. Update the position of the brushstrokes in the current frame and the position information of the prediction point to which the brushstrokes belong based on the preliminary position.

5. The method for processing lines drawn with brushes according to claim 4, characterized in that, Based on historical brushstroke information and the occlusion light in the current frame, the initial position of the brushstroke is located, including: Obtain historical brush information used by the touchscreen brush; wherein, the historical brush information includes historical position information, historical movement speed, and direction; The initial position of the brushstrokes is extracted based on the historical brushstroke information and the occlusion light in the current frame.

6. The method for processing lines drawn with brushes according to claim 5, characterized in that, Based on the historical brushstroke information and the occlusion light in the current frame, the preliminary position of the brushstroke is extracted, including: Position the endpoints of the brush on both sides based on partial light blocking; Use the direction of the parallel brush to block the light to determine the vertical position of the brush; The initial position of the brush is obtained based on the endpoint positioning and longitudinal position positioning.

7. A processing device for drawing lines with a brush, characterized in that, include: The mode detection module is used to control the touch screen to enter the brush writing mode when the touch point is detected to meet the conditions for brush writing. The position prediction module is used to search and locate the brush based on the light blocking effect of the touch screen to determine the position of the brush. The search and location of the brush includes: intensively searching for the light blocking effect at the horizontal and vertical ends of the brush, and discarding or sparsely searching for the light blocking effect at other positions. The partial point-finding module is used to select a portion of touch points as target points and search for the target points at the brush position. The remaining point filling module is used to fill in the remaining touch points according to the pen position if the target point is found at the pen position in order to complete the pen drawing process.

8. An infrared touch screen, characterized in that, include: The display screen, the motherboard, and the infrared touch frame; wherein the motherboard is configured to perform the steps of the brush-drawing method according to any one of claims 1 to 6.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the brush-drawing method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the brush stroke processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Handwriting presenting method and device, interactive intelligent tablet and storage medium

    CN107797752A

  • Writing display method and device of smart blackboard, computer equipment and storage medium

    CN118708075A