Picture labeling method and device, equipment and storage medium

By setting a preset transparency less than 1 during the picture labeling process, the problem of uneven display of drawing traces caused by multiple drawing operations is solved, and uniform display is achieved and user experience is improved.

CN118915948APending Publication Date: 2024-11-08BEIJING CHENGSHI WANGLIN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411196441.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

During the picture labeling process, multiple drawing operations lead to uneven display of drawing traces, reducing user experience.

Method used

By setting a preset transparency less than 1 between the original canvas and the target image, ensure that the transparency remains consistent every time the traces are drawn overlay, avoiding overlapping area color deepening.

Benefits of technology

A uniform display of drawing traces is achieved, improving user experience, ensuring that no matter how many times the drawing traces are superimposed, the transparency of the final mixing result is the same as the canvas preset transparency, and the RGB channel value remains unchanged.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118915948A_ABST
    Figure CN118915948A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a picture labeling method and device, equipment and a storage medium, and the method comprises the steps: rendering a first canvas with a first drawing trace in response to a first drawing operation generated for a first region in an original canvas, so as to obtain a first drawing result that the first canvas is displayed on a target picture in an overlapping manner. And in response to a second drawing operation generated on a second area in the first canvas, rendering a second canvas with the first drawing trace and a second drawing trace to obtain a second drawing result that the second canvas is overlaid and displayed on the target picture. Wherein the canvas and the target picture are displayed on the target page in the drawing state in an overlapped mode, and the first area and the second area are at least partially overlapped. As the canvas has the preset transparency smaller than 1, no matter how many times the drawing traces with the transparency being 1 are overlaid, the transparency of the mixing result between the canvas and the drawing traces is the same as the preset transparency of the canvas, and therefore the display uniformity of the drawing traces can be guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a picture annotation method, device, equipment and storage medium. Background Art

[0002] With the rapid development of Internet technology, the interaction between users and image elements in browser pages has become more frequent and in-depth, such as image annotation, image beautification and other interactive methods.

[0003] In the picture annotation scenario, the user can draw any area in the picture to annotate the area. However, during the drawing process, the user often generates multiple drawing operations, which causes the drawing traces to be displayed unevenly, thereby reducing the user experience.

[0004] Based on this, it is crucial to solve the problem of uneven display of drawing traces caused by multiple drawing operations. Summary of the invention

[0005] In view of this, embodiments of the present invention provide a method, apparatus, device and storage medium for annotating an image, so as to ensure the uniformity of display of drawing traces obtained by multiple drawing operations.

[0006] In a first aspect, an embodiment of the present invention provides a method for labeling an image, comprising:

[0007] In response to a first drawing operation generated on a first area in the original canvas, rendering a first canvas having a first drawing trace to obtain a first drawing result that is displayed by superimposing the first canvas on a target image;

[0008] In response to a second drawing operation generated on a second area in the first canvas, rendering a second canvas having the first drawing trace and the second drawing trace to obtain a second drawing result that is displayed on the target image by superimposing the second canvas;

[0009] The canvas and the target image are superimposed and displayed on the target page in the drawing state; the first area and the second area at least partially overlap, the transparency of any drawing trace is 1, and the canvas has a preset transparency less than 1.

[0010] In a second aspect, an embodiment of the present invention provides a picture annotation device, including:

[0011] A first rendering module, configured to render a first canvas having a first drawing trace in response to a first drawing operation on a first area in an original canvas, so as to obtain a first drawing result in which the first canvas is superimposed and displayed on a target image;

[0012] A second rendering module is configured to render a second canvas having the first drawing trace and the second drawing trace in response to a second drawing operation on a second area in the first canvas, so as to obtain a second drawing result displayed by superimposing the second canvas on the target image;

[0013] The canvas and the target image are superimposed and displayed on the target page in the drawing state; the first area and the second area at least partially overlap, the transparency of any drawing trace is 1, and the canvas has a preset transparency less than 1.

[0014] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the image annotation method in the first aspect. The electronic device may also include a communication interface for communicating with other devices or communication systems.

[0015] In a fourth aspect, an embodiment of the present invention provides a non-temporary machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor can at least implement the image annotation method as described in the first aspect above.

[0016] In the image annotation method provided by an embodiment of the present invention, in response to a first drawing operation generated on a first area in an original canvas, a first canvas having a first drawing trace is rendered to obtain a first drawing result in which the first canvas is superimposed and displayed on a target image. After obtaining the first drawing result, in response to a second drawing operation generated on a second area in the first canvas, a second canvas having the first drawing trace and the second drawing trace is rendered to obtain a second drawing result in which the second canvas is superimposed and displayed on the target image. The canvas and the target image are superimposed and displayed on a target page in a drawing state; the first area and the second area at least partially overlap, the transparency of any drawing trace is 1, and the canvas has a preset transparency less than 1.

[0017] It can be seen that in the above method, the drawing result obtained after multiple drawing operations is the superimposed display result of the canvas with drawing traces and the target image, and the superimposed display result can be composed of RGB channel values. In this solution, the canvas and the target image are two separate layers, and the canvas can have a preset transparency less than 1. Therefore, no matter how many times the drawing traces with a transparency of 1 are superimposed, the transparency of the final mixed result between the canvas and the drawing traces will be the same as the preset transparency of the canvas, that is, the final calculated RGB channel value will not change, thereby ensuring the uniformity of the drawing trace display. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 A schematic diagram of a drawing result provided by an embodiment of the present invention;

[0020] Figure 2 A schematic diagram of another drawing result provided by an embodiment of the present invention;

[0021] Figure 3 A flowchart of a method for labeling an image provided by an embodiment of the present invention;

[0022] Figure 4 A schematic diagram of a first canvas provided by an embodiment of the present invention;

[0023] Figure 5 A schematic diagram of a second canvas provided by an embodiment of the present invention;

[0024] Figure 6 A schematic diagram of the structure of a target page provided by an embodiment of the present invention;

[0025] Figure 7 A schematic diagram of a coordinate system provided by an embodiment of the present invention;

