Method for determining shared contours of adjacent objects in a picture, method for marking contours, and device for marking contours

By obtaining and determining the position information of the annotation points in the image and intercepting the shared contour fragments, the problem of adjacent object contours not being able to fit closely together is solved, and the accuracy and efficiency of contour annotation are improved.

CN114821107BActive Publication Date: 2025-09-12BEIJING SHENDU SOUSUO TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210497180.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-09
Publication Date
2025-09-12
Estimated Expiration
2042-05-09

AI Technical Summary

Technical Problem

In the existing technology of image semantic segmentation and annotation, the contours of adjacent objects cannot be kept closely together. Conventional methods are complex and the processing effect is not ideal, resulting in a decrease in the accuracy of contour annotation.

Method used

By obtaining the position information of the first and second annotation points in the annotated contour, it is determined whether they belong to the same annotated contour or the same annotation point, and the contour fragment is intercepted as the shared contour when the conditions are met, so as to achieve close fitting of the contours of adjacent objects.

Benefits of technology

The close fit of the contour annotations of adjacent objects in the image is achieved, which improves the accuracy and efficiency of contour annotation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114821107B_ABST
    Figure CN114821107B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for determining shared contours of adjacent objects in an image, a method for annotating contours, and an apparatus. The method for determining shared contours of adjacent objects includes obtaining position information of a first annotation point and a second annotation point in an already annotated contour, intercepting a contour segment from the already annotated contour as a shared contour with a contour to be annotated currently, so as to keep the contour annotations of adjacent objects in the image closely aligned through contour sharing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to a method for determining shared contours of adjacent objects in an image, a method for annotating contours, and a device. Background Art

[0002] When segmenting and annotating image semantics, the contours of all objects in the image need to be marked, and adjacent contours must be kept tightly together. Conventional annotation tools require users to manually mark object contours, but the contours of adjacent objects obtained by this method cannot meet the requirement of tight fit. Using a polygonal clipping algorithm to generate the contours of adjacent objects can make the contours of adjacent objects fit together to a certain extent, but the algorithm is complex and the processing effect on complex contours is not ideal, resulting in a visually difficult-to-detect spur effect, affecting the accuracy of contour annotation. Summary of the Invention

[0003] In view of this, the present disclosure proposes a method for determining shared contours of adjacent objects in an image, a method and apparatus for labeling contours, which can keep the contour labels of adjacent objects in the image closely aligned.

[0004] According to a first aspect of the present disclosure, a method for determining a shared contour of adjacent objects in a picture is provided, comprising:

[0005] Obtaining position information of a first marking point and position information of a second marking point from a marked contour of the image; wherein the marked contour is an adjacent contour to the contour currently to be marked;

[0006] According to the position information of the first marking point and the position information of the second marking point, a contour segment is intercepted from the marked contour as a shared contour with the contour to be currently marked.

[0007] In a possible implementation, after obtaining the position information of the first annotation point and the position information of the second annotation point from the annotated contour of the image, the method includes:

[0008] determining, based on the position information of the first marked point and the position information of the second marked point, whether the first marked point and the second marked point belong to the same marked contour;

[0009] When it is determined that the first marking point and the second marking point belong to the same marked contour, a step of cutting out a contour segment from the marked contour as a shared contour with the contour to be marked is performed based on the position information of the first marking point and the position information of the second marking point.

[0010] In a possible implementation, a unique contour identifier is provided for each marked contour mark;

[0011] When determining, based on the position information of the first marked point and the position information of the second marked point, whether the first marked point and the second marked point belong to the same marked contour, the method includes:

[0012] Determining, based on the position information of the first marked point, a first contour identifier of the marked contour where the first marked point is located;

[0013] Determining, based on the position information of the second marked point, a second contour identifier of the marked contour where the second marked point is located;

[0014] Based on the first contour identifier and the second contour identifier, it is determined whether the first marked point and the second marked point are marked points on the same marked contour.

[0015] In a possible implementation, when it is determined that the first annotation point and the second annotation point do not belong to the same annotated contour, the second annotation point is used as the first annotation point, and the step of obtaining the position information of the second annotation point from the annotated contour of the image is returned to be executed.

