Method and system for co-edge calculation of multiple contours in visual sensor data

By using a common-edge computation method, the problem of low contour drawing efficiency in visual sensor data is solved, achieving efficient semantic segmentation and accurate contour fitting, reducing manual review and repeated modifications.

CN115359251BActive Publication Date: 2026-06-16WUHAN KOTEI INFORMATICS

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN KOTEI INFORMATICS
Filing Date
2022-07-05
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In the existing technology, the semantic segmentation process of visual sensor data is extremely inefficient and requires a lot of rework and review because a large number of contours need to be drawn manually and adjacent contours need to be accurately matched.

Method used

By using the common edge calculation method, the coordinates of contour points in each scene in the visual sensor data are obtained, the starting point and ending point of the direction are set, the point path between the starting point and the ending point on the existing contour is calculated, and the path of the currently drawn contour is replaced with it, so as to unify the direction of the contour point set to reduce drawing operations.

🎯Benefits of technology

It significantly improves the rendering efficiency of semantic segmentation, reduces manual review and repetitive modification work, increases productivity, and makes adjacent contours fit more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115359251B_ABST
    Figure CN115359251B_ABST
Patent Text Reader

Abstract

The application provides a method and system for calculating common edges of multiple contours in visual sensor data, which comprises: obtaining contour point coordinates of each scene in visual sensor data, setting a direction for marking contour coordinate data, finding and marking the start point and end point of the common edge of the existing contour and the contour to be drawn according to the direction, calculating the point path between the start point and the end point on the existing contour, and replacing the point path between the start point and the end point in the currently drawn contour with the point path as the common edge point path. The method of the application reduces point line drawing operation, greatly improves the drawing efficiency of semantic segmentation, makes the fitting of adjacent contours more accurate, reduces a large amount of manual review and repeated modification work, and improves productivity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more specifically, to a method and system for calculating the shared edges of multiple contours in visual sensor data. Background Technology

[0002] Semantic segmentation classifies each pixel in an image and is currently widely used in fields such as medical imaging and autonomous driving. The simplest and most common implementation of semantic segmentation currently uses a large number of polygonal contours to segment the entire image, such as roads, buildings, and vehicles. These closely fitted polygonal contours segment different scenes in the image, with each contour representing a scene from the visual sensor data. These segmented targets play a significant role in target identification for autonomous driving. If there are overlapping areas between the segmented contours, it can lead to misidentification of targets by autonomous driving algorithms. Therefore, it is necessary to ensure that each adjacent segmented contour fits precisely.

[0003] However, in the current semantic segmentation process, a large number of contours need to be drawn manually, and precise fitting between adjacent contours is required, resulting in extremely low semantic segmentation efficiency and causing a lot of rework and review processes. Summary of the Invention

[0004] This invention addresses the technical problems existing in the prior art by providing a method and system for calculating the shared edges of multiple contours in visual sensor data. It optimizes the contour drawing of various scenes in visual sensor data and significantly reduces drawing operations by using the shared edge calculation method, thereby improving the contour drawing efficiency of semantic segmentation visual sensor data.

[0005] According to a first aspect of the present invention, a method for calculating the common edge of multiple contours in visual sensor data is provided, comprising:

[0006] Obtain the coordinates of contour points of each scene in the visual sensor data, set the direction for marking the contour coordinate data, and find and mark the common edge start and end point of the contour and the contour to be drawn on the existing contour according to the direction.

[0007] Calculate the point path between the starting point and the ending point on the existing contour, and replace the point path between the starting point and the ending point in the currently drawn contour with the point path as the common edge point path.

[0008] Based on the above technical solution, the present invention can also be improved as follows.

[0009] Optionally, the contour coordinate data marking direction is clockwise or counterclockwise.

[0010] Optionally, before calculating the point path between the start and end points on the existing contour, the method further includes:

[0011] Determine whether the starting point and the ending point belong to one or more existing contours;

[0012] If the starting point and the ending point belong to the same existing contour, then the point path of the common edge between the existing contour and the contour to be drawn is calculated through the starting point and the ending point.