[0026] Figure 8 A schematic diagram of an erasing process of a drawing result provided by an embodiment of the present invention;

[0027] Fig. 9 A schematic diagram of another process of erasing a drawing result provided by an embodiment of the present invention;

[0028] Fig.10 A schematic diagram of a moving process of a drawing result provided by an embodiment of the present invention;

[0029] Fig.11 A schematic diagram of a scaling process of a drawing result provided by an embodiment of the present invention;

[0030] Fig.12 A schematic diagram of the structure of a picture annotation device provided by an embodiment of the present invention;

[0031] Fig.13 For Fig.12 A schematic diagram of the structure of an electronic device corresponding to the image annotation device provided in the illustrated embodiment. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.

[0033] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.

[0034] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0035] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to identifying", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is identified" may be interpreted as "when determining" or "in response to determining" or "when identifying (stated condition or event)" or "in response to identifying (stated condition or event)", depending on the context.

[0036] It should be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such product or system. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the product or system including the elements.

[0037] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0038] Before describing in detail the image annotation methods provided by the embodiments of the present invention, an application scenario of image annotation may be schematically described:

[0039] As described in the background technology, a user can draw any area in the image displayed on the browser page to mark the area. For example, if the image is a face image, and the face image may also include trees that are not related to the face, then the area where the tree is located can be painted to mark the area where the tree is located, so as to facilitate the subsequent elimination of the area where the tree is located.

[0040] However, when users are labeling trees in pictures, they often perform multiple drawing operations, and the areas of multiple drawing operations may overlap at least partially. It is easy to understand that since the overlapping areas correspond to multiple drawing operations, the color displayed in the overlapping areas will be darker than the color displayed in other non-overlapping areas. For example, suppose the user performs two drawing operations, the first drawing operation corresponds to the first area, the second drawing operation corresponds to the second area, and the first area represented by a rectangle and the second area represented by a regular hexagon overlap at least partially, as shown in FIG. Figure 1 As shown, the color displayed in the overlapping area is darker than the color displayed in other areas, that is, multiple drawing operations will cause the drawing traces to appear unevenly displayed, thereby reducing the user experience.

[0041] In order to improve the above problem, the image annotation method provided by the following embodiments of the present invention can be used. After performing multiple drawing operations on the area where the trees are located, the following image annotation method can be obtained: Figure 2 The one shown shows uniform drawing marks.

[0042] Based on the above description, some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.

[0043] Figure 3The flowchart of a method for annotating a picture provided by an embodiment of the present invention is shown in FIG. The method for annotating a picture provided by an embodiment of the present invention can be executed by an annotation device. It is understood that the annotation device can be implemented as software or a combination of software and hardware. Figure 3 As shown, the method may include the following steps:

[0044] S301 , in response to a first drawing operation generated on a first area in an original canvas, rendering a first canvas having a first drawing trace to obtain a first drawing result that is displayed by overlaying the first canvas on a target image.

[0045] S302, in response to a second drawing operation generated on a second area in the first canvas, render a second canvas having a first drawing trace and a second drawing trace to obtain a second drawing result in which the second canvas is superimposed and displayed on a target image, wherein the canvas and the target image are superimposed and displayed on a target page in a drawing state; the first area and the second area at least partially overlap, the transparency of any drawing trace is 1, and the canvas has a preset transparency less than 1.

[0046] In practice, when a user has a drawing requirement for a target image displayed on a target page on a browser, the user can draw on the canvas displayed on the target page to obtain a canvas with drawing traces, which can be superimposed and displayed on the target image to form a drawing result. The canvas with drawing traces and the target image can be superimposed and displayed on the target page in the drawing state.

[0047] The canvas has a preset transparency less than 1. Optionally, the preset transparency can be any value less than 1, such as 0.5. The transparency of any drawing trace is 1, and the drawing result is the superimposed display result of the canvas and the target image, which can be composed of RGB channel values. Optionally, a drawing component can be provided in the target page on the browser side. Then, the annotation device can set the target page to a drawing state in response to the user's selection operation of the drawing component.

[0048] Specifically, the user can use a drawing tool to generate a first drawing operation on a first area in the original canvas, that is, generate the first drawing operation by moving the drawing tool. Then the annotation device can render the original canvas in response to the first drawing operation to obtain a first canvas with a first drawing trace. The superimposed display effect of the first canvas and the target image can form a first drawing result. The transparency of the first drawing trace is 1. Unlike the first canvas, the original canvas may not contain a drawing trace. The display effect of the first canvas can be combined with Figure 4 The specific process of rendering the first canvas can refer to the description in the following embodiment.

[0049] Optionally, the drawing tool may be a tool that enables interaction, such as a mouse, a stylus, or a finger. Optionally, the size of the original canvas may be the same as or different from the size of the target image. When the size of the original canvas is the same as the size of the target image, the position of the object to be annotated in the target image is the same as the position of the first area in the original canvas. When the size of the original canvas is larger than the size of the target image, the position of the object to be annotated in the target image is the same as the position of the first area in the area to be annotated. The area to be annotated is the overlapping area of ​​the original canvas and the target image.

[0050] After obtaining the first drawing result, the user can also use the drawing tool to perform a second drawing operation on the second area in the first canvas. Then the annotation device can respond to the second drawing operation and render a second canvas having both the first drawing trace and the second drawing trace to obtain a second drawing result in which the second canvas is superimposed on the target image. The transparency of the second drawing trace is 1, and the second drawing result is the superimposed display result of the second canvas and the target image. The second canvas contains both the first drawing trace and the second drawing trace. The display effect of the second canvas can be combined with Figure 5 The specific rendering process of the second canvas can also refer to the description in the following embodiment.

[0051] Following the above example, assuming that the target image includes trees that are not related to human faces, and the trees in the target image are to be labeled, the first area and the second area may be the area where the trees are located, or may be part of the area where the trees are located. And the second area may at least partially overlap with the first area.