[0016] In a possible implementation, after obtaining the position information of the first annotation point and the position information of the second annotation point from the annotated contour of the image, the method further includes:

[0017] determining, based on the position information of the first marking point and the position information of the second marking point, whether the first marking point and the second marking point are the same marking point;

[0018] When it is determined that the first marking point and the second marking point do not belong to the same marking point, a step of cutting out a contour segment from the marked contour as a shared contour with the contour currently to be marked is performed based on the position information of the first marking point and the position information of the second marking point.

[0019] In a possible implementation, when it is determined that the first annotation point and the second annotation point are the same annotation point, the process returns to the step of obtaining the position information of the second annotation point from the annotated contour of the image.

[0020] In a possible implementation, when extracting a contour segment from the marked contour as a shared contour with the contour currently to be marked based on the position information of the first marked point and the position information of the second marked point, the method includes:

[0021] Determining first index information of the first marked point in the marked contour according to the position information of the first marked point;

[0022] Determining second index information of the second marked point in the marked contour according to the position information of the second marked point;

[0023] Determining a set of annotation points for extracting a contour segment based on the first index information and the second index information;

[0024] Based on the set of annotation points of the clipped contour segment, a contour segment is clipped from the already-annotated contour as a shared contour with the contour currently to be annotated.

[0025] According to a second aspect of the present disclosure, a method for labeling contours of adjacent objects in a picture is provided, comprising:

[0026] Obtain the position information of the first marking point of the object to be marked;

[0027] Based on the position information of the first marked point, determining whether the first marked point is located on a marked outline of an adjacent object;

[0028] When it is determined that the first marking point is located in the outline marking, obtaining position information of a second marking point of the object to be marked;

[0029] Based on the position information of the second marked point, determining whether the second marked point is located on a marked contour of an adjacent object;

[0030] When it is determined that the second annotation point is located in the contour annotation, the method for determining the shared contour is executed, a contour segment is intercepted from the annotated contour as a shared contour with the annotated contour of the object to be annotated, and the contour of the object to be annotated is annotated based on the shared contour.

[0031] According to a third aspect of the present disclosure, a device for determining a shared contour of adjacent objects in a picture is provided, comprising:

[0032] A shared contour starting position acquisition module is used to acquire the position information of the first annotation point and the position information of the second annotation point from the annotated contour of the image; wherein the annotated contour is an adjacent contour to the contour currently to be annotated;

[0033] The shared contour construction module is configured to extract a contour segment from the marked contour as a shared contour with the contour currently to be marked according to the position information of the first marked point and the position information of the second marked point.

[0034] According to a fourth aspect of the present disclosure, a device for labeling contours of adjacent objects in a picture is provided, comprising:

[0035] A first position acquisition module is used to obtain the position information of the first marking point of the object to be marked;

[0036] a first determining module, configured to determine, based on the position information of the first marked point, whether the first marked point is located on a marked outline of an adjacent object;

[0037] A second position acquisition module is used to acquire position information of a second annotation point of the object to be annotated when it is determined that the first annotation point is located in the contour annotation;

[0038] a second determining module, configured to determine, based on the position information of the second marked point, whether the second marked point is located on a marked outline of an adjacent object;

[0039] The contour annotation module is used to execute the shared contour determination method described in any one of the first aspects of the present disclosure when it is determined that the second annotation point is located in the contour annotation, extract a contour segment from the annotated contour as a shared contour with the annotated contour of the object to be annotated, and annotate the contour of the object to be annotated based on the shared contour.

[0040] In the present disclosure, by obtaining the position information of the first annotation point and the position information of the second annotation point in the already-annotated contour, a contour segment is intercepted from the already-annotated contour as a shared contour with the contour currently to be annotated, so that the contour annotations of adjacent objects in the image are kept closely fitted through contour sharing.

[0041] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.

[0043] Figure 1 A schematic flowchart illustrating a method for determining a shared contour of adjacent objects in a picture according to an embodiment of the present disclosure is shown;

[0044] Figure 2 A schematic flowchart illustrating a method for labeling contours of adjacent objects in a picture according to an embodiment of the present disclosure is shown;