[0013] If the starting point and the ending point belong to multiple different existing contours, the corresponding multiple existing contours are first merged into a virtual contour to be shared, and then the point path of the common edge between the virtual contour to be shared and the contour to be drawn is calculated through the starting point and the ending point.

[0014] Optionally, the virtual contours to be shared only participate in the calculation of the point paths of the common edges. After the currently drawn contour is completed, the merging of the virtual contours to be shared is deactivated.

[0015] Optionally, a polygon merging algorithm can be used to merge multiple existing contours into a virtual contour to be shared by edges.

[0016] Optionally, the common edge path between the starting and ending points on the existing contour is calculated, including:

[0017] Store the coordinates of all points of the contour to be drawn and the coordinates of all points of the existing contour into two sets respectively;

[0018] Find all common points in the two sets and select them as subsets;

[0019] The common points in the subset are sorted according to the direction, and the start and end points are recorded and marked;

[0020] Sort the set of points of the existing contour according to the direction, and find the coordinates of all points from the starting point to the ending point in the set of points of the existing contour, thus obtaining the point path of the common edge.

[0021] According to a second aspect of the present invention, a system for calculating multiple contours sharing edges in visual sensor data is provided, comprising:

[0022] The endpoint lookup module sets the direction for marking contour coordinate data, and finds and marks the start and end points of the common edge between the existing contour and the contour to be drawn based on the direction.

[0023] The graphics drawing module calculates the point path between the starting point and the ending point on the existing contour, and replaces the point path between the starting point and the ending point in the currently drawn contour with the point path as the common edge point path.

[0024] According to a third aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the processor is configured to execute a computer management program stored in the memory to implement the steps of the above-described method for calculating the common edges of multiple contours in visual sensor data.

[0025] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer management program is stored, wherein when executed by a processor, the computer management program implements the steps of the above-described method for calculating the common edges of multiple contours in visual sensor data.

[0026] This invention provides a method, system, electronic device, and storage medium for calculating shared edges of multiple contours. First, the search direction for the point sets of contours in each scene from the visual sensor data is unified, for example, clockwise or counterclockwise. Then, the start and end points of the common edge are found according to a preset direction. The common edge point set of the existing contours replaces the corresponding point set of the currently drawn contour. Finally, the remaining point paths of the currently drawn contour are drawn. This method reduces point and line drawing operations, significantly improving the drawing efficiency of semantic segmentation, and making the fitting of adjacent scene contours more accurate. It also reduces a large amount of manual review and repetitive modification work, increasing productivity. Attached Figure Description

[0027] Figure 1 A flowchart illustrating an embodiment of a method for calculating the shared edges of multiple contours in visual sensor data provided by the present invention;

[0028] Figure 2 A flowchart of yet another embodiment of the method for calculating multiple contours sharing edges provided by the present invention;

[0029] Figure 3 This invention provides a block diagram of the structure of a system for calculating multiple contours sharing edges in visual sensor data.

[0030] Figure 4 This is a schematic diagram of the working steps in an embodiment of the present invention where the contour to be shared by an edge is a single contour;

[0031] Figure 5 This is a schematic diagram of the working steps in an embodiment of the present invention where the contours to be shared by multiple contours are to be shown.

[0032] Figure 6 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention;

[0033] Figure 7 This is a schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. Detailed Implementation

[0034] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0035] Figure 1A flowchart of a method for calculating the shared edges of multiple contours in visual sensor data provided by the present invention is shown below. Figure 1 As shown, the method includes:

[0036] Obtain the coordinates of contour points of each scene in the visual sensor data, set the direction for marking the contour coordinate data, and find and mark the common edge start and end point of the contour and the contour to be drawn on the existing contour according to the direction.

[0037] Calculate the point path between the starting point and the ending point on the existing contour, and replace the point path between the starting point and the ending point in the currently drawn contour with the point path as the common edge point path;

[0038] Complete the drawing of the coordinates of all points except the common edge of the currently drawn contour.

[0039] It is understandable that, based on the deficiencies in the background technology, this embodiment of the invention proposes a method for calculating the shared edges of multiple contours in visual sensor data.