[0052] In this embodiment, in response to a first drawing operation generated on a first area in an original canvas, a first canvas having a first drawing trace is rendered to obtain a first drawing result in which the first canvas is superimposed and displayed on a target image. After obtaining the first drawing result, in response to a second drawing operation generated on a second area in the first canvas, a second canvas having the first drawing trace and the second drawing trace is rendered to obtain a second drawing result in which the second canvas is superimposed and displayed on the target image. The canvas and the target image are superimposed and displayed on a target page in a drawing state; the first area and the second area at least partially overlap, the transparency of any drawing trace is 1, and the canvas has a preset transparency less than 1.

[0053] It can be seen that in the above method, the drawing result obtained after multiple drawing operations is the superimposed display result of the canvas with drawing traces and the target image, and the superimposed display result can be composed of RGB channel values. In this solution, the canvas and the target image are two separate layers, and the canvas can have a preset transparency less than 1. Therefore, no matter how many times the drawing traces with a transparency of 1 are superimposed, the transparency of the final mixed result between the canvas and the drawing traces will be the same as the preset transparency of the canvas, that is, the final calculated RGB channel value will not change, thereby ensuring the uniformity of the drawing trace display.

[0054] As Figure 3 In the illustrated embodiment, when the target page is in the drawing state, the user can use the drawing tool to mark the target image. And the state of the target page can be realized by selecting the drawing component. On this basis, optionally, the target page can also include other states, such as the erase state, the cancel state, etc. The state switching of the target page can be realized by using the various page state selection components provided by the target page.

[0055] like Figure 6 As shown, the multiple state selection components can be located in the function area of ​​the target page. In addition, the target page also includes an operation area, which can display the drawing result obtained by superimposing the canvas with drawing traces and the target image.

[0056] based on Figure 6 In the page style shown, for the rendering of the first canvas, specifically, the annotation device can obtain a first coordinate set of the action position of the first drawing operation in the page coordinate system in response to the first drawing operation. Then, according to the embedded relationship between the target page and the operation area, the first coordinate set is transformed to obtain a second coordinate set of the action position in the canvas coordinate system. Finally, according to the second coordinate set obtained after the transformation, the first canvas is rendered, that is, in the original canvas, the pixel points corresponding to the second coordinate set are rendered with drawing traces.

[0057] For the conversion of the coordinate system, specifically, the annotation device can determine the first offset between the vertex coordinates according to the vertex coordinates of the target vertices in the same direction of the operation area and the target page. Then, according to the first offset, the first coordinate set is converted into the second coordinate set. The first offset may include the offset between the vertex coordinates of the operation area and the vertex coordinates of the target page in the horizontal direction, and the offset between the vertex coordinates of the operation area and the vertex coordinates of the target page in the vertical direction.

[0058] The canvas is displayed in the operation area of ​​the target page, and the size of the canvas can be the same as the size of the operation area. Optionally, the page coordinate system can be composed of an x1 axis and a y1 axis, and its starting coordinate can be the coordinate of any vertex of the target page, with the x1 axis horizontally to the right as the positive direction, and the y1 axis vertically downward as the positive direction. Optionally, as Figure 7 As shown, any vertex of the target page can be the upper left corner of the target page. Similarly, the canvas coordinate system can be composed of an x2 axis and a y2 axis, and its starting coordinate can be the coordinate of any vertex of the canvas, i.e., the operation area, with the x2 axis horizontally to the right as the positive direction and the y2 axis vertically downward as the positive direction. Optionally, as Figure 7 As shown, any vertex of the canvas can be the upper left corner of the canvas. Then the above coordinate system transformation can be combined with Figure 7 The coordinate system shown can be understood.

[0059] For the rendering of the first canvas, optionally, the annotation device may directly merge the coordinates in the second coordinate set, the merging result is the drawing trace, and the canvas with the drawing trace is determined as the first canvas.

[0060] The above process of converting the first coordinate set into the second coordinate set can be implemented by executing the following code:

[0061]

[0062] Among them, getCanvasPos is a custom function for calculating the second coordinate set. (pageX, pageY) is the coordinate in the first coordinate set, and (x, y) is the coordinate in the second coordinate set. (l eft1, top1) represents the first offset. Among them, l eft1 is the horizontal offset between the vertex coordinates of the operation area and the vertex coordinates of the target page. top1 is the vertical offset between the vertex coordinates of the operation area and the vertex coordinates of the target page. The annotation device can then subtract pageX from l eft1 in the coordinates in the first coordinate set to obtain the x in the coordinates in the second coordinate set. Subtract pageY from top1 in the coordinates in the first coordinate set to obtain the y in the coordinates in the second coordinate set.

[0063] In this embodiment, through the page status selection component provided by the function area in the target page and the superimposed display result provided by the operation area in the target page, the user can more conveniently realize the annotation of the target image. And according to the embedded relationship between the target page and the operation area, and the first offset between the vertex coordinates of the target vertices in the same direction of the operation area and the target page, the first coordinate set of the action position of the first drawing operation in the page coordinate system is converted to the second coordinate set of the action position in the canvas coordinate system. It can be seen that through the conversion of the coordinate system, the action position of the first drawing operation in the canvas coordinate system can be better determined, thereby improving the rendering effect of the first canvas.

[0064] The above embodiment has mentioned that the coordinates in the second coordinate set can be directly merged, and the merged result is the first drawing trace. In order to improve the accuracy of the first drawing trace, the annotation device can also group the second coordinate set, and draw on the original canvas in sequence according to the grouping results to obtain the drawing traces corresponding to the different grouping results. Afterwards, the canvas with the drawing traces corresponding to the different grouping results can be determined as the first canvas. Optionally, different grouping results can include the same number of coordinates or different numbers of coordinates.

[0065] For example, assuming that the second coordinate set includes 60 coordinates, and different grouping results each include 20 consecutive coordinates, the annotation device may draw three different grouping results on the original canvas in sequence to obtain three drawing traces. Afterwards, the annotation device may splice the three drawing traces to obtain a first canvas having a splicing result of the three drawing traces.

