Camera topological relation construction method and device, equipment and storage medium

By segmenting and updating the line information collection, generating and traversing the adjacency table, the topological relationship between cameras in the parking lot is automatically constructed, which solves the problems of time-consuming and error-prone traditional methods and improves the construction efficiency and accuracy.

CN119494386AActive Publication Date: 2025-02-21SHENZHEN JIESHUN SCI & TECH IND
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411542949.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-21
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

Traditional camera topological relationship construction methods are time-consuming and error-prone, and require staff familiar with the space location of the parking lot to operate.

Method used

By obtaining the line information set and camera position of the channel route in the parking lot, segmenting the target channel route based on the camera position, updating the line information set, generating an adjacency table, and searching and traversing in the adjacency table to obtain the topological relationship between cameras.

Benefits of technology

There is no need to manually construct topological relationships, which improves the efficiency and accuracy of camera topological relationship construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494386A_ABST
    Figure CN119494386A_ABST
Patent Text Reader

Abstract

The invention discloses a camera topological relation construction method and device, equipment and a storage medium. The method comprises the steps that a line information set of channel lines in a parking lot and camera positions corresponding to cameras are acquired; for each camera position, segmenting the target channel route based on the camera position to obtain a plurality of divided routes, and updating the camera route information set based on the plurality of divided routes of the camera; generating an adjacency list based on the camera line information set; and performing search traversal in the camera adjacency list based on the positions of the cameras to obtain a topological relation among the cameras in the camera parking lot. According to the method, the line information set of the channel lines in the parking lot and the positions of the cameras are combined to construct the topological relation between the cameras in the parking lot, the topological relation does not need to be constructed manually according to the position relation of the cameras, and the efficiency and accuracy of camera topological relation construction are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of parking lot control technology, and in particular to a camera topological relationship construction method, device, equipment and storage medium. Background Art

[0002] At present, in order to facilitate the control of vehicles in parking lots, a large number of cameras are installed in parking lots. Since a single camera is an independent unit, in order to make full use of surveillance videos to quickly track vehicles, it is usually necessary to establish a topological relationship between different cameras. The traditional method of establishing a camera topological relationship is to first record the channel number and camera position of each camera. Then, according to the camera position, the staff finds the corresponding cameras in various directions around each camera. The entire process of constructing the camera topological relationship is very time-consuming and often requires staff who are very familiar with the spatial location of the parking lot to operate, which greatly increases the probability of error. Summary of the invention

[0003] Based on this, it is necessary to provide a camera topology relationship construction method, device, equipment and storage medium for the above-mentioned technical problems, so as to solve at least one of the above-mentioned technical problems.

[0004] The present invention provides a camera topology relationship construction method, comprising:

[0005] Obtaining a route information set of a passage route in a parking lot and a camera position corresponding to a camera, wherein the route information set includes endpoint positions corresponding to two endpoints in any passage route;

[0006] For each camera position: based on the camera position, the target channel route is segmented to obtain a plurality of segmented routes, and based on the plurality of segmented routes, the route information set is updated, wherein the target channel route refers to the channel route closest to the camera position, and the camera position is an endpoint position corresponding to one of the endpoints in the segmented routes;

[0007] Based on the line information set, generate an adjacency table;

[0008] Based on the position of each camera, a search and traversal is performed in the adjacency table to obtain the topological relationship between the cameras in the parking lot.

[0009] Optionally, according to a camera topology relationship construction method provided by the present invention, the target channel route is segmented based on the camera position to obtain multiple segmented routes, including:

[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] Taking the channel route with the shortest distance as the target channel route;

[0012] Based on the camera position and the endpoint position corresponding to one endpoint in the target channel route, a divided route is generated, and based on the camera position and the endpoint position corresponding to another endpoint in the target channel route, another divided route is generated.

[0013] Optionally, according to a camera topology relationship construction method provided by the present invention, generating an adjacency table based on the line information set includes:

[0014] Each endpoint position in the line information set is regarded as a node, and the adjacent nodes corresponding to each node are determined according to all the endpoint positions, wherein each node is associated with a node number and a node type attribute, the node type attribute includes a road node and a camera node, and the node number is a number obtained by sorting the endpoint positions in the line information set;

[0015] Based on each node and its corresponding adjacent nodes, the adjacency list is constructed.

[0016] Optionally, according to a camera topology relationship construction method provided by the present invention, the node number is determined based on the following steps:

[0017] Deduplication processing is performed on all endpoint positions in the line information set;

[0018] All the endpoint positions after duplication are sorted and numbered to obtain the node number.

[0019] Optionally, according to a camera topology relationship construction method provided by the present invention, based on the position of each camera, searching and traversing in the adjacency table to obtain the topological relationship between the cameras in the parking lot includes:

[0020] For the camera position of any of the cameras: taking the node corresponding to the camera position as the starting node, querying in the adjacency table to obtain all first adjacent nodes corresponding to the starting node;

[0021] Determining a topological relationship corresponding to the start node according to a node type attribute corresponding to each of the first adjacent nodes;

[0022] After the traversal is completed with the nodes corresponding to all camera positions as the starting nodes, the topological relationship between the cameras in the parking lot is determined according to the topological relationship corresponding to all the starting nodes.

[0023] Optionally, according to a camera topology relationship construction method provided by the present invention, determining the topology relationship corresponding to the start node according to 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, establishing a topological relationship between the start node and the first adjacent node;

[0026] If the node type attribute of the first adjacent node is a road node, the second adjacent nodes corresponding to the first adjacent node are queried in the adjacent table to establish a topological relationship between the starting node and the second adjacent node corresponding to the camera node whose node type attribute is a road node.

[0027] Optionally, according to a camera topology relationship construction method provided by the present invention, the updating of the route information set based on the multiple divided routes includes:

[0028] The endpoint positions corresponding to the divided routes are added to the route information set, and the endpoint positions corresponding to the target channel routes in the route information set are deleted.

[0029] The present invention also provides a camera topology relationship construction device, comprising:

[0030] An acquisition module, used to acquire a set of route information of a passage route in a parking lot and a camera position corresponding to a camera, wherein the set of route information includes endpoint positions corresponding to two endpoints in any passage route;

[0031] A segmentation module, for each camera position: based on the camera position, segmenting the target channel route to obtain a plurality of segmented routes, and based on the plurality of segmented routes, updating the route information set, wherein the target channel route refers to the channel route closest to the camera position, and the camera position is an endpoint position corresponding to one of the endpoints in the segmented routes;

[0032] A generating module, used for generating an adjacency table based on the line information set;

[0033] The traversal module is used to search and traverse the adjacency table based on the position of each camera to obtain the topological relationship between the cameras in the parking lot.

[0034] The present invention also provides a computer device, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the above-mentioned camera topological relationship construction method when executing the computer-readable instructions.

[0035] The present invention also provides one or more readable storage media storing computer-readable instructions, and when the computer-readable instructions are executed by a processor, the above-mentioned camera topology relationship construction method is implemented.

[0036] The above-mentioned camera topological relationship construction method, device, equipment and storage medium include: obtaining a route information set of a channel route in a parking lot, and a camera position corresponding to a camera, wherein the route information set includes the endpoint positions corresponding to two endpoints in any channel route; 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 closest to the camera position, and the camera position is the endpoint position corresponding to one of the endpoints in the segmented route; based on the route information set, an adjacency table is generated; based on each of the camera positions, a search and traversal is performed in the adjacency table to obtain the topological relationship between the cameras in the parking lot. The present invention segments the target channel route by using the camera position point as the segmentation point, and then updates the route information set based on the multiple segmented routes obtained by the segmentation, and then generates an adjacency table according to the position in the route information set, and further, in combination with the adjacency table, traverses and queries the adjacent cameras corresponding to each camera, thereby constructing the topological relationship between the cameras in the parking lot. There is no need to manually construct topological relationships based on the positional relationships of the cameras, which effectively improves the efficiency and accuracy of camera topological relationship construction. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0038] Figure 1 It is one of the flowcharts of the method for constructing camera topological relationship in one embodiment of the present invention;

[0039] Figure 2 It is a structural deployment diagram of a parking lot passage route provided by an embodiment of the present invention;

[0040] Figure 3 is a second flow chart of a method for constructing a camera topological relationship in one embodiment of the present invention;

[0041] Figure 4 3 is a flow chart of a method for constructing a camera topology relationship in one embodiment of the present invention;

[0042] Figure 5 FIG4 is a fourth flow chart of a method for constructing a camera topological relationship in an embodiment of the present invention;

[0043] Figure 6 It is a structural deployment diagram of a straight channel provided by an embodiment of the present invention;