[0045] Figure 3 A schematic block diagram illustrating an apparatus for determining a shared contour of adjacent objects in a picture according to an embodiment of the present disclosure is shown;

[0046] Figure 4 A schematic block diagram illustrating an apparatus for labeling contours of adjacent objects in a picture according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0047] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.

[0048] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0049] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.

[0050] <Determination Method Example>

[0051] Figure 1 FIG. 1 is a schematic flow chart illustrating a method for determining shared contours of adjacent objects in a picture according to an embodiment of the present disclosure. Figure 1 As shown, the method for determining the shared contour includes steps S1100 - S1200 .

[0052] S1100: Obtain position information of a first marking point and position information of a second marking point from a marked contour of an image, wherein the marked contour is a contour adjacent to the contour to be marked.

[0053] Before semantic segmentation of an image, the outlines of all objects in the image need to be marked. After the outline of an object is marked, the marked outline of the object is displayed in the image and the outline information of the marked outline is stored.

[0054] The marked outline may be a polygon, a quadrilateral, or a triangle, which is not specifically limited here.

[0055] The contour information includes at least one of a contour identifier, index information of each vertex, and position information of each vertex. The contour identifier is used to uniquely identify a marked contour, so that the marked contour can be distinguished by the contour identifier. The index information of each vertex is used to identify the connection order of each vertex. The index information can be a number or other identifier that can identify the connection order, which is not specifically limited here. In an achievable method of sequentially generating and connecting 8 vertices to obtain a marked contour, the index information of the 8 vertices generated in sequence can be recorded as 1, 2, 3, 4, 5, 6, 7, and 8 respectively. The position information of each vertex is used to identify the position of each vertex in the image. The position information can be represented by the pixel coordinates of each vertex in the image.

[0056] If the outlines of two objects in the image overlap, the two objects are considered adjacent objects. The number of adjacent objects to be labeled in the image can be one or more, and is not specifically limited here.

[0057] In a possible implementation, there is one adjacent object to the object to be annotated in the picture, and a contour annotation of the adjacent object has been generated.

[0058] In this implementation, when generating the outline of the overlap between the current object to be annotated and the adjacent object, the user can click on the adjacent object's already annotated outline to select the vertex at the starting point of the overlapping outline as the first annotation point, and the vertex at the ending point of the overlapping outline as the second annotation point. In this way, the position information of the first and second annotation points can be obtained from the adjacent object's already annotated outline based on the user's click operation.

[0059] In another possible implementation, there are at least two adjacent objects to the object to be annotated in the picture, and contour annotations of the at least two adjacent objects have been generated.

[0060] In this implementation, when generating the outline of the overlap between the currently annotated object A and one of the adjacent objects B, the user can click to select the vertex at the starting point of the outline that overlaps with the currently annotated object A on the annotated contour of adjacent object B as the first annotation point, and the vertex at the end point of the overlapping contour as the second annotation point. However, if the selected second annotation point is close to a vertex on the annotated contour of adjacent object C, the selected second annotation point may fall on a vertex of the annotated contour of adjacent object C. In this case, since the first and second annotation points are no longer on the same annotated contour, it is impossible to extract a contour segment from the annotated contour of adjacent object B that can serve as the shared contour.

[0061] To avoid the above-mentioned problem, in one possible implementation, after obtaining the position information of the first and second annotation points from the already annotated contour of the image according to the user's selection, the method further includes determining whether the first and second annotation points belong to the same annotated contour based on the position information of the first and second annotation points. If it is determined that the first and second annotation points belong to the same annotated contour, the method further includes extracting a contour segment from the already annotated contour based on the position information of the first and second annotation points as a shared contour with the contour to be annotated.

[0062] In one possible implementation, a unique contour identifier is set for each marked contour mark. Therefore, when determining whether the first marked point and the second marked point belong to the same marked contour based on the position information of the first marked point and the position information of the second marked point, steps S1110-S1130 are also included.

[0063] S1110 : Determine a first contour identifier of the marked contour where the first marked point is located based on position information of the first marked point.

