Method and system for adding annotations in real time
By creating video, annotation and operation layers in video teaching scenarios, obtaining screen images in real time and generating annotations, the problem of cumbersome and inefficient real-time annotation operations in the existing technology is solved, and the flexibility and efficiency of real-time annotation are achieved.
Patent Information
- Application Number
- CN202411136015.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-29
AI Technical Summary
The existing technology cannot realize real-time annotation in scenarios such as video teaching, and the operation is cumbersome and inefficient. The video needs to be recorded before editing and annotating, resulting in insufficient timeliness and high cost.
By creating three layers of video, annotation and operating, you can obtain the screen screen in real time and generate annotations. Use transparent bottom annotation layer to superimpose it on the video layer, supporting undo, recovery and fallback operations, and using layer stack and queue to manage annotations data.
It realizes the real-time annotation operation of videos without the need for additional video editing tools, which improves the efficiency and flexibility of annotation and simplifies the operation process.
Smart Images

Figure CN119052598A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for adding annotations in real time. Background Art
[0002] Annotating on a video helps mark important knowledge points or content, making it easier for people to understand. It is of great significance in application scenarios such as video teaching, live broadcasting, and video conferencing. However, when conducting activities such as teaching with the existing technology, the lecturer sometimes needs to demonstrate the operation of other software, and often cannot annotate the video in real time. Instead, the video needs to be recorded and then annotated using video editing software, which is cumbersome, inefficient, and more costly. Therefore, there is a need for a method that can solve the problems of existing annotation methods that are not timely, cumbersome to operate, and inefficient. Summary of the invention
[0003] To solve the above problems, the present invention provides a method and system for adding annotations in real time, which solves the problems of cumbersome operation and low efficiency of existing annotation methods by creating different layers and using the layers to display the annotations in real time.
[0004] To achieve the above object, the present invention provides the following technical solutions:
[0005] A method for adding annotations in real time, the method comprising:
[0006] Create layers, the layers include a video layer, an annotation layer, and an operation layer, the annotation layer is a transparent bottom layer;
[0007] Get the real-time screen image and display it frame by frame on the video layer;
[0008] Annotation operation: the operation layer generates annotations according to the operation content. When the annotation operation is completed, the annotations are copied to the annotation layer and the operation layer is cleared.
[0009] When there are annotations on the annotation layer, the annotation layer is superimposed on the video layer;
[0010] Reset operation saves all annotations in the current annotation layer as annotation images, stores the annotation images into the annotation stack, and clears the annotation layer;
[0011] Undo the operation, clear the annotation layer, and restore the annotation image at the top of the annotation stack to the annotation layer.
[0012] Furthermore, the method further comprises: a rollback operation, storing the annotation added to the annotation layer last time into a rollback stack, and clearing the annotation on the annotation layer.
[0013] Furthermore, the method also includes: a recovery operation, restoring the annotation at the top of the back stack to the annotation layer, and deleting the annotation at the top of the back stack.
[0014] Furthermore, in the undo operation, before clearing the annotation layer, the current annotation content of the annotation layer is stored in the undo stack; the method also includes: a restore operation, restoring the annotation content at the top of the undo stack to the annotation layer, and deleting the annotation at the top of the undo stack.
[0015] Furthermore, the operation layer generates annotations according to the operation content, and its specific implementation method includes: receiving operation content data, storing the operation content data into an operation queue, and taking out the data according to the order of storing in the operation queue to perform drawing operations.
[0016] Furthermore, the operation contents include: drawing lines, drawing circles, drawing frame lines and erasing annotations.
[0017] Furthermore, storing the operation content data into the operation queue further includes: extracting the operation content data at preset intervals and discarding the extracted data.
[0018] Furthermore, the layer creation also includes creating a text layer; in response to text input, generating text annotations on the text layer, copying the text annotations to the annotation layer, and clearing the text layer.
[0019] Furthermore, the method also includes: receiving an annotation operation via a touch screen.
[0020] Through the above technical scheme, the present invention has the following beneficial effects: by receiving annotation operations through different layers, the input video stream can be annotated in real time, there is no need to use additional video editing tools to annotate the video, and the annotations can be undone, which is more flexible and improves the efficiency of real-time annotation. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 The figure is a schematic diagram of the overall process of a method for adding annotations in real time according to the present invention.
[0022] Figure 2 It is a structural schematic diagram of a system for adding annotations in real time according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0025] Example 1
[0026] See also Figure 1 , a method for adding annotations in real time, the method comprising:
[0027] Create layers, the layers include a video layer, an annotation layer, and an operation layer, the annotation layer is a transparent bottom layer;
[0028] Get the real-time screen image and display it frame by frame on the video layer;
[0029] Annotation operation: the operation layer generates annotations according to the operation content. When the annotation operation is completed, the annotations are copied to the annotation layer and the operation layer is cleared.
[0030] When there are annotations on the annotation layer, the annotation layer is superimposed on the video layer;
[0031] Reset operation saves all annotations in the current annotation layer as annotation images, stores the annotation images into the annotation stack, and clears the annotation layer;
[0032] Undo the operation, clear the annotation layer, and restore the annotation image at the top of the annotation stack to the annotation layer.
[0033] By acquiring real-time screen images, displaying the screen images frame by frame, and then merging and overlaying them using layers, the screen images and annotations can be displayed in real time.
[0034] In an optional embodiment, it also includes: uploading the merged layer, broadcasting it live over the network, recording the layer and saving it as a video.
[0035] In an optional embodiment, the method further includes: a rollback operation, storing the annotation added to the annotation layer last time into a rollback stack, and clearing the annotation on the annotation layer.
[0036] The undo stack is used to recall and restore individual annotations, thereby increasing the flexibility of annotations and eliminating the need for users to erase existing annotations one by one.
[0037] In an optional embodiment, the method further includes: a recovery operation, restoring the annotation at the top of the back stack to the annotation layer, and deleting the annotation at the top of the back stack.
[0038] In an optional embodiment, in an undo operation, before clearing the annotation layer, the current annotation content of the annotation layer is stored in an undo stack; the method also includes: a restore operation, restoring the annotation content at the top of the undo stack to the annotation layer, and deleting the annotation at the top of the undo stack.
[0039] In an optional embodiment, the operation layer generates annotations according to the operation content, and its specific implementation method includes: receiving operation content data, storing the operation content data into an operation queue, and retrieving data according to the order of storage in the operation queue to perform drawing operations.
[0040] The touch screen monitors touch events, which include parameters such as press and release state value, annotation type, coordinate value, line width value, color value, etc. The annotation line is drawn according to the above parameters.
[0041] In an optional embodiment, the operation content includes: drawing a line, drawing a circle, drawing a frame line and erasing annotations.
[0042] In an optional embodiment, storing the operation content data into the operation queue further includes: extracting the operation content data at preset intervals and discarding the extracted data.
[0043] When users make annotations, a large amount of continuous annotation data will be generated. However, due to the limited display capacity of the screen and the limited speed of human eye recognition, it is not necessary to draw each received data. While ensuring the display effect, discarding some intermediate data or reducing the frequency of responding to the touch screen can increase the speed of annotation, reduce device occupancy, and save performance.
[0044] In an optional embodiment, the creating a layer further includes creating a text layer; in response to text input, generating a text annotation on the text layer, copying the text annotation to the annotation layer, and clearing the text layer.
[0045] In an optional embodiment, the method further includes: receiving an annotation operation via a touch screen.
[0046] Example 2
[0047] See also Figure 2 , a system for adding annotations in real time, comprising:
[0048] A layer creation module, used to create layers, the layers include a video layer, an annotation layer, and an operation layer, the annotation layer is a transparent bottom layer;
[0049] The image acquisition module is used to acquire the real-time screen image and display the real-time screen image frame by frame on the video layer;
[0050] The annotation operation module is used to generate annotations on the operation layer according to the operation content until the annotation operation is completed, copy the annotations to the annotation layer, and clear the operation layer;
[0051] Annotation overlay module, when there are annotations on the annotation layer, the annotation layer is overlaid on the video layer;
[0052] The layer reset module is used to save all annotations in the current annotation layer as annotation images, store the annotation images into the annotation stack, and clear the annotation layer;
[0053] The layer undo module is used to clear the annotation layer and restore the annotation image at the top of the annotation stack to the annotation layer.
[0054] The embodiment disclosed in this specification is only an example of a unilateral feature of the present invention, and the protection scope of the present invention is not limited to this embodiment, and any other functionally equivalent embodiments fall within the protection scope of the present invention. For those skilled in the art, various other corresponding changes and deformations can be made according to the technical solutions and concepts described above, and all of these changes and deformations should fall within the protection scope of the claims of the present invention.
Claims
1. A method for adding annotations in real time, It is characterized in that The method comprises: Create layers, the layers include a video layer, an annotation layer, and an operation layer, the annotation layer is a transparent bottom layer; Get the real-time screen image and display it frame by frame on the video layer; Annotation operation: the operation layer generates annotations according to the operation content. When the annotation operation is completed, the annotations are copied to the annotation layer and the operation layer is cleared. When there are annotations on the annotation layer, the annotation layer is superimposed on the video layer; Reset operation saves all annotations in the current annotation layer as annotation images, stores the annotation images into the annotation stack, and clears the annotation layer; Undo the operation, clear the annotation layer, and restore the annotation image at the top of the annotation stack to the annotation layer.
2. A method for adding annotations in real time according to claim 1, It is characterized in that The method further comprises: a rollback operation, storing the annotation added to the annotation layer last time into a rollback stack, and clearing the annotation on the annotation layer.
3. A method for adding annotations in real time according to claim 2, It is characterized in that The method further includes: a recovery operation, restoring the annotation at the top of the back stack to the annotation layer, and deleting the annotation at the top of the back stack.
4. A method for adding annotations in real time according to claim 1, It is characterized in that In the undo operation, before clearing the annotation layer, the current annotation content of the annotation layer is stored in the undo stack; The method further includes: a restoration operation, restoring the annotation content at the top of the undo stack to the annotation layer, and deleting the annotation at the top of the undo stack.
5. A method for adding annotations in real time according to claim 1, It is characterized in that The operation layer generates annotations according to the operation content, and its specific implementation method includes: receiving operation content data, storing the operation content data into an operation queue, and taking out data according to the order of storing in the operation queue to perform drawing operations.
6. A method for adding annotations in real time according to claim 5, It is characterized in that The operations include: drawing lines, drawing circles, drawing frame lines and erasing annotations.
7. A method for adding annotations in real time according to claim 5, It is characterized in that The storing the operation content data into the operation queue also includes: extracting the operation content data at preset intervals and discarding the extracted data.
8. A method for adding annotations in real time according to claim 1, It is characterized in that The creating layer also includes creating a text layer; in response to text input, generating text annotations on the text layer, copying the text annotations to the annotation layer, and clearing the text layer.
9. A method for adding annotations in real time according to claim 1, It is characterized in that The method further includes: receiving an annotation operation via a touch screen.
10. A system for adding annotations in real time, It is characterized in that include: A layer creation module, used to create layers, the layers include a video layer, an annotation layer, and an operation layer, the annotation layer is a transparent bottom layer; The image acquisition module is used to acquire the real-time screen image and display the real-time screen image frame by frame on the video layer; The annotation operation module is used to generate annotations on the operation layer according to the operation content until the annotation operation is completed, copy the annotations to the annotation layer, and clear the operation layer; Annotation overlay module, when there are annotations on the annotation layer, the annotation layer is overlaid on the video layer; The layer reset module is used to save all annotations in the current annotation layer as annotation images, store the annotation images into the annotation stack, and clear the annotation layer; The layer undo module is used to clear the annotation layer and restore the annotation image at the top of the annotation stack to the annotation layer.
Citation Information
Cited By
Method and system for real-time annotation addition
WO2026040448A1