[0066] In this embodiment, by grouping the second coordinate set and performing segmented drawing on the original canvas according to the grouping results, it is possible to ensure that each coordinate participates in the drawing, thereby ensuring the accuracy of the first drawing trace.

[0067] Similar to the rendering process of the first canvas, the annotation device can obtain a third coordinate set of the action position of the second drawing operation in the page coordinate system in response to the second drawing operation. Then, according to the embedded relationship between the target page and the operation area, the third coordinate set is converted to obtain a fourth coordinate set of the action position in the canvas coordinate system. Finally, the second canvas is rendered according to the fourth coordinate set.

[0068] Among them, for determining the fourth coordinate set, specifically, the annotation device can determine the first offset between the vertex coordinates according to the vertex coordinates of the target vertices in the same direction of the operation area and the target page. Then, according to the first offset, the third coordinate set is converted into the fourth coordinate set. The determination process of the fourth coordinate set can also refer to the description of the determination process of the second coordinate set.

[0069] In this embodiment, the annotation device converts the third coordinate set of the action position of the second drawing operation in the page coordinate system into the fourth coordinate set of the action position in the canvas coordinate system according to the embedded relationship between the target page and the operation area. It can be seen that through the conversion of the coordinate system, the action position of the second drawing operation in the canvas coordinate system can be better determined, thereby improving the rendering effect of the second canvas.

[0070] In addition, the contents not described in detail in this embodiment and the technical effects that can be achieved can all be found in the relevant descriptions in the above embodiments, and will not be repeated here.

[0071] In order to improve the user experience, optionally, after the drawing is completed, the annotation device may further determine the validity of the drawing trace.

[0072] Specifically, the annotation device can determine whether the third area completely overlaps with the drawn area or whether the third area is included in the drawn area in response to the third drawing operation generated by the user on the third area in the first canvas and / or the second canvas, wherein the drawn area includes the first area and / or the second area.

[0073] Furthermore, if the third area completely overlaps with the drawn area, it indicates that the user has performed a drawing operation again in the same area, and the third drawing trace corresponding to the third area can be determined to be invalid, and the third drawing trace is not rendered on the canvas. Alternatively, if the third area is included in the drawn area, it indicates that the user has performed a drawing operation again in a part of the drawn area, and the third drawing trace corresponding to the third area can be determined to be invalid, and the third drawing trace is not rendered on the canvas.

[0074] If the third area does not completely overlap with the drawn area, it can be determined that the third drawing trace corresponding to the third area is valid, and the third drawing trace is rendered on the canvas.

[0075] Regarding the determination of the degree of overlap between the third region and the drawn region, specifically, the annotation device may sequentially compare the pixels contained in the third region and the drawn region respectively. If the pixels contained in the third region and the drawn region respectively are exactly the same, it can be determined that the third region completely overlaps with the drawn region. Alternatively, if the pixels corresponding to the third region are contained in the pixels corresponding to the drawn region, it can be determined that the third region is contained in the drawn region.

[0076] In this embodiment, by judging the validity of the drawing traces, the same drawing traces obtained in response to repeated drawing operations do not need to be rendered on the canvas, so that the user can see the drawing results more quickly, thereby improving the user experience.

[0077] In the above embodiments, it has been mentioned that the function area of ​​the target page includes a variety of page state selection components. And the page state selection component may include an erase component. Based on this, when the drawn area exceeds the target area, the annotation device can set the target page to the erase state in response to the user's selection operation of the erase component. The target area is the area where the target image and the canvas are superimposed and displayed.

[0078] Specifically, after obtaining the second drawing result, the annotation device can respond to the user's erasing operation on the drawn area in the second canvas through the drawing tool, and obtain the fifth coordinate set of the effective position of the erasing operation in the page coordinate system. The fifth coordinate set is a subset of the second coordinate set and the fourth coordinate set. The drawn area includes the first area and / or the second area. Then, the annotation device can perform a coordinate system conversion on the fifth coordinate set according to the embedded relationship between the target page and the operation area to obtain a sixth coordinate point set of the erasing operation in the canvas coordinate system. The specific determination process of the sixth coordinate set can refer to the description of the determination process of the second coordinate set mentioned above. Finally, the second drawing result can be erased according to the sixth coordinate point set of the erasing operation in the canvas coordinate system. The second drawing result after erasure can be referred to. Figure 8 shown.

[0079] Optionally, the annotation device may directly merge the coordinates in the sixth coordinate set to obtain an erasure mark, and erase the second drawing result according to the erasure mark. To ensure the accuracy of the erasure mark, the annotation device may also group the sixth coordinate set, and erase the second drawing result on the original canvas in sequence according to the erasure marks corresponding to the different grouping results.

[0080] In this embodiment, the erasing component provided by the target page allows the user to conveniently perform an erasing operation on the drawn area, thereby improving the user experience. The main purpose of performing an erasing operation on the drawn area is to correct the erroneous part of the drawn result, thereby achieving accurate erasing of a part of the area.

[0081] In addition, the contents not described in detail in this embodiment and the technical effects that can be achieved can all be found in the relevant descriptions in the above embodiments, and will not be repeated here.

[0082] In practice, the size of the target image displayed in the operation area of ​​the target page may be smaller than the size of the canvas. The size of the canvas is the size of the operation area of ​​the target page. In this case, the area where the target image and the canvas are superimposed can be regarded as the target area. Fig. 9 As shown, there are other areas in the canvas except the target area, and the other areas include an upper area, a lower area, a left area and a right area in the canvas except the target area.

[0083] The actual drawing operation generated by the user may appear in other areas of the canvas besides the target area, such as Fig. 9 The upper and right areas of the image are drawn, and the drawing traces on other areas will interfere with the overlay display result of the target area. Therefore, in order to ensure the accuracy of image annotation, the annotation device can optionally obtain the position coordinates of other areas and automatically erase the drawing traces or other content on other areas according to the position coordinates of other areas.

