A camera positioning method, device and storage medium

By calculating the distance and angle between the camera and the signal source using a wireless sensor network, and controlling the camera to turn towards the signal source, the problem of blind spots in spherical camera monitoring is solved, enabling timely and accurate management of goods.

CN116347242BActive Publication Date: 2026-07-10SHENZHEN HUIHAI YUNLIAN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN HUIHAI YUNLIAN TECH CO LTD
Filing Date
2023-02-07
Publication Date
2026-07-10

Smart Images

  • Figure CN116347242B_ABST
    Figure CN116347242B_ABST
Patent Text Reader

Abstract

The application relates to a camera positioning method and device and a storage medium, and belongs to the camera field. The method comprises the following steps: acquiring a target signal emitted by a signal source, and positioning a target wireless sensor network where the signal source is located; acquiring a node coordinate of a sink node in the target wireless sensor network; acquiring a communication distance between the sink node and the signal source; acquiring a first coordinate of a first camera and a second coordinate of a second camera; calculating a first distance between the first camera and the signal source, and calculating a second distance between the second camera and the signal source; making a first circular coverage interval and a second circular coverage interval; positioning an intersection point of the first circular coverage interval and the second circular coverage interval; if the intersection point is one, taking the intersection point as the target signal source, and controlling the first camera and the second camera to turn to the target signal source. The application has the effect of facilitating the management of goods by managers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cameras, and in particular to a camera positioning method, device and storage medium. Background Technology

[0002] In large warehouses, due to the large number of people and vehicles entering and exiting, a spherical surveillance camera is installed in each goods storage area to ensure the normal operation of the warehouse. This camera is used for 24 / 7 rotating monitoring. Because the goods are stacked high inside the warehouse, to prevent the goods from obstructing the monitoring line of sight, the monitoring system in the warehousing and logistics warehouse is usually installed using a suspended method. That is, by adding an extension pole, the camera is suspended from the warehouse ceiling, so that the camera image is not easily obstructed.

[0003] In existing technology, pressure sensors are usually installed at the locations where goods are stacked inside the warehouse to weigh the goods. If an accident occurs during the stacking of goods, such as the goods tipping over or the weight of the goods being inconsistent with the weight pre-entered into the system, the pressure sensors can detect it in time and issue an alarm.

[0004] Regarding the aforementioned prior art, the applicant believes that since the spherical camera rotates at a fixed angle once, pauses for a few seconds, and then continues to rotate, if goods in the warehouse are in the current blind spot of the spherical camera, the spherical camera may not be able to detect it in time. This will result in the back-end management personnel not being able to detect the unexpected goods in time when they receive the alarm from the pressure sensor, making it inconvenient for the management personnel to manage the goods. Summary of the Invention

[0005] To facilitate the management of goods by managers, this application provides a camera positioning method, device, and storage medium.

[0006] Firstly, the camera positioning method provided in this application adopts the following technical solution:

[0007] A camera positioning method, comprising:

[0008] Acquire the target signal emitted by the signal source and locate the target wireless sensor network where the signal source is located;

[0009] Obtain the node coordinates of the aggregation node in the target wireless sensor network;

[0010] Obtain the communication distance between the aggregation node and the signal source; the aggregation node and the signal source are located on the same horizontal plane; obtain the first coordinates of the first camera and the second coordinates of the second camera;

[0011] The first distance between the first camera and the signal source is calculated, and the second distance between the second camera and the signal source is calculated.

[0012] A first circular coverage area is drawn with the first camera as the center and the first distance as the radius, and a second circular coverage area is drawn with the second camera as the center and the second distance as the radius;

[0013] Locate the intersection point of the first circular coverage area and the second circular coverage area;

[0014] If there is only one intersection point, the intersection point is used as the target signal source, and the first camera and the second camera are controlled to turn towards the target signal source.

[0015] By adopting the above technical solution, the signal source emits a target signal, indicating that the goods where the signal source is located have encountered an accident. At this time, the target signal source is acquired in the wireless sensor network composed of signal sources, and the first camera and the second camera are controlled to turn towards the target signal source. Thus, when the signal source emits a signal, the first camera and the second camera turn towards the target signal source, which makes it easier for the camera to locate the target signal source in time, thereby facilitating the management of goods by the management personnel.