[0040] In this embodiment, the method first unifies the search direction of the point sets of the contours of each scene in the visual sensor data, for example, clockwise or counterclockwise. Then, the starting and ending points of the common edges are searched according to the preset direction. Based on the starting and ending points of the common edges, the point coordinate set of the common edges is found in the existing contours. The point set of the common edges of the existing contours replaces the corresponding point set of the currently drawn contour. Then, the drawing of the remaining point paths of the currently drawn contour is completed. This embodiment reduces the drawing operations of common edge points and lines, which can significantly improve the drawing efficiency of semantic segmentation, and make the fitting of adjacent contours more accurate, reducing a lot of manual review and repetitive modification work, and improving productivity.

[0041] In one possible embodiment, the contour coordinate data marking direction is either clockwise or counterclockwise.

[0042] It is understandable that the point path of a contour is a closed contour shape formed by sorting the point coordinates clockwise or counterclockwise. Pre-setting the sorting direction of the contour coordinate data, such as using the Green algorithm to unify the sorting direction of the contour point set to clockwise, helps to standardize the contour drawing operation and makes it easier to determine the start and end coordinates of the common edge when finding the common edge.

[0043] In one possible embodiment, such as Figure 2 As shown, before calculating the point path between the starting point and the ending point on the existing contour, the following steps are also included:

[0044] Determine whether the starting point and the ending point belong to one or more existing contours;

[0045] If the starting point and the ending point belong to the same existing contour, then the point path of the common edge between the existing contour and the contour to be drawn is calculated through the starting point and the ending point.

[0046] If the starting point and the ending point belong to multiple different existing contours, the corresponding multiple existing contours are first merged into a virtual contour to be shared, and then the point path of the common edge between the virtual contour to be shared and the contour to be drawn is calculated through the starting point and the ending point.

[0047] It is understandable that the outline to be drawn may have a larger area than existing outlines, for example, it may share edges with multiple adjacent existing outlines. Therefore, when finding the start and end points of the common edge between the outline to be drawn and existing outlines, there may be cases where there is only one common point between the outline to be drawn and existing outlines. If the outline to be drawn is compared with a single existing outline, it may be impossible to find the common edge between them. Therefore, multiple adjacent existing outlines can be treated as a whole and compared with the outline to be drawn in advance to find common points. Adjacent existing outlines that have two or more common points with the outline to be drawn are merged into a virtual outline to be shared by edges using an algorithm. Then, the start and end points of the common edge between the virtual outline to be shared by edges and the outline to be drawn are found using the above method. Then, the edge on the virtual outline to be shared by edges located between the start and end points is taken as its common edge with the outline to be drawn. The point path of this common edge is saved to the outline to be drawn, so that the common edge is replaced by the edge between the start and end points on the outline to be drawn. This achieves accurate fitting between the current outline and the existing outline group, eliminating the overlapping area between adjacent outlines.

[0048] In one possible embodiment, the virtual contour to be shared only participates in calculating the point path of the common edge, and the merging of the virtual contour to be shared is released after the currently drawn contour is completed.

[0049] It is understandable that combining adjacent existing contours into a virtual contour to be drawn is only for the purpose of facilitating the calculation when finding the common edge between the existing contour and the currently drawn contour. In fact, the existing contours are not changed. Therefore, after the drawing of the current contour is completed, the original multiple existing contours remain unchanged. The currently drawn contour and the original contours both become existing contours. The next contour to be drawn can be drawn on the basis of the new existing contour.

[0050] In one possible implementation, a polygon merging algorithm is used to merge multiple existing contours into a virtual contour to be shared by edges.

[0051] It is understandable that the idea behind polygon merging algorithms is to remove the common edges of adjacent contours, which is an existing technology and will not be elaborated here.

[0052] In one possible embodiment, calculating the common edge path between the start and end points on the existing contour includes:

[0053] Store the coordinates of all points of the contour to be drawn and the coordinates of all points of the existing contour into two sets respectively;

[0054] Find all common points in the two sets and select them as subsets;

[0055] The common points in the subset are sorted according to the direction, and the start and end points are recorded and marked;

[0056] The point set of the existing contour is sorted according to the preset direction, and the coordinates of all points from the starting point to the ending point in the point set of the existing contour are found, thus obtaining the point path of the common edge.