[0084] In this embodiment, by erasing other areas that are not related to the target area, it is possible to prevent drawing traces in other areas from interfering with the superimposed display results in the target area, thereby improving the accuracy of image annotation. In addition, for the user, during the process of generating the drawing operation, it is not necessary to care about other areas. Even if drawing is performed in other areas, it does not matter. The annotation device will automatically clear the drawing traces in other areas. Therefore, it can also reduce the difficulty of annotating the target image for the user.

[0085] Optionally, the page state selection component may further include an undo component. In response to the user's selection operation on the undo component, the annotation device may set the target page to the undo state to achieve undoing of the drawing trace.

[0086] Specifically, the annotation device may cancel the second drawing trace in response to the user's undo operation on the second area using the drawing tool. Then, the first drawing trace is redrawn according to the start index and the end index corresponding to each of the different groups in the grouping result. After that, the third canvas with the first drawing trace is rendered to obtain a third drawing result that is superimposed and displayed on the target image.

[0087] The grouping result is obtained by the annotation device grouping the second coordinate set, and the grouping result includes not only a preset number of coordinates, but also a start index and an end index corresponding to these coordinates. The start index and the end index are used to indicate the start position and the end position of the preset number of coordinates in the canvas coordinate system.

[0088] In this embodiment, after canceling the second drawing trace, the annotation device can quickly redraw the first drawing trace through the start index and end index corresponding to different groups included in the grouping results, without the need to recalculate the coordinate set in the canvas coordinate system, thereby reducing the user's waiting time and improving the user experience.

[0089] And when the user needs to undo any drawing trace, since the annotation device will judge the validity of the drawing trace during the annotation process, that is, the same drawing trace will not be rendered multiple times, the user will not have to perform multiple undo operations to see the result after undoing, thereby improving the user experience.

[0090] After obtaining the drawing result, the user may optionally use an adjustment tool to move the target image and the drawing trace in the drawing result, respectively. The drawing result may be the first drawing result or the second drawing result.

[0091] Optionally, the adjustment tool may also be a tool capable of realizing interaction, such as a mouse, a stylus pen, a finger, etc. It should be noted that the adjustment tool may be the same tool as the drawing tool, but is named differently from the functional perspective.

[0092] For the movement of the target image in the drawing result, specifically, the annotation device can obtain the position coordinates of the adjustment tool before the movement in the page coordinate system and the position coordinates of the adjustment tool after the movement in response to the movement of the adjustment tool, and the position of the drawing result in the target page moves with the movement of the adjustment tool. Then, the second offset between the position coordinates of the adjustment tool before and after the movement is calculated. Then, according to the second offset, the first position coordinates of the movement result of the target image in the drawing result in the canvas coordinate system are determined.

[0093] Among them, the second offset can be expressed by (l eft2, top2), and the second offset can include the horizontal offset l eft2 between the position coordinates of the adjustment tool before moving and the position coordinates of the adjustment tool after moving, and the vertical offset top2 between the position coordinates of the adjustment tool before moving and the position coordinates of the adjustment tool after moving.

[0094] Before moving the drawing trace in the drawing result, the annotation device may first calculate the difference between the vertex coordinates of the target vertices in the same direction of the target image and the canvas to obtain a third offset. Then, the difference between the second coordinate set and the third offset is divided by the size of the target image to obtain a first division result. Thereafter, the first division result is multiplied by the size of the original image to obtain the position coordinates of the drawing trace mapped to the original image.

[0095] The third offset may be represented by (left3, top3). Optionally, the target vertex may be the upper left corner of the target image and the canvas. Then the third offset may include the horizontal offset of the vertex coordinates of the upper left corner of the target image and the vertex coordinates of the upper left corner of the canvas, l eft3, and the vertical offset of the vertex coordinates of the upper left corner of the target image and the vertex coordinates of the upper left corner of the canvas, top3.

[0096] For the movement of the drawing trace in the drawing result, specifically, the annotation device can determine the second position coordinates of the movement result of the drawing trace in the drawing result in the canvas coordinate system according to the position coordinates of the drawing trace mapped to the original picture, the respective sizes of the target picture and the original picture, and the first position coordinates. The size of the target picture is the result of adjusting the size of the original picture. Optionally, the size of the original picture can be larger than the size of the target picture, and the size of the original picture can also be smaller than the size of the target picture.

[0097] Finally, according to the first position coordinates and the second position coordinates, the annotation device can overlay and render the movement result of the drawing trace on the movement result of the target image to obtain the drawing result after the movement, that is, to complete the movement of the drawing result. Fig.10 Understand. Fig.10 As shown, the circle represents the position coordinates of the adjustment tool in the page coordinate system before and after moving.

[0098] For determining the second position coordinates, specifically, the annotation device may perform a division operation on the position coordinates of the drawing trace mapped to the original image and the size of the original image to obtain a second division result. Then, the second division result is multiplied by the size of the target image to obtain a first multiplication result. Then, the first multiplication result is added to the first position coordinates to obtain the second position coordinates.

[0099] The above-mentioned process of determining the second position coordinates can be implemented by executing the following code:

[0100] a2=X / imageInfo.naturalSize.width*imageInfo.displaySize.width+a1;

[0101] b2=Y / imageInfo.naturalSize.height*imageInfo.displaySize.height+b1;

[0102] Wherein, (a1, b1) represents the first position coordinates. (a2, b2) represents the second position coordinates. (X, Y) represents the position coordinates of the drawing trace mapped to the original image.

[0103] imageInfo.displaySize.width is the width of the target image, and imageInfo.displaySize.height is the height of the target image. (imageInfo.displaySize.width, imageInfo.displaySize.height) indicates the size of the target image.

[0104] imageInfo.naturalSize.width is the width of the original image, and imageInfo.naturalSize.height is the height of the original image. (imageInfo.naturalSize.width, imageInfo.naturalSize.height) indicates the size of the original image.

[0105] The process of determining the position coordinates of the above-mentioned drawing traces mapped to the original image can be implemented by executing the following code:

[0106]

[0107] Wherein, get ImagePos is a custom function used to calculate the position coordinates of the drawing trace mapped to the original image. canvasPos represents the second coordinate set. (x, y) represents the coordinates in the second coordinate set.