[0016] Optionally, calculating the first distance between the first camera and the signal source, and calculating the second distance between the second camera and the signal source, includes:

[0017] Obtain the first connection between the aggregation node and the first camera, obtain the second connection between the aggregation node and the second camera, and obtain the target connection between the aggregation node and the signal source;

[0018] Obtain the first angle between the first connecting line and the target connecting line, and obtain the second angle between the second connecting line and the target connecting line;

[0019] Calculate the first length of the first connecting line based on the node coordinates and the first coordinates, and calculate the second length of the second connecting line based on the node coordinates and the second coordinates;

[0020] The first distance between the first camera and the signal source is calculated based on the first length, the communication distance, and the first included angle.

[0021] The second distance between the second camera and the signal source is calculated based on the second length, the communication distance, and the second included angle.

[0022] By adopting the above technical solution, both the first distance and the second distance are calculated, effectively ensuring the accuracy of the calculation of the first distance and the second distance.

[0023] Optionally, after locating the intersection point of the first circular coverage area and the second circular coverage area, the method further includes:

[0024] If there are two intersection points, locate the first intersection point and the second intersection point, and obtain the first node coordinates of the first intersection point and the second node coordinates of the second intersection point;

[0025] Calculate the first communication distance between the convergence node and the first intersection point based on the coordinates of the first node, and calculate the second communication distance between the convergence node and the second intersection point based on the coordinates of the second node;

[0026] The first communication distance, the second communication distance, and the communication distance are compared respectively.

[0027] If the first communication distance is the same as the communication distance, the first node is used as the target signal source;

[0028] If the second communication distance is the same as the communication distance, the second node is used as the target signal source.

[0029] By adopting the above technical solution, when there are two intersection points, determining the intersection point where the target signal source is located effectively ensures the accuracy of the positioning of the first and second cameras, thereby further facilitating the management of goods by managers.

[0030] Optionally, obtaining the coordinates of the first node of the first intersection point and the coordinates of the second node of the second intersection point includes:

[0031] The camera distance between the first camera and the second camera is calculated based on the first coordinate and the second coordinate.

[0032] Substituting the first coordinate, the second coordinate, the camera distance, the first distance, and the second distance into a preset mathematical model, the coordinates of the first node and the coordinates of the second node are obtained.

[0033] By adopting the above technical solution, the coordinates of the first node and the coordinates of the second node are both calculated through mathematical models, which effectively saves calculation time and thus improves positioning efficiency.

[0034] Optionally, after acquiring the target signal emitted by the signal source and locating the target wireless sensor network where the signal source is located, the process includes:

[0035] Determine whether the signal source is the aggregation node;

[0036] If it is the convergence node, the convergence node is used as the target signal source, and the first camera and the second camera are controlled to turn towards the target signal source;

[0037] If it is not the aggregation node, perform the step of obtaining the node coordinates of the aggregation node in the target wireless sensor network.

[0038] By adopting the above technical solution, after acquiring the target signal emitted by the signal source, it is first determined whether the signal source is a convergence node. When the signal source is a convergence node, the first camera and the second camera are directly controlled to turn towards the target signal source, which effectively ensures the accuracy of the positioning of the first camera and the second camera.

[0039] Optionally, after controlling the first camera and the second camera to turn towards the target signal source, the following steps are included:

[0040] If there are multiple signal sources at the same time, acquire all the target signal sources and assign priority to each target signal source based on the distance between each target signal source and the first camera;

[0041] The first camera is controlled to turn towards the target signal source in a manner from maximum priority to minimum priority, and the second camera is controlled to turn towards the target signal source in a manner from minimum priority to maximum priority;

[0042] Control the first camera and the second camera to capture and upload images of the scene.

[0043] By adopting the above technical solution, when multiple signal sources appear at the same time, the first camera and the second camera do not turn to the same target signal source, but turn to different target signal sources in sequence, thereby effectively improving the efficiency of the first camera and the second camera in locating the goods.

[0044] Optionally, after controlling the first camera and the second camera to capture and upload scene images, the process includes:

[0045] According to a preset image recognition algorithm, the scene image is compared with a preset initial image to obtain the similarity between the initial image and the scene image;

[0046] An alarm signal is output when the similarity is less than the standard similarity.

