Display device and writing brush handwriting drawing method
By performing curve and linear interpolation of touch points input by users in the display device, a smooth curve and target interpolation list is generated, which solves the problem of continuous change capture when drawing brush strokes, and achieves a more continuous and smooth brush stroke effect.
Patent Information
- Application Number
- CN202410361383.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2025-03-28
AI Technical Summary
When drawing brush handwriting, existing display devices cannot capture the continuous changes in brush handwriting when writing, resulting in a big gap between the drawn brush handwriting and the actual brush effect.
By performing curve interpolation and linear interpolation of touch points input by the user, a smooth curve and target interpolation list is generated, and the brush stroke model is drawn according to these interpolation lists, thus forming a more continuous and smooth brush stroke.
It improves the continuity and fluency of brush strokes, realistically simulates the characteristics of brush writing, and improves the effect of brush strokes drawn.
Smart Images

Figure CN119718153A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of display devices, and in particular to a display device and a method for drawing handwriting with a brush. Background Art
[0002] Display devices refer to terminal devices that can output specific display images, which can be terminal devices such as smart TVs, communication terminals, smart advertising screens, projectors, etc. Taking smart TVs as an example, smart TVs are based on Internet application technology, have open operating systems and chips, have open application platforms, can realize two-way human-computer interaction functions, and are TV products that integrate multiple functions such as audio and video, entertainment, and data to meet the diverse and personalized needs of users.
[0003] For display devices that support touch interaction, you can run a whiteboard application and implement writing or drawing functions based on the touch actions input by the user. In order to increase the diversity of line drawing, the display device can set multiple line drawing types. For example, you can process the handwriting to make it look like a brush.
[0004] However, when drawing brush strokes, the continuous changes of the brush strokes cannot be captured when drawing based on the reported touch points, resulting in a large gap between the drawn brush strokes and the actual brush effect. When drawing based on the texture method, the brush stroke effect does not change with the writing speed, and cannot reflect the real brush effect. In addition, the fast writing speed leads to a small number of reported touch points, making the writing strokes sparse. The drawn brush strokes can see obvious brush stroke prototypes, and the brush writing effect is poor. Summary of the invention
[0005] The present application provides a display device and a method for drawing brush handwriting to solve the problem of poor brush writing effect when the display device draws brush handwriting.
[0006] In a first aspect, an embodiment of the present application provides a display device, comprising: a display and a controller. The display is configured to display a user interface. The display is connected to a touch interaction module, and the touch interaction module is used to receive a touch instruction input by a user. The controller is configured to execute the following program steps:
[0007] In response to a touch command input by a user, detecting a touch point;
[0008] Performing curve interpolation on the touch point to obtain a curve interpolation list, wherein the curve interpolation list includes a first interpolation point, which is a point on a smooth curve generated based on the touch point;
[0009] Performing linear interpolation on the curve interpolation list to obtain a target interpolation list, wherein the target interpolation list includes second interpolation points, where the second interpolation points are interpolation points inserted between the first interpolation points according to an interpolation interval;
[0010] According to the target interpolation list, a brush stroke model is drawn to form brush traces.
[0011] In a second aspect, the present application also provides a method for drawing brush handwriting, which is applied to the above-mentioned display device, comprising:
[0012] In response to a touch command input by a user, detecting a touch point;
[0013] Performing curve interpolation on the touch point to obtain a curve interpolation list, wherein the curve interpolation list includes a first interpolation point, which is a point on a smooth curve generated based on the touch point;
[0014] Performing linear interpolation on the curve interpolation list to obtain a target interpolation list, wherein the target interpolation list includes second interpolation points, where the second interpolation points are interpolation points inserted between the first interpolation points according to an interpolation interval;
[0015] According to the target interpolation list, a brush stroke model is drawn to form brush traces.
[0016] It can be seen from the above technical solutions that the present application provides a display device and a method for drawing brush handwriting. The method can detect touch points in response to touch instructions input by the user, perform curve interpolation on the touch points to obtain a curve interpolation list, and then perform linear interpolation on the curve interpolation list to obtain a target interpolation list. Among them, the curve interpolation list includes a first interpolation point, which is a point on a smooth curve generated based on the touch point, and the target interpolation list includes a second interpolation point, which is an interpolation point inserted between the first interpolation points according to the interpolation interval. Finally, according to the target interpolation list, a brush stroke model is drawn to form brush handwriting. The method uses a quadratic interpolation point filling method, first uses curve interpolation for overall interpolation, fits and generates a smooth curve, and then uses linear interpolation to perform quadratic interpolation on the smooth curve, thereby improving the continuity and fluency of the brush strokes. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1A schematic diagram of an operation scenario between a display device and a control device provided in some embodiments of the present application;
[0019] Figure 2 A schematic diagram of the hardware configuration of a control device provided in some embodiments of the present application;
[0020] Figure 3 A schematic diagram of the hardware configuration of a display device provided in some embodiments of the present application;
[0021] Figure 4 A schematic diagram of software configuration of a display device provided in some embodiments of the present application;
[0022] Figure 5 A schematic diagram of operating parameters of touch interaction data provided by some embodiments of the present application;
[0023] Figure 6 A schematic diagram of a whiteboard interface provided for some embodiments of the present application;
[0024] Figure 7 A structural diagram of a display system provided for some embodiments of the present application;
[0025] Figure 8 Schematic diagram of an acceleration layer and an OSD layer provided for some embodiments of the present application;
[0026] Fig. 9 A schematic diagram of a set square provided for some embodiments of the present application;
[0027] Fig.10 A schematic diagram of a pen stroke effect provided in some embodiments of the present application;
[0028] Fig.11 A schematic diagram of the brush writing effect provided in some embodiments of the present application;
[0029] Fig.12 A schematic diagram of a process of drawing a brush handwriting provided in some embodiments of the present application;
[0030] Fig.13 A schematic diagram of a starting point, a control point and an end point provided in some embodiments of the present application;
[0031] Fig.14 Another schematic diagram of a starting point, a control point and an end point provided for some embodiments of the present application;
[0032] Fig.15 A schematic diagram of a second interpolation point provided in some embodiments of the present application;
[0033] Fig.16 A schematic diagram of a brush stroke model with different ink concentrations provided in some embodiments of the present application;
[0034] Fig.17 A schematic diagram of brush stroke models of different model sizes corresponding to a thicker brush position provided in some embodiments of the present application;
[0035] Fig.18 A schematic diagram of brush stroke models of different model sizes corresponding to a finer brush position provided in some embodiments of the present application;
[0036] Fig.19 A schematic diagram of the occupied area of a brush stroke model provided in some embodiments of the present application;
[0037] Fig. 20 A brush handwriting effect diagram provided for some embodiments of the present application;
[0038] Fig.21 Another brush handwriting effect diagram provided for some embodiments of the present application. DETAILED DESCRIPTION
[0039] The following embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following embodiments do not represent all implementations consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application as detailed in the claims.
[0040] The following embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following embodiments do not represent all implementations consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application as detailed in the claims.
[0041] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0042] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.
[0043] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0044] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0045] Figure 1 This is a schematic diagram of an operation scenario between a display device and a control device provided in some embodiments of the present application. Figure 1 As shown in FIG. 1 , a user can operate the display device 200 through the mobile terminal 300 and the control device 100 .
[0046] In some embodiments, the mobile terminal 300 can install software applications with the display device 200, and achieve connection and communication through a network communication protocol to achieve the purpose of one-to-one control operation and data communication. The audio and video content displayed on the mobile terminal 300 can also be transmitted to the display device 200 to achieve a synchronous display function.
[0047] like Figure 1 As also shown in FIG. 4 , the display device 200 also communicates data with the server 400 through various communication methods. The display device 200 may be allowed to communicate and connect through a local area network (LAN), a wireless local area network (WLAN), and other networks.
[0048] In addition to providing the broadcast receiving television function, the display device 200 may also provide an intelligent network television function with computer support functions, including but not limited to network television, smart television, Internet Protocol television (IPTV), etc.
[0049] Figure 2 Some embodiments of the present application provide Figure 1 2 is a block diagram of the hardware configuration of the display device 200.
[0050] In some embodiments, the display device 200 includes at least one of a tuner 210 , a communicator 220 , a detector 230 , a device interface 240 , a controller 250 , a display 260 , an audio output interface 270 , a memory, a power supply, and a communication device interface 280 .
[0051] In some embodiments, the communicator 220 is a component for communicating with an external device or a server 400 according to various communication protocol types.
[0052] In some embodiments, the detector 230 is used to collect signals of the external environment or external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.
[0053] In some embodiments, the device interface 240 may include, but is not limited to, any one or more of the following interfaces: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. It may also be a composite input / output interface formed by the above multiple interfaces.
[0054] For example, in order to enrich the display types of the display device 200, an HDMI interface and a USB interface may be provided on the display device 200, wherein the HDMI interface may be connected to a device having video and audio input / output functions, and the corresponding audio and video output / input functions may be realized through the HDMI driver. The USB interface may be connected to a device having signal and data transmission functions and interactive functions, and based on the USB driver, access signals, transmit data, and perform specific interactive actions.
[0055] In some embodiments, the controller 250 includes a processor, a video processor, an audio processor, a graphics processor, a RAM, a ROM, and a first interface to an nth interface for input / output. The controller 250 controls the operation of the display device and responds to the user's operation through various software control programs stored in the memory. The controller 250 controls the overall operation of the display device 200.
[0056] In some embodiments, the controller 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0057] In some embodiments, the user may input a user command through a graphical user interface (GUI) displayed on the display 260 , and the user input interface receives the user input command through the graphical user interface (GUI).
[0058] In some embodiments, the display 260 includes a display screen component for presenting images, and a driving component for driving image display, which is used to receive image signals output from a controller, display video content, image content, and a menu control interface component and a user control UI interface, etc.
[0059] The display 260 may be a liquid crystal display, an OLED display, or a projection display, and may also be a projection device and a projection screen.
[0060] In some embodiments, the display device 200 may also support touch interaction, that is, a touch interaction module may be provided on the display device 200, and the touch interaction module may be a built-in module or an external module. For example, in order to implement touch interaction operations, a touch panel (TP) may be provided on the display 260 of the display device 200, and the touch panel may receive touch signals input by fingers, contacts, styluses, etc., and execute touch interaction responses according to a pre-set interaction strategy. Of course, the display device 200 may also be a touch-integrated screen.
[0061] For the display device 200 with an external touch interaction module, a terminal, device, or component with a touch function can be connected through the device interface 240 of the display device 200. For example, the USB or USB-C interface of the display device 200 is connected to a touch panel, and the touch panel can receive the touch data input by the user in real time and transmit the touch data to the display device 200 through the USB channel. The display device 200 can perform an interactive response based on the received touch data in combination with the touch application, so that the display device 200 supports touch interaction operations.
[0062] In some embodiments, the communication device interface 280 is an interface that can be used to receive control input.
[0063] Figure 3 Some embodiments of the present application provide Figure 1 The hardware configuration diagram of the control device in the figure. Figure 3 As shown, the control device 100 includes a controller 110 , a communication interface 130 , a user input / output interface, a memory 190 , and a power supply 180 .
[0064] The control device 100 is configured to control the display device 200 , and can receive user input operation instructions, and convert the operation instructions into instructions that the display device 200 can recognize and respond to, playing the role of an interactive intermediary between the user and the display device 200 .
[0065] In some embodiments, the control device 100 may be a smart device, for example, the control device 100 may be installed with various applications for controlling the display device 200 according to user needs.
[0066] In some embodiments, Figure 1 As shown, the mobile terminal 300 or other intelligent electronic devices can play a similar function as the control device 100 after installing the application for controlling the display device 200 .
[0067] The controller 110 includes a processor 112, a RAM 113, a ROM 114, a communication interface 130, and a communication bus. The controller 110 is used to control the operation and operation of the control device 100, as well as the communication and cooperation between the internal components and the external and internal data processing functions.
[0068] The communication interface 130 implements communication of control signals and data signals with the display device 200 under the control of the controller 110. The communication interface 130 may include at least one of other near field communication modules such as a WiFi chip 131, a Bluetooth module 132, and an NFC module 133.
[0069] The user input / output interface 140 , wherein the input interface includes at least one of other input interfaces such as a microphone 141 , a touch panel 142 , a sensor 143 , and a button 144 .
[0070] In some embodiments, the control device 100 includes at least one of a communication interface 130 and an input / output interface 140. The control device 100 is configured with a communication interface 130, such as a WiFi, Bluetooth, NFC or other module, and can encode the user input command through the WiFi protocol, Bluetooth protocol, or NFC protocol and send it to the display device 200.
[0071] The memory 190 is used to store various operating programs, data and applications for driving and controlling the control device 100 under the control of the controller. The memory 190 can store various control signal instructions input by the user.
[0072] The power supply 180 is used to provide operating power support for each component of the control device 100 under the control of the controller.
[0073] Figure 4 Some embodiments of the present application provide Figure 1 Schematic diagram of software configuration in the display device. In some embodiments, the system of the display device 200 can be divided into three layers, namely, application layer, middleware layer and hardware layer from top to bottom.
[0074] The application layer mainly includes commonly used applications on TV and application frameworks. Common applications are mainly applications developed based on browsers, such as HTML5 APPs and native APPs.
[0075] The Application Framework is a complete program model that has all the basic functions required by standard application software, such as file access, data exchange, etc., as well as the user interfaces of these functions (toolbars, status bars, menus, dialog boxes).
[0076] Native apps can support online or offline, message push or local resource access.
[0077] The middleware layer includes various TV protocols, multimedia protocols, system components and other middleware. The middleware can use the basic services (functions) provided by the system software to connect various parts of the application system or different applications on the network, and can achieve the purpose of resource sharing and function sharing.
[0078] The hardware layer mainly includes the hardware abstraction layer (HAL) interface, hardware and drivers. The HAL interface is a unified interface for all TV chips to connect, and the specific logic is implemented by each chip. Drivers mainly include: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver.
[0079] For a display device 200 that supports touch interaction operations, the touch interaction data input by the user can be received through the touch interaction module. According to the interaction principle of the touch interaction module, the touch interaction module can detect relevant parameters in the touch action. For example, a capacitive touch layer is provided on the display 260 of the display device 200. When the user's finger touches any position of the touch layer, the capacitance of the touch layer at the touch position will change. At this time, the touch interaction module can record the position of the capacitance change, and record the time when the capacitance change occurs in combination with the timer in the controller to generate touch interaction data.
[0080] In some embodiments, the physical signal detected by the touch interaction module needs to be converted before it can be read by the controller 250 of the display device 200. For example, the analog signal of the capacitance change needs to be converted into a digital signal and then transmitted to the controller 250 of the display device 200. In order to adapt to the screen display process of the display device 200, the touch data detected by the touch interaction module also needs to be coordinate mapped so that the position point corresponding to the touch data can have a corresponding relationship with the display 260 of the display device 200 or the pixel point in the user interface. For example, the coordinate position detection accuracy of the touch interaction module is 65536×65536, and the resolution of the display 260 of the display device 200 is 3840×2160. After the touch interaction module detects the touch data, the coordinate mapping of the touch point position in the width and height directions can be performed according to the ratio of 65536 / 3840 and 65536 / 2160, so that the display device 200 can perform related operation responses based on the mapped touch point position coordinates.
[0081] The touch data may include different operation parameters according to the user's input method. Figure 5 As shown, the touch data may include the touch time, touch position, touch event type, number of touch points, etc. of the touch operation. In a touch interaction process, the touch event types that can be detected by the touch interaction module include: the down event, move event, and up event of the touch action. Corresponding to the entire touch track, a starting point, a track point, and an end point can be formed. Each touch event records the corresponding touch time and touch position.
[0082] In the process of executing the touch interaction response, the display device 200 can classify different touch times, touch positions, the number of touch points, and the type of touch events, so as to detect the user's touch input gesture, thereby performing different interactive responses for different input gestures. For example, when the number of touch points in the touch data detected by the touch interaction module is 1, the touch event type only includes a down event and an up event, and the time interval between the down event and the up event is less than the single-click event time threshold, and the touch position change distance of the down event and the up event is less than the jitter distance threshold, it can be determined that the current user's touch input gesture is a click gesture. Based on the click gesture, the display device 200 executes the operation of starting the application according to the icon in the area where the touch position corresponding to the click gesture is located.
[0083] Similarly, the display device 200 can also detect other touch interaction gestures input by the user based on the touch time, touch position, number of touch points and touch event type, such as double-click gesture, slide gesture, long press gesture, multi-finger click gesture, multi-finger slide gesture, etc. Different interaction gestures can derive different touch parameters. For example, a slide gesture can also generate parameters such as slide distance, slide speed, slide direction, slide track shape, etc. Different touch parameters can be used to perform different interactive controls.
[0084] In some embodiments, in order to enrich the touch interaction types supported by the display device 200, the display device 200 can also perform complex gesture detection based on the dynamic change rules of touch time, touch position, number of touch points and touch event type. For example, when the touch interaction module detects that the touch data input by the user includes multiple touch points, and the touch position of each touch point is close to each other as the user inputs, it can be determined that the touch gesture currently input by the user is a grab gesture. Based on complex gesture detection, the display device 200 can perform more interactive responses. For example, when the detected touch gesture is a grab operation for an image view, the display device 200 can respond to the grab gesture and perform a control action to move the image display position.
[0085] In some embodiments, the touch gesture can also be combined with the touch position to form a touch interaction operation based on a specific position. For example, when the touch interaction module detects that the down event position during the touch operation is at the top of the display 260, the touch point position corresponding to the move event moves downward. When the up event is detected, the display device 200 can determine that the current touch gesture is to slide down from the top of the screen. Therefore, the display device 200 can respond to the touch gesture and control the display 260 to present a drop-down list.
[0086] Some touch interaction gestures can be used to perform interactive actions based on the operating system of the display device 200, which are called global gestures. For example, the operation of sliding down from the top of the screen to call out a drop-down list in the above example of the display device 200. Some touch interaction gestures can be used to perform interactive actions based on specific touch applications. For example, when the display device 200 runs a whiteboard application, the sliding touch operation input by the user can be used to draw a track line on the whiteboard.
[0087] The touch application can be a system application or a third-party application developed based on a specific display device type and user needs. The touch application can be installed in the display device 200 and started to run under user control. For example, the user can control the display device 200 to run the whiteboard application by clicking the "whiteboard" application icon in the application interface of the display device 200.
[0088] It should be noted that the above-mentioned whiteboard application can be an independent application, an associated application, or a functional module in a touch application. Different forms of whiteboard applications can have different startup methods. For example, a user can start an independent whiteboard application through the application interface of the display device 200; a user can also start a whiteboard application by executing a "whiteboard" operation on a conference application; a user can also control the conference application to start the whiteboard functional module by clicking the "whiteboard" icon on the conference application.
[0089] Different forms of whiteboard applications may present different forms of whiteboard application interfaces after startup. For example, when a user starts a whiteboard application in an associated application form, the display device 200 may automatically enter a dual-screen (or split-screen) mode. In the dual-screen (or split-screen) mode, the display device 200 may display a user interface through two display areas, i.e., the main screen displays the original application (such as a conference application) interface, and the secondary screen displays the whiteboard application interface.
[0090] After the whiteboard application is running, the display device 200 can be switched to display a whiteboard interface. Figure 6As shown, the whiteboard interface may include drawing tool controls for drawing operations, such as pen shape, graphics, line shape, color, erase, clear screen, selection, etc. The user can click any control to draw graphics according to specific drawing needs.
[0091] like Figure 7 As shown, the display device 200 can render and display the drawing picture in real time through an image generation (Image Producer) module, an image rendering (surface flinger) module, a synthesis (Composer) module, a video process (Video Processing Unit hardware, VPU hardware) module and a display (screen).
[0092] In the process of displaying the drawn picture, the graphics interface (openGLES) of the image generation module can be connected to the whiteboard application to generate the drawn image content and pass the image content to the image rendering module. The image rendering module is used to control the display 260 to display the content, that is, to render the image content through the user interaction layer (UI layer) or the video layer (video layer) according to the image content. In order to obtain a better display effect, the image content of the UI layer can be rendered by the GPU component, so as to form a picture frame for display in the synthesis module. Among them, the synthesis module can form the picture content by software or hardware, for example, the synthesis module can be a hardware synthesis (Hardware Composer, HWC) module.
[0093] In the synthesis module, the picture frames can be stored through the frame buffer and the video buffer, and the picture content can be formed in the corresponding layers through the video process module. That is, the image frames generated by the video playback process form the picture content through the video plane, and the image frames of other image pictures (such as touch tracks, graphics, etc.) form the picture content through the primary OSD plane. Finally, the display device 200 forms the final picture through the blending unit of the video process module and displays it on the display 260.
[0094] Since the whiteboard application will present the user's touch trajectory in real time according to the user's touch operation, in order to present a better real-time response effect, the display device 200 should shorten the touch action input time and the delay time of the drawing result display. To this end, in some embodiments, the display device 200 can present a real-time painting effect by setting an acceleration layer. That is, in the video process module of the display device 200, an additional extended display layer (external OSD plane) can be set on the basis of the main OSD layer and the video layer. Among them, the extended display layer can be configured with different layer characteristics according to the specific display effect requirements. For example, the bitmap refresh mode of the extended display layer can be modified so that the extended display layer is refreshed in real time according to the region, thereby improving the display speed of the graphics. At this time, the extended display layer can be used as an acceleration layer in scenes with high dynamic display effects.
[0095] Taking the display device 200 running a whiteboard application as an example, in order to improve the real-time response speed of the line drawing process, after detecting the user's touch operation, the touch track can be drawn in real time on the extended display layer (acceleration layer). Figure 8 As shown, the display level of the acceleration layer can be higher than other layers, and when the user completes the touch input, the lines drawn by the acceleration layer are updated to other layers, thereby reducing input delay and improving the real-time display effect of the whiteboard application drawing process.
[0096] In some embodiments, the extended display layer can also work together with other graphics to improve display quality. For example, the acceleration layer can respond to the touch events input by the user at the same time as the main OSD layer, and draw graphics separately. However, since the acceleration layer is displayed above the main OSD layer, the graphics drawn by the acceleration layer can block the graphics drawn by the OSD layer to maintain real-time response speed. After the user inputs the touch interaction action, the content displayed by the acceleration layer can be released directly, and the OSD layer directly forms the drawn graphics, so there is no need for the acceleration layer to refresh the drawn graphics to the OSD layer, reducing the graphics mixing time. It not only improves the real-time display effect of the graphics drawing process, but also improves the final presentation quality of the graphics drawing.
[0097] In some embodiments, in order to meet different user needs, the whiteboard application can also dynamically configure different interface contents. Fig. 9As shown, a "teaching tool" option may be included in a whiteboard application run by a display device 200 applied to the field of education. When a user clicks on the teaching tool option, a teaching tool list may pop up. The teaching tool list may include tool options of the type "ruler", "set square", "protractor", etc. After the user clicks on the "set square" tool option, the "set square" tool may be called to assist in drawing. At this time, the display device 200 may add a movable set square tool graphic to the whiteboard drawing interface, and when the user's touch operation track approaches the edge of the set square tool graphic, a straight line segment may be drawn along the edge of the set square tool graphic.
[0098] In some embodiments, the whiteboard application can also store the graphic objects drawn by each user touch action. Among them, a touch action refers to the process from the user's finger (or stylus) contacting the touch layer to the user's finger (or stylus) leaving the touch layer. That is, if the user inputs a click action, a touch action should include a down event and an up event. If the user inputs a sliding action, a touch action should include a down event, a move event, and an up event. Each touch action can generate a drawing object, and the whiteboard application can record the drawing object, so that the user can perform actions such as selection, undo, and redo.
[0099] When storing graphics, the whiteboard application can also set associated information for the graphic object according to the graphic characteristics and input status. For example, after the user draws a straight line, the whiteboard application can set a shape identifier for the straight line object. The shape identifier can be stored in association with the straight line object and can be called by other modules of the whiteboard application or other applications to facilitate operations such as object selection, object retrieval, and object deletion.
[0100] In some embodiments, the whiteboard application can also render and process the graphics drawn by the user to make the graphics drawn by the user more accurate. Fig.10 As shown, when a user writes or draws on a whiteboard application, the whiteboard application can set a pen tip effect for the handwriting. The pen tip effect refers to the effect that the end of the drawn line has a gradually tapering effect. The whiteboard application can dynamically adjust the pen tip effect according to parameters such as the movement trend and movement speed of the touch track during the user's drawing process. For example, the faster the user writes, the longer the pen tip length; the slower the user writes, the shorter the pen tip length.
[0101] The process of rendering and processing the graphics drawn by the user by the whiteboard application can be implemented based on a preset graphics algorithm model. For example, the pen stroke effect can draw the tip effect through a water drop-shaped pen stroke model, and the tip effect is added to the end of the drawn graphic. For example, the whiteboard application can detect the shape of the user's drawn graphics within a preset drawing cycle, and replace the drawn shape with a standard graphics model to improve the standardization of the drawn graphics. To this end, a graphic recognition model can be built into the whiteboard application, and all the lines drawn by the user within the preset drawing cycle can form an image to be recognized, and the image to be recognized is processed by the graphic recognition model to identify the standard graphics similar to the drawn graphics within the drawing cycle, thereby replacing the drawn graphics displayed in the whiteboard application interface.
[0102] In some embodiments, the whiteboard application interface may also provide drawing auxiliary tools and menus for adjusting the drawing content. For example, the whiteboard application interface may include a "select" tool, and when the user clicks the "select" tool icon, the whiteboard application may be controlled to enter the object selection mode. In the object selection mode, the display device 200 may call the drawing object that intersects with the touch position based on the touch position under the down event, move event, and / or up event in the user's touch interaction operation, so as to achieve the purpose of multi-graphic selection.
[0103] In some embodiments, the whiteboard application may also support multiple gesture interaction operations, and have different control functions for different gesture interaction operations. For example, the whiteboard application may move the whiteboard drawing area along the multi-finger sliding track in response to the user's multi-finger sliding operation. The whiteboard application may also execute an erase function in response to the user's entire palm sliding operation to erase the drawing graphics covered by the palm sliding operation track.
[0104] In some embodiments, in order to improve the diversity of line drawing, the whiteboard application can also set multiple line drawing types, and then different types of line drawing can be drawn according to the touch action input by the user. For example, the user can click the "Line" control in the toolbar provided by the whiteboard application to call out the line selection menu, and click any line option according to the specific drawing needs to set the line drawing type. For example, Fig.11 As shown, the user selects the "brush" option. When the user writes or draws on the whiteboard application, the whiteboard application can process the writing trajectory to make the writing appear like brush writing.
[0105] In some embodiments, when drawing brush handwriting, drawing can be performed according to the touch points reported by the touch interaction module of the display device 200. However, due to the limitation of the sampling frame rate, the reported touch points are relatively small, and the continuous changes of the handwriting during brush writing cannot be captured, resulting in a large gap between the drawn brush handwriting and the actual effect of the brush.
[0106] In some embodiments, when drawing brush handwriting, it can also be realized based on the mapping method, by setting a dynamic mapping mechanism, following the touch action input by the user, and constantly mapping to fit and generate a brush handwriting. However, the brush stroke effect of this method does not change with the writing speed, and cannot reflect the real brush effect. In addition, the fast writing speed leads to a small number of reported touch points, making the writing strokes sparse, and the drawn brush handwriting can see obvious brush stroke prototypes, and the fitting effect is poor.
[0107] In order to draw a smoother and more fluent brush writing effect, some embodiments of the present application provide a brush handwriting drawing method, which uses quadratic interpolation to fill in points. Curve interpolation is first performed on the reported touch points to fit and generate a smooth curve, and then linear interpolation is performed on the obtained smooth curve, thereby improving the continuity and fluency of the brush strokes.
[0108] The brush handwriting drawing method can be applied to the display device 200 provided in the above embodiment. In order to meet the implementation of the brush handwriting drawing method, the display device 200 should at least include: a display 260 and a controller 250. The display 260 is configured to display a user interface. The display 260 is connected to a touch interaction module, and the touch interaction module is used to receive a touch instruction input by a user. The controller 250 is configured to execute the program steps corresponding to the brush handwriting drawing method, such as Fig.12 As shown, Fig.12 The flowchart of the method for drawing handwriting with a brush provided in the embodiment of the present application specifically includes the following contents:
[0109] When running a whiteboard application, the display device 200 can respond to a touch instruction input by a user based on a touch interaction module, detect touch points according to a preset sampling frame rate, and perform curve interpolation on the touch points to obtain a curve interpolation list.
[0110] The curve interpolation list includes a first interpolation point, which is a point on a smooth curve generated based on the touch point. A smooth curve is a curve fitted based on an interpolation algorithm. There are many types of smooth curves fitted based on different interpolation algorithms, such as polynomial curves, double arc segment curves, sine function curves, Bezier curves, B-spline curves, etc. The display device 200 can set a corresponding interpolation algorithm according to the actual line drawing method to fit different smooth curves.
[0111] In some embodiments, the smoothness of the smooth curve is related to the resolution of the smooth curve. The higher the resolution of the smooth curve, the smoother the smooth curve, the more sampling points on the smooth curve, and the more first interpolation points extracted. Therefore, the resolution parameter of the smooth curve can be preset, and the resolution parameter is used to characterize the number of sampling points on the smooth curve. The resolution parameter can be set based on the required number of interpolation points. When performing curve interpolation, the display device 200 can obtain the resolution parameter, calculate the smooth curve according to the resolution parameter, and extract the sampling points on the smooth curve to obtain a curve interpolation list.
[0112] In some embodiments, the smooth curve is a Bezier curve. The display device 200 can set the starting point, control point and end point according to the detected touch point, calculate the Bezier curve according to the starting point, control point and end point, and finally extract the sampling points on the Bezier curve to obtain a curve interpolation list. Among them, the end point is the midpoint between the third touch point and the second touch point, the starting point is the midpoint between the second touch point and the first touch point, the control point is the second touch point, the first touch point is the touch point of the previous detection cycle of the second touch point, and the second touch point is the touch point of the previous detection cycle of the third touch point.
[0113] When calculating the Bezier curve, the display device 200 can obtain the resolution parameter of the Bezier curve, and calculate the Bezier curve according to the resolution parameter of the Bezier curve, so as to extract the first interpolation point of the interpolation point number that meets the drawing requirements on the Bezier curve.
[0114] Bezier curves are divided into first-order Bezier curves, second-order Bezier curves, third-order Bezier curves, and higher-order Bezier curves. The higher the order, the more complex it is. In order to improve the smoothness and interpolation speed of the writing direction, the embodiment of the present application can use a second-order Bezier curve to interpolate and fill in the curve points.
[0115] Exemplarily, the formula of the second-order Bezier curve is B(t)=(1-t) 2 P a +2t(1-t)P b +t 2 P c , where t is the resolution parameter, ranging from 0 to 1. a , P b and P c are the starting point, control point and end point on the Bezier curve, respectively, and B(t) is a point on the Bezier curve. The embodiment of the present application can be based on De Casteljau's Algorithm and recursively calculate the sequence of coordinate points on the Bezier curve through the resolution parameter t, thereby drawing the Bezier curve.
[0116] It can be understood that the points on the Bezier curve can be interpolated by the resolution parameter t. When t is 0, it corresponds to the starting point, when t is 1, it corresponds to the end point, and other values of t between [0-1] correspond to the interpolation points. The more t values there are, the higher the resolution of the corresponding Bezier curve is, and the smoother the fitted Bezier curve is. However, the higher the resolution, the greater the increase in computing time and resource consumption. Therefore, in order to balance the drawing effect and performance consumption, the display device 200 can set the corresponding resolution parameter t based on the number of interpolation points required for actual drawing.
[0117] In order to make the curve smoother during the drawing process, for the starting point, control point and end point on the Bezier curve, the middle position between two adjacent touch points can be used as the starting point or end point, and the touch point between the starting point and the end point can be used as the control point. Fig.13 As shown, the display device 200 detects a down event and a move event through the touch interaction module, and the corresponding touch points on the touch track are point P1 and point P2, that is, the touch action input by the user moves from point P1 to point P2 after falling. For the case of two touch points, point P1 can be used as the starting point and control point, and point P12, the middle position between point P1 and point P2, can be used as the end point.
[0118] like Fig.14 As shown, the display device 200 detects touch point P3 through the touch interaction module, that is, the touch action input by the user continues to move from point P2 to point P3. For the case of three touch points, the end point P12 of the last drawing can be used as the starting point of this drawing, the touch point P2 detected last time can be used as the control point, and the middle position P23 between points P2 and P3 can be used as the end point of this drawing.
[0119] Based on the above starting point, control point and end point, the points on the Bezier curve can be interpolated based on the De Casteljau's Algorithm recursive algorithm and the resolution parameter t to obtain the curve interpolation list mBezierInterPolationList. For example, when the preset number of interpolation points Num is 3, the interpolation interval Interval is 1 / 3, and the resolution parameter t is set based on the number of interpolation points Num. The values of t are 0, 1 / 3, 2 / 3, and 1. The corresponding second interpolation point is Fig.15 The 4 points shown ( Fig.15 The points corresponding to the middle hatched fill pattern are P1, P10, P11, and P12.
[0120] The above curve interpolation method can make the interpolation point trend smoother. In order to improve the drawing speed and solve the problem of sparse stroke intervals caused by a small number of touch points, the embodiment of the present application can use the linear interpolation algorithm again for the curve interpolation list and solve the problem of sparse stroke intervals by defining the minimum distance interval between adjacent points.
[0121] After the display device 200 performs the curve interpolation, it can perform linear interpolation on the curve interpolation list to obtain a target interpolation list, wherein the target interpolation list includes second interpolation points, which are interpolation points inserted between the first interpolation points according to the interpolation interval.
[0122] In some embodiments, the display device 200 may obtain an interpolation interval, traverse the first interpolation points in the curve interpolation list, and insert interpolation points between adjacent first interpolation points according to the interpolation interval to obtain a target interpolation list. In other words, one interpolation point is inserted every interpolation interval between adjacent first interpolation points.
[0123] In some embodiments, in order to improve the continuity and fluency of the strokes, the display device 200 may further set a first distance threshold according to the interpolation interval, and determine whether an interpolation point needs to be inserted between adjacent first interpolation points by using the first distance threshold.
[0124] The display device 200 can obtain the target interpolation point and the adjacent interpolation point of the target interpolation point in the curve interpolation list, calculate the first interval distance between the target interpolation point and the adjacent interpolation point of the target interpolation point, and compare the first interval distance with the first distance threshold. If the first interval distance is greater than the first distance threshold, the interpolation point is inserted between the target interpolation point and the adjacent interpolation point of the target interpolation point according to the interpolation interval. If the first interval distance is less than or equal to the first distance threshold, the adjacent interpolation point of the target interpolation point is deleted from the curve interpolation list, and the adjacent interpolation point of the target interpolation point is obtained in the curve interpolation list after the adjacent interpolation point is deleted, so as to continue to determine the distance threshold.
[0125] For example, Fig.15Taking the second interpolation point shown as an example, the curve interpolation list mBezierInterPolationList includes 4 first interpolation points, namely point P1, point P10, point P11, and point P12. The display device 200 can set the first distance threshold to twice the interpolation interval, that is, the first distance threshold is Interval*2. When performing linear interpolation, the display device 200 can use point P1 as the starting point to traverse the first interval distance between adjacent points in the curve interpolation list, that is, first traverse the first distance interval between point P1 and point P10. If the first distance interval between point P1 and point P10 is less than the first distance threshold Interval*2, point P10 is deleted and the first distance interval between point P1 and point P11 is continued to be traversed.
[0126] If the first distance interval between point P1 and point P11 is still less than the first distance threshold Interval*2, then delete point P11 and continue to traverse the first distance interval between point P1 and point P12. If the first distance interval between point P1 and point P11 is greater than or equal to the first distance threshold Interval*2, then insert an interpolation point between point P1 and point P11 according to the interpolation interval Interval, and continue to traverse the next adjacent point, that is, the first distance interval between point P11 and point P12, to determine whether interpolation is required between point P11 and point P12, and so on, traverse the complete curve interpolation list to obtain the target interpolation list mInterPolationList that meets the distance requirements, including Fig.15 The multiple second interpolation points shown ( Fig.15 black dots in the image).
[0127] In the above implementation, distance determination and linear interpolation are performed simultaneously, or distance determination and linear interpolation can be performed separately, that is, the display device 200 can first obtain the first interval distance between the target interpolation point and its adjacent interpolation point in the curve interpolation list. If the first interval distance is greater than the first distance threshold, no processing is performed. If the first interval distance is less than or equal to the first distance threshold, the interpolation point adjacent to the target interpolation point is deleted, and the first interval distance between the target interpolation point and its adjacent interpolation point is continuously obtained backward until the distance determination of the adjacent points in the curve interpolation list is completed, and a curve interpolation list that meets the linear interpolation distance requirements is obtained. Finally, according to the interpolation interval, interpolation points are inserted between adjacent first interpolation points in the curve interpolation list to obtain the target interpolation list.
[0128] Based on the above-mentioned quadratic interpolation point filling method, after obtaining the target interpolation list, the display device 200 can draw a preset brush stroke model according to the target interpolation list to form brush handwriting with brush writing characteristics, thereby being able to simulate the writing effects of different brush stroke shapes, areas and ink volume distributions, and can present the following: Fig. 20 ,21 The brush handwriting effect shown.
[0129] Among them, the brush stroke model is a mathematical or algorithmic model that simulates the characteristics of brush writing. The brush stroke model can be divided into many types according to factors such as ink concentration, color, model size, etc., for example Fig.16 As shown in FIG, there are two brush stroke models with different ink concentrations, and users can set them based on actual drawing needs. Fig.17 As shown in the figure, the brush stroke models of different model sizes corresponding to the thicker brush position. Fig.18 As shown, the brush stroke models of different model sizes corresponding to the thinner brush position, the display device 200 can scale the model size accordingly based on the brush stroke thickness selected by the user.
[0130] In some embodiments, in order to improve the writing effect of a brush, the model size of the brush stroke model can be set based on factors such as touch speed and touch pressure. For example, based on the principle that the faster the writing speed, the thinner the handwriting, and the slower the speed, the thicker the handwriting, the model size of the brush stroke model can be set to the smallest when the writing speed is the smallest. When the writing speed is the largest, the model size of the brush stroke model is set to the largest. When the writing speed is an intermediate speed, the model size of the corresponding brush stroke model can be set according to the speed ratio. For another example, based on the principle that the greater the touch pressure, the thicker the handwriting, and the smaller the touch pressure, the thinner the handwriting, the model size of the brush stroke model can be scaled accordingly to achieve a realistic fit of the brush shape.
[0131] That is, the display device 200 can calculate the touch parameters of the second interpolation point in the target interpolation list, set the model size of the brush stroke model according to the touch parameters, and finally draw the brush strokes according to the model size of the brush stroke model. The touch parameters include touch speed and / or touch pressure, the touch speed is negatively correlated with the model size of the brush stroke model, and the touch pressure is positively correlated with the model size of the brush stroke model.
[0132] The touch parameters of each second interpolation point in the target interpolation list can be obtained based on the process of curve interpolation and linear interpolation. When performing curve interpolation, the display device 200 can obtain the touch parameters of the first touch point, the second touch point, and the third touch point respectively. And the touch parameters of the starting point and the touch parameters of the end point are calculated according to the touch parameters of the first touch point, the second touch point, and the third touch point, wherein the touch parameters of the starting point are the average touch parameters between the first touch point and the second touch point, and the touch parameters of the end point are the average touch parameters between the second touch point and the third touch point.
[0133] When performing linear interpolation, the display device 200 can obtain the number of interpolation points of the second interpolation point between the starting point and the end point, and calculate the touch parameter of the second interpolation point between the starting point and the end point according to the touch parameter of the starting point and the touch parameter of the end point, wherein the touch parameter of the second interpolation point is the ratio of the difference between the touch parameters between the starting point and the end point to the number of interpolation points.
[0134] For example, using the above example, Fig.13 As shown, the x-axis touch speed and y-axis touch speed of point P1 are mLastXVelocity and mLastYVelocity respectively. The x-axis touch speed and y-axis touch speed of point P2 are mCurrentXVelocity and mCurrentYVelocity respectively. Then the x-axis touch speed and y-axis touch speed of point P12, the midpoint between points P1 and P2, are (mLastXVelocity+mCurrentXVelocity) / 2 and (mLastYVelocity+mCurrentYVelocity) / 2 respectively. The number of interpolation points inserted between points P1 and P12 ( Fig.15 Assume that the number of black dots shown in FIG. 1 is N, the x-axis touch speed and y-axis touch speed of the interpolation point inserted between point P1 and point P12 are (mTempXVelocity-mLastXVelocity) / N and (mTempYVelocity-mLastYVelocity) / N respectively.
[0135] Similarly, the touch pressure can also be calculated based on the above method, which will not be elaborated here.
[0136] Thus, the display device 200 can obtain the touch speed and touch pressure of each interpolation point in the target interpolation list. When drawing the brush stroke model, it can traverse the target interpolation list, set the model size of the brush stroke model according to the touch speed and / or touch pressure corresponding to each interpolation point in the target interpolation list, and draw the brush stroke model to form brush handwriting.
[0137] In some embodiments, in order to improve the writing effect of a brush, the interpolation interval during linear interpolation can be set based on the model size of the brush stroke model. Fig.19As shown, it is the occupied area of the brush stroke model drawn according to the points P1 and P12, W and H are the width and height of the brush stroke model respectively. By adjusting the interpolation interval by the model size, a better drawing effect can be achieved under the brush stroke model of different model sizes. For example, when the model size of the brush stroke model is large, a larger interpolation interval can be set. When the model size of the brush stroke model is small, a smaller interpolation interval can be set. It can be understood that the fewer points are required to be drawn, the faster the drawing speed. Therefore, by setting the interpolation interval by the model size of the brush stroke model, fewer points are drawn on the basis of ensuring that no obvious stroke model can be seen, and the drawing speed is increased on the basis of ensuring the brush writing effect.
[0138] Therefore, the display device 200 may preset a scale parameter, which is a ratio of the interpolation interval to the model size of the brush stroke model. When performing linear interpolation, the scale parameter and the model size of the brush stroke model may be obtained, and the interpolation interval may be set according to the scale parameter.
[0139] For example, Fig.19 As shown, the width and height of the brush stroke model are equal. When the ratio value P1 between the interpolation interval Interval and the width W is between 0.02 and 0.03, a better drawing speed and brush writing effect can be achieved. Therefore, the interpolation interval can be dynamically adjusted according to the ratio value P1 and the width W of the brush stroke model set by the user, that is, the interpolation interval Interval = P1*W.
[0140] Similarly, the interpolation interval can also be dynamically adjusted according to the ratio value P2 between the interpolation interval Interval and the occupied area S of the brush stroke model, that is, the interpolation interval Interval = P2*S.
[0141] In some embodiments, the display device 200 can also set a second distance threshold, and determine whether the second interpolation point needs to be drawn by the second distance threshold. That is, when the display device 200 draws the brush stroke model according to the target interpolation list, the second interval distance between the drawn interpolation point and the pre-drawn interpolation point in the target interpolation list can be calculated, wherein the drawn interpolation point is the second interpolation point of the drawn brush stroke model, and the pre-drawn interpolation point is the second interpolation point of the brush stroke model to be drawn adjacent to the drawn interpolation point. Compare the second interval distance and the second distance threshold. If the second interval distance is less than or equal to the second distance threshold, delete the pre-drawn interpolation point in the target interpolation list and do not draw. If the second interval distance is greater than the second distance threshold, draw the brush stroke model according to the pre-drawn interpolation point. Improve the drawing speed on the basis of ensuring the brush writing effect.
[0142] In the above implementation mode, distance determination and drawing are performed simultaneously, or distance determination and drawing may be performed separately, that is, the display device 200 may take the first interpolation point as the starting point, traverse the second interval distance between the first interpolation point and the second interpolation point in the target interpolation list, and if the second interval distance between the first interpolation point and the second interpolation point is greater than the second distance threshold, no processing is performed, and the second interval distance between the second interpolation point and the third interpolation point is continued to be traversed, and distance determination is performed.
[0143] If the second interval distance between the second interpolation point and the third interpolation point is still greater than the second distance threshold, no processing is performed, and the second interval distance between the third interpolation point and the fourth interpolation point is continued to be traversed. If the second interval distance between the second interpolation point and the third interpolation point is less than or equal to the second distance threshold, the third interpolation point is deleted, and the second interval distance between the second interpolation point and the fourth interpolation point is continued to be traversed, and the distance is determined.
[0144] The same process is repeated until the distance determination of adjacent points in the target interpolation list is completed, and a target interpolation list that meets the drawing distance requirement is obtained. Finally, the brush stroke model is drawn according to the target interpolation list to form brush traces.
[0145] Based on the above brush handwriting drawing method. In some embodiments of the present application, a display device 200 is also provided, including: a display 260 and a controller 250. Among them, the display 260 is configured to display a user interface. The display 260 is connected to a touch interaction module, and the touch interaction module is used to receive a touch instruction input by a user. The controller 250 is configured to execute the following program steps:
[0146] In response to a touch command input by a user, a touch point is detected.
[0147] Curve interpolation is performed on the touch point to obtain a curve interpolation list, wherein the curve interpolation list includes a first interpolation point, which is a point on a smooth curve generated based on the touch point.
[0148] Linear interpolation is performed on the curve interpolation list to obtain a target interpolation list, wherein the target interpolation list includes second interpolation points, which are interpolation points interpolated between the first interpolation points according to the interpolation interval.
[0149] According to the target interpolation list, the brush stroke model is drawn to form brush traces.
[0150] The same and similar parts between the various embodiments in this specification can be referenced to each other and will not be described again here.
[0151] It can be seen from the above technical solutions that the display device and the brush handwriting drawing method provided in the above embodiments can detect the touch point in response to the touch command input by the user, perform curve interpolation on the touch point to obtain a curve interpolation list, and then perform linear interpolation on the curve interpolation list to obtain a target interpolation list. Among them, the curve interpolation list includes a first interpolation point, which is a point on a smooth curve generated based on the touch point, and the target interpolation list includes a second interpolation point, which is an interpolation point inserted between the first interpolation points according to the interpolation interval. Finally, according to the target interpolation list, the brush stroke model is drawn to form the brush handwriting. The method uses a quadratic interpolation point filling method, first uses curve interpolation for overall interpolation, fits and generates a smooth curve, and then uses linear interpolation to perform quadratic interpolation on the smooth curve, thereby improving the continuity and fluency of the strokes.
[0152] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention or certain parts of the embodiments.
[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0154] For the convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.
Claims
1. A display device, characterized in that: include: A display configured to display a user interface, the display being connected to a touch interaction module, the touch interaction module being used to receive a touch instruction input by a user; The controller is configured as: In response to a touch command input by a user, detecting a touch point; Performing curve interpolation on the touch point to obtain a curve interpolation list, wherein the curve interpolation list includes a first interpolation point, which is a point on a smooth curve generated based on the touch point; Performing linear interpolation on the curve interpolation list to obtain a target interpolation list, wherein the target interpolation list includes second interpolation points, where the second interpolation points are interpolation points inserted between the first interpolation points according to an interpolation interval; According to the target interpolation list, a brush stroke model is drawn to form brush traces.
2. The display device according to claim 1, characterized in that The controller performs curve interpolation on the touch point to obtain a curve interpolation list, and is configured as follows: A starting point, a control point and an end point are set according to the touch point, the end point is the midpoint between the third touch point and the second touch point, the starting point is the midpoint between the second touch point and the first touch point, the control point is the second touch point, the first touch point is the touch point of the previous detection cycle of the second touch point, and the second touch point is the touch point of the previous detection cycle of the third touch point; Calculate a Bezier curve according to the starting point, the control point and the end point; The sampling points on the Bezier curve are extracted to obtain the curve interpolation list.
3. The display device according to claim 2, characterized in that The controller performs curve interpolation on the touch point to obtain a curve interpolation list, and is configured as follows: Obtaining a resolution parameter of the Bezier curve, where the resolution parameter is used to characterize the number of sampling points on the Bezier curve; The Bezier curve is calculated according to the resolution parameter.
4. The display device according to claim 1, characterized in that The controller performs linear interpolation on the curve interpolation list to obtain a target interpolation list, and is configured as follows: Get the interpolation interval; Traversing the first interpolation point in the curve interpolation list; Interpolation points are inserted between adjacent first interpolation points according to the interpolation interval to obtain a target interpolation list.
5. The display device according to claim 4, characterized in that The controller is also configured to: Setting a first distance threshold according to the interpolation interval; Obtaining a target interpolation point and adjacent interpolation points of the target interpolation point in the curve interpolation list; Calculating a first interval distance between the target interpolation point and an adjacent interpolation point of the target interpolation point; If the first interval distance is greater than the first distance threshold, inserting an interpolation point between the target interpolation point and an adjacent interpolation point of the target interpolation point according to the interpolation interval; If the first interval distance is less than or equal to the first distance threshold, the adjacent interpolation points of the target interpolation point are deleted from the curve interpolation list, and the target interpolation point and the adjacent interpolation points of the target interpolation point are obtained from the curve interpolation list after the adjacent interpolation points are deleted.
6. The display device according to claim 4, characterized in that The controller is also configured to: Obtaining the model size of the brush stroke model; Acquire a scale parameter, where the scale parameter is a ratio value between a preset interpolation interval and a model size of the brush stroke model; The interpolation interval is set according to the scale parameter.
7. The display device according to claim 2, characterized in that The controller is also configured to: Calculating touch parameters of a second interpolation point in the target interpolation list, where the touch parameters include touch speed and / or touch pressure; The model size of the brush stroke model is set according to the touch parameter, wherein the touch speed is negatively correlated with the model size of the brush stroke model, and the touch pressure is positively correlated with the model size of the brush stroke model; The brush strokes are drawn according to the model size of the brush stroke model.
8. The display device according to claim 7, characterized in that The controller is also configured to: respectively acquiring touch parameters of the first touch point, the second touch point and the third touch point; Calculating a touch parameter of the starting point and a touch parameter of the end point, wherein the touch parameter of the starting point is an average value of the touch parameters between the first touch point and the second touch point, and the touch parameter of the end point is an average value of the touch parameters between the second touch point and the third touch point; Obtaining the number of interpolation points of the second interpolation point between the starting point and the end point; A touch parameter of a second interpolation point between the starting point and the end point is calculated, where the touch parameter of the second interpolation point is a ratio of a touch parameter difference between the starting point and the end point to the number of interpolation points.
9. The display device according to claim 8, characterized in that The controller executes drawing of the brush stroke model according to the target interpolation list, and is further configured to: Calculating a second interval distance between a drawn interpolation point and a pre-drawn interpolation point in the target interpolation list, wherein the drawn interpolation point is a second interpolation point of the drawn brush stroke model, and the pre-drawn interpolation point is a second interpolation point of the brush stroke model to be drawn adjacent to the drawn interpolation point; If the second interval distance is less than or equal to a second distance threshold, deleting the pre-drawn interpolation point in the target interpolation list; If the second interval distance is greater than a second distance threshold, the brush stroke model is drawn according to the pre-drawn interpolation points.
10. A method for drawing brush handwriting, characterized in that: include: In response to a touch command input by a user, detecting a touch point; Performing curve interpolation on the touch point to obtain a curve interpolation list, wherein the curve interpolation list includes a first interpolation point, which is a point on a smooth curve generated based on the touch point; Performing linear interpolation on the curve interpolation list to obtain a target interpolation list, wherein the target interpolation list includes second interpolation points, where the second interpolation points are interpolation points inserted between the first interpolation points according to an interpolation interval; According to the target interpolation list, a brush stroke model is drawn to form brush traces.