[0108] In this embodiment, by using the adjustment tool to move the target image and the drawing trace in the drawing result, the moved drawing result can be better displayed in the operation area of ​​the target page.

[0109] After obtaining the drawing result, the user may optionally use an adjustment tool to scale the target image and the drawing trace in the drawing result.

[0110] For the scaling of the target image in the drawing result, specifically, the annotation device can respond to the scaling operation triggered on the drawing result, and use the current position coordinates of the adjustment tool in the canvas coordinate system as the scaling center. Then, calculate the fourth offset between the scaling center and the coordinates of any vertex of the original canvas. Then, multiply the difference between the fourth offset and the third offset by the scaling factor corresponding to the scaling operation to obtain a second multiplication result. After that, determine the third position coordinates of the scaling result of the target image in the drawing result in the canvas coordinate system according to the difference between the fourth offset and the second multiplication result.

[0111] The fourth offset may be represented by (left4, top4). Optionally, any vertex may be the upper left corner of the zoom center and the original canvas. Then the fourth offset may include the horizontal offset of the coordinates of the zoom center and the upper left corner of the original canvas, l eft4, and the vertical offset of the coordinates of the zoom center and the upper left corner of the original canvas, top4.

[0112] For the scaling of the drawing trace in the drawing result, specifically, the annotation device can determine the fourth position coordinate of the scaling result of the drawing trace in the drawing result in the canvas coordinate system according to the position coordinate of the drawing trace mapped to the original picture, the size of the scaling result, the size of the original picture, and the third position coordinate. The process of determining the position coordinate of the drawing trace mapped to the original picture can be referred to. Fig.10 Description of the illustrated embodiment.

[0113] Finally, according to the third position coordinates and the fourth position coordinates, the annotation device can overlay and render the scaling result of the drawing trace on the scaling result of the target image to obtain the scaled drawing result, that is, to complete the scaling of the drawing result. Fig.11 Understand. Fig.11 As shown, the zoom center indicates the position of the five-pointed star.

[0114] The determination process of the third position coordinates can also be obtained by executing the following code:

[0115] a3=l eft4-(l eft4-l eft3)*do ll yScale

[0116] b3=top4-(top4-top3)*do l lySca le

[0117] Wherein, (a3, b3) represents the third position coordinates, and do l lySca le represents the scaling factor.

[0118] Optionally, do l lySca le may be greater than 1 or less than 1. If do l lySca le is greater than 1, it can be determined that a zoom-in operation is performed on the target image. If do l lySca le is less than 1, it can be determined that a zoom-out operation is performed on the target image. Regarding the determination of the fourth position coordinate, specifically, the annotation device may perform a division operation on the position coordinate of the drawing trace mapped to the original image and the size of the original image to obtain a third division result. Then, the third division result is multiplied by the size of the scaling result to obtain a third multiplication result. Then, the third multiplication result is added to the third position coordinate to obtain the fourth position coordinate.

[0119] The process of determining the fourth position coordinates can be implemented by executing the following code:

[0120] a4=X / imageInfo.naturalSize.width*displaywidth+a3;

[0121] b4=Y / imageInfo.naturalSize.height*displayheight+b3;

[0122] Wherein, (a4, b4) represents the fourth position coordinate. displaywidth is the width of the target image's scaling result, and displayheight is the height of the target image's scaling result. (displaywidth, displayheight) represents the size of the target image's scaling result.

[0123] In this embodiment, by using the adjustment tool to perform a scaling operation on the target image and the drawing trace in the drawing result, the scaled drawing result can be better displayed on the operation area of ​​the target page.

[0124] The following will describe in detail one or more embodiments of the image annotation device of the present invention. Those skilled in the art will appreciate that these image annotation devices can be configured using commercially available hardware components through the steps taught in this solution.

[0125] Fig.12 A schematic diagram of the structure of a picture annotation device provided by an embodiment of the present invention is shown in FIG. Fig.12 As shown, the device comprises:

[0126] The first rendering module 11 is used for rendering a first canvas having a first drawing trace in response to a first drawing operation on a first area in an original canvas, so as to obtain a first drawing result that is displayed by superimposing the first canvas on a target image.

[0127] The second rendering module 12 is used for rendering a second canvas having the first drawing trace and the second drawing trace in response to a second drawing operation on a second area in the first canvas, so as to obtain a second drawing result that is displayed on the target image by superimposing the second canvas.

[0128] The canvas and the target image are superimposed and displayed on the target page in the drawing state; the first area and the second area at least partially overlap, the transparency of any drawing trace is 1, and the canvas has a preset transparency less than 1. The target page includes a function area and an operation area, the function area includes a plurality of page state selection components, and the operation area is used to superimpose and display the canvas and the target image.

[0129] Optionally, the first rendering module 11 is used to obtain a first coordinate set of the action position of the first drawing operation in the page coordinate system in response to the first drawing operation; perform a coordinate system transformation on the first coordinate set according to the embedded relationship between the target page and the operation area to obtain a second coordinate set of the action position in the canvas coordinate system; and render the first canvas according to the second coordinate set.

[0130] Optionally, the first rendering module 11 is used to determine a first offset between the vertex coordinates according to vertex coordinates of target vertices of the operation area and the target page in the same direction; and convert the first coordinate set into the second coordinate set according to the first offset.

[0131] Optionally, the second rendering module 12 is used to obtain a third coordinate set of the action position of the second drawing operation in the page coordinate system in response to the second drawing operation; perform a coordinate system transformation on the third coordinate set according to the embedded relationship between the target page and the operation area to obtain a fourth coordinate set of the action position in the canvas coordinate system; and render the second canvas according to the fourth coordinate set.

[0132] Optionally, the first rendering module 11 is further configured to group the second coordinate set; draw on the original canvas in sequence according to the grouping results; and determine a canvas having drawing traces corresponding to different grouping results as the first canvas.