[0047] By adopting the above technical solution, when the similarity is less than the standard similarity, it indicates that there is a serious accident with the goods. At this time, an alarm signal is output to prompt the management personnel to manage the goods in a timely manner.

[0048] Secondly, the device provided in this application adopts the following technical solution:

[0049] A device includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor loads and executes the computer program using the aforementioned camera positioning method.

[0050] By adopting the above technical solution, a computer program is generated from the above camera positioning method and stored in a memory for loading and execution by a processor. Thus, a device can be manufactured based on the memory and processor for convenient use.

[0051] Thirdly, the computer-readable storage medium provided in this application adopts the following technical solution:

[0052] A computer-readable storage medium storing a computer program, which, when loaded and executed by a processor, employs the aforementioned camera positioning method.

[0053] By adopting the above technical solution, a computer program is generated by the above camera positioning method and stored in a computer-readable storage medium so that it can be loaded and executed by a processor. The computer-readable storage medium facilitates the reading and storage of the computer program.

[0054] In summary, this application has at least one of the following beneficial technical effects:

[0055] 1. In a wireless sensor network composed of signal sources, the target signal source is acquired, and the first and second cameras are controlled to turn towards the target signal source. This allows the first and second cameras to turn towards the target signal source when the signal source emits a signal, making it easier for the cameras to locate the target signal source in a timely manner, which in turn helps managers to manage the goods.

[0056] 2. When there are two intersection points, determining the intersection point where the target signal source is located effectively ensures the accuracy of the positioning of the first and second cameras, thereby further facilitating the management of goods by the managers.

[0057] 3. When multiple signal sources appear at the same time, the first camera and the second camera do not turn towards the same target signal source, but turn towards different target signal sources in sequence, thereby effectively improving the efficiency of the first camera and the second camera in locating the goods. Attached Figure Description

[0058] Figure 1 This is a flowchart illustrating one embodiment of a camera positioning method according to an example of this application.

[0059] Figure 2This is a flowchart illustrating one embodiment of a camera positioning method according to an example of this application.

[0060] Figure 3 This is a flowchart illustrating one embodiment of a camera positioning method according to an example of this application.

[0061] Figure 4 This is a flowchart illustrating one embodiment of a camera positioning method according to an example of this application.

[0062] Figure 5 This is a flowchart illustrating one embodiment of a camera positioning method according to an example of this application.

[0063] Figure 6 This is a flowchart illustrating one embodiment of a camera positioning method according to an example of this application.

[0064] Figure 7 This is a flowchart illustrating one embodiment of a camera positioning method according to an example of this application. Detailed Implementation

[0065] The following is in conjunction with the appendix Figures 1 to 7 This application will be described in further detail.

[0066] This application discloses a camera positioning method.

[0067] Reference Figure 1 A camera positioning method includes the following steps:

[0068] S101. Acquire the target signal emitted by the signal source and locate the target wireless sensor network where the signal source is located.

[0069] To facilitate better understanding, the application scenario of this application is first described. The warehouse is divided into several placement areas, and each placement area has several stacking positions for placing goods. Each stacking position is equipped with a pressure sensor. In this embodiment, the pressure sensors in each placement area are combined into a wireless sensor network. In addition, each placement area has two spherical cameras, and the two spherical cameras are located on the same horizontal line. Specifically, the two cameras are located on both sides of all the goods.

[0070] Wireless sensor networks consist of sensor nodes, aggregation nodes, and management nodes. Pressure data is detected by distributing a large number of sensors throughout the monitored area, with each sensor self-organizing to form a network. The sensors collect the detected pressure data in a specific way and send it to the aggregation node. Finally, the aggregation node transmits all the pressure data to the management node via satellite, the internet, or mobile communication networks. A sensor node consists of four parts: a sensor module, a processor module, a wireless communication module, and a power supply module. The sensor module monitors information within the area, collects the information, and converts it into data in a specific format. The processor module processes and stores the collected data, including data collected by itself and data transmitted from other nodes. The wireless communication module communicates wirelessly with other sensor nodes, exchanging information and data. The power supply module powers the sensor node, typically using a miniature battery.