[0064] In one possible implementation, the contour identifier of each marked contour in the image and the position information of each vertex on the contour are stored in the form of a mapping relationship table. In this way, after obtaining the position information of the first marked point, the first contour identifier of the marked contour where the first marked point is located can be determined by querying the mapping relationship table.

[0065] S1120: Based on the position information of the second marked point, determine a second contour identifier of the marked contour where the second marked point is located. The steps for determining the second contour identifier are the same as those for determining the first contour identifier, and are not described in detail here.

[0066] S1130: Determine whether the first and second marked points are marked points on the same marked contour based on the first and second contour identifiers. Specifically, if the first and second contour identifiers are consistent, it can be determined that the first and second marked points belong to the same marked contour.

[0067] In one possible implementation, when it is determined that the first annotation point and the second annotation point do not belong to the same annotated contour, the second annotation point is used as the first annotation point, and the process returns to the step of obtaining the position information of the second annotation point from the annotated contour of the image.

[0068] For example, if the first annotation point is P0 and the second annotation point is P1, and it is determined that the first annotation point P0 and the second annotation point P1 do not belong to the same annotated contour, the location information of the first annotation point P0 will be deleted, and the location information of the second annotation point P1 will be set as the location information of the first annotation point. At the same time, the user will be prompted to reselect the second annotation point. If the user reselects the second annotation point, the location information of the second annotation point is obtained from the annotated contour of the image. The steps performed after obtaining the location information of the second annotation point are the same as above and will not be repeated here.

[0069] In one possible implementation, when the positions of the first annotation point and the second annotation point selected by the user are close, the position information of the first annotation point obtained may be consistent with the position information of the second annotation point, that is, the first annotation point and the second annotation point are the same annotation point. At this time, it is impossible to extract a contour segment that can be used as a shared contour from the annotated contours of the adjacent objects.

[0070] In order to avoid the occurrence of the above-mentioned problems, in a possible implementation method, after obtaining the position information of the first annotation point and the position information of the second annotation point from the annotated contour of the image, it also includes determining whether the first annotation point and the second annotation point belong to the same annotation point based on the position information of the first annotation point and the second annotation point; when it is determined that the first annotation point and the second annotation point do not belong to the same annotation point, executing the step of cutting out a contour segment from the annotated contour based on the position information of the first annotation point and the position information of the second annotation point as a shared contour with the contour to be currently annotated.

[0071] In one possible implementation, if it is determined that the first and second annotation points are the same, the process returns to the step of obtaining the position information of the second annotation point from the annotated outline of the image. Specifically, if it is determined that the first and second annotation points are the same, the position information of the second annotation point is deleted, and the user is prompted to reselect the second annotation point. If the user reselects the second annotation point, the position information of the second annotation point is re-obtained from the annotated outline of the image. The steps performed after obtaining the position information of the second annotation point are the same as those described above and are not further described here.

[0072] It should be noted that in the present disclosure, after obtaining the position information of the first annotation point and the position information of the second annotation point from the annotated contour of the image, it is possible to first determine whether the first annotation point and the second annotation point belong to the same annotated contour, and then determine whether the first annotation point and the second annotation point belong to the same annotation point. Alternatively, it is possible to first determine whether they belong to the same annotation point, and then determine whether they belong to the same annotated contour. No specific limitation is made here.

[0073] S1200: Extracting a contour segment from the marked contour according to the position information of the first marking point and the position information of the second marking point as a shared contour with the contour to be marked currently.

[0074] In a possible implementation, step S1200 specifically includes steps S1210 - S1240 .

[0075] S1210: Determine first index information of the first marked point in the marked contour according to position information of the first marked point.

[0076] In one possible implementation, the position information and index information of each vertex in the contour information are stored in the form of a mapping relationship table. In this way, after obtaining the position information of the first annotation point, the first index information of the first annotation point in the annotated contour can be determined by querying the mapping relationship table.

[0077] S1220: Determine second index information of the second marked point in the marked contour based on the position information of the second marked point. The step of determining the second index information is similar to S1210 and will not be repeated here.

[0078] S1230: Determine a set of annotation points for extracting the contour segment based on the first index information and the second index information. Specifically, a minimum vertex set between the first annotation point and the second annotation point may be determined based on the first index information and the second index information. The minimum vertex set is the set of annotation points for extracting the contour segment.