[0057] Understandably, this embodiment demonstrates the process of finding common edges that need to be fitted between an existing contour and a currently drawn contour. For example, the Green algorithm is first used to unify the contour point set to clockwise. Because the contour point search order is consistent, a double loop is used to search for common points in the two sets until the start and end coordinates of the common edge are obtained. Then, the point coordinate set of the existing contour is searched again in a preset direction, starting from the first point where the common edge is found and recording points until the end point of the common edge is found. The set of point coordinates between the start and end points is the common edge point set. Using the common edge point set to replace the points between the start and end points of the corresponding common edge on the newly drawn contour achieves precise fitting between the newly generated contour and the existing contour.

[0058] To more clearly demonstrate the technical solution of the present invention, this embodiment will now be explained and illustrated with specific operational examples.

[0059] like Figure 4 As shown, assuming there is a single existing contour, that is, the current drawing contour shares an edge with a single existing contour, refer to the following workflow.

[0060] Shared edge for a single contour: Contour A (sorted clockwise, with point paths P1P2P3P4P5P6P7) is an existing contour, and contour B (sorted clockwise, with point paths P1N1N2P5) is a newly drawn contour, where P1 and P5 are common points. The algorithm calculates that the point path P1P2P3P4P5 is a common edge. Therefore, the P1P5 edge of contour B is replaced with P1P2P3P4P5, so contours A and B can be precisely matched without drawing points P2, P3, and P4, thus reducing the amount of drawing work.

[0061] like Figure 5As shown, assuming there are multiple existing contours, that is, the current contour being drawn shares an edge with multiple existing contours, refer to the following workflow.

[0062] Multiple contours share edges: Contour A (sorted clockwise, point path P1P2P7), contour B (sorted clockwise, point path P7P2P3P4P6), and contour C (sorted clockwise, point path P6P4P5) are existing contours that are all closely connected, with P1, P2, and P4 being common points. Contour D (sorted clockwise, point path P1N1N2P5) is a newly drawn contour, with P1 and P5 being common points. First, contours A, B, and C are merged into a new virtual contour A' (P1P2P3P4P5P6P7) using a contour merging algorithm. Then, the single contour sharing logic is executed to generate a new contour D' (P1N1N2P5P4P3P2) based on the virtual contours A' and D.

[0063] Figure 3 This invention provides a structural diagram of a system for calculating the shared edges of multiple contours in visual sensor data, as shown in the embodiment of the invention. Figure 3 As shown, a system for calculating multiple shared edges of contours in visual sensor data includes an endpoint lookup module and a graphics drawing module, wherein:

[0064] The endpoint lookup module is used to obtain the coordinates of contour points of each scene in the visual sensor data, set the direction for marking the contour coordinate data, and find and mark the common edge start and end point of the contour and the contour to be drawn on the existing contour according to the direction.

[0065] The graphics drawing module is used to calculate the point path between the starting point and the ending point on the existing contour, and replace the point path between the starting point and the ending point in the currently drawn contour with the point path as the common edge point path.

[0066] It is understood that the multiple contours sharing edge calculation system in visual sensor data provided by the present invention corresponds to the multiple contours sharing edge calculation method provided in the foregoing embodiments. The relevant technical features of the multiple contours sharing edge calculation system can be referred to the relevant technical features of the multiple contours sharing edge calculation method, and will not be repeated here.

[0067] Please see Figure 6 , Figure 6 This is a schematic diagram illustrating an embodiment of the electronic device provided in this invention. For example... Figure 6 As shown, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:

[0068] Obtain the coordinates of contour points of each scene in the visual sensor data, set the direction for marking the contour coordinate data, and find and mark the common edge start and end point of the contour and the contour to be drawn on the existing contour according to the direction.

[0069] Calculate the point path between the starting point and the ending point on the existing contour, and replace the point path between the starting point and the ending point in the currently drawn contour with the point path as the common edge point path.

[0070] Please see Figure 7 , Figure 7 This is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided by the present invention. (See diagram below.) Figure 7 As shown, this embodiment provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program performs the following steps:

[0071] Obtain the coordinates of contour points of each scene in the visual sensor data, set the direction for marking the contour coordinate data, and find and mark the common edge start and end point of the contour and the contour to be drawn on the existing contour according to the direction.