[0071] Pressure data monitored by sensor nodes is transmitted hop-by-hop along other sensor nodes. During transmission, the pressure data may be processed by multiple nodes, routed to the aggregation node after multiple hops, and finally reach the management node via the Internet or satellite. Users configure and manage the sensor network, issue monitoring tasks, and collect monitoring data through the management node.

[0072] A signal source refers to an object that generates and emits signals; that is, the origin of the signal. In this embodiment, the signal source refers to a pressure sensor in a wireless sensor network. The target signal refers to the alarm signal emitted when the pressure sensor detects a discrepancy between the weight of the goods and a pre-set weight.

[0073] Upon receiving the target signal from the signal source, the aggregation node can be located, and at this point, the target wireless sensor network can be located.

[0074] S102. Obtain the node coordinates of the sink node in the target wireless sensor network.

[0075] After locating the target sensor network, the node coordinates are obtained from a pre-set node coordinate database, which stores the coordinates of the aggregation node in each wireless sensor network.

[0076] S103. Obtain the communication distance between the aggregation node and the signal source; the aggregation node and the signal source are located on the same horizontal plane.

[0077] The communication distance between the aggregation node and the signal source is the distance between two nodes in a wireless sensor network. Commonly used methods for measuring the distance between nodes in wireless sensor networks include TOA, TDOA, ultrasonic, RSSI, and TOF. In this embodiment, RSSI ranging technology is used to measure the communication distance between the aggregation node and the signal source.

[0078] RSSI ranging technology, in ranging based on Received Signal Strength Indicator (RSSI), uses the known transmitted signal strength of the transmitting node. The receiving node calculates the signal propagation loss based on the received signal strength and uses an attenuation model between signal and distance to convert the transmission loss into the distance between nodes. This will not be elaborated further here.

[0079] S104. Obtain the first coordinates of the first camera and the second coordinates of the second camera.

[0080] The first coordinates of the first camera and the second coordinates of the second camera are both stored in a pre-set camera coordinate database. Therefore, the first coordinates of the first camera and the second coordinates of the second camera can be obtained through the camera coordinate database.

[0081] S105. Calculate the first distance between the first camera and the signal source, and calculate the second distance between the second camera and the signal source.

[0082] The first distance between the first camera and the signal source can be calculated using the law of cosines. That is, first obtain the distance between the first camera and the aggregation node, and then obtain the angle between the distance between the first camera and the aggregation node and the communication distance. The first distance can then be calculated using the law of cosines. Similarly, the second distance between the second camera and the signal source can be calculated using the law of cosines. That is, first obtain the distance between the second camera and the aggregation node, and then obtain the angle between the distance between the second camera and the aggregation node and the communication distance. The second distance can then be calculated using the law of cosines.

[0083] S106. With the first camera as the center and the first distance as the radius, a first circular coverage area is formed, and with the second camera as the center and the second distance as the radius, a second circular coverage area is formed.

[0084] There are two cases where the first and second circular coverage areas intersect. The first case is that the first and second circular coverage areas are tangent, in which case there is only one intersection point. The second case is that the first and second circular coverage areas intersect, in which case there are two intersection points.

[0085] S107. Locate the intersection point of the first circular coverage area and the second circular coverage area.

[0086] After generating the first and second circular coverage areas, the number of intersection points can be determined and the intersection points can be located.

[0087] S108. If there is only one intersection point, the intersection point is used as the target signal source, and the first camera and the second camera are controlled to turn towards the target signal source.

[0088] If there is only one intersection point, it indicates that the intersection point is the target signal source. In this case, the first camera and the second camera are controlled to turn towards the target signal source so that the camera can locate the target signal source.

[0089] The implementation principle of this embodiment is as follows: when a signal source emits a target signal, it indicates that an accident has occurred to the goods where the signal source is located. At this time, the target signal source is acquired in the wireless sensor network composed of signal sources, and the first camera and the second camera are controlled to turn towards the target signal source. Thus, when the signal source emits a signal, the first camera and the second camera turn towards the target signal source, which makes it easier for the camera to locate the target signal source in time, thereby facilitating the management of the goods by the management personnel.

[0090] exist Figure 1 In step S105 of the illustrated embodiment, a first distance between the first camera and the signal source is calculated, and a second distance between the second camera and the signal source is calculated. Specifically, this is achieved through... Figure 2 The embodiments shown will be described in detail.