[0079] For example, the annotated contour of object A consists of eight sequentially connected vertices, whose indexes are 1, 2, 3, 4, 5, 6, 7, and 8, respectively. If the first index of the first annotated point is 4 and the second index of the second annotated point is 6, it can be determined that there are two sets of vertices between the first index 4 and the second index 6: one set of vertices with indexes 4, 5, and 6, and the other set of vertices with indexes 6, 7, 8, and 1, 2, 3, and 4. In this case, the set of vertices with the smallest number of vertices, namely the set of vertices with indexes 4, 5, and 6, is used as the annotated point set for extracting the contour segment.

[0080] S1240: Based on the set of annotation points of the clipped contour segment, a contour segment clipped from the already-annotated contour is used as a shared contour with the contour currently to be annotated. Specifically, after determining the set of annotation points of the clipped contour segment, the contour segment corresponding to the set of annotation points of the clipped contour segment is used as a shared contour with the contour currently to be annotated.

[0081] In the present disclosure, by obtaining the position information of the first annotation point and the position information of the second annotation point in the already-annotated contour, a contour segment is intercepted from the already-annotated contour as a shared contour with the contour currently to be annotated, so that the contour annotations of adjacent objects in the image are kept closely fitted through contour sharing.

[0082] <Method Example>

[0083] This embodiment shows an example of a method for determining a shared contour of adjacent objects in a picture. In this example, the method for determining a shared contour includes the following steps.

[0084] First, the position information of the first annotation point P0 and the position information of the second annotation point are obtained from the annotated contour of the image, wherein the annotated contour is an adjacent contour to the contour to be annotated.

[0085] Second, determine whether the first marked point and the second marked point belong to the same marked contour based on the position information of the first marked point and the position information of the second marked point:

[0086] When it is determined that the first marked point and the second marked point belong to the same marked contour, executing step 3;

[0087] When it is determined that the first marked point and the second marked point do not belong to the same marked contour, the second marked point is used as the first marked point, and the process returns to the step of obtaining the position information of the second marked point from the marked contour of the image.

[0088] Third, determine whether the first marking point and the second marking point are the same marking point based on the position information of the first marking point and the position information of the second marking point:

[0089] When it is determined that the first marking point and the second marking point are not the same marking point, executing step 4;

[0090] When it is determined that the first marking point and the second marking point are the same marking point, the process returns to the step of obtaining the position information of the second marking point from the marked contour of the image.

[0091] Fourth, a contour segment is intercepted from the marked contour according to the position information of the first marking point and the position information of the second marking point as a shared contour with the contour to be marked currently.

[0092] <Marking Method Example>

[0093] Figure 2 FIG. 1 is a schematic flow chart illustrating a method for labeling the contours of adjacent objects in a picture according to an embodiment of the present disclosure. Figure 2 As shown, the method for labeling the contours of adjacent objects includes steps S2100-S2500.

[0094] S2100: Obtain position information of the first marking point of the object to be marked.

[0095] Specifically, when annotating the outline of an object to be annotated, the user can select a vertex of the outline of the object to be annotated in the image by clicking. After detecting the user's click operation, the obtained user's click position can be used as the position information of the first annotation point of the object to be annotated.

[0096] S2200: Based on the position information of the first annotation point, determine whether the first annotation point is located on the annotated contour of the adjacent object.

[0097] Specifically, after obtaining the position information of the first annotation point, the position information of the first annotation point may be matched with the position information of each vertex of the annotated contour to determine whether the first annotation point is located on the annotated contour of the adjacent object.

[0098] When the position information of the first marked point matches the position information of any vertex in the marked contour, it is determined that the first marked point is located on the marked contour of the adjacent object, and step S2300 is executed.

[0099] When the position information of the first annotation point does not match the position information of any vertex in the annotated contour, it is determined that the first annotation point does not belong to the annotated contour of the adjacent object. In this case, a vertex in the contour annotation is directly generated based on the position information of the first annotation point.

[0100] S2300: When it is determined that the first annotation point is located in the already marked contour, obtain the position information of the second annotation point of the object to be annotated. Specifically, the position information of the second annotation point can be obtained by referring to the step of obtaining the position information of the first annotation point, which will not be repeated here.