[0044] Figure 7 is a structural deployment diagram of a corner channel provided by an embodiment of the present invention;

[0045] Figure 8 It is a structural deployment diagram of a T-shaped channel provided by an embodiment of the present invention;

[0046] Fig. 9 It is a structural deployment diagram of a crossroad passage provided by an embodiment of the present invention;

[0047] Fig.10 is a topological relationship structure diagram between cameras at a crossroads provided by an embodiment of the present invention;

[0048] Fig.11 is a structural schematic diagram of a camera topological relationship construction device in one embodiment of the present invention;

[0049] Fig.12 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] The terms used in one or more embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present invention. The singular forms of "a", "said" and "the" used in one or more embodiments of the present invention are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present invention refers to and includes any or all possible combinations of one or more associated listed items.

[0052] In one embodiment, if Figure 1 As shown, Figure 1 FIG. 1 is a flow chart of a method for constructing a camera topology relationship in an embodiment of the present invention. The method for constructing a camera topology relationship in an embodiment of the present invention includes the following steps:

[0053] Step S11, obtaining a set of route information of passage routes in the parking lot and a camera position corresponding to the camera;

[0054] It should be noted that the channel route is a route formed based on two endpoints. The route information set includes the endpoint positions corresponding to the two endpoints in any channel route. For example, Figure 2 , Figure 2 It is a structural deployment diagram of the parking lot channel route provided by an embodiment of the present invention. The channel route L is a channel route formed according to the endpoint position corresponding to the endpoint Pa and the endpoint position corresponding to the endpoint Pb. In addition, multiple cameras are installed in the parking lot to monitor the situation of the parking lot. It is necessary to obtain the camera position corresponding to the camera, that is, the coordinate point where the camera is located. In one embodiment, the line information set of all channel routes in the parking lot and the camera position corresponding to each camera deployed on the channel route are obtained; in other embodiments, the line information set of some channel routes in the parking lot can also be obtained in combination with actual needs, for example, the line information set of the corner channel route and the T-shaped channel route is obtained, and the line information set of the channel routes in the area with heavy traffic can also be obtained.

[0055] Step S12, 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;