[0091] Reference Figure 2 The calculation of the first distance between the first camera and the signal source, and the calculation of the second distance between the second camera and the signal source, includes the following steps:

[0092] S201. Obtain the first connection between the aggregation node and the first camera, obtain the second connection between the aggregation node and the second camera, and obtain the target connection between the aggregation node and the signal source.

[0093] In this embodiment, a first test connection is made between the first camera and the signal source, and the first connection, the target connection, and the first test connection form a triangle; a second test connection is made between the second camera and the signal source, and the second connection, the second test connection, and the target connection form a triangle.

[0094] S202. Obtain the first angle between the first connecting line and the target connecting line, and obtain the second angle between the second connecting line and the target connecting line.

[0095] In this embodiment, in the wireless sensor network, the angles of the angle formed by the camera, the aggregation node, and the sensor nodes with the aggregation node as the vertex are all stored in a pre-set angle database. Therefore, the first included angle and the second included angle can be obtained through the angle database.

[0096] S203. Calculate the first length of the first connection line based on the node coordinates and the first coordinate. Calculate the second length of the second connection line based on the node coordinates and the second coordinate.

[0097] Given the coordinates of two points, namely the node coordinates and the first coordinate, we can calculate the first length and the second length using the distance formula between the two points. The distance formula between the two points is as follows:

[0098] Let there be two points A and B with coordinates (x1, y1) and (x2, y2) respectively. Then the distance d between points A and B is:

[0099] S204. Based on the first length, communication distance and first included angle, calculate the first distance between the first camera and the signal source.

[0100] Since the first connecting line, the target connecting line, and the first connecting line to be measured form a triangle, and the length of the first connecting line is the first length, the length of the target connecting line is the communication distance, and the acute angle formed by the target connecting line and the first connecting line is the first included angle, that is, given two sides of the triangle and the included angle between the two sides, the other side of the triangle, i.e., the first distance, can be calculated according to the cosine theorem.

[0101] S205. Based on the second length, the communication distance, and the second included angle, calculate the second distance between the second camera and the signal source.

[0102] Similar to step S204, since the second connecting line, the target connecting line and the second connecting line to be measured form a triangle, and the length of the second connecting line is the second length, the length of the target connecting line is the communication distance, and the acute angle formed by the target connecting line and the second connecting line is the second included angle, that is, given two sides of the triangle and the included angle between the two sides, the other side of the triangle, i.e. the second distance, can be calculated according to the cosine theorem.

[0103] The camera positioning method provided in this embodiment calculates both the first distance and the second distance, effectively ensuring the accuracy of the calculation of the first distance and the second distance.

[0104] exist Figure 1 After step S107 in the illustrated embodiment, if there are two intersection points, it is necessary to filter out the intersection point where the target signal source is located from the two intersection points. Specifically, through... Figure 3 The embodiments shown will be described in detail.

[0105] Reference Figure 3 After locating the intersection point of the first circular coverage area and the second circular coverage area, the following steps are also included:

[0106] S301. If there are two intersection points, locate the first intersection point and the second intersection point, and obtain the coordinates of the first node of the first intersection point and the coordinates of the second node of the second intersection point.

[0107] In practice, the calculation process is displayed on the screen. If there are two intersection points, these two points can be located on the screen: the first intersection point and the second intersection point. In the triangle formed by the first camera, the first intersection point, and the second camera, given the lengths of the three sides and the coordinates of the two vertices (i.e., the first coordinates of the first camera and the second coordinates of the second camera), the coordinates of the first and second nodes can be obtained based on a pre-defined mathematical model. Knowing the lengths of the three sides and the coordinates of the two vertices of the triangle, the mathematical model is used to solve for the last side of the triangle.

[0108] S302. Calculate the first communication distance between the convergence node and the first intersection point based on the coordinates of the first node, and calculate the second communication distance between the convergence node and the second intersection point based on the coordinates of the second node.

[0109] Similarly to step S204, given the coordinates of the first node and the sink node, the first communication distance can be calculated using the distance formula between the two points; given the coordinates of the second node and the sink node, the second communication distance can be calculated using the distance formula between the two points.

[0110] S303. Compare the first communication distance, the second communication distance, and the communication distance respectively.