[0101] S2400: Based on the position information of the second annotation point, determine whether the second annotation point is located on the annotated contour of the adjacent object. Specifically, refer to step S2200 to determine whether the second annotation point is located on the annotated contour of the adjacent object, which will not be repeated here.

[0102] If the second annotation point is determined to be located in an already marked contour annotation, step S2500 is executed. If the second annotation point is determined not to be located in an already marked contour annotation, two vertices in the contour annotation are directly generated based on the position information of the first annotation point and the position information of the second annotation point.

[0103] S2500, when it is determined that the second annotation point is located in the annotated contour, execute any of the above-mentioned methods for determining the shared contour, extract a contour segment from the annotated contour as a shared contour with the annotated contour of the object to be annotated, and implement annotation of the contour of the object to be annotated based on the shared contour.

[0104] By using the method for labeling the contours of adjacent objects in this embodiment, the contours of the objects to be labeled can be labeled based on the shared contours, so that the contour labels of adjacent objects in the image remain closely aligned.

[0105] <Determination Device Example>

[0106] Figure 3 FIG. 1 is a schematic block diagram showing a device for determining a shared contour of adjacent objects in a picture according to an embodiment of the present disclosure. Figure 3 As shown, the shared profile determination device 100 includes:

[0107] The shared contour starting position acquisition module 110 is configured to acquire the position information of the first and second annotation points from the already-annotated contours of the image; wherein the already-annotated contours are adjacent contours to the contour currently to be annotated.

[0108] The shared contour construction module 120 is configured to extract a contour segment from the marked contour according to the position information of the first marked point and the position information of the second marked point as a shared contour with the contour to be marked currently.

[0109] In a possible implementation, after obtaining the position information of the first annotation point and the position information of the second annotation point from the annotated contour of the image, the shared contour starting position obtaining module 110 is further configured to:

[0110] Determining whether the first marked point and the second marked point belong to the same marked contour according to the position information of the first marked point and the position information of the second marked point;

[0111] When it is determined that the first marking point and the second marking point belong to the same marked contour, a step of extracting a contour segment from the marked contour as a shared contour with the contour to be marked is performed based on the position information of the first marking point and the position information of the second marking point.

[0112] In a possible implementation, a unique contour identifier is provided for each marked contour mark;

[0113] When determining whether the first marked point and the second marked point belong to the same marked contour based on the position information of the first marked point and the position information of the second marked point, the shared contour starting position obtaining module 110 is specifically configured to:

[0114] Determining, based on the position information of the first marked point, a first contour identifier of the marked contour where the first marked point is located;

[0115] Determining, based on the position information of the second marked point, a second contour identifier of the marked contour where the second marked point is located;

[0116] Based on the first contour identifier and the second contour identifier, it is determined whether the first marked point and the second marked point are marked points on the same marked contour.

[0117] In one possible implementation, when the shared contour starting position acquisition module 110 determines that the first annotation point and the second annotation point do not belong to the same annotated contour, the second annotation point is used as the first annotation point, and the process returns to the step of acquiring the position information of the second annotation point from the annotated contour of the image.

[0118] In a possible implementation, after obtaining the position information of the first annotation point and the position information of the second annotation point from the annotated contour of the image, the shared contour starting position obtaining module 110 is further configured to:

[0119] Determining whether the first marking point and the second marking point are the same marking point based on the position information of the first marking point and the position information of the second marking point;

[0120] When it is determined that the first marking point and the second marking point do not belong to the same marking point, a step of cutting out a contour segment from the marked contour as a shared contour with the contour to be marked is performed according to the position information of the first marking point and the position information of the second marking point.

[0121] In a possible implementation, when the shared contour starting position acquisition module 110 determines that the first annotation point and the second annotation point are the same annotation point, it returns to the step of acquiring the position information of the second annotation point from the annotated contour of the image.

[0122] In a possible implementation, when the shared contour construction module 120 extracts a contour segment from the marked contour as a shared contour with the contour to be marked currently according to the position information of the first marked point and the position information of the second marked point, it is specifically configured to:

[0123] Determining first index information of the first marked point in the marked contour according to the position information of the first marked point;

[0124] Determining second index information of the second marked point in the marked contour according to the position information of the second marked point;

[0125] Determining a set of annotation points for extracting a contour segment based on the first index information and the second index information;

[0126] Based on the annotation point set of the intercepted contour fragment, the contour fragment is intercepted from the labeled contour as a shared contour with the contour to be currently labeled.

[0127] <Marking device embodiment>

[0128] Figure 4A schematic block diagram of a device for labeling the contours of adjacent objects in a picture according to an embodiment of the present disclosure is shown. Figure 4 As shown, the adjacent object contour labeling device 200 includes:

[0129] The first position acquisition module 210 is configured to acquire position information of a first annotation point of the object to be annotated.

[0130] The first determination module 220 is configured to determine, based on the position information of the first marked point, whether the first marked point is located on a marked contour of an adjacent object.

[0131] The second position acquisition module 230 is configured to acquire position information of a second annotation point of the object to be annotated when it is determined that the first annotation point is located in the contour annotation.

[0132] The second determining module 240 is configured to determine whether the second marked point is located on a marked contour of an adjacent object based on the position information of the second marked point.

[0133] The contour annotation module 250 is used to execute the shared contour determination method of any one of the first aspects of the present disclosure when it is determined that the second annotation point is located at the contour annotation, extract a contour segment from the annotated contour as a shared contour with the annotated contour of the object to be annotated, and implement the annotation of the contour of the object to be annotated based on the shared contour.

[0134] While various embodiments of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technical improvements to existing technologies, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for determining shared contours of adjacent objects in an image, characterized in that: include: Obtaining position information of a first marking point and position information of a second marking point from a marked contour of the image; wherein the marked contour is an adjacent contour to the contour currently to be marked; intercepting a contour segment from the marked contour according to the position information of the first marking point and the position information of the second marking point as a shared contour with the contour currently to be marked; After the outline of one of the objects is marked, the marked outline of the object is displayed in the image, and the outline information of the marked outline is stored, where the outline information includes the outline identifier, the index information of each vertex, and the position information of each vertex; When generating the outline of the overlapped portion of the current object to be annotated and the adjacent object, the vertex at the starting point of the overlapping outline is selected as the first annotation point on the annotated outline of the adjacent object by clicking, and the vertex at the end point of the overlapping outline is selected as the second annotation point. Then, the position information of the first annotation point and the position information of the second annotation point are obtained from the annotated outline of the adjacent object according to the clicking operation; After obtaining the position information of the first annotation point and the position information of the second annotation point from the annotated contour of the image, the method includes: determining, based on the position information of the first mark point and the position information of the second mark point, whether the first mark point and the second mark point belong to the same marked contour; if it is determined that the first mark point and the second mark point belong to the same marked contour, determining, based on the position information of the first mark point and the position information of the second mark point, whether the first mark point and the second mark point belong to the same marked point; and if it is determined that the first mark point and the second mark point do not belong to the same marked point, executing the step of intercepting a contour segment from the marked contour as a shared contour with the contour currently to be marked, based on the position information of the first mark point and the position information of the second mark point; When determining, based on the position information of the first marked point and the position information of the second marked point, whether the first marked point and the second marked point belong to the same marked contour, the method includes: Determining, based on the position information of the first marked point, a first contour identifier of the marked contour where the first marked point is located; Determining, based on the position information of the second marked point, a second contour identifier of the marked contour where the second marked point is located; Determining, based on the first contour identifier and the second contour identifier, whether the first marked point and the second marked point are marked points on the same marked contour; When extracting a contour segment from the marked contour as a shared contour with the contour currently to be marked according to the position information of the first marking point and the position information of the second marking point, the method includes: Determining first index information of the first marked point in the marked contour according to the position information of the first marked point; Determining second index information of the second marked point in the marked contour according to the position information of the second marked point; Determining a set of annotation points for extracting a contour segment based on the first index information and the second index information; Based on the set of annotation points of the clipped contour segment, a contour segment is clipped from the already-annotated contour as a shared contour with the contour currently to be annotated.