[0133] Optionally, the device also includes: a determination module 13, which is used to determine whether the third area completely overlaps with the drawn area in response to a third drawing operation generated on a third area in the canvas, and the drawn area includes the first area and / or the second area; if the third area completely overlaps with the drawn area, it is determined that the third drawing trace corresponding to the third area is invalid.

[0134] Optionally, the device also includes: an erasing module 14, which is used to respond to an erasing operation on the drawn area in the second canvas, obtain a fifth coordinate set of the effective position of the erasing operation in the page coordinate system, and the fifth coordinate set is a subset of the second coordinate set and the fourth coordinate set; determine a sixth coordinate point set of the erasing operation in the canvas coordinate system according to the fifth coordinate set; and erase the second drawing result according to the sixth coordinate set.

[0135] Optionally, the size of the target image is smaller than the size of the canvas. Based on this, the erasing module 14 is also used to erase the drawing traces on other areas outside the target area of ​​the canvas if the second drawing operation is performed on the other areas. The target area is the area where the target image and the canvas are superimposed and displayed.

[0136] Optionally, the device further includes: an undo module 15, configured to undo the second drawing trace in response to an undo operation generated on the second area; redraw the first drawing trace according to the start index and the end index corresponding to each of the different groups in the grouping result; and render a third canvas having the first drawing trace to obtain a third drawing result in which the third canvas is superimposed and displayed on the target image.

[0137] Optionally, the device further includes: an adjustment module 16, configured to obtain, in response to the movement of the adjustment tool, the position coordinates of the adjustment tool in the page coordinate system before and after the movement, the position of the drawing result in the target page moves with the movement of the adjustment tool, the drawing result is the first drawing result or the second drawing result, and the drawing result includes a drawing trace; determine the first position coordinates of the moving result of the target image in the drawing result in the canvas coordinate system according to the second offset between the position coordinates of the adjustment tool before and after the movement; determine the drawing trace according to the second coordinate set, the third offset, and the respective sizes of the target image and the original image. The drawing trace is mapped to the position coordinates in the original picture, and the third offset is the difference between the vertex coordinates of the target vertices of the target picture and the canvas in the same direction; according to the position coordinates of the drawing trace mapped to the original picture, the respective sizes of the target picture and the original picture, and the first position coordinates, the second position coordinates of the movement result of the drawing trace in the drawing result in the canvas coordinate system are determined, and the size of the target picture is the adjustment result of the size of the original picture; according to the first position coordinates and the second position coordinates, the movement result of the drawing trace is superimposed and rendered on the movement result of the target picture to obtain the drawing result after the movement.

[0138] Optionally, the adjustment module 16 is further used to, in response to a zoom operation triggered on the drawing result, use the current position coordinates of the adjustment tool in the canvas coordinate system as the zoom center; determine the third position coordinates of the zoom result of the target image in the drawing result in the canvas coordinate system according to a fourth offset between the zoom center and any vertex coordinate of the original canvas, the third offset, and the zoom coefficient corresponding to the zoom operation; determine the fourth position coordinates of the zoom result of the drawing trace in the drawing result in the canvas coordinate system according to the position coordinates of the drawing trace mapped to the original image, the size of the zoom result, the size of the original image, and the third position coordinates; and overlay and render the zoom result of the drawing trace on the zoom result of the target image according to the third position coordinates and the fourth position coordinates to obtain a zoomed drawing result.

[0139] Fig.12 The device shown can perform Figures 1 to 11 For the method of the embodiment shown in the figure, the part not described in detail in this embodiment can be referred to Figures 1 to 11 The implementation process and technical effects of this technical solution refer to Figures 1 to 11 The description in the illustrated embodiment will not be repeated here.

[0140] In a possible design, the structure of the image annotation device can be implemented as an electronic device, such as Fig.13 As shown, the electronic device may include: a processor 21 and a memory 22. The memory 22 is used to store the electronic device to perform the above Figures 1 to 11 The program of the picture annotation method provided in the illustrated embodiment, the processor 21 is configured to execute the program stored in the memory 22 .

[0141] The program includes one or more computer instructions, wherein the one or more computer instructions can implement the following steps when executed by the processor 21:

[0142] In response to a first drawing operation generated on a first area in the original canvas, rendering a first canvas having a first drawing trace to obtain a first drawing result that is displayed by superimposing the first canvas on a target image;

[0143] In response to a second drawing operation generated on a second area in the first canvas, rendering a second canvas having the first drawing trace and the second drawing trace to obtain a second drawing result that is displayed on the target image by superimposing the second canvas;

[0144] The canvas and the target image are superimposed and displayed on the target page in the drawing state; the first area and the second area at least partially overlap, the transparency of any drawing trace is 1, and the canvas has a preset transparency less than 1.

[0145] Optionally, the processor 21 is further configured to execute the aforementioned Figures 1 to 11 All or part of the steps in the illustrated embodiments.

[0146] The structure of the electronic device may further include a communication interface 23 for the electronic device to communicate with other devices or a communication network.

[0147] In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the above electronic device, which includes instructions for executing the above Figures 1 to 11 The procedures involved in the picture annotation method shown.

[0148] In addition, an embodiment of the present invention provides a computer program product. The computer program product includes a computer program or an instruction. When the computer program or the instruction is executed by a processor, the processor is enabled to implement the above Figures 1 to 11 The steps or functions of the method shown.

