Interaction method for alpha erasure for image, system, computer device and storage medium
By recording the sliding trajectory and coordinates on the image, dynamically calculating the transparency parameter based on the sliding speed, and automatically adjusting the image transparency, the problem of complex operation in existing technologies is solved, achieving a flexible and efficient transparency erasure effect.
Patent Information
- Application Number
- PCT/CN2024/095439
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-25
- Filing Date
- 2024-05-27
- Publication Date
- 2025-10-30
AI Technical Summary
Current image transparency erasure techniques are complex and require frequent parameter adjustments, resulting in low efficiency, especially in educational settings where they disrupt the teaching process.
By recording the sliding trajectory and coordinates of the sliding point of the operating device on the image, the transparency parameter is dynamically calculated based on the sliding speed, and the transparency of the sliding trajectory is automatically adjusted to achieve real-time changes in transparency.
It provides a flexible and intelligent transparency erasure method, allowing users to finely control transparency changes, improve operational efficiency, and is suitable for various devices and software, meeting the need for quickly switching transparency parameters.
Smart Images

Figure CN2024095439_30102025_PF_FP_ABST
Abstract
Description
An interactive method, system, computer device, and storage medium for erasing transparency from an image.
[0001] Related applications
[0002] This application claims priority to Chinese Patent Application No. 202410505801.7, filed on April 25, 2024, entitled "An Interactive Method, System, Computer Device and Storage Medium for Erasing Transparency of an Image", which is incorporated herein by reference. Technical Field
[0003] This application belongs to the field of human-computer interaction technology, specifically relating to an interactive method, system, computer device, and storage medium for erasing the transparency of an image. Background Technology
[0004] Currently, many drawing and writing software programs implement the function of varying handwriting transparency for tasks such as image editing, artistic creation, and data management. This function can be used on mobile devices, PCs, and large-screen hardware devices. Implemented transparency variation methods include adjusting the brightness of the eraser tool to control the erasing transparency; adjusting layer transparency to achieve overall transparency variations; adjusting the eraser tool mode to control the erasing transparency; adjusting the flow parameter (in Photoshop tools) to control the depth of color applied with each stroke, thus adjusting the tool's color intensity to achieve continuous transparency variations; and using a soft-edged eraser to create more natural transparency transitions.
[0005] The methods described above for controlling image transparency all share a common drawback: the transparency parameters need to be adjusted through menus or panels. Furthermore, during the eraser process, if you want to change the degree of transparency, you need to open the menu or panel again to readjust it. To achieve multiple levels of transparency on a single image, you need to constantly open the menu or panel to adjust the transparency parameters during the erasing process, making the operation cumbersome and the drawing efficiency very low.
[0006] In real-world scenarios, such as when teachers use large-screen devices for classes, if they want to control the transparency of the eraser, they need to switch different transparency parameters of the eraser or switch eraser tool modes before erasing the transparent text. This kind of erasing scenario is time-consuming and, more importantly, it will disrupt the teacher's teaching rhythm.
[0007] Application content
[0008] The purpose of this application is to overcome the shortcomings of existing technologies that require continuous adjustment of transparency parameters when performing image transparency erasure, which are complex and inefficient.
[0009] To achieve the above objectives, this application proposes an interactive method for erasing the transparency of an image, comprising:
[0010] When the device is currently in the state of erasing transparency, the trajectory of the device sliding on the image and the coordinates of the sliding point are recorded, and the transparency parameter is obtained based on the speed at which the device slides on the image.
[0011] Based on the obtained transparency parameters, modify the transparency of the image on the sliding track with the set track width.
[0012] As an improvement to the above method, the recording device slides along the trajectory and coordinates of the sliding point on the image, and calculates the transparency parameter based on the sliding speed, including:
[0013] Record the current coordinates of the operating device at set time intervals;
[0014] Calculate the distance between the current coordinate and the previous coordinate;
[0015] The transparency parameter is calculated based on the distance.
[0016] As an improvement to the above method, the recording device slides along the trajectory and coordinates of the sliding point on the image, and calculates the transparency parameter based on the sliding speed, including:
[0017] Record the current coordinates of the operating device at set time intervals;
[0018] When the operating device slides a set distance, calculate the time taken for the operating device to slide.
[0019] The transparency parameter is calculated based on the duration of the slide.
[0020] As an improvement to the above method, the recording device slides along the trajectory and coordinates of the sliding point on the image, and calculates the transparency parameter based on the sliding speed, including:
[0021] Record the current coordinates of the operating device at set time intervals;
[0022] Calculate the sliding speed of the operating equipment periodically;
[0023] The transparency parameter is calculated based on the sliding speed.
[0024] As an improvement to the above method, obtaining the transparency parameter based on the speed at which the operating device slides on the image means that the faster the operating device slides on the image, the higher the transparency parameter is obtained, or the faster the operating device slides on the image, the lower the transparency parameter is obtained.
[0025] As an improvement to the above method, the method further includes:
[0026] The set trajectory width is a preset fixed value, or it is calculated based on the speed at which the operating device slides.
[0027] The calculation based on the speed of the sliding of the operating device results in a wider or narrower set trajectory width value when the operating device slides faster on the image.
[0028] This application also provides an interactive system for erasing the transparency of an image. Based on the above system implementation, the system includes:
[0029] The transparency parameter calculation module, when currently in the erase transparency operation state, records the trajectory and coordinates of the sliding point of the operating device on the image, and obtains the transparency parameter based on the speed of the device's sliding on the image; and
[0030] The transparency module is used to change the transparency of the image on the sliding track with a set track width, based on the obtained transparency parameters.
[0031] As an improvement to the above system, the system further includes:
[0032] The trajectory width calculation module is used to determine the set trajectory width based on the speed at which the operating device slides across the image when the device is in the erase transparency operation state.
[0033] This application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method as described in any of the preceding claims.
[0034] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the method described in any of the preceding claims.
[0035] Compared with existing technologies, the advantages of this application are:
[0036] 1. The method of this application provides users with a more flexible and intelligent way to erase transparency, which can be used on different devices and software, and meets the demand for quickly switching transparency parameters;
[0037] 2. Using the method of this application, users can perform very fine control, from slight fading to complete erasure, and this continuous range of control is difficult to provide with traditional preset transparency. Attached Figure Description
[0038] Figure 1 shows a flowchart of one approach to interactively erasing the transparency of an image. Detailed Implementation
[0039] The technical solution of this application will be described in detail below with reference to the accompanying drawings.
[0040] When teachers use monitors or touchscreens to conduct classes, they will write, draw, and perform other operations on the screen. In order to achieve better teaching results, it is often necessary to adjust the display transparency of some images or handwriting. Moreover, the display transparency may vary in a single image area, such as a gradual process from dark to light, or a "zebra"-like transparency change process with alternating light and dark shades, or irregular transparency changes based on the content of the image.
[0041] To enable users to easily and quickly adjust image transparency without interrupting the current operation, opening menus or panels to adjust transparency parameters, and then continuing to draw, this application proposes an interactive method for erasing image transparency. This method is applicable to on-screen operations using a hardware pen, finger, or mouse. The following explanation uses mouse operations on the screen as an example; these operations also apply to on-screen operations using hardware pens, fingers, and other similar devices.
[0042] An interactive method for erasing image transparency includes: when the mouse is in the transparency erasure operation state, recording the mouse's trajectory and speed across the image; dynamically calculating transparency parameters based on the different speeds; and then changing the transparency of the image along the trajectory. When changing the transparency of the image along the trajectory, the transparency can be adjusted in real-time based on changes in the transparency parameters, or the area corresponding to each change in transparency parameter can be recorded first, and then the transparency of each area covered by the trajectory can be uniformly modified after the sliding operation is complete. When calculating the transparency parameters based on mouse speed, the faster the sliding speed, the larger the transparency parameter, and vice versa.
[0043] Example 1
[0044] As a preferred approach, the system records the speed at which the mouse moves across the image. The method for calculating the transparency parameter is as follows: at each set time interval, the current coordinate of the mouse is recorded, and the mouse movement speed is determined based on the distance between the current coordinate and the previous coordinate. The greater the distance between the two coordinates, the faster the mouse moves. A univariate linear equation can be constructed between the transparency parameter and the distance between the two coordinates, and the transparency parameter can be calculated based on this distance.
[0045] Example 2
[0046] As another preferred approach, the system records the speed at which the mouse moves across the image. The method for calculating the transparency parameter is as follows: at each set time interval, the current coordinates of the mouse are recorded. When the mouse has moved a set distance, the duration of the mouse movement is calculated. The longer the mouse movement time, the slower the mouse movement. The transparency parameter and the mouse movement time can be used to construct a linear equation, and the transparency parameter can be calculated based on the mouse movement time.
[0047] Example 3
[0048] As another preferred approach, the system can also calculate the speed at which the mouse moves across the image based on time or distance, and directly correlate the speed with the transparency parameter, calculating the transparency parameter directly based on the speed. Specifically, as shown in Figure 1: Initially, the initial mouse movement speed is recorded as zero, the eraser width is X, and the initial eraser transparency parameter is a. The data of the current mouse position is stored in the memory to form historical data. As the mouse moves across the image, the movement speed and transparency parameters of the current point in the erased area are updated.
[0049] Example 4
[0050] The width of the mouse's sliding trajectory can be preset by the user through a menu or parameter panel provided by the system, or it can be dynamically set by the system based on the speed of the mouse movement. A linear equation can be formed between the trajectory width and the mouse movement speed, and the width of the trajectory can be dynamically calculated based on the mouse movement speed.
[0051] Example 5
[0052] This application also provides an interactive system for erasing the transparency of an image, implemented based on the above method. The system includes:
[0053] The transparency parameter calculation module is used to record the trajectory and coordinates of the sliding point of the operating device on the image when the current state of erasing transparency is in progress, and to obtain the transparency parameter based on the speed at which the operating device slides on the image.
[0054] The trajectory width calculation module is used to obtain the set trajectory width based on the speed at which the operating device slides on the image when the current state is in the erase transparency operation state.
[0055] The transparency module is used to change the transparency of the image on the sliding track with a set track width, based on the calculated transparency parameters.
[0056] This application may also provide a computer device, including: at least one processor, memory, at least one network interface, and a user interface. The various components in this device are coupled together via a bus system. It is understood that the bus system is used to implement communication between these components. In addition to a data bus, the bus system also includes a power bus, a control bus, and a status signal bus.
[0057] The user interface can include a display, keyboard, or clicking device. Examples include a mouse, trackball, touchpad, or touchscreen.
[0058] It is understood that the memory in the embodiments disclosed in this application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memories described herein are intended to include, but are not limited to, these and any other suitable types of memory.
[0059] In some implementations, the memory stores elements such as executable modules or data structures, or subsets thereof, or extended sets thereof: operating systems and applications.
[0060] The operating system includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application programs include various applications, such as media players and browsers, used to implement various application functions. Programs implementing the methods of the embodiments of this disclosure can be included in the application programs.
[0061] In the above embodiments, the processor can also invoke programs or instructions stored in memory, specifically programs or instructions stored in an application program, for the following purposes:
[0062] Follow the steps described above.
[0063] The above methods can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the disclosed methods, steps, and logic block diagrams. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the disclosed methods can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.
[0064] It is understood that the embodiments described in this application can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or combinations thereof.
[0065] For software implementation, the technology of this application can be implemented by executing the functional modules (e.g., procedures, functions, etc.) of this application. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or externally.
[0066] This application may also provide a non-volatile storage medium for storing a computer program. When the computer program is executed by a processor, it can implement the steps in the above method embodiments.
[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to the embodiments, those skilled in the art should understand that modifications or equivalent substitutions to the technical solutions of this application do not depart from the spirit and scope of the technical solutions of this application, and should all be covered within the scope of the claims of this application.
Claims
1. An interactive method for erasing the transparency of an image, comprising: When the device is currently in the state of erasing transparency, the trajectory of the device sliding on the image and the coordinates of the sliding point are recorded, and the transparency parameter is obtained based on the speed at which the device slides on the image. Based on the obtained transparency parameters, modify the transparency of the image on the sliding track with the set track width.
2. The interactive method for erasing the transparency of an image according to claim 1, characterized in that, The recording device tracks the image and records the coordinates of the sliding point. Based on the sliding speed, a transparency parameter is calculated, including: Record the current coordinates of the operating device at set time intervals; Calculate the distance between the current coordinate and the previous coordinate; The transparency parameter is calculated based on the distance.
3. The interactive method for erasing the transparency of an image according to claim 1, characterized in that, The recording device tracks the image and records the coordinates of the sliding point. Based on the sliding speed, a transparency parameter is calculated, including: Record the current coordinates of the operating device at set time intervals; When the operating device slides a set distance, calculate the time taken for the operating device to slide. The transparency parameter is calculated based on the duration of the slide.
4. The interactive method for erasing the transparency of an image according to claim 1, characterized in that, The recording device tracks the image and records the coordinates of the sliding point. Based on the sliding speed, a transparency parameter is calculated, including: Record the current coordinates of the operating device at set time intervals; Calculate the sliding speed of the operating equipment periodically; The transparency parameter is calculated based on the sliding speed.
5. The interactive method for erasing the transparency of an image according to claim 1, characterized in that, The statement that the transparency parameter is obtained based on the speed at which the operating device slides on the image means that the faster the operating device slides on the image, the higher the transparency parameter is obtained, or the faster the operating device slides on the image, the lower the transparency parameter is obtained.
6. The interactive method for erasing the transparency of an image according to claim 1, characterized in that, The method further includes: The set trajectory width is a preset fixed value, or it is calculated based on the speed at which the operating device slides. The calculation based on the speed of the sliding of the operating device results in a wider or narrower set trajectory width value when the operating device slides faster on the image.
7. An interactive system for erasing the transparency of an image, implemented based on the system described in claim 1, characterized in that, The system includes: The transparency parameter calculation module, when the image is currently in the erasure transparency operation state, records the trajectory and coordinates of the sliding point of the operating device on the image, and obtains the transparency parameter based on the speed at which the operating device slides on the image; and The transparency module is used to change the transparency of the image on the sliding track with a set track width, based on the obtained transparency parameters.
8. The interactive system for erasing the transparency of an image according to claim 7, characterized in that, The system also includes: The trajectory width calculation module is used to obtain the set trajectory width based on the speed at which the operating device slides on the image when the current state is in the erase transparency operation state.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in claim 1.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the method as described in claim 1.
Citation Information
Patent Citations
Method for beautifying handwriting in real time and electronic equipment
CN102937849A
Electronic pen switching method, electronic pen and electronic equipment
CN115309276A
Display device, display method, and vehicle
US20230017486A1