2. A method for labeling the contours of adjacent objects in an image, characterized in that: include: Obtain the position information of the first marking point of the object to be marked; Based on the position information of the first marked point, determining whether the first marked point is located on a marked outline of an adjacent object; When it is determined that the first marking point is located in the outline marking, obtaining position information of a second marking point of the object to be marked; Based on the position information of the second marked point, determining whether the second marked point is located on a marked contour of an adjacent object; When it is determined that the second annotation point is located in the contour annotation, the method for determining the shared contour described in claim 1 is executed, a contour segment is intercepted from the annotated contour as a shared contour with the annotated contour of the object to be annotated, and the contour of the object to be annotated is annotated based on the shared contour.

3. A device for determining shared contours of adjacent objects in a picture, characterized in that: include: A shared contour starting position acquisition module is used to acquire the position information of the first annotation point and the position information of the second annotation point from the annotated contour of the image; wherein the annotated contour is an adjacent contour to the contour currently to be annotated; a shared contour construction module, configured to extract a contour segment from the marked contour as a shared contour with the contour currently to be marked based on the position information of the first marked point and the position information of the second marked point; After the outline of one of the objects is marked, the marked outline of the object is displayed in the image, and the outline information of the marked outline is stored, where the outline information includes the outline identifier, the index information of each vertex, and the position information of each vertex; When generating the outline of the overlapped portion of the current object to be annotated and the adjacent object, the vertex at the starting point of the overlapping outline is selected as the first annotation point on the annotated outline of the adjacent object by clicking, and the vertex at the end point of the overlapping outline is selected as the second annotation point. Then, the position information of the first annotation point and the position information of the second annotation point are obtained from the annotated outline of the adjacent object according to the clicking operation; After obtaining the position information of the first annotation point and the position information of the second annotation point from the annotated contour of the image, the method includes: determining, based on the position information of the first mark point and the position information of the second mark point, whether the first mark point and the second mark point belong to the same marked contour; if it is determined that the first mark point and the second mark point belong to the same marked contour, determining, based on the position information of the first mark point and the position information of the second mark point, whether the first mark point and the second mark point belong to the same marked point; and if it is determined that the first mark point and the second mark point do not belong to the same marked point, executing the step of intercepting a contour segment from the marked contour as a shared contour with the contour currently to be marked, based on the position information of the first mark point and the position information of the second mark point; When determining, based on the position information of the first marked point and the position information of the second marked point, whether the first marked point and the second marked point belong to the same marked contour, the method includes: Determining, based on the position information of the first marked point, a first contour identifier of the marked contour where the first marked point is located; Determining, based on the position information of the second marked point, a second contour identifier of the marked contour where the second marked point is located; Determining, based on the first contour identifier and the second contour identifier, whether the first marked point and the second marked point are marked points on the same marked contour; When extracting a contour segment from the marked contour as a shared contour with the contour currently to be marked according to the position information of the first marking point and the position information of the second marking point, the method includes: Determining first index information of the first marked point in the marked contour according to the position information of the first marked point; Determining second index information of the second marked point in the marked contour according to the position information of the second marked point; Determining a set of annotation points for extracting a contour segment based on the first index information and the second index information; Based on the set of annotation points of the clipped contour segment, a contour segment is clipped from the already-annotated contour as a shared contour with the contour currently to be annotated.

4. A device for labeling the contours of adjacent objects in a picture, characterized in that: include: A first position acquisition module is used to obtain the position information of the first marking point of the object to be marked; a first determining module, configured to determine, based on the position information of the first marked point, whether the first marked point is located on a marked outline of an adjacent object; A second position acquisition module is used to acquire position information of a second annotation point of the object to be annotated when it is determined that the first annotation point is located in the contour annotation; a second determining module, configured to determine, based on the position information of the second marked point, whether the second marked point is located on a marked outline of an adjacent object; A contour annotation module is used to execute the shared contour determination method according to claim 1 when it is determined that the second annotation point is located in the contour annotation, extract a contour segment from the annotated contour as a shared contour with the annotated contour of the object to be annotated, and annotate the contour of the object to be annotated based on the shared contour.

Citation Information

Patent Citations

  • Image annotation method and device

    CN110751663A