[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention 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 make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for image annotation, It is characterized in that include: In response to a first drawing operation generated on a first area in the original canvas, rendering a first canvas having a first drawing trace to obtain a first drawing result that is displayed by superimposing the first canvas on a target image; In response to a second drawing operation generated on a second area in the first canvas, rendering a second canvas having the first drawing trace and the second drawing trace to obtain a second drawing result that is displayed on the target image by superimposing the second canvas; The canvas and the target image are superimposed and displayed on the target page in the drawing state; the first area and the second area at least partially overlap, the transparency of any drawing trace is 1, and the canvas has a preset transparency less than 1.

2. The method according to claim 1, It is characterized in that The target page includes a function area and an operation area. The function area includes a plurality of page state selection components. The operation area is used to overlay and display the canvas and the target image.

3. The method according to claim 2, It is characterized in that The step of rendering a first canvas having a first drawing trace in response to a first drawing operation generated by a drawing tool on a first area in the original canvas comprises: In response to the first drawing operation, obtaining a first coordinate set of an action position of the first drawing operation in a page coordinate system; According to the embedded relationship between the target page and the operation area, the first coordinate set is converted into a coordinate system to obtain a second coordinate set of the action position in the canvas coordinate system; Rendering the first canvas according to the second coordinate set.

4. The method according to claim 3, It is characterized in that The performing coordinate system conversion on the first coordinate set according to the embedded relationship between the target page and the operation area to obtain a second coordinate set of the action position in the canvas coordinate system includes: Determine a first offset between the vertex coordinates according to vertex coordinates of target vertices of the operation area and the target page in the same direction; The first set of coordinates is converted into the second set of coordinates according to the first offset.

5. The method according to claim 3, It is characterized in that In response to a second drawing operation generated on a second area in the original canvas, rendering a second canvas having the first drawing trace and the second drawing trace comprises: In response to the second drawing operation, obtaining a third coordinate set of an action position of the second drawing operation in a page coordinate system; According to the embedded relationship between the target page and the operation area, the third coordinate set is converted into a coordinate system to obtain a fourth coordinate set of the action position in the canvas coordinate system; The second canvas is rendered according to the fourth coordinate set.

6. The method according to claim 3, It is characterized in that The rendering of the first canvas according to the second coordinate set includes: grouping the second coordinate set; Drawing on the original canvas in sequence according to the grouping results; The canvas having drawing traces corresponding to different grouping results is determined as the first canvas.

7. The method according to claim 5, It is characterized in that The method further comprises: In response to a third drawing operation generated on a third area in the canvas, determining whether the third area completely overlaps with the drawn area or whether the third area is included in the drawn area, the drawn area including the first area and / or the second area; If the third area completely overlaps with the drawn area or the third area is included in the drawn area, it is determined that the third drawing trace corresponding to the third area is invalid.

8. The method according to claim 7, It is characterized in that The method further comprises: In response to an erase operation on the drawn area in the second canvas, obtaining a fifth coordinate set of an action position of the erase operation in the page coordinate system, wherein the fifth coordinate set is a subset of the second coordinate set and the fourth coordinate set; Determine, according to the fifth coordinate set, a sixth coordinate point set of the erasing operation in the canvas coordinate system; The second drawing result is erased according to the sixth coordinate set.

9. The method according to claim 7, It is characterized in that The size of the target image is smaller than the size of the canvas, and the method further includes: If the second drawing operation is performed in other areas of the canvas other than the target area, an erasing operation is performed on the drawing traces in the other areas, and the target area is the area where the target image and the canvas are superimposed and displayed.

10. The method according to claim 6, It is characterized in that The method further comprises: In response to an undo operation generated on the second area, undoing the second drawing trace; redrawing the first drawing trace according to the start index and the end index corresponding to each of the different groups in the grouping result; The third canvas having the first drawing trace is rendered to obtain a third drawing result that is displayed by superimposing the third canvas on the target image.

11. The method according to claim 4, It is characterized in that The method further comprises: In response to the movement of the adjustment tool, the position coordinates of the adjustment tool in the page coordinate system before and after the movement are acquired, and the position of the drawing result in the target page moves with the movement of the adjustment tool, the drawing result is the first drawing result or the second drawing result, and the drawing result includes a drawing trace; Determining, according to a second offset between the position coordinates of the adjustment tool before and after the movement, a first position coordinate of a movement result of the target image in the drawing result in the canvas coordinate system; Determine the position coordinates of the drawing trace mapped to the original image according to the second coordinate set, a third offset, and the sizes of the target image and the original image, wherein the third offset is the difference between the vertex coordinates of the target vertices of the target image and the canvas in the same direction; Determine, according to the position coordinates of the drawing trace mapped to the original picture, the sizes of the target picture and the original picture, and the first position coordinates, a second position coordinate of a movement result of the drawing trace in the drawing result in the canvas coordinate system, wherein the size of the target picture is the adjustment result of the size of the original picture; According to the first position coordinates and the second position coordinates, the movement result of the drawing trace is superimposed and rendered on the movement result of the target image to obtain a drawing result after the movement.

12. The method according to claim 11, It is characterized in that The method further comprises: In response to a zoom operation triggered on the drawing result, taking the current position coordinates of the adjustment tool in the canvas coordinate system as a zoom center; Determine, according to a fourth offset between the scaling center and any vertex coordinate of the original canvas, the third offset, and a scaling coefficient corresponding to the scaling operation, a third position coordinate of a scaling result of the target image in the drawing result in the canvas coordinate system; Determine a fourth position coordinate of a scaling result of the drawing trace in the drawing result in the canvas coordinate system according to the position coordinate of the drawing trace mapped to the original picture, the size of the scaling result, the size of the original picture, and the third position coordinate; According to the third position coordinates and the fourth position coordinates, the scaling result of the drawing trace is overlaid and rendered on the scaling result of the target image to obtain a scaled drawing result.

13. A picture annotation device, It is characterized in that include: A first rendering module, configured to render a first canvas having a first drawing trace in response to a first drawing operation on a first area in an original canvas, so as to obtain a first drawing result in which the first canvas is superimposed and displayed on a target image; A second rendering module is configured to render a second canvas having the first drawing trace and the second drawing trace in response to a second drawing operation on a second area in the first canvas, so as to obtain a second drawing result displayed by superimposing the second canvas on the target image; The canvas and the target image are superimposed and displayed on the target page in the drawing state; the first area and the second area at least partially overlap, the transparency of any drawing trace is 1, and the canvas has a preset transparency less than 1.

14. An electronic device, It is characterized in that include: A memory and a processor; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the image labeling method according to any one of claims 1 to 12.

15. A non-transitory machine-readable storage medium, It is characterized in that The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the image tagging method according to any one of claims 1 to 12.