[0111] Specifically, the first communication distance, the second communication distance, and the communication distance are compared to determine whether the first communication distance and the second communication distance are the same as the communication distance.

[0112] S304. If the first communication distance is the same as the communication distance, the first node shall be used as the target signal source.

[0113] S305. If the second communication distance is the same as the communication distance, the second node shall be used as the target signal source.

[0114] Since there is only one target signal source, the target signal source whose distance to the aggregation node is the same as the communication distance is selected from the first communication distance and the second communication distance by checking whether it is consistent with the communication distance.

[0115] The camera positioning method provided in this embodiment, when there are two intersection points, effectively ensures the accuracy of positioning of the first and second cameras by determining the intersection point where the target signal source is located, thereby further facilitating the management of goods by managers.

[0116] exist Figure 3 In step S301 of the illustrated embodiment, the coordinates of the first node and the second node can be calculated and obtained through a pre-set mathematical model. Specifically, through... Figure 4 The embodiments shown will be described in detail.

[0117] Reference Figure 4 To obtain the coordinates of the first node at the first intersection point and the second node at the second intersection point, the following steps are included:

[0118] S401. Calculate the camera distance between the first camera and the second camera based on the first coordinate and the second coordinate.

[0119] The distance between the first and second cameras can be calculated using the formula for the distance between two points, based on the first and second coordinates.

[0120] S402. Substitute the first coordinate, the second coordinate, the camera distance, the first distance, and the second distance into the preset mathematical model to obtain the coordinates of the first node and the second node.

[0121] As can be seen from step S301, the lengths of the three sides of the triangle and the coordinates of the two vertices of the triangle are known. The mathematical model is used to solve for the last side of the triangle. Therefore, when the first coordinate, the second coordinate, the first distance, the camera distance, and the second distance are known, that is, when the lengths of the three sides of the triangle and the coordinates of the two vertices of the triangle are known, the coordinates of the first node and the second node can be obtained according to the mathematical model.

[0122] The camera positioning method provided in this embodiment calculates the coordinates of the first node and the second node using a mathematical model, effectively saving calculation time and thus improving positioning efficiency.

[0123] exist Figure 1 After step S101 in the illustrated embodiment, Xu determines whether the signal source is a convergence node. Specifically, through... Figure 5 The embodiments shown will be described in detail.

[0124] Reference Figure 5 After acquiring the target signal emitted by the signal source and locating the target wireless sensor network where the signal source is located, the process includes the following steps:

[0125] S501. Determine whether the signal source is a convergence node.

[0126] After locating the target wireless sensor network where the signal source is located, if the target signal source is a convergence node, no further steps are required, and the first and second cameras can be directly controlled to turn towards the target signal source.

[0127] S502. If it is a convergence node, the convergence node is used as the target signal source, and the first camera and the second camera are controlled to turn towards the target signal source.

[0128] S503. If it is not a sink node, execute the step of obtaining the node coordinates of the sink node in the target wireless sensor network.

[0129] If the target signal source is not a convergence node, then step S102, which is to obtain the node coordinates of the convergence node in the target wireless sensor network, is executed.

[0130] The camera positioning method provided in this embodiment first determines whether the signal source is a convergence node after acquiring the target signal emitted by the signal source, and directly controls the first camera and the second camera to turn towards the target signal source when the signal source is a convergence node, effectively ensuring the accuracy of the positioning of the first camera and the second camera.

[0131] exist Figure 1 After step S108 of the illustrated embodiment, if there are multiple signal sources at the same time, efficiency can be improved by controlling the first camera and the second camera to turn towards different target signal sources. Specifically, through... Figure 6 The embodiments shown will be described in detail.

[0132] Reference Figure 6 After controlling the first and second cameras to turn towards the target signal source, the following steps are included:

[0133] S601. If there are multiple signal sources at the same time, acquire all target signal sources and assign priority to each target signal source based on the distance between each target signal source and the first camera.

[0134] If multiple signal sources exist simultaneously within the same wireless sensor network, it indicates that there are multiple target signal sources. In this case, all target signal sources are acquired according to steps S101 to S108. The priority determination rule is: the greater the distance, the higher the priority of the target signal source corresponding to that distance; that is, the maximum distance has the highest priority.