[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 route is obtained, the camera position will be used as the endpoint position corresponding to an endpoint in the segmentation route.

[0057] In one embodiment, the following operations are performed for any camera position: 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 then the channel route with the closest distance is used as the target channel route. Then, the position point corresponding to the camera position is used as the segmentation point, and the target channel route is segmented according to the segmentation point to obtain two segmented routes. Figure 2 , for the channel route L, point P is the camera position corresponding to the camera, and after segmenting the channel route L, the segmented route La corresponding to the endpoint Pa and point P, and the segmented route Lb corresponding to the endpoint Pb and point P are obtained. In other embodiments, since there may be errors in the position marking process, resulting in the position point of the camera not being on the channel route, the projection point of the camera projection on the target channel route can be calculated according to the camera position of the camera, and then the target channel route is segmented according to 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 in the route information set are deleted. It can be understood that, using the above example, the position association of the endpoint Pa and the point P in the divided route La is added to the route information set, and the position association of the endpoint Pb and the point P in the divided route Lb is added to the route information set, and the positions of the endpoint Pa and the endpoint Pb in the channel route L are deleted.

[0059] Step S13, generating an adjacency table based on the line information set;

[0060] In one embodiment, each position in the line information set is deduplicated, and each position after deduplication is numbered to obtain a node number corresponding to each position. For example, the positions on each channel route are numbered in sequence according to the preset channel number. In other embodiments, the positions of each channel route can also be randomly numbered. Further, each position is taken 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 a road node and a camera node. The road node refers to the endpoint corresponding to the channel route in the parking lot, and the camera node refers to the location point of the camera. Further, based on each node and its corresponding adjacent node, an adjacency table is constructed.

[0061] Step S14: Based on the position of each camera, a search is performed in the adjacency table to obtain the topological relationship between the cameras in the parking lot.

[0062] In one embodiment, for any camera position: determine the node number corresponding to the camera position, take the node corresponding to the node number as the starting node, and then query the first adjacent node corresponding to the starting node in the adjacency table. It should be noted that the number of adjacent nodes can be 1 or more. Further, for any first adjacent node: if the node type attribute of the first adjacent node is a camera node, associate the starting node with the 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, further query the adjacent table to obtain each second adjacent node corresponding to the first adjacent node to establish a topological relationship between the starting node and the second adjacent node whose node type attribute is a camera node. After the traversal is completed with the nodes corresponding to all camera positions as the starting nodes, the topological relationship between the cameras in the parking lot is determined based on the topological relationship corresponding to all starting nodes.

[0063] The embodiment of the present invention includes the following steps: obtaining a route information set of a channel route in a parking lot, and a camera position corresponding to a camera, wherein the route information set includes the endpoint positions corresponding to two endpoints in any channel route; for each camera position: based on the camera position, segmenting the target channel route to obtain multiple segmented routes, and updating 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 of the endpoints in the segmented route; generating an adjacency table based on the route information set; searching and traversing the adjacency table based on each camera position to obtain the topological relationship between each camera in the parking lot. The embodiment of the present invention segments the target channel route by using the camera position point as the segmentation point, and then obtains multiple segmented routes based on the segmentation, updates the route information set, and then generates an adjacency table according to the position in the route information set, and further, traverses and queries the adjacent cameras corresponding to each camera in the adjacency table, thereby constructing the topological relationship between each camera in the parking lot. There is no need to manually construct the topological relationship based on the position relationship of the camera, which effectively improves the efficiency and accuracy of the camera topological relationship construction.

[0064] like Figure 3 As shown, Figure 3 FIG2 is a flow chart of a method for constructing a camera topological relationship in an embodiment of the present invention. In an embodiment of the present invention, based on the camera position, the target channel route is segmented 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, taking the channel route with the shortest distance as the target channel route;

[0067] Step S23, generating a division route based on the camera position and the endpoint position corresponding to one endpoint in the target channel route, and generating another division route based on the camera position and the endpoint position corresponding to another endpoint in the target channel route.

[0068] In one embodiment, the following operations are performed for any camera position: 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 then the channel route with the closest distance is used as the target channel route. Then, the target channel route is segmented using the camera position as a segmentation point, that is, based on the camera position and the endpoint position corresponding to one endpoint in the target channel route, a segmentation route is formed, and based on the camera position and the endpoint position corresponding to the other endpoint in the target channel route, another segmentation route is formed. Figure 2For the channel route L, point P is the camera position corresponding to the camera. After segmenting the channel route L, the segmentation route La corresponding to the endpoint Pa and point P, and the segmentation route Lb corresponding to the endpoint Pb and point P are obtained.

[0069] The embodiment of the present invention adopts the above scheme to determine the channel route closest to the camera position, and then uses the camera position of the camera as the segmentation point to segment the target channel route to obtain multiple segmentation routes, thereby integrating the camera position of the camera on the channel route, making it easier to subsequently determine the points directly adjacent to each camera.

[0070] like Figure 4 As shown, Figure 4 FIG3 is a flow chart of a method for constructing a camera topology relationship in an embodiment of the present invention. In an embodiment of the present invention, an adjacency table is generated based on a line information set, including:

[0071] Step S31, taking each endpoint position in the line information set as a node, and determining the adjacent node corresponding to each node according to all endpoint positions;

[0072] Step S32: construct an adjacency list based on each node and its corresponding adjacent nodes.

[0073] It should be noted that each node is associated with a node number and a node type attribute, and the node type attribute includes a road node and a camera node. The node number is a number obtained by sorting the positions of each endpoint in the line information set. Optionally, the numbering process of the node number is as follows: after updating the line information set, all the endpoint positions in the line information set are deduplicated. For example, for a corner channel, the line information set includes any channel route 1 (endpoint a, endpoint b) and channel route 2 (endpoint b, endpoint c). It is necessary to filter out duplicate endpoint b, and then sort and number all the endpoint positions after deduplication to obtain the node number. In one embodiment, each channel route in the parking lot is provided with a channel number, and the endpoints on each route and the camera points of the camera positions corresponding to the route are sorted and numbered in turn according to the channel number to obtain the node numbers corresponding to all points.

[0074] In one embodiment, each endpoint position in the line information set is regarded as a node, and the adjacent nodes corresponding to each node are queried based on all the endpoint positions. For example, referring to Figure 6 , Figure 6: is a structural deployment diagram of a straight channel provided by an embodiment of the present invention. For a P node, the adjacent nodes of the P point are a node P1 and a node P2. Then, based on each node and its corresponding adjacent nodes, an adjacency table is constructed. In other embodiments, each node may also be associated with a distance between its adjacent nodes, and the distance is calculated based on the positions corresponding to the node and the adjacent nodes.

[0075] The embodiment of the present invention adopts the above scheme, takes each endpoint and the position point of the camera as a node, and searches for the adjacent nodes corresponding to each node according to each position to construct an adjacency list, so that the adjacent cameras associated with each camera can be accurately traversed in the adjacency list to obtain the topological relationship between the cameras.

[0076] like Figure 5 As shown, Figure 5 FIG4 is a flow chart of a method for constructing a camera topological relationship in an embodiment of the present invention. In an embodiment of the present invention, based on the position of each camera, a search is performed in the adjacency table to obtain the topological relationship between the cameras in the parking lot, including:

[0077] Step S41, for the camera position of any camera: taking the node corresponding to the camera position as the starting node, querying in the adjacency table to obtain all first adjacent nodes corresponding to the starting node;

[0078] Step S42, determining the topological relationship corresponding to the start node according to the node type attributes corresponding to each first adjacent node;

[0079] Step S43, after the traversal is completed with the nodes corresponding to all camera positions as the starting nodes, the topological relationship between the cameras in the parking lot is determined according to the topological relationship corresponding to all the starting nodes.

[0080] In one embodiment, the following steps are performed for each camera position:

[0081] Determine the node number corresponding to the camera position, and then use the node corresponding to the node number as the starting node, and then query all the first adjacent nodes corresponding to the starting node in the adjacency table. Further, 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; for example, refer to Figure 6, the first adjacent nodes of the current node P include nodes P1 and P2, both nodes P1 and P2 are camera nodes, and then determine to establish the topological relationship between the current node P and node P1 and between the current node P and node P2. In addition, if the node type attribute of the first adjacent node is a road node, then further query the adjacent table to obtain the second adjacent nodes corresponding to the first adjacent node, and then establish the topological relationship between the starting node and the second adjacent node whose node type attribute is a camera node. Figure 7-Figure 8 , Figure 7 is a structural deployment diagram of a corner channel provided by an embodiment of the present invention; Figure 8 It is a structural deployment diagram of a T-shaped channel provided by an embodiment of the present invention; the first adjacent nodes of the current node P include nodes P1 and P2, and node P1 is a camera node; and node P2 is a road node, and then the adjacent nodes of node P2 (node ​​P3 and node P4) are queried, and nodes P3 and P4 are both camera nodes, and then the topological relationship corresponding to the current node P and node P1, the current node P and node P3, and the current node P and node P4 is determined. Fig. 9 , Fig. 9 It is a structural deployment diagram of the intersection channel provided by an embodiment of the present invention; node P2 is a road node, and then the adjacent nodes (node ​​P3, node P4 and node P5) corresponding to node P2 are queried, node P3, node P4 and node P5 are all camera nodes, and the topological relationship corresponding to the current node P and node P1, node P3, node P4 and node P5 is established.

[0082] Furthermore, after the traversal is completed with the nodes corresponding to all camera positions as the starting nodes, the topological relationship between the cameras in the parking lot is determined according to the topological relationship corresponding to all the starting nodes. Figure 6 After establishing the topological relationship between the current node P and the node P1 and the current node P and the node P2, the node P1 is used as the current starting node to determine the topological relationship between the node P1 and other nodes. The above steps are repeated until the traversal is completed with the nodes corresponding to all camera positions as the starting nodes.

[0083] In addition, after constructing the topological relationship between the cameras, the vehicles in the parking lot can be tracked across cameras based on the surveillance videos collected by the cameras and combined with the topological relationship between the cameras. Fig.10 , Fig.10It is a topological relationship structure diagram between cameras at an intersection provided by an embodiment of the present invention. Taking the most complex intersection as an example, the location camera is used as a landmark point to construct a network diagram, and the vehicle is relay-tracked by linking adjacent cameras. The original topological relationship structure of the camera is an undirected graph, but in the tracking process, it can be regarded as a directed graph according to the identified direction of vehicle travel. For example, camera A in the figure recognizes that the vehicle is traveling to the right. According to the topological relationship between each camera, the camera that will be able to monitor the vehicle should be B1, C1 or D1, and it cannot be A1 (in the opposite direction), nor can it be B2, C2 and D2 (will not jump directly to non-adjacent areas). Thus, the video monitored by B1, C1 or D1 completes the cross-camera tracking of the vehicle.

[0084] The embodiment of the present invention uses the above solution to traverse the adjacent cameras corresponding to each camera by combining the adjacency list and the node type attribute corresponding to the node, thereby constructing the topological relationship between the cameras in the parking lot. There is no need to manually construct the topological relationship based on the position relationship of the cameras, which effectively improves the efficiency and accuracy of the camera topological relationship construction.

[0085] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean 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 embodiment of the present invention.

[0086] In one embodiment, a camera topology relationship construction device is provided, and the camera topology relationship construction device corresponds to the camera topology relationship construction method in the above embodiment. Fig.11 As shown, Fig.11 : is a schematic diagram of a structure of a camera topology relationship construction device in one embodiment of the present invention, the camera topology relationship construction device comprises:

[0087] An acquisition module 51 is used to acquire a set of line information of a passage route in a parking lot and a camera position corresponding to a camera, wherein the set of line information includes endpoint positions corresponding to two endpoints in any passage route;

[0088] The segmentation module 52 is used for: for each camera position: based on the camera position, segmenting the target channel route to obtain multiple segmented routes, and based on the multiple segmented routes, updating the route information set, wherein the target channel route refers to the channel route closest to the camera position, and the camera position is an endpoint position corresponding to one of the endpoints in the segmented routes;

[0089] A generating module 53, configured to generate an adjacency table based on the line information set;

[0090] The traversal module 54 is used to search and traverse the adjacency table based on the position of each camera to obtain the topological relationship between the cameras 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] The closest channel route is taken as the target channel route;

