Camera topology construction method, apparatus, device and storage medium
By acquiring parking lot access routes and camera locations, segmenting and generating adjacency lists, the problem of time-consuming and error-prone traditional camera topology construction is solved, achieving efficient and accurate camera topology construction.
Patent Information
- Application Number
- CN202411542949.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2044-10-30
AI Technical Summary
Traditional methods for constructing camera topology relationships are time-consuming and error-prone, requiring staff familiar with the spatial layout of parking lots to operate them.
By acquiring the set of route information and camera locations of the passageways in the parking lot, the target passageway routes are segmented based on the camera locations, an adjacency list is generated, and the topological relationships between cameras are constructed by searching and traversing the adjacency list.
It improves the efficiency and accuracy of camera topology construction, reduces manual intervention, and ensures the accuracy and efficiency of camera topology construction.
Smart Images

Figure CN119494386B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of parking lot management technology, and in particular to a method, apparatus, device and storage medium for constructing camera topology relationships. Background Technology
[0002] Currently, a large number of cameras are installed in parking lots to facilitate vehicle management. Since each camera is an independent unit, establishing a topological relationship between different cameras is usually necessary to fully utilize the surveillance video for rapid vehicle tracking. The traditional method for establishing this camera topology involves first recording information such as the channel number and location of each camera. Then, based on the camera's location, staff must locate the corresponding cameras in all directions around each camera. This entire process of building the camera topology is very time-consuming and often requires staff who are very familiar with the parking lot's spatial layout, significantly increasing the probability of errors. Summary of the Invention
[0003] Therefore, it is necessary to provide a camera topology construction method, apparatus, device, and storage medium to address the above-mentioned technical problems and solve at least one of them.
[0004] This invention provides a method for constructing camera topology relationships, comprising:
[0005] Obtain a set of route information for passageways in the parking lot, as well as the camera positions corresponding to the cameras. The set of route information includes the endpoint positions corresponding to the two endpoints in any passageway.
[0006] For each camera position: Based on the camera position, the target channel route is segmented to obtain multiple segmented routes, and based on the multiple segmented routes, the route information set is updated, wherein the target channel route refers to the channel route that is closest to the camera position, and the camera position is the endpoint position corresponding to one endpoint of the segmented route;
[0007] Based on the set of line information, an adjacency table is generated;
[0008] Based on the location of each camera, a search traversal is performed in the adjacency list to obtain the topological relationship between the cameras in the parking lot.
[0009] Optionally, according to a camera topology construction method provided by the present invention, the step of segmenting the target channel route based on the camera position to obtain multiple segmented routes includes:
[0010] Based on the camera position and the endpoint positions corresponding to the two endpoints in the channel route, the distance between the camera and each of the channel routes is calculated;
[0011] The nearest passage route is taken as the target passage route;
[0012] Based on the camera position and the endpoint position corresponding to one endpoint in the target channel route, a segmented route is generated, and based on the camera position and the endpoint position corresponding to the other endpoint in the target channel route, another segmented route is generated.
[0013] Optionally, according to a camera topology construction method provided by the present invention, generating an adjacency list based on the line information set includes:
[0014] Each endpoint position in the route information set is taken as a node, and the adjacent nodes corresponding to each node are determined based on all endpoint positions. Each node is associated with a node number and a node type attribute. The node type attribute includes road nodes and camera nodes. The node number is a number obtained by sorting the endpoint positions in the route information set.
[0015] The adjacency table is constructed based on each node and its corresponding neighboring nodes.
[0016] Optionally, according to a camera topology construction method provided by the present invention, the node number is determined based on the following steps:
[0017] Deduplication is performed on all endpoint locations in the line information set;
[0018] Sort and number all the endpoint positions after deduplication to obtain the node number.
[0019] Optionally, according to a camera topology construction method provided by the present invention, the step of searching and traversing the adjacency list based on the positions of each camera to obtain the topology relationship between cameras in the parking lot includes:
[0020] For any of the camera positions: take the node corresponding to the camera position as the starting node, and query the adjacency list to obtain all the first adjacent nodes corresponding to the starting node;
[0021] The topological relationship corresponding to the starting node is determined based on the node type attribute corresponding to each of the first adjacent nodes;
[0022] After traversing all the nodes corresponding to the camera positions as starting nodes, the topological relationships between the cameras in the parking lot are determined based on the topological relationships corresponding to all the starting nodes.
[0023] Optionally, according to a camera topology construction method provided by the present invention, determining the topology relationship corresponding to the starting node based on the node type attribute corresponding to each of the first adjacent nodes includes:
[0024] For any first adjacent node:
[0025] If the node type attribute of the first adjacent node is a camera node, then establish a topological relationship between the starting node and the first adjacent node.
[0026] If the node type attribute of the first adjacent node is a road node, then the corresponding second adjacent nodes are retrieved from the adjacency table to establish the topological relationship between the starting node and the second adjacent node whose node type attribute is a camera node.
[0027] Optionally, according to a camera topology construction method provided by the present invention, updating the route information set based on the multiple partitioned routes includes:
[0028] Add the endpoint positions corresponding to each of the divided routes to the route information set, and delete the endpoint positions corresponding to the target channel routes in the route information set.
[0029] The present invention also provides a camera topology construction apparatus, comprising:
[0030] The acquisition module is used to acquire a set of route information for passageways in the parking lot, as well as the camera positions corresponding to the cameras. The set of route information includes the endpoint positions corresponding to two endpoints in any passageway.
[0031] The segmentation module is used for each camera position to: segment the target channel route based on the camera position to obtain multiple segmented routes, and update the route information set based on the multiple segmented routes, wherein the target channel route refers to the channel route closest to the camera position, and the camera position is the endpoint position corresponding to one endpoint of the segmented route;
[0032] The generation module is used to generate an adjacency table based on the set of line information;
[0033] The traversal module is used to perform a search traversal in the adjacency list based on the location of each camera to obtain the topological relationship between the cameras in the parking lot.
[0034] The present invention also provides a computer device, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the above-described camera topology construction method when executing the computer-readable instructions.
[0035] The present invention also provides one or more readable storage media storing computer-readable instructions, which, when executed by a processor, implement the above-described camera topology construction method.
[0036] The aforementioned camera topology construction method, apparatus, device, and storage medium include: acquiring a set of route information for passageways in a parking lot, and the camera positions corresponding to the cameras, wherein the set of route information includes the endpoint positions corresponding to two endpoints in any passageway; for each camera position: based on the camera position, the target passageway is segmented to obtain multiple segmented routes, and the set of route information is updated based on the multiple segmented routes, wherein the target passageway is the passageway closest to the camera position, and the camera position is the endpoint position corresponding to one endpoint in the segmented routes; an adjacency list is generated based on the set of route information; and a search and traversal is performed in the adjacency list based on each camera position to obtain the topology relationship between the cameras in the parking lot. This invention constructs the topology relationship between the cameras in the parking lot by segmenting the target passageway using the camera position as the segmentation point, updating the set of route information based on the multiple segmented routes, generating an adjacency list based on the positions in the set of route information, and further, traversing and querying the adjacent cameras corresponding to each camera using the adjacency list. It eliminates the need for manual construction of topological relationships based on camera positions, effectively improving the efficiency and accuracy of camera topological relationship construction. Attached Figure Description
[0037] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is one of the flowcharts illustrating a camera topology construction method in one embodiment of the present invention;
[0039] Figure 2 This is a structural deployment diagram of a parking lot access route provided in an embodiment of the present invention;
[0040] Figure 3 This is a second schematic flowchart of a camera topology relationship construction method in one embodiment of the present invention;
[0041] Figure 4 This is the third flowchart illustrating the camera topology construction method in one embodiment of the present invention;
[0042] Figure 5 This is the fourth flowchart of a camera topology relationship construction method in one embodiment of the present invention;
[0043] Figure 6 This is a structural deployment diagram of a straight channel provided in an embodiment of the present invention;
[0044] Figure 7 This is a structural deployment diagram of a corner passage provided in an embodiment of the present invention;
[0045] Figure 8 This is a structural deployment diagram of a T-shaped channel provided in an embodiment of the present invention;
[0046] Figure 9 This is a structural deployment diagram of a crossroads passage provided in an embodiment of the present invention;
[0047] Figure 10 This is a topological relationship diagram between intersection cameras provided in an embodiment of the present invention;
[0048] Figure 11 This is a schematic diagram of a camera topology construction device according to an embodiment of the present invention;
[0049] Figure 12 This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] The terminology used in one or more embodiments of the present invention is for the purpose of describing particular embodiments only and is not intended to limit the scope of the invention. The singular forms “a,” “the,” and “the” used in one or more embodiments of the invention are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of the invention refers to and includes any or all possible combinations of one or more associated listed items.
[0052] In one embodiment, such as Figure 1 As shown, Figure 1 This is one of the flowcharts illustrating a camera topology relationship construction method in one embodiment of the present invention. The present invention provides a camera topology relationship construction method, comprising the following steps:
[0053] Step S11: Obtain the set of route information for the passageways in the parking lot, as well as the camera positions corresponding to the cameras;
[0054] It should be noted that the route is based on two endpoints, and the route information set includes the endpoint positions corresponding to the two endpoints in any given route. For example, refer to... Figure 2 , Figure 2 This is a structural deployment diagram of a parking lot access route provided in one embodiment of the present invention. The access route L is formed based on the endpoint positions corresponding to endpoint Pa and endpoint Pb. In addition, multiple cameras are installed in the parking lot to monitor the parking situation. It is necessary to obtain the camera positions, i.e., the coordinates of the camera locations. In one embodiment, the set of route information for all access routes in the parking lot and the camera positions corresponding to each camera deployed on the access routes are obtained. In other embodiments, the set of route information for some access routes in the parking lot can also be obtained according to actual needs, for example, the set of route information for corner access routes and T-shaped access routes, or the set of route information for access routes in areas with high traffic volume.
[0055] Step S12: For each camera position: Based on the camera position, the target channel route is segmented to obtain multiple segmented routes, and the route information set is updated based on the multiple segmented routes;
[0056] It should be noted that the target channel route refers to the channel route that is closest to the camera position. After the segmentation is completed, the camera position will be used as the endpoint position of one of the endpoints of the segmented route.
[0057] In one embodiment, for any camera position, the following operations are performed: based on the camera position and the endpoint positions corresponding to the two endpoints in the channel route, the distance between the camera and each channel route is calculated, and the channel route with the closest distance is selected as the target channel route. Then, using the position point corresponding to the camera position as a dividing point, the target channel route is divided according to this dividing point, resulting in two divided routes. (Refer to...) Figure 2 For a channel route L, where point P is the camera position, the channel route L is segmented to obtain the segmented route La corresponding to endpoint Pa and point P, and the segmented route Lb corresponding to endpoint Pb and point P. In other embodiments, due to possible errors in the position annotation process, the camera position may not be on the channel route. Therefore, based on the camera position, the projection point of the camera onto the target channel route can be calculated, and then the target channel route can be segmented based on the position of the projection point to obtain multiple segmented routes.
[0058] Furthermore, the endpoint positions corresponding to each divided route are added to the route information set, and the endpoint positions corresponding to the target channel route are deleted from the route information set. Understandably, following the example above, the positions of endpoints Pa and P in divided route La are added to the route information set, as are the positions of endpoints Pb and P in divided route Lb, and the positions of endpoints Pa and Pb in channel route L are deleted.
[0059] Step S13: Generate an adjacency table based on the line information set;
[0060] In one embodiment, the locations in the route information set are deduplicated, and each deduplicated location is numbered to obtain a node number corresponding to each location. For example, the locations on each route are numbered sequentially according to a preset route number. In other embodiments, the locations on each route can be numbered randomly. Further, each location is treated as a node, and the adjacent nodes corresponding to each node are determined. Each node is associated with a node number and a node type attribute. The node type attribute includes road nodes and camera nodes. Road nodes refer to the endpoints of the routes in the parking lot, and camera nodes refer to the location points of cameras. Further, an adjacency table is constructed based on each node and its corresponding adjacent nodes.
[0061] Step S14: Based on the location of each camera, perform a search traversal in the adjacency list to obtain the topological relationship between each camera in the parking lot.
[0062] In one embodiment, for any camera location: the node number corresponding to the camera location is determined, and the node corresponding to the node number is used as the starting node. Then, the first adjacent node corresponding to the starting node is retrieved from the adjacency list. It should be noted that the number of adjacent nodes can be one or more. Further, for any first adjacent node: if the node type attribute of the first adjacent node is a camera node, the starting node is associated with this first adjacent node to establish a topological relationship between the starting node and the first adjacent node. If the node type attribute of the first adjacent node is a road node, the various second adjacent nodes corresponding to the first adjacent node are further retrieved from the adjacency list to establish a topological relationship between the starting node and the second adjacent nodes whose node type attribute is a camera node. After traversing all the nodes corresponding to all camera locations as starting nodes, the topological relationship between the cameras in the parking lot is determined based on the topological relationships corresponding to all starting nodes.
[0063] This invention embodiment, through the above steps, includes: obtaining a set of route information for passageways in a parking lot, and the camera positions corresponding to the cameras, wherein the set of route information includes the endpoint positions corresponding to two endpoints in any passageway; for each camera position: based on the camera position, the target passageway is segmented to obtain multiple sub-routes, and the set of route information is updated based on the multiple sub-routes, wherein the target passageway is the passageway closest to the camera position, and the camera position is the endpoint position corresponding to one endpoint in the sub-routes; an adjacency list is generated based on the set of route information; based on each camera position, the adjacency list is searched and traversed to obtain the topological relationship between the cameras in the parking lot. This invention embodiment, by using the camera position points as segmentation points to segment the target passageway, and then obtaining multiple sub-routes based on the segmentation, updating the set of route information, and then generating an adjacency list based on the positions in the set of route information, further, traversing and querying the adjacency list to find the adjacent cameras corresponding to each camera, thereby constructing the topological relationship between the cameras in the parking lot. This eliminates the need for manual construction of the topological relationship based on the camera position relationships, effectively improving the efficiency and accuracy of camera topological relationship construction.
[0064] like Figure 3 As shown, Figure 3 This is a second flowchart illustrating a camera topology construction method in one embodiment of the present invention. In one embodiment, the target channel route is segmented based on the camera position to obtain multiple segmented routes, including:
[0065] Step S21: Based on the camera position and the endpoint positions corresponding to the two endpoints in the channel route, calculate the distance between the camera and each channel route;
[0066] Step S22: Select the nearest passage route as the target passage route;
[0067] Step S23: Based on the camera position and the endpoint position corresponding to one endpoint in the target channel route, generate one segmented route, and based on the camera position and the endpoint position corresponding to the other endpoint in the target channel route, generate another segmented route.
[0068] In one embodiment, for any camera position, the following operations are performed: based on the camera position and the endpoint positions corresponding to two endpoints in the channel route, the distance between the camera and each channel route is calculated, and the channel route with the closest distance is selected as the target channel route. Then, using the camera position as a dividing point, the target channel route is divided; that is, based on the camera position and the endpoint position corresponding to one endpoint in the target channel route, one segmented route is formed, and based on the camera position and the endpoint position corresponding to the other endpoint in the target channel route, another segmented route is formed. (Refer to...) Figure 2For a channel route L, where point P is the camera position corresponding to the camera, after segmenting the channel route L, we obtain the segmented route La corresponding to endpoint Pa and point P, and the segmented route Lb corresponding to endpoint Pb and point P.
[0069] The present invention, through the above-described scheme, determines the channel route closest to the camera position, and then uses the camera position as the dividing point to divide the target channel route into multiple divided routes, thereby merging the camera positions onto the channel route, which facilitates the subsequent determination of the directly adjacent points around each camera.
[0070] like Figure 4 As shown, Figure 4 This is a flowchart illustrating the camera topology construction method in one embodiment of the present invention. In one embodiment of the present invention, an adjacency list is generated based on a set of line information, including:
[0071] Step S31: Treat each endpoint position in the line information set as a node, and determine the adjacent nodes corresponding to each node based on all endpoint positions.
[0072] Step S32: Construct an adjacency list based on each node and its corresponding neighboring nodes.
[0073] It should be noted that each node is associated with a node number and a node type attribute. The node type attribute includes road nodes and camera nodes. The node number is obtained by sorting the endpoint positions in the route information set. Optionally, the node numbering process is as follows: After updating the route information set, all endpoint positions in the route information set are deduplicated. For example, for a corner passage, the route information set includes any passage route 1 (endpoint a, endpoint b) and passage route 2 (endpoint b, endpoint c). Duplicate endpoint b needs to be filtered out. Then, all the deduplicated endpoint positions are sorted and numbered to obtain the node number. In one embodiment, each passage route in the parking lot is assigned a passage number. The endpoints on each route and the camera points of the corresponding camera positions are sorted and numbered according to the passage number to obtain the node number corresponding to all points.
[0074] In one embodiment, each endpoint location in the line information set is treated as a node, and based on all endpoint locations, the adjacent nodes corresponding to each node are queried. For example, referring to... Figure 6 , Figure 6This is a structural deployment diagram of a straight channel provided in one embodiment of the present invention. For node P, the adjacent nodes of node P are nodes P1 and P2. An adjacency list is then constructed based on each node and its corresponding adjacent nodes. In other embodiments, each node may also be associated with the distance between it and its adjacent nodes, the distance being calculated based on the positions of the node and its adjacent nodes respectively.
[0075] The embodiments of the present invention, through the above-described scheme, treat each endpoint and the position point of the camera as a node, and find the adjacent nodes corresponding to each node according to each position to construct an adjacency table. Thus, the adjacent cameras associated with each camera can be accurately traversed in the adjacency table to obtain the topological relationship between each camera.
[0076] like Figure 5 As shown, Figure 5 This is the fourth flowchart illustrating a camera topology construction method in one embodiment of the present invention. In one embodiment, based on the location of each camera, a search traversal is performed in the adjacency list to obtain the topology relationships between cameras in the parking lot, including:
[0077] Step S41: For any camera position: take the node corresponding to the camera position as the starting node, and query the adjacency list to obtain all the first adjacent nodes corresponding to the starting node.
[0078] Step S42: Determine the topological relationship corresponding to the starting node based on the node type attribute of each first adjacent node;
[0079] Step S43: After traversing all the nodes corresponding to the camera positions as the starting nodes, determine the topological relationship between the cameras in the parking lot based on the topological relationship corresponding to all the starting nodes.
[0080] In one embodiment, the following steps are performed for the camera position of any camera:
[0081] The node number corresponding to the camera position is determined, and then the node corresponding to that node number is used as the starting node. The adjacency list is then searched to obtain all first adjacent nodes corresponding to the starting node. Further, for any first adjacent node: if the node type attribute of the first adjacent node is a camera node, then a topological relationship is established between the starting node and the first adjacent node; for example, referring to... Figure 6The first adjacent nodes of the current node P include nodes P1 and P2, both of which are camera nodes. This establishes the topological relationships between the current node P and nodes P1, and between the current node P and nodes P2. Furthermore, if the node type attribute of the first adjacent node is a road node, the adjacency table is further queried to obtain the corresponding second adjacent nodes. This establishes the topological relationships between the starting node and the second adjacent nodes whose node type attribute is camera node. (See reference...) Figures 7-8 , Figure 7 This is a structural deployment diagram of a corner passage provided in an embodiment of the present invention; Figure 8 This is a structural deployment diagram of a T-shaped channel provided in an embodiment of the present invention; the first adjacent nodes of the current node P include nodes P1 and P2, where node P1 is a camera node; and node P2 is a road node. Then, the adjacent nodes of node P2 (nodes P3 and P4) are queried. Nodes P3 and P4 are both camera nodes, thus determining and establishing the topological relationships between the current node P and node P1, the current node P and node P3, and the current node P and node P4. (Refer to...) Figure 9 , Figure 9 This is a structural deployment diagram of a crossroad passage provided in an embodiment of the present invention; node P2 is a road node, and then the adjacent nodes (nodes P3, P4 and P5) corresponding to node P2 are queried. Nodes P3, P4 and P5 are all camera nodes, and the topological relationship between the current node P and the nodes P1, P3, P4 and P5 is established.
[0082] Furthermore, after traversing using the nodes corresponding to all camera positions as starting nodes, the topological relationships between the cameras in the parking lot are determined based on the topological relationships corresponding to all starting nodes. For example, refer to... Figure 6 After establishing the topological relationships between the current node P and node P1, and between the current node P and node P2, the process continues to use node P1 as the current starting node to determine the topological relationships between node P1 and other nodes. This process is repeated until the traversal ends with all the nodes corresponding to the camera positions as the starting nodes.
[0083] Furthermore, after establishing the topological relationships between the various cameras, cross-camera tracking of vehicles in the parking lot can be performed based on the surveillance video captured by the cameras and the topological relationships between them. For example, referring to... Figure 10 , Figure 10This is a topological relationship diagram between cameras at an intersection provided in one embodiment of the present invention. Taking the most complex intersection as an example, the location camera, as a road sign point, forms a network graph. Vehicles are tracked in relay by linking with neighboring cameras. The original topological relationship structure of the cameras is an undirected graph, but during the tracking process, it can be considered a directed graph based on the identified vehicle's direction of travel. For example, if camera A in the diagram identifies a vehicle traveling to the right, according to the topological relationship between the cameras, the camera that can monitor the vehicle should be B1, C1, or D1, and not A1 (which is in the opposite direction), nor B2, C2, or D2 (which would not directly jump to a non-adjacent area). Thus, the video monitored by B1, C1, or D1 completes cross-camera tracking of the vehicle.
[0084] This invention, through the above-described scheme, combines an adjacency list and the node type attributes of each node to traverse and obtain the adjacent cameras corresponding to each camera, thereby constructing the topological relationships between cameras in a parking lot. This eliminates the need for manual construction of topological relationships based on camera positions, effectively improving the efficiency and accuracy of camera topological relationship construction.
[0085] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0086] In one embodiment, a camera topology construction apparatus is provided, which corresponds one-to-one with the camera topology construction method described in the above embodiments. For example... Figure 11 As shown, Figure 11 This is a schematic diagram of a camera topology construction device according to an embodiment of the present invention. The camera topology construction device includes:
[0087] The acquisition module 51 is used to acquire a set of route information of the passage routes in the parking lot, and the camera position corresponding to the camera. The set of route information includes the endpoint positions corresponding to the two endpoints in any passage route.
[0088] The segmentation module 52 is used for each camera position: based on the camera position, the target channel route is segmented to obtain multiple segmented routes, and based on the multiple segmented routes, the route information set is updated. The target channel route refers to the channel route that is closest to the camera position, and the camera position is the endpoint position corresponding to one endpoint of the segmented route.
[0089] The generation module 53 is used to generate an adjacency list based on the line information set;
[0090] Traversal module 54 is used to perform a search traversal in the adjacency list based on the location of each camera to obtain the topological relationship between each camera in the parking lot.
[0091] The segmentation module 52 is also used for:
[0092] Based on the camera position and the endpoint positions corresponding to the two endpoints in the channel route, the distance between the camera and each channel route is calculated;
[0093] Select the nearest passage route as the target passage route;
[0094] Based on the camera position and the endpoint position corresponding to one endpoint in the target channel route, generate one segmented route, and based on the camera position and the endpoint position corresponding to the other endpoint in the target channel route, generate another segmented route.
[0095] The generation module 53 is also used for:
[0096] Each endpoint location in the route information set is treated as a node, and the adjacent nodes corresponding to each node are determined based on all endpoint locations. Each node is associated with a node number and a node type attribute. The node type attribute includes road nodes and camera nodes, and the node number is a number obtained by sorting the endpoint locations in the route information set.
[0097] An adjacency list is constructed based on each node and its corresponding neighboring nodes.
[0098] The camera topology construction device includes:
[0099] The deduplication module is used to deduplicat all endpoint positions in the line information set;
[0100] The numbering module is used to sort and number all the endpoint positions after deduplication to obtain the node number.
[0101] Traversal module 54 is also used for:
[0102] For any camera position: take the node corresponding to the camera position as the starting node, and query the adjacency list to get all the first adjacent nodes corresponding to the starting node;
[0103] The topological relationship corresponding to the starting node is determined based on the node type attribute of each first adjacent node.
[0104] After traversing all the nodes corresponding to the camera positions as the starting nodes, the topological relationships between the cameras in the parking lot are determined based on the topological relationships corresponding to all the starting nodes.
[0105] Traversal module 54 is also used for:
[0106] For any first adjacent node:
[0107] If the node type attribute of the first adjacent node is a camera node, then establish the topological relationship between the starting node and the first adjacent node.
[0108] If the node type attribute of the first adjacent node is a road node, then the corresponding second adjacent nodes are retrieved from the adjacency table to establish the topological relationship between the starting node and the second adjacent node whose node type attribute is a camera node.
[0109] The segmentation module 52 is also used for:
[0110] Add the endpoint locations corresponding to each divided route to the route information set, and delete the endpoint locations corresponding to the target channel route in the route information set.
[0111] Specific limitations regarding the camera topology construction device can be found in the limitations of the camera topology construction method described above, and will not be repeated here. Each module in the aforementioned camera topology construction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0112] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 12 As shown, Figure 12 This is a schematic diagram of a computer device according to an embodiment of the present invention. The computer device includes a processor, a memory, a network interface, and a database connected via a device bus. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a readable storage medium and internal memory. The readable storage medium stores operating devices, computer-readable instructions, and a database. The internal memory provides an environment for the operation of the operating devices and computer-readable instructions in the readable storage medium. The database of the computer device stores data involved in the camera topology construction method. The network interface of the computer device is used for communication with external terminals via a network connection. When the computer-readable instructions are executed by the processor, a camera topology construction method is implemented. The readable storage medium provided in this embodiment includes non-volatile readable storage media and volatile readable storage media.
[0113] In one embodiment, a computer device is provided, which may be a terminal device, and its internal structure diagram may be as follows: Figure 12As shown, the computer device includes a processor, memory, and network interface connected via a device bus. The processor provides computing and control capabilities. The memory includes a readable storage medium storing computer-readable instructions. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer-readable instructions implement a camera topology construction method. The readable storage medium provided in this embodiment includes both non-volatile and volatile readable storage media.
[0114] In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, it implements the steps of the camera topology construction method described above.
[0115] In one embodiment, a readable storage medium is provided, which stores computer-readable instructions. When executed by a processor, these computer-readable instructions implement the steps of the camera topology construction method described above. Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware using computer-readable instructions. These computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When executed, these computer-readable instructions can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0116] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0117] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for constructing camera topology relationships, characterized in that, include: Obtain a set of route information for passageways in the parking lot, as well as the camera positions corresponding to the cameras, wherein the set of route information includes the endpoint positions corresponding to two endpoints in any passageway; For each camera position: Based on the camera position, the target channel route is segmented to obtain multiple segmented routes, and based on the multiple segmented routes, the route information set is updated, wherein the target channel route refers to the channel route that is closest to the camera position, and the camera position is the endpoint position corresponding to one endpoint of the segmented route; Based on the set of line information, an adjacency table is generated; Based on the location of each camera, a search traversal is performed in the adjacency list to obtain the topological relationship between each camera in the parking lot; Based on the multiple route divisions, the route information set is updated, including: Add the endpoint positions corresponding to each of the divided routes to the route information set, and delete the endpoint positions corresponding to the target channel routes in the route information set.
2. The camera topology construction method according to claim 1, characterized in that, Based on the camera position, the target channel route is segmented to obtain multiple segmented routes, including: Based on the camera position and the endpoint positions corresponding to the two endpoints in the channel route, the distance between the camera and each of the channel routes is calculated; The nearest passage route is taken as the target passage route; Based on the camera position and the endpoint position corresponding to one endpoint in the target channel route, a segmented route is generated, and based on the camera position and the endpoint position corresponding to the other endpoint in the target channel route, another segmented route is generated.
3. The camera topology construction method according to claim 1, characterized in that, The step of generating an adjacency table based on the set of line information includes: Each endpoint position in the route information set is taken as a node, and the adjacent nodes corresponding to each node are determined based on all endpoint positions. Each node is associated with a node number and a node type attribute. The node type attribute includes road nodes and camera nodes. The node number is a number obtained by sorting the endpoint positions in the route information set. The adjacency table is constructed based on each node and its corresponding neighboring nodes.
4. The camera topology construction method according to claim 3, characterized in that, The node number is determined based on the following steps: Deduplication is performed on all endpoint locations in the line information set; Sort and number all the endpoint positions after deduplication to obtain the node number.
5. The camera topology construction method according to claim 1, characterized in that, The step of searching and traversing the adjacency list based on the location of each camera to obtain the topological relationship between the cameras in the parking lot includes: For any of the camera positions: take the node corresponding to the camera position as the starting node, and query the adjacency list to obtain all the first adjacent nodes corresponding to the starting node; The topological relationship corresponding to the starting node is determined based on the node type attribute corresponding to each of the first adjacent nodes; After traversing all the nodes corresponding to the camera positions as starting nodes, the topological relationships between the cameras in the parking lot are determined based on the topological relationships corresponding to all the starting nodes.
6. The camera topology construction method according to claim 5, characterized in that, The step of determining the topological relationship corresponding to the starting node based on the node type attribute corresponding to each of the first adjacent nodes includes: For any first adjacent node: If the node type attribute of the first adjacent node is a camera node, then establish a topological relationship between the starting node and the first adjacent node. If the node type attribute of the first adjacent node is a road node, then the corresponding second adjacent nodes are retrieved from the adjacency table to establish the topological relationship between the starting node and the second adjacent node whose node type attribute is a camera node.
7. A camera topology construction device, characterized in that, include: The acquisition module is used to acquire a set of route information for passageways in the parking lot, as well as the camera positions corresponding to the cameras. The set of route information includes the endpoint positions corresponding to two endpoints in any passageway. The segmentation module is used for each camera position to: segment the target channel route based on the camera position to obtain multiple segmented routes, and update the route information set based on the multiple segmented routes, wherein the target channel route refers to the channel route closest to the camera position, and the camera position is the endpoint position corresponding to one endpoint of the segmented route; The generation module is used to generate an adjacency table based on the set of line information; The traversal module is used to perform a search traversal in the adjacency list based on the location of each camera to obtain the topological relationship between each camera in the parking lot. The segmentation module is also used to add the endpoint positions corresponding to each segmented route to the route information set, and delete the endpoint positions corresponding to the target channel route in the route information set.
8. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and running on the processor, characterized in that, When the processor executes the computer-readable instructions, it implements the camera topology construction method as described in any one of claims 1 to 6.
9. A readable storage medium having computer-readable instructions stored thereon, characterized in that, When the computer-readable instructions are executed by a processor, they implement the camera topology construction method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Parking lot map generation method, electronic equipment and vehicle
CN118225075A
Automatic spatial calibration of camera network
US20160012589A1