[0135] S602, control the first camera to turn towards the target signal source in a manner from maximum priority to minimum priority, and control the second camera to turn towards the target signal source in a manner from minimum priority to maximum priority.

[0136] If the first camera and the second camera simultaneously turn towards the same target signal source, and then simultaneously turn towards another target signal source after shooting, until all target signal sources have been turned towards, the positioning efficiency of the target signal source will be greatly reduced. Therefore, at this time, the first camera is controlled to turn towards the target signal source in a manner from the highest priority to the lowest priority, and the second camera is controlled to turn towards the target signal source in a manner from the lowest priority to the highest priority, so that the turning order of the first camera and the second camera is reversed, which effectively improves the positioning efficiency of the target signal source.

[0137] S603, Control the first and second cameras to capture and upload images of the scene.

[0138] When the first or second camera turns towards the target signal source, it controls the first and second cameras to capture images of the scene and upload them to a pre-set platform.

[0139] The camera positioning method provided in this embodiment, when multiple signal sources appear at the same time, does not turn the first camera and the second camera to the same target signal source, but instead turn to different target signal sources in sequence, thereby effectively improving the efficiency of the first camera and the second camera in locating goods.

[0140] exist Figure 6 After step S603 of the illustrated embodiment, the scene image and the initial image can be compared using an image recognition algorithm to obtain the similarity between the initial image and the scene image. Specifically, through... Figure 7 The embodiments shown will be described in detail.

[0141] Reference Figure 7 After controlling the first camera and the second camera to capture and upload the scene images, the process includes the following steps: S701, according to the preset image recognition algorithm, the scene images are compared with the preset initial images to obtain the similarity between the initial images and the scene images.

[0142] In this embodiment, the image recognition algorithm refers to the NCC fast similarity matching algorithm, which is used to compare the similarity between two images. The algorithm steps of the NCC fast similarity matching algorithm are as follows: convert the color image to a grayscale image; pre-calculate the integral images of the template image and the target image; perform NCC calculation using the integral images according to the input window radius; obtain the matching or non-matching regions according to the threshold; and output the results.

[0143] The similarity between the initial image and the on-site image can be obtained using image recognition algorithms.

[0144] S702. When the similarity is less than the standard similarity, an alarm signal is output.

[0145] The similarity score ranges from 0 to 1. The closer to 1, the more similar the two images are. In this embodiment, the standard similarity score is 0.6. Therefore, if the similarity score is less than 0.6, it indicates that there is a problem with the goods, and an alarm signal is output. Specifically, the alarm signal is an audible and visual signal.

[0146] The camera positioning method provided in this embodiment indicates a serious accident involving the goods when the similarity is less than the standard similarity. At this time, an alarm signal is output to prompt the management personnel to take timely action and facilitate the management of the goods.

[0147] This application also discloses a device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program using the camera positioning method described in the above embodiments.

[0148] The device can be a desktop computer, laptop computer, or cloud server, and includes, but is not limited to, a processor and memory. For example, the device may also include input / output devices, network access devices, and buses.

[0149] The processor can be a central processing unit (CPU). Of course, depending on the actual use, it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc., and this application does not limit it in this regard.

[0150] The memory can be an internal storage unit of the device, such as the device's hard disk or RAM, or an external storage device of the device, such as a plug-in hard disk, smart memory card (SMC), secure digital card (SD), or flash memory card (FC) equipped on the device. Furthermore, the memory can also be a combination of the device's internal storage unit and external storage device. The memory is used to store computer programs and other programs and data required by the device. The memory can also be used to temporarily store data that has been output or will be output. This application does not limit this.

[0151] In this device, the camera positioning method described in the above embodiments is stored in the device's memory and loaded and executed on the device's processor for convenient use.

[0152] This application also discloses a computer-readable storage medium, which stores a computer program, wherein when the computer program is executed by a processor, it employs the camera positioning method described in the above embodiments.

[0153] The computer program can be stored in a computer-readable medium. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or certain middleware. The computer-readable medium includes any entity or device capable of carrying computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the computer-readable medium includes, but is not limited to, the above-mentioned components.

[0154] The XXXXX method in the above embodiments is stored in the computer-readable storage medium and loaded and executed on the processor to facilitate the storage and application of the above method.

[0155] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.

Claims