[0072] Calculate the point path between the starting point and the ending point on the existing contour, and replace the point path between the starting point and the ending point in the currently drawn contour with the point path as the common edge point path.

[0073] This invention provides a method, system, electronic device, and storage medium for calculating shared edges of multiple contours. First, the search direction of the point sets of each contour is unified, for example, clockwise or counterclockwise. Then, the start and end points of the common edge are found according to a preset direction. The common edge point sets of existing contours replace the corresponding point sets of the currently drawn contour. Finally, the remaining point paths of the currently drawn contour are drawn. This method reduces point and line drawing operations, significantly improving the drawing efficiency of semantic segmentation, and making the fitting of adjacent contours more accurate. It also reduces a large amount of manual review and repetitive modification work, increasing productivity.

[0074] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0075] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0076] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0077] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0078] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0079] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0080] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for calculating the shared edges of multiple contours in visual sensor data, characterized in that, include: Obtain the coordinates of contour points of each scene in the visual sensor data, set the direction for marking the contour coordinate data, and find and mark the common edge start and end point of the contour and the currently drawn contour on the existing contour according to the direction. Determine whether the starting point and the ending point belong to one or more existing contours; If the starting point and the ending point belong to the same existing contour, then the point path of the common edge between the existing contour and the currently drawn contour is calculated through the starting point and the ending point. If the starting point and the ending point belong to multiple different existing contours, the corresponding multiple existing contours are first merged into a virtual contour to be shared, and then the point path of the common edge between the virtual contour to be shared and the currently drawn contour is calculated through the starting point and the ending point. Calculate the point path between the starting point and the ending point on the existing contour, and replace the point path between the starting point and the ending point in the currently drawn contour with the point path as the common edge point path.

2. The method for calculating multiple contours sharing edges in visual sensor data according to claim 1, characterized in that, The contour coordinate data is marked in either a clockwise or counterclockwise direction.

3. The method for calculating multiple contours sharing edges in visual sensor data according to claim 1, characterized in that, The virtual contour to be shared only participates in the calculation of the point path of the common edge. After the current contour is drawn, the merging of the virtual contour to be shared is released.

4. The method for calculating multiple contours sharing edges in visual sensor data according to claim 1, characterized in that, The polygon merging algorithm merges multiple existing contours into a virtual contour to be shared by edges.

5. A method for calculating the shared edges of multiple contours in visual sensor data according to any one of claims 1 to 4, characterized in that, Calculate the path of common edge points between the starting and ending points on the existing contour, including: Store the coordinates of all points of the currently drawn contour and the coordinates of all points of the existing contour into two separate sets; Find all common points in the two sets and select them as subsets; The common points in the subset are sorted according to the direction, and the start and end points are recorded and marked; Sort the set of points of the existing contour according to the direction, and find the coordinates of all points from the starting point to the ending point in the set of points of the existing contour, thus obtaining the point path of the common edge.

6. A system for calculating the shared edges of multiple contours in visual sensor data, characterized in that, include: The endpoint lookup module sets the direction for marking contour coordinate data, and finds and marks the common edge start and end points of the contour and the currently drawn contour on the existing contour according to the direction. The graphics drawing module is used to determine whether the starting point and the ending point belong to one or more existing contours; If the starting point and the ending point belong to the same existing contour, then the point path of the common edge between the existing contour and the currently drawn contour is calculated through the starting point and the ending point. If the starting point and the ending point belong to multiple different existing contours, the corresponding multiple existing contours are first merged into a virtual contour to be shared, and then the point path of the common edge between the virtual contour to be shared and the currently drawn contour is calculated through the starting point and the ending point. Calculate the point path between the starting point and the ending point on the existing contour, and replace the point path between the starting point and the ending point in the currently drawn contour with the point path as the common edge point path.

7. An electronic device, characterized in that, The device includes a memory and a processor, wherein the processor is used to execute a computer management program stored in the memory to implement the steps of the method for calculating multiple contours sharing edges in visual sensor data as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, It stores a computer management program, which, when executed by a processor, implements the steps of a method for calculating multiple contours sharing edges in visual sensor data as described in any one of claims 1-5.