[0094] A division route is generated based on the camera position and an endpoint position corresponding to one endpoint in the target channel route, and another division route is generated based on the camera position and an endpoint position corresponding to another endpoint in the target channel route.

[0095] The generation module 53 is also used for:

[0096] Each endpoint position in the line information set is regarded as a node, and the adjacent nodes corresponding to each node are determined according to all the endpoint positions, wherein each node is associated with a node number and a node type attribute, and the node type attribute includes a road node and a camera node, and the node number is a number obtained by sorting the endpoint positions in the line information set;

[0097] Based on each node and its corresponding adjacent nodes, an adjacency list is constructed.

[0098] The camera topology relationship building device includes:

[0099] A deduplication module, used for deduplicating 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] The traversal module 54 is also used for:

[0102] For the camera position of any camera: take the node corresponding to the camera position as the starting node, and query in the adjacency table to obtain all the first adjacent nodes corresponding to the starting node;

[0103] Determine the topological relationship corresponding to the start node according to the node type attributes corresponding to each first adjacent node;

[0104] After the traversal is completed with the nodes corresponding to all camera positions as the starting nodes, the topological relationship between the cameras in the parking lot is determined according to the topological relationship corresponding to all the starting nodes.

[0105] The 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, a topological relationship between the start node and the first adjacent node is established;