1. A camera positioning method, characterized in that, include: Acquire the target signal emitted by the signal source and locate the target wireless sensor network where the signal source is located; Obtain the node coordinates of the aggregation node in the target wireless sensor network; Obtain the communication distance between the aggregation node and the signal source; The convergence node and the signal source are located on the same horizontal plane; Obtain the first coordinates of the first camera and the second coordinates of the second camera; The first distance between the first camera and the signal source is calculated, and the second distance between the second camera and the signal source is calculated. A first circular coverage area is drawn with the first camera as the center and the first distance as the radius, and a second circular coverage area is drawn with the second camera as the center and the second distance as the radius; Locate the intersection point of the first circular coverage area and the second circular coverage area; If there is only one intersection point, the intersection point is used as the target signal source, and the first camera and the second camera are controlled to turn towards the target signal source; The calculation of the first distance between the first camera and the signal source, and the calculation of the second distance between the second camera and the signal source, include: Obtain the first connection between the aggregation node and the first camera, obtain the second connection between the aggregation node and the second camera, and obtain the target connection between the aggregation node and the signal source; Obtain the first angle between the first connecting line and the target connecting line, and obtain the second angle between the second connecting line and the target connecting line; Calculate the first length of the first connecting line based on the node coordinates and the first coordinates, and calculate the second length of the second connecting line based on the node coordinates and the second coordinates; The first distance between the first camera and the signal source is calculated based on the first length, the communication distance, and the first included angle. The second distance between the second camera and the signal source is calculated based on the second length, the communication distance, and the second included angle.

2. The camera positioning method according to claim 1, characterized in that, After locating the intersection point of the first circular coverage area and the second circular coverage area, the method further includes: If there are two intersection points, locate the first intersection point and the second intersection point, and obtain the first node coordinates of the first intersection point and the second node coordinates of the second intersection point; Calculate the first communication distance between the convergence node and the first intersection point based on the coordinates of the first node, and calculate the second communication distance between the convergence node and the second intersection point based on the coordinates of the second node; The first communication distance, the second communication distance, and the communication distance are compared respectively. If the first communication distance is the same as the communication distance, the first node is used as the target signal source; If the second communication distance is the same as the communication distance, the second node is used as the target signal source.

3. The camera positioning method according to claim 2, characterized in that, The step of obtaining the coordinates of the first node of the first intersection point and the coordinates of the second node of the second intersection point includes: The camera distance between the first camera and the second camera is calculated based on the first coordinate and the second coordinate. Substituting the first coordinate, the second coordinate, the camera distance, the first distance, and the second distance into a preset mathematical model, the coordinates of the first node and the coordinates of the second node are obtained.

4. The camera positioning method according to claim 1, characterized in that, After acquiring the target signal emitted by the signal source and locating the target wireless sensor network where the signal source is located, the process includes: Determine whether the signal source is the aggregation node; If it is the convergence node, the convergence node is used as the target signal source, and the first camera and the second camera are controlled to turn towards the target signal source; If it is not the aggregation node, perform the step of obtaining the node coordinates of the aggregation node in the target wireless sensor network.

5. A camera positioning method according to claim 1, characterized in that, After controlling the first camera and the second camera to turn towards the target signal source, the following is included: If there are multiple signal sources at the same time, acquire all the target signal sources and assign priority to each target signal source based on the distance between each target signal source and the first camera; The first camera is controlled to turn towards the target signal source in a manner from maximum priority to minimum priority, and the second camera is controlled to turn towards the target signal source in a manner from minimum priority to maximum priority; Control the first camera and the second camera to capture and upload images of the scene.

6. The camera positioning method according to claim 5, characterized in that, After controlling the first camera and the second camera to capture and upload images of the scene, the process includes: According to a preset image recognition algorithm, the scene image is compared with a preset initial image to obtain the similarity between the initial image and the scene image; An alarm signal is output when the similarity is less than the standard similarity.

7. A device for applying the camera positioning method according to any one of claims 1 to 6, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor loads and executes the computer program, it employs the method described in any one of claims 1 to 6.

8. A computer-readable storage medium for applying the camera positioning method according to any one of claims 1 to 6, wherein the computer-readable storage medium stores a computer program, characterized in that, When the computer program is loaded and executed by the processor, it employs the method described in any one of claims 1 to 6.