[0108] If the node type attribute of the first adjacent node is a road node, the second adjacent nodes corresponding to the first adjacent node are queried in the adjacent table to establish a topological relationship between the start node and the second adjacent node corresponding to the camera node whose node type attribute is a camera node.

[0109] The segmentation module 52 is also used for:

[0110] 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 in the route information set are deleted.

[0111] For the specific definition of the camera topology relationship construction device, please refer to the definition of the camera topology relationship construction method above, which will not be repeated here. Each module in the above-mentioned camera topology relationship construction device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0112] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.12 As shown, Fig.12 : is a schematic diagram of a computer device in an embodiment of the present invention. The computer device includes a processor, a memory, a network interface and a database connected by a device bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The readable storage medium stores an operating device, a computer-readable instruction and a database. The internal memory provides an environment for the operation of the operating device and the computer-readable instructions in the readable storage medium. The database of the computer device is used to store data involved in the camera topology relationship construction method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instruction is executed by the processor, a camera topology relationship construction method is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

[0113] In one embodiment, a computer device is provided. The computer device may be a terminal device, and its internal structure diagram may be as follows: Fig.12As shown. The computer device includes a processor, a memory, and a network interface connected through a device bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium. The readable storage medium stores computer-readable instructions. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, a method for constructing a camera topological relationship is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

[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, the steps of the camera topology relationship construction method described above are implemented.

[0115] In one embodiment, a readable storage medium is provided, the readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the camera topology relationship construction method as described above are implemented. A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may 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 many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0116] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by 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, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A camera topology relationship construction method, characterized in that: include: Obtaining a route information set of a passage route in a parking lot and a camera position corresponding to a camera, wherein the route information set includes endpoint positions corresponding to two endpoints in any passage route; For each camera position: based on the camera position, the target channel route is segmented to obtain a plurality of segmented routes, and based on the plurality of segmented routes, the route information set is updated, wherein the target channel route refers to the channel route closest to the camera position, and the camera position is an endpoint position corresponding to one of the endpoints in the segmented routes; Based on the line information set, generate an adjacency table; Based on the position of each camera, a search and traversal is performed in the adjacency table to obtain the topological relationship between the cameras in the parking lot.

2. The camera topology relationship construction method according to claim 1, characterized in that: The target channel route is segmented based on the camera position 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; Taking the channel route with the shortest distance as the target channel route; Based on the camera position and the endpoint position corresponding to one endpoint in the target channel route, a divided route is generated, and based on the camera position and the endpoint position corresponding to another endpoint in the target channel route, another divided route is generated.

3. The camera topology relationship construction method according to claim 1, characterized in that: The step of generating an adjacency table based on the line information set includes: Each endpoint position in the line information set is regarded as a node, and the adjacent nodes corresponding to each node are determined according to all the endpoint positions, wherein each node is associated with a node number and a node type attribute, the node type attribute includes a road node and a camera node, and the node number is a number obtained by sorting the endpoint positions in the line information set; Based on each node and its corresponding adjacent nodes, the adjacency list is constructed.

4. The camera topology relationship construction method according to claim 3, characterized in that: The node number is determined based on the following steps: Deduplication processing is performed on all endpoint positions in the line information set; All the endpoint positions after duplication are sorted and numbered to obtain the node number.

5. The camera topology relationship construction method according to claim 1, characterized in that: The step of searching and traversing the adjacency table based on the positions of the cameras to obtain the topological relationship between the cameras in the parking lot includes: For the camera position of any of the cameras: taking the node corresponding to the camera position as the starting node, querying in the adjacency table to obtain all first adjacent nodes corresponding to the starting node; Determining a topological relationship corresponding to the start node according to a node type attribute corresponding to each of the first adjacent nodes; After the traversal is completed with the nodes corresponding to all camera positions as the starting nodes, the topological relationship between the cameras in the parking lot is determined according to the topological relationship corresponding to all the starting nodes.

6. The camera topology relationship construction method according to claim 5, characterized in that: The determining, according to the node type attributes corresponding to each of the first adjacent nodes, the topological relationship corresponding to the start node includes: For any first adjacent node: If the node type attribute of the first adjacent node is a camera node, establishing a topological relationship between the start node and the first adjacent node; If the node type attribute of the first adjacent node is a road node, the second adjacent nodes corresponding to the first adjacent node are queried in the adjacent table to establish a topological relationship between the starting node and the second adjacent node corresponding to the camera node whose node type attribute is a road node.

7. The camera topology relationship construction method according to claim 1, characterized in that: The updating of the route information set based on the plurality of divided routes includes: The endpoint positions corresponding to the divided routes are added to the route information set, and the endpoint positions corresponding to the target channel routes in the route information set are deleted.

8. A camera topology relationship construction device, characterized in that: include: An acquisition module, used to acquire a set of route information of a passage route in a parking lot and a camera position corresponding to a camera, wherein the set of route information includes endpoint positions corresponding to two endpoints in any passage route; A segmentation module, for each camera position: based on the camera position, segmenting the target channel route to obtain a plurality of segmented routes, and based on the plurality of segmented routes, updating the route information set, wherein the target channel route refers to the channel route closest to the camera position, and the camera position is an endpoint position corresponding to one of the endpoints in the segmented routes; A generating module, used for generating an adjacency table based on the line information set; The traversal module is used to search and traverse the adjacency table based on the position of each camera to obtain the topological relationship between the cameras in the parking lot.

9. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executed on the processor, characterized in that: When the processor executes the computer-readable instructions, the camera topology relationship construction method according to any one of claims 1 to 7 is implemented.

10. A readable storage medium having computer readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the camera topology relationship construction method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Parking lot map generation method, electronic equipment and vehicle

    CN118225075A

  • Automatic spatial calibration of camera network

    US20160012589A1