Layout method and device of camera equipment, storage medium and electronic equipment
By identifying blind spots and redundant areas in the field of view of camera equipment and optimizing camera layout using target trajectory data, the problem of inaccurate camera equipment layout is solved, achieving efficient and accurate camera equipment layout and improving the dynamic tracking capability and resource utilization efficiency of the monitoring system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MULTIPOINT (SHENZHEN) DIGITAL TECH CO LTD
- Filing Date
- 2026-02-03
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, the camera equipment layout is inaccurate, making it impossible to effectively assess the ability to track continuous dynamic moving targets in actual operating scenarios, resulting in blind spots and redundant areas being difficult to identify.
By determining the state of the target object, identifying blind spots and redundant areas, and using target trajectory data to adjust the layout of camera equipment, the camera layout is optimized by combining stress testing and data-driven methods to ensure no blind spots and efficient resource utilization.
It enables precise adjustment of camera equipment layout, improves dynamic tracking capabilities, identifies and eliminates potential blind spots, reduces redundant equipment, lowers costs, and improves the efficiency of the monitoring system.
Smart Images

Figure CN121908151A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a layout method, apparatus, storage medium, and electronic device for a camera device. Background Technology
[0002] In related technologies, pedestrian tracking systems based on video surveillance are a core means of improving security and management efficiency, and are highly dependent on the physical layout of cameras. However, camera layout planning mainly relies on the experience of security engineers or uses simple coverage models, which cannot assess the ability of camera networks to track real, continuous, and dynamically moving targets in actual operating scenarios.
[0003] This indicates that there is a problem with the inaccurate layout of camera equipment in the relevant technology.
[0004] There is currently no effective solution to the aforementioned problems in the relevant technologies. Summary of the Invention
[0005] This application provides a method, apparatus, storage medium, and electronic device for laying out a camera device, so as to at least solve the technical problem of inaccurate camera device layout in the related art.
[0006] According to one aspect of the embodiments of this application, a layout method for a camera device is provided, comprising: determining a first state of the target object obtained by the first camera device monitoring the target object in the target area, wherein the target object moves according to predetermined target trajectory data; if the first state is a lost state, determining a blind spot of the camera device based on the lost position; if the first state is a tracking state, determining a redundant area included in the target area based on the tracking state; and adjusting the current layout of the first camera device based on the blind spot and the redundant area to obtain a target layout.
[0007] In an exemplary embodiment, determining the blind spot of the first camera device based on the lost location includes: dividing the target area into multiple target grids; for each target grid, performing the following operations to determine the density value of the target grid: if the target grid includes the lost location, determining a lost coordinate point based on the lost location, and determining the density value based on the lost coordinate point; if the target grid does not include the lost location, setting the density value to a preset value; determining a target density value that is greater than or equal to a first preset threshold included in the density value; and determining the target grid corresponding to the target density value as the blind spot.
[0008] In an exemplary embodiment, determining the redundant region included in the target region based on the tracking state includes: dividing the target region into multiple target grids; for each target grid, performing the following operations to determine a first quantity corresponding to each target grid: determining an image obtained by the first camera device capturing the target grid, determining a target image included in the image, wherein the first state of the target object included in the target image is a tracking state, determining a second quantity of the second camera device capturing the target image as the first quantity; determining a number of targets included in the first quantity that is greater than a second preset threshold; and determining the target grids corresponding to the target quantity as the redundant region.
[0009] In an exemplary embodiment, adjusting the current layout of the camera device based on the blind spot and the redundant area to obtain a target layout includes: determining a first layout of a third camera device to be added in the target area based on the blind spot; determining a fourth camera device included in the first camera device based on the redundant area, wherein the fourth camera device is a device to be adjusted; determining a second layout based on the fourth camera device; and adjusting the current layout based on the first layout and the second layout to obtain the target layout.
[0010] In an exemplary embodiment, determining a first layout of a third camera device to be added in a target area based on the blind spot includes: generating a plurality of initial layouts based on the blind spot and the building structure of the target area; determining a reward value for each initial layout based on the installation position of the third camera device included in the initial layout and the first device parameters of the third camera device; determining the maximum value among the plurality of reward values; and determining the initial layout corresponding to the maximum value as the first layout.
[0011] In an exemplary embodiment, determining the reward value for each initial layout based on the installation location of the third camera device included in the initial layout and the first device parameters of the third camera device includes: for each initial layout, performing the following operations to determine the reward value of the initial layout: when the third camera device is installed at the installation location and monitors the target area with the first device parameters, determining the overlap area between the field of view and the blind spot of the third camera device; updating the current layout according to the initial layout to obtain a third layout; determining the second state of the target object obtained by the fifth camera device in the third layout monitoring the target object, wherein the target object moves according to the target trajectory data; determining the number of targets included in the repair trajectory in the target trajectory corresponding to the target trajectory data, wherein the first state of the repair trajectory is a lost state and the second state is a tracking state; determining the monitoring overlap area between the third layout and the current layout; and weighted summing the overlap area, the number of targets, and the monitoring overlap area to obtain the reward value.
[0012] In an exemplary embodiment, determining a fourth camera device included in the first camera device based on the redundant region includes: determining the redundancy contribution of each sixth camera device monitoring the redundant region; determining a target contribution that satisfies a third preset threshold among the redundancy contributions; and determining the sixth camera device corresponding to the target contribution as the fourth camera device.
[0013] In an exemplary embodiment, determining a second layout based on the fourth camera device includes: performing the following operations for each of the fourth camera devices to determine the second layout: adjusting the fourth camera device according to the fourth layout to obtain a fifth layout, wherein the fourth layout includes one of the following: removing the fourth camera device; adjusting the second device parameters of the fourth camera device; determining a third state obtained by the fourth camera device in the fifth layout monitoring the target object, wherein the target object moves according to the target trajectory data; determining a third number of lost states included in the third state; determining a first ratio of the third number to the target length, and a first percentage of the first ratio; determining a fourth number of lost states included in the first state; determining a second ratio of the fourth number to the target length, and a second percentage of the second ratio; determining the difference between the first percentage and the second percentage; determining a target difference value that is less than a fourth preset threshold included in the difference; and determining the fifth layout corresponding to the target difference as the second layout.
[0014] In an exemplary embodiment, determining the first state of the target object obtained by the first camera device monitoring the target object in the target area includes: when the target object changes from an initial tracking state to an initial lost state, determining a predicted area based on the target trajectory data; determining a plurality of first objects included in the predicted area within a preset time period; determining the similarity between a first feature vector of each first object and a second feature vector of the target object; if a target similarity exists in the similarity, determining the first state as a tracking state, wherein the target similarity is greater than or equal to a fifth preset threshold; if no target similarity exists in the similarity, determining the first state as a lost state.
[0015] In an exemplary embodiment, before determining the first state of the target object obtained by the first camera device monitoring the target object in the target area, the method further includes: acquiring historical trajectory data of other objects included in the target area; and constructing a target database based on the historical trajectory data, the target database including multiple target trajectory data.
[0016] In an exemplary embodiment, constructing a target database based on the historical trajectory data includes: segmenting each piece of historical trajectory data to obtain trajectory segments, wherein each trajectory segment includes a start point and an end point; dividing the trajectory segments into sub-trajectory segment sets, wherein each sub-trajectory segment set includes a type of sub-trajectory segment, and each trajectory segment includes the sub-trajectory segments; determining a fifth number of the sub-trajectory segments included in each sub-trajectory segment set; determining the proportion of the sub-trajectory segment set based on the fifth number; constructing a target matrix based on the proportion and the sub-trajectory segment sets; and constructing the target database based on the target matrix.
[0017] In an exemplary embodiment, constructing the target database based on the target matrix includes: generating an initial trajectory; repeatedly performing the following operations to update the initial trajectory until the updated initial trajectory meets a preset condition, and determining the updated initial trajectory as the target trajectory data included in the target database: determining a connection point from the target matrix; determining a first trajectory category, wherein the category of a trajectory whose starting point is the end point of the initial trajectory and whose ending point is the connection point is the first trajectory type; determining a first trajectory in a set of sub-trajectory segments with the same first trajectory category; connecting the first trajectory to the initial trajectory to obtain an updated initial trajectory, and updating the end point of the updated initial trajectory to the end point of the first trajectory; wherein the preset condition includes the updated initial trajectory being greater than a preset length or the end point of the updated initial trajectory being a preset point.
[0018] According to another aspect of the embodiments of this application, a layout device for a camera device is also provided, comprising: a first determining module, configured to determine a first state of the target object obtained by the first camera device monitoring a target object in a target area, wherein the target object moves according to predetermined target trajectory data; a second determining module, configured to determine a blind spot of the camera device based on the lost position when the first state is a lost state; a third determining module, configured to determine a redundant area included in the target area based on the tracking state when the first state is a tracking state; and an adjusting module, configured to adjust the current layout of the first camera device based on the blind spot and the redundant area to obtain a target layout.
[0019] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed by a processor.
[0020] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps in any of the method embodiments described above.
[0021] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to perform the steps of any of the above method embodiments through the computer program.
[0022] This application allows for the monitoring of target objects within a target area using a first camera device. The first state of each target object can be determined, whereby the target object moves according to pre-defined target trajectory data. When the first state of a target object is determined to be lost, the blind spot of the camera device can be identified by its location at the time of loss. When the first state of a target object is determined to be tracked, redundant areas within the target area can be identified by the tracking status. Finally, the current layout of the first camera device can be adjusted based on the blind spot and redundant areas to obtain the target layout. Because the evaluation criteria can be upgraded from static field coverage to dynamic continuous tracking capability (i.e., real-time monitoring of the target object's initial state), the evaluation results can be more realistic. Moreover, through massive virtual movement lines (i.e., the aforementioned target trajectory data), all potential, yet-to-be-exposed tracking blind spots can be proactively discovered and located. Furthermore, it can distinguish between geometric redundancy and functional redundancy (i.e., determining redundant areas through the target object's tracking state, rather than simply through the geographical location of the first camera device), accurately identifying cameras that are truly ineffective for the tracking task, achieving cost reduction and efficiency improvement, and avoiding accidental deletion. Therefore, it can solve the problem of inaccurate camera device layout and achieve the effect of accurate camera device layout. Attached Figure Description
[0023] Figure 1 This is a schematic diagram illustrating an application scenario of a layout method for a camera device according to an embodiment of this application;
[0024] Figure 2 This is a schematic flowchart of an optional camera device layout method according to an embodiment of this application;
[0025] Figure 3 This is a flowchart illustrating the layout method of the camera device in this optional example.
[0026] Figure 4 This is a structural block diagram of an optional layout device for a camera according to an embodiment of this application;
[0027] Figure 5 This is a computer system architecture block diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0030] According to one aspect of the embodiments of this application, a method for laying out a camera device is provided. Optionally, in this embodiment, the above-described method for laying out a camera device may be applied, but is not limited to, to applications such as... Figure 1 The hardware environment shown includes terminal device 102 and server 104. Server 104 can be connected to terminal device 102 via a network and can be used to provide services (e.g., application services, etc.) to terminal device 102 or clients installed on terminal device 102. A database can be set up on server 104 or independently of server 104 to provide data storage services for server 104.
[0031] The aforementioned network may include, but is not limited to, at least one of the following: wired network and wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network (WAN), metropolitan area network (MAN), and local area network (LAN). The aforementioned wireless network may include, but is not limited to, at least one of the following: Wireless Fidelity (WIFI) and Bluetooth. Terminal device 102 may be, but is not limited to, a personal computer (PC), mobile phone, tablet computer, etc. Server 104 may be, but is not limited to, a cloud server, server cluster, or other server types.
[0032] The camera device layout method of this application embodiment can be executed by server 104, terminal device 102, or jointly by server 104 and terminal device 102. The camera device layout method of this application embodiment can also be executed by a client installed on the terminal device 102.
[0033] Figure 2 This is a flowchart illustrating an optional camera device layout method according to an embodiment of this application, as shown below. Figure 2 As shown, the process of this method may include the following steps:
[0034] Step S202: Determine the first state of the target object obtained by the first camera device monitoring the target object in the target area, wherein the target object moves according to the predetermined target trajectory data;
[0035] The camera placement method described in this embodiment can be applied to retail, logistics and warehousing, public safety and urban planning, as well as enterprise offices and smart buildings. Specifically, it can be applied to scenarios such as large shopping malls, supermarket monitoring, unmanned convenience stores, smart warehouse management, smart city projects, enterprise park monitoring, and smart building security. (Explanation of terms used). In large-scale indoor spaces such as retail, warehousing, and smart buildings, video surveillance-based pedestrian tracking systems have become a core means of improving safety and management efficiency. However, the effectiveness of pedestrian tracking systems is highly dependent on the physical layout of the cameras. An excellent placement scheme should achieve the following two core objectives: first, blind-spot-free coverage, ensuring continuous and seamless tracking of key targets (such as customers and employees); second, high efficiency and no redundancy, avoiding the waste of hardware costs and computing resources caused by multiple cameras covering the same area. However, in related technologies, camera layout planning mainly relies on the experience of security engineers or uses simple coverage models. Both methods have fundamental flaws: they cannot assess the camera network's ability to track real, continuous, and dynamically moving targets in actual operating scenarios. In other words, a layout that theoretically has no geometric blind spots may experience numerous tracking interruptions in practical applications due to factors such as shelf obstruction, lighting changes, camera resolution limitations, and the limitations of pedestrian re-identification algorithms. Furthermore, the "redundancy" of relying solely on overlap determination based on geometric field of view may mistakenly remove cameras crucial for ensuring tracking robustness.
[0036] To at least partially solve the above-mentioned technical problems, this embodiment provides a disruptive approach to camera layout optimization. This approach transforms the planning of the surveillance system from relying on human experience to a scientific process through "data-driven" and "stress testing." Its core value lies in evaluating and optimizing the system closely around its ultimate business goal—achieving stable, continuous, and efficient pedestrian tracking—thereby ensuring optimal resource allocation while guaranteeing safety.
[0037] In the above embodiments, for each virtual movement line consisting of a series of (x,y,t) points... (i.e., the target trajectory data mentioned above) can simulate a point target (i.e., the target object mentioned above) moving along the path in the target area in a corresponding time series. A tracking state machine can also be set for each target object to maintain its first state. That is, the first state of the target object can be monitored by a camera device. The first state can include the tracked state and the interrupted / lost state.
[0038] Step S204: When the first target is in a lost state, determine the blind spot of the camera device based on the lost location;
[0039] In the above embodiments, the first state may include an interruption / loss state, which can be understood as the target object disappearing from the field of view of all the first camera devices. When the target object is determined to be in an interruption / loss state, it can be recorded as a tracking interruption event. Then, the spatial coordinates (x, y) of the position where the interruption occurred (i.e., the aforementioned loss position) can be recorded. Finally, the coordinates of all interruption events can be counted to generate a continuous tracking interruption heatmap. The highlighted area in the tracking interruption heatmap is the dynamic blind spot (i.e., the aforementioned field of view blind spot).
[0040] Step S206: When the first state is a tracking state, determine the redundant regions included in the target region based on the tracking state;
[0041] In the above embodiments, the first target state may further include a tracked state, which can be understood as the target object being within the field of view of at least one camera device, and the position of the target object matching a target detected by the first camera device. When the target object is determined to be in a tracked state, redundant areas in the target region can be determined based on the number of camera devices that have determined the tracked state.
[0042] Step S208: Adjust the current layout of the first camera device based on the blind spot and the redundant area to obtain the target layout.
[0043] In the above embodiments, a structured report (such as JSON / PDF format) can be generated based on the blind spots and redundant areas. This report may include an execution summary, a quantitative indicator comparison table, a list of optimization suggestions, and visual attachments. The execution summary can outline the core issues and optimization potential. The quantitative indicator comparison table may include the global average tracking interruption rate ((total interruptions / total virtual trajectory length)). 100%), Blind Spot Area Percentage ((Total Blind Spot Grids / Total Grids) 100%) and average camera redundancy (( / Total number of grids, only for (Sum of grid cells greater than or equal to 2) This can be understood as a grid generated after dividing the target area. The optimization suggestion list can include blind spot elimination and redundancy reduction. Blind spot elimination can be understood as listing the ID, location, angle, estimated cost, and effect of each recommended new / adjusted camera. Redundancy reduction can be understood as the ID, operation type, estimated savings, and risk analysis of each removable / adjustable camera. Visual attachments can include heatmaps before and after optimization, redundancy area maps, layout comparison maps, etc. By analyzing the above structured report, various schemes for adjusting the current layout of the first camera device in the target area can be identified. Evaluating each scheme can then determine the optimal target layout.
[0044] This application allows for the monitoring of target objects within a target area using a first camera device. The first state of each target object can be determined, whereby the target object moves according to pre-defined target trajectory data. When the first state of a target object is determined to be lost, the blind spot of the camera device can be identified by its location at the time of loss. When the first state of a target object is determined to be tracked, redundant areas within the target area can be identified by the tracking status. Finally, the current layout of the first camera device can be adjusted based on the blind spot and redundant areas to obtain the target layout. Because the evaluation criteria can be upgraded from static field coverage to dynamic continuous tracking capability (i.e., real-time monitoring of the target object's initial state), the evaluation results can be more realistic. Moreover, through massive virtual movement lines (i.e., the aforementioned target trajectory data), all potential, yet-to-be-exposed tracking blind spots can be proactively discovered and located. Furthermore, it can distinguish between geometric redundancy and functional redundancy (i.e., determining redundant areas through the target object's tracking state, rather than simply through the geographical location of the first camera device), accurately identifying cameras that are truly ineffective for the tracking task, achieving cost reduction and efficiency improvement, and avoiding accidental deletion. Therefore, it can solve the problem of inaccurate camera device layout and achieve the effect of accurate camera device layout.
[0045] Optionally, the entity performing the above steps can be a terminal, a client, a server, or other devices with similar processing capabilities, but is not limited to these.
[0046] In an exemplary embodiment, determining the blind spot of the first camera device based on the lost location includes: dividing the target area into multiple target grids; for each target grid, performing the following operations to determine the density value of the target grid: if the target grid includes the lost location, determining a lost coordinate point based on the lost location, and determining the density value based on the lost coordinate point; if the target grid does not include the lost location, setting the density value to a preset value; determining a target density value that is greater than or equal to a first preset threshold included in the density value; and determining the target grid corresponding to the target density value as the blind spot.
[0047] In the above embodiments, during the identification of dynamic blind spots, the entire monitoring area (i.e., the target area) can be divided into regular square grids, rectangular grids, etc. (i.e., the target grids), for example, a square grid with a side length of 0.5 meters. For each target grid, its density value can be determined: when the target grid includes lost positions, all interruption events (i.e., lost positions) of all movement lines (i.e., the target trajectory data) included in each target grid including lost positions can be counted first. Then, the coordinates of each interruption event (i.e., the lost coordinate points) can be determined. Afterward, the kernel density estimation method can be used to calculate the kernel density estimate value corresponding to each lost coordinate point, and then the density value of each target grid can be calculated through the kernel density estimate value. However, when a target grid does not have lost positions, the density value can be directly set to a preset value of 0.
[0048] In the above embodiments, after the density value of each target grid in the target area is calculated, a continuous tracking interruption heatmap can be generated. Each density value can be compared with a first preset threshold, and the highlighted area (i.e., the density is greater than or equal to the first preset threshold) is determined as a dynamic blind zone (i.e., the above-mentioned field blind zone).
[0049] This embodiment defines and discovers blind spots at the algorithm level based on the continuous frame loss criterion, which can upgrade the evaluation standard from "static field coverage" to "dynamic continuous tracking capability", aligning it with the system's ultimate business objectives and ensuring that the evaluation results are true and reliable.
[0050] In an exemplary embodiment, determining the redundant region included in the target region based on the tracking state includes: dividing the target region into multiple target grids; for each target grid, performing the following operations to determine a first quantity corresponding to each target grid: determining an image obtained by the first camera device capturing the target grid, determining a target image included in the image, wherein the first state of the target object included in the target image is a tracking state, determining a second quantity of the second camera device capturing the target image as the first quantity; determining a number of targets included in the first quantity that is greater than a second preset threshold; and determining the target grids corresponding to the target quantity as the redundant region.
[0051] In the above embodiments, during the process of identifying redundant areas, the entire monitoring area (i.e., the target area) can be divided into regular square grids, rectangular grids, etc. (i.e., the target grids), for example, a square grid with a side length of 0.5 meters. For each target grid, the initial number of redundant camera devices in each target grid can be determined: First, a two-dimensional array coverage_count with the same shape as the target grid can be initialized, with all elements initially set to 0. During the stress test (i.e., the target object moves in the target trajectory data), when any virtual target (i.e., the target object) enters a target grid... And by a certain camera When successful tracking (i.e., in a "tracked" state), record. This covered The tracking events within the array are incremented by 1 for each element of the two-dimensional array. After the test, the statistics for each target grid are calculated. The number of different cameras that the CCP has successfully tracked within the grid can be determined by the corresponding values in a two-dimensional array, which represents the number of cameras M covering the grid. That is, the target image can be determined from the images captured by all the first camera devices on the target grid. The first state of the target object in the target image is the tracking state, which allows us to determine the second number M of the second camera devices that captured the target image. This second number is the first number of redundant camera devices. By iterating through the second number of the second camera devices in all grids, if there exists M > K (K can be 3, i.e., the aforementioned second preset threshold, where M is the number of targets), then the target grid can be marked as a redundant grid. The set of all redundant grids constitutes a redundant region.
[0052] This embodiment combines stress test results (rather than relying solely on field-of-view overlap) to evaluate camera redundancy, thus distinguishing between "geometric redundancy" and "functional redundancy," accurately identifying cameras that are truly ineffective for the tracking task, achieving cost reduction and efficiency improvement, and avoiding accidental deletion.
[0053] In an exemplary embodiment, adjusting the current layout of the camera device based on the blind spot and the redundant area to obtain a target layout includes: determining a first layout of a third camera device to be added in the target area based on the blind spot; determining a fourth camera device included in the first camera device based on the redundant area, wherein the fourth camera device is a device to be adjusted; determining a second layout based on the fourth camera device; and adjusting the current layout based on the first layout and the second layout to obtain the target layout.
[0054] In the above embodiments, after identifying blind spots and redundant areas, the current layout can be adjusted by adjusting these areas to obtain the target layout. For blind spots, they can be eliminated by adding a third camera device to the blind spot within the target area and determining the optimal layout of the third camera device (i.e., the first layout described above). For redundant areas, a fourth camera device included in the first camera device can be identified and its optimal layout can be determined (i.e., the second layout described above). Finally, the current layout can be adjusted simultaneously using both the first and second layouts to obtain the target layout that eliminates blind spots and reduces redundant areas.
[0055] This embodiment combines blind spot elimination and redundancy reduction to automatically adjust the camera layout, ensuring neither blind spots nor over-coverage. This achieves efficient utilization of monitoring resources, not only improving the overall performance of the monitoring system but also optimizing the design of the camera network and reducing the complexity of later maintenance and upgrades.
[0056] In an exemplary embodiment, determining a first layout of a third camera device to be added in a target area based on the blind spot includes: generating a plurality of initial layouts based on the blind spot and the building structure of the target area; determining a reward value for each initial layout based on the installation position of the third camera device included in the initial layout and the first device parameters of the third camera device; determining the maximum value among the plurality of reward values; and determining the initial layout corresponding to the maximum value as the first layout.
[0057] In the above embodiments, around the blind zone polygon (a blind zone formed by clustering continuous high-density interrupted grids), a series of feasible installation points (i.e., the initial layout mentioned above) can be automatically generated based on the architectural structure diagram of the target area (such as CAD drawings, Computer-Aided Design), excluding load-bearing walls, ventilation ducts, and other areas where installation is not permitted. For each initial layout, the installation of the third camera device can be simulated based on the determined points of each third camera device (i.e., the installation positions mentioned above), camera model, pitch angle, and yaw angle (i.e., the first device parameters mentioned above). The parameters under each initial layout can then be substituted into the constructed objective function. F In this process, a greedy algorithm or a genetic algorithm is used to search the candidate solution space to select the solution that best suits the objective function. F The layout that maximizes the reward value (i.e., the maximum value mentioned above) is taken as the first layout.
[0058] This embodiment calculates a reward value for each initial layout scheme, comprehensively considering improvements in blind zone coverage, tracking performance enhancements, and the impact of added redundancy on resource efficiency. Quantitative evaluation allows for an objective comparison of the merits of different layout schemes, avoiding potential biases from decisions based on intuition or experience, and achieving optimal cost-effectiveness.
[0059] In an exemplary embodiment, determining the reward value for each initial layout based on the installation location of the third camera device included in the initial layout and the first device parameters of the third camera device includes: for each initial layout, performing the following operations to determine the reward value of the initial layout: when the third camera device is installed at the installation location and monitors the target area with the first device parameters, determining the overlap area between the field of view and the blind spot of the third camera device; updating the current layout according to the initial layout to obtain a third layout; determining the second state of the target object obtained by the fifth camera device in the third layout monitoring the target object, wherein the target object moves according to the target trajectory data; determining the number of targets included in the repair trajectory in the target trajectory corresponding to the target trajectory data, wherein the first state of the repair trajectory is a lost state and the second state is a tracking state; determining the monitoring overlap area between the third layout and the current layout; and weighted summing the overlap area, the number of targets, and the monitoring overlap area to obtain the reward value.
[0060] In the above embodiments, the reward value is determined by inputting the parameters of different initial layouts into the objective function. The objective function is determined by the blind area covered by the third camera device with different initial layouts (i.e., the aforementioned overlapping area), the newly added overlapping area generated by the third camera device and the current layout (i.e., the aforementioned monitoring overlapping area), and how many traffic lines that were originally interrupted are repaired after retesting according to the initial layout (i.e., the aforementioned target number). F The formula is shown below: F = + ,in, , , This is a weighting coefficient, which can be adjusted according to business priorities; The aforementioned overlapping area can be understood as the overlapping area of the blind spot that the monitored field of view can cover when the third camera device is installed at the installation position set in the initial layout and the target area is monitored with the first device parameters. The target number mentioned above can be understood as the target number of the repaired trajectories (i.e. the repaired trajectories) in the target trajectory data when the fifth camera device retests the third layout after updating the current layout according to the initial layout. The repaired trajectory is the first state of the current layout as the lost state and the second state of the third layout as the tracking state. This refers to the aforementioned overlapping area of the monitoring system, which can be understood as the newly added overlapping area between the third layout and the current layout.
[0061] Through this embodiment, continuous stress testing and data-driven optimization enable adaptive adjustments to camera layout to address challenges such as environmental changes and evolving requirements. This not only solves current problems but also provides a scientific basis and implementation path for the long-term evolution of surveillance systems.
[0062] In an exemplary embodiment, determining a fourth camera device included in the first camera device based on the redundant region includes: determining the redundancy contribution of each sixth camera device monitoring the redundant region; determining a target contribution that satisfies a third preset threshold among the redundancy contributions; and determining the sixth camera device corresponding to the target contribution as the fourth camera device.
[0063] In the above embodiments, for each sixth camera device in the redundant area The redundancy contribution can be calculated for each of them, and the redundancy contribution can be calculated using the following formula: =α ( (Area of redundant grid covered) + β ( The functional redundancy rate within the redundant grid), where α and β represent weight values, can be understood as the functional redundancy rate within the redundant grid. Within the redundant grid coverage, over 90% of the successfully tracked target objects were also being tracked simultaneously by other cameras.
[0064] In the above embodiment, after calculating the redundancy contribution of each sixth camera device, it can be... Sort the cameras from highest to lowest and select the sixth camera from either the top N or bottom N as the candidate list L, which is the fourth camera. Alternatively, determine the target contribution that meets the third preset threshold from multiple redundant contribution values, and determine the sixth camera corresponding to the target contribution value as the fourth camera.
[0065] By calculating the actual redundancy contribution of the sixth camera in the redundant area, we can go beyond simple geometric overlap assessment and take into account the functional redundancy of the device in actual tracking tasks. This helps to accurately identify cameras that have significant overlap with other camera devices in terms of coverage and are not indispensable at the functional level, providing a scientific basis for redundancy reduction.
[0066] In an exemplary embodiment, determining a second layout based on the fourth camera device includes: performing the following operations for each of the fourth camera devices to determine the second layout: adjusting the fourth camera device according to the fourth layout to obtain a fifth layout, wherein the fourth layout includes one of the following: removing the fourth camera device; adjusting the second device parameters of the fourth camera device; determining a third state obtained by the fourth camera device in the fifth layout monitoring the target object, wherein the target object moves according to the target trajectory data; determining a third number of lost states included in the third state; determining a first ratio of the third number to the target length, and a first percentage of the first ratio; determining a fourth number of lost states included in the first state; determining a second ratio of the fourth number to the target length, and a second percentage of the second ratio; determining the difference between the first percentage and the second percentage; determining a target difference value that is less than a fourth preset threshold included in the difference; and determining the fifth layout corresponding to the target difference as the second layout.
[0067] In the above embodiment, for each fourth camera device in the candidate list L All of these can be adjusted according to the fourth layout to obtain the fifth layout. The fourth layout can include simulated removal and simulated adjustment. Simulated removal can be understood as removing the fourth camera device. Temporarily removing it from the layout and simulating the adjustment can be understood as adjusting the second device parameters of the fourth camera, such as the yaw angle ±10°, to make it avoid the main redundant area.
[0068] In the above embodiments, after determining multiple fifth layouts, the fourth camera device can perform a rapid stress test. This involves using a subset of movement lines (a portion of the target trajectory data, e.g., 10,000 lines) to determine the third state obtained by the fourth camera device monitoring the target object for each fifth layout. Then, the second layout can be determined by the change in the global average tracking interruption rate ΔR. Specifically, the third number of lost states included in the third state and the fourth number of lost states included in the first state can be determined separately. A first ratio of the third number to the total virtual movement line length (the length of all target trajectories, i.e., the aforementioned target length), a first percentage of the first ratio, a second ratio of the fourth number to the target length, and a second percentage of the second ratio can be calculated. If the difference between the first percentage and the second percentage contains a target difference ΔR less than a fourth preset threshold δ, and no new high-priority blind spots are generated in a fixed area (critical area, such as entrances / exits, or premium areas), the fifth layout corresponding to the target difference can be determined as a safe layout and recorded, i.e., the aforementioned second layout. The fourth preset threshold can be understood as an acceptable threshold, such as 0.5%.
[0069] By analyzing the adjustment effects of each fourth camera device one by one, the camera layout can be optimized more meticulously. Whether it is removing redundant devices or fine-tuning device parameters, each operation is based on a comparison of specific differences with preset thresholds, ensuring that every adjustment is the best decision made for actual performance.
[0070] In an exemplary embodiment, determining the first state of the target object obtained by the first camera device monitoring the target object in the target area includes: when the target object changes from an initial tracking state to an initial lost state, determining a predicted area based on the target trajectory data; determining a plurality of first objects included in the predicted area within a preset time period; determining the similarity between a first feature vector of each first object and a second feature vector of the target object; if a target similarity exists in the similarity, determining the first state as a tracking state, wherein the target similarity is greater than or equal to a fifth preset threshold; if no target similarity exists in the similarity, determining the first state as a lost state.
[0071] In the above embodiment, when it is detected that the target object changes from the "being tracked state" to the "lost state", that is, when it changes from the initial tracking state to the initial lost state, a counter frame_count = 0 can be started. In each frame (simulating time stepping) within the subsequent preset duration, an attempt is made to recapture the target object in all the first cameras. The capture logic is as follows: The next position of the target object (i.e., the above-mentioned target prediction position) can be determined through the target trajectory data. Calculate the ReID feature vectors of the multiple first objects included in the target prediction position (i.e., the above-mentioned first feature vectors) and the ReID determined for the target object before it was lost (i.e., the above-mentioned second feature vectors). Determine the cosine similarity between the first feature vector and the second feature vector. If there is a target similarity greater than or equal to the fifth preset threshold in the cosine similarity, it can be determined as a recapture. That is, if a recapture occurs when frame_count < Q (i.e., the above-mentioned preset duration, which can be 15 frames, approximately 0.5 seconds), the first state is restored to the "tracking state", and this short-term loss is not counted as an interrupted loss event. If frame_count reaches Q and no recapture occurs, a tracking interruption loss event is recorded, and the spatial coordinates (x, y) at the time of the interruption are recorded.
[0072] Through this embodiment, when the target object changes from the initial tracking state to the initial lost state, it is possible to quickly restore the tracking state through the setting of the prediction area and subsequent feature vector matching, which can significantly reduce the tracking interruption caused by environmental factors such as short-term occlusion, improving the continuity and overall accuracy of tracking. Moreover, not only focusing on the visual appearance similarity of the target, but also using the quantitative comparison of feature vectors to ensure the accuracy of the matching. By setting the fifth preset threshold as the similarity determination criterion, it is possible to effectively distinguish the real target object from the interference items, reducing the risk of false matching and enhancing the intelligent level of the monitoring system.
[0073] In an exemplary embodiment, before determining the first state of the target object obtained by the first camera device monitoring the target object in the target area, the method further includes: obtaining the historical trajectory data of other objects included in the target area; constructing a target database based on the historical trajectory data, where the target database includes multiple target trajectory data.
[0074] In the above embodiment, full trajectory data for a historical time period (e.g., 3 months) can be obtained from the database of the deployed pedestrian re-identification system. The original data table structure can include: track_id (anonymous trajectory ID), timestamp (millisecond level), camera_id (camera ID), person_bbox (pedestrian bounding box pixel coordinates), and feature_vector (ReID feature vector, such as a 512-dimensional floating-point array). Then, using the pre-completed camera calibration parameters (intrinsic parameters, extrinsic parameters, distortion coefficients) of the first camera device, the bottom center pixel coordinates of the person_bbox of each historical trajectory data can be converted to (x,y) coordinates in a unified world coordinate system with the ground as the Z=0 plane through back projection transformation. Then, data can be cleared and repaired. This involves filtering out trajectory fragments with short durations (e.g., <3 seconds) that are statistically insignificant due to false detections or targets that have just entered the field of view. For trajectory interruptions caused by brief, localized occlusions (i.e., a small gap between two cameras for the same track_id within a short period, such as 2 seconds), motion model-based interpolation algorithms (such as linear interpolation or Kalman filter prediction) can be used to fill in the gaps, forming smooth and continuous trajectories. After clearing and repair, complete historical trajectory data for other objects can be obtained. Finally, historical trajectory data can be used to simulate massive virtual movement paths (i.e., the aforementioned target database) to proactively discover and locate all potential, yet-to-be-exposed tracking blind spots, enabling proactive deployment.
[0075] In an exemplary embodiment, constructing a target database based on the historical trajectory data includes: segmenting each piece of historical trajectory data to obtain trajectory segments, wherein each trajectory segment includes a start point and an end point; dividing the trajectory segments into sub-trajectory segment sets, wherein each sub-trajectory segment set includes a type of sub-trajectory segment, and each trajectory segment includes the sub-trajectory segments; determining a fifth number of the sub-trajectory segments included in each sub-trajectory segment set; determining the proportion of the sub-trajectory segment set based on the fifth number; constructing a target matrix based on the proportion and the sub-trajectory segment sets; and constructing the target database based on the target matrix.
[0076] In the above embodiments, the cleaned and repaired historical trajectory data can be segmented according to the semantic region boundaries to obtain trajectory fragments. For example, a trajectory from the entrance to the fresh food area and then to the checkout counter can be segmented into two trajectory fragments: [Entrance → Fresh Food Area] and [Fresh Food Area → Checkout Counter]. Each fragment is a "movement primitive," containing its starting region (i.e., the aforementioned starting point), ending region (i.e., the aforementioned ending point), and a series of world coordinate points in between. Since there will always be a trajectory fragment with the same starting and ending points among different historical trajectory data, a type of sub-trajectory fragment (i.e., multiple trajectory fragments with the same starting and ending points, or a single trajectory fragment with a single starting and ending point) can be aggregated into a sub-trajectory fragment set, and thus the trajectory fragment can be divided into multiple sub-trajectory fragment sets.
[0077] In the above embodiment, the frequency of the sequence from region A to region B in all trajectory segments can then be counted, that is, the proportion of the fifth number of sub-trajectory segments included in each sub-trajectory segment set in all trajectory segments. Based on the proportion, an M can be constructed. The transition probability matrix of M (i.e. the target matrix mentioned above, where M is the number of semantic regions) can be constructed. The element P(B|A) can represent the probability of transitioning from region A to region B (i.e. the proportion mentioned above). Finally, a target database containing multiple target trajectory data can be constructed based on the target matrix.
[0078] This embodiment further divides the trajectory segment into sub-trajectory segment sets and determines the number and proportion of sub-segments within each set. This allows for the identification of which paths are frequently used and which are infrequent or abnormal. This enables more refined allocation of monitoring resources, allowing for optimization of camera layout and viewing angles based on the popularity of different sub-trajectory segments. This ensures high coverage of key areas while reducing monitoring costs in low-frequency areas.
[0079] In an exemplary embodiment, constructing the target database based on the target matrix includes: generating an initial trajectory; repeatedly performing the following operations to update the initial trajectory until the updated initial trajectory meets a preset condition, and determining the updated initial trajectory as the target trajectory data included in the target database: determining a connection point from the target matrix; determining a first trajectory category, wherein the category of a trajectory whose starting point is the end point of the initial trajectory and whose ending point is the connection point is the first trajectory type; determining a first trajectory in a set of sub-trajectory segments with the same first trajectory category; connecting the first trajectory to the initial trajectory to obtain an updated initial trajectory, and updating the end point of the updated initial trajectory to the end point of the first trajectory; wherein the preset condition includes the updated initial trajectory being greater than a preset length or the end point of the updated initial trajectory being a preset point.
[0080] In the above embodiments, the synthesis process of the virtual movement lines (i.e., the target trajectory data mentioned above) is as follows: all virtual movement lines can be pre-initialized starting from a specified entry area, and then iteratively expanded, that is, for the end area of the current movement line (i.e., the initial trajectory mentioned above), The next target region can be randomly selected based on the transition probability matrix P (i.e., the target matrix mentioned above). (i.e., the aforementioned connection point), and then a random selection can be made from the motion element library (i.e., all trajectory segments) to... Starting from t, with The trajectory segment (i.e., the first trajectory) with the endpoint (i.e., the first trajectory category mentioned above) is spliced with the first trajectory coordinate sequence after the current virtual movement line to obtain the updated initial trajectory. The above steps are repeated until the movement line enters the exit area I, i.e., the preset point mentioned above, or reaches the maximum length (i.e., greater than the preset length), at which point the generation is terminated, and a target trajectory data can be generated.
[0081] In this embodiment, an initial trajectory is first generated, and then the connection points are continuously searched from the target matrix. The trajectory is gradually expanded until the preset conditions are met. The above process ensures that each trajectory data in the database is coherent and can reflect the complete behavioral path of the target, rather than isolated fragments.
[0082] The layout method of the camera device in this application will be explained below with reference to specific embodiments.
[0083] Figure 3 This is a flowchart illustrating the layout method of the camera device in this optional example, such as... Figure 3 As shown, the layout method of this camera device may include the following steps:
[0084] Step S302, Historical ReID trajectory data;
[0085] Step S304, Data preprocessing and motion simulation engine;
[0086] Step S306, Virtual Customer Flow Library;
[0087] Step S308, Current camera layout and calibration parameters;
[0088] Step S310, Stress test analysis module;
[0089] Step S312: Track continuity analysis to identify blind spots in the algorithm;
[0090] Step S314: Coverage redundancy analysis identifies functional redundancy;
[0091] Step S316, Layout optimization suggestion module;
[0092] Step S318, Blind spot elimination suggestion: Add a new camera position;
[0093] Step S320, Redundancy reduction suggestion indicator can be adjusted for cameras;
[0094] Step S322, Quantitative Optimization Report;
[0095] Step S324: Implement layout adjustments.
[0096] In the above embodiments, the entire system may include a data acquisition and processing module, a movement simulation engine, a stress test analysis module, a layout optimization suggestion module, and a visual interactive interface. The data acquisition and processing module is responsible for interfacing with the ReID system database and performing data cleaning, coordinate transformation, and trajectory repair. The movement simulation engine is used to implement the transition probability model and movement synthesis algorithm, and manage the movement primitive library. The stress test analysis module, the core computing unit, is used to perform virtual target playback, state tracking, interruption determination, and coverage statistics. The layout optimization suggestion module may contain an optimization algorithm library, responsible for candidate scheme generation, simulation testing, and feasibility verification. The visual interactive interface is a web-based graphical interface that allows users to upload layouts, configure parameters, view reports and visualization results, and provides the function of manually fine-tuning optimization suggestions.
[0097] In the above embodiments, a large retail supermarket is used as an example to illustrate the implementation of the present invention:
[0098] (1) Data preparation: Access the ReID system data of the supermarket over the past three months, which includes tens of millions of customer trajectory points. Through pre-completed camera calibration, all coordinates have been unified on the supermarket floor plan.
[0099] (2) Traffic flow simulation: The traffic flow simulation engine learns patterns such as "customers are more likely to go from the entrance to the fresh food area" and "they leave the store directly after queuing at the cashier" from historical data, generating 100,000 virtual traffic flow lines, covering all reasonable paths from the entrance to each shelf and then to the cashier.
[0100] (3) Stress test: Play back these traffic flows under the current layout. The test found that there is a high incidence of tracking interruption blind spot at the end aisle of the beverage shelf (due to the height of the shelf and the angle of the camera). At the same time, there are four cameras with high functional redundancy in the central main aisle.
[0101] (4) Generate suggestions:
[0102] Blind spot elimination: After calculation, it is recommended to add a wide-angle camera to the ceiling at the end of the liquor shelf, facing downwards, which is expected to cover 95% of the blind spot area.
[0103] Redundancy reduction: The simulation removed the camera with the highest redundancy contribution on the central main channel and verified that the global tracking interruption rate only increased by 0.1%, which is within an acceptable range, so removal is recommended.
[0104] (5) Output report: The report shows that the optimized solution can reduce the global average tracking interruption rate from 3.5% to 1.2%, while the total number of cameras remains unchanged (one increases and one decreases), achieving a precise improvement in efficiency.
[0105] This example provides a disruptive approach to optimizing camera placement. The core of this approach lies in introducing "customer movement stress testing." By using "data-driven" and "stress testing," the planning of the surveillance system shifts from relying on human experience to a scientific process. Its core value lies in its close alignment with the system's ultimate business goal—achieving stable, continuous, and efficient pedestrian tracking—for evaluation and optimization, thereby achieving optimal resource allocation while ensuring safety. Specifically, by transforming historical movement data into "test cases" to evaluate camera placement performance, combining stress test results (rather than solely relying on field-of-view overlap) to assess camera redundancy contributions, and through a simulation-verification closed loop, it automatically recommends new camera locations and safe removal / adjustment solutions. This achieves full-process automation and data-driven operation, providing unified quantitative indicators, reducing reliance on personal experience, and making the placement decision-making process standardized, reproducible, and optimizable.
[0106] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0107] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0108] According to another aspect of the embodiments of this application, a camera device layout apparatus is also provided. This camera device layout apparatus can be used to implement the camera device layout method provided in the above embodiments, and details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0109] Figure 4 This is a structural block diagram of an optional layout device for a camera according to an embodiment of this application, such as... Figure 4 As shown, the layout arrangement of the camera device includes:
[0110] The first determining module 42 is used to determine the first state of the target object obtained by the first camera device monitoring the target object in the target area, wherein the target object moves according to the predetermined target trajectory data;
[0111] The second determining module 44 is used to determine the blind spot of the camera device based on the location of loss when the first state is a lost state.
[0112] The third determining module 46 is used to determine the redundant region included in the target region based on the tracking state when the first state is the tracking state.
[0113] The adjustment module 48 is used to adjust the current layout of the first camera device based on the blind spot and the redundant area to obtain the target layout.
[0114] In an exemplary embodiment, the second determining module 44 can determine the blind spot of the first camera device based on the lost location in the following manner: dividing the target area into multiple target grids; for each target grid, performing the following operations to determine the density value of the target grid: if the target grid includes the lost location, determining a lost coordinate point based on the lost location, determining the density value based on the lost coordinate point; if the target grid does not include the lost location, setting the density value to a preset value; determining a target density value that is greater than or equal to a first preset threshold included in the density value; and determining the target grid corresponding to the target density value as the blind spot.
[0115] In an exemplary embodiment, the third determining module 46 can determine the redundant region included in the target region based on the tracking state in the following manner: dividing the target region into multiple target grids; for each target grid, performing the following operations to determine a first quantity corresponding to each target grid: determining an image obtained by the first camera device capturing the target grid, determining a target image included in the image, wherein the first state of the target object included in the target image is a tracking state, determining a second quantity of the second camera device capturing the target image as the first quantity; determining a number of targets included in the first quantity that is greater than a second preset threshold; and determining the target grids corresponding to the target quantity as the redundant region.
[0116] In an exemplary embodiment, the adjustment module 48 can adjust the current layout of the camera device based on the blind spot and the redundant area to obtain a target layout in the following manner: determining a first layout of a third camera device to be added in the target area based on the blind spot; determining a fourth camera device included in the first camera device based on the redundant area, wherein the fourth camera device is a device to be adjusted; determining a second layout based on the fourth camera device; and adjusting the current layout based on the first layout and the second layout to obtain the target layout.
[0117] In an exemplary embodiment, the adjustment module 48 can determine the first layout of the third camera device to be added in the target area based on the blind spot in the field of view as follows: generating multiple initial layouts based on the blind spot and the building structure of the target area; determining a reward value for each initial layout based on the installation position of the third camera device included in the initial layout and the first device parameters of the third camera device; determining the maximum value among the multiple reward values; and determining the initial layout corresponding to the maximum value as the first layout.
[0118] In an exemplary embodiment, the adjustment module 48 can determine the reward value of each initial layout based on the installation position of the third camera device included in the initial layout and the first device parameters of the third camera device in the following manner: For each initial layout, the following operations are performed to determine the reward value of the initial layout: when the third camera device is installed at the installation position and the target area is monitored with the first device parameters, the overlap area between the field of view area and the blind spot of the third camera device is determined; the current layout is updated according to the initial layout to obtain a third layout; the second state of the target object obtained by the fifth camera device in the third layout monitoring the target object is determined, wherein the target object moves according to the target trajectory data; the number of targets included in the repair trajectory in the target trajectory corresponding to the target trajectory data is determined, wherein the first state of the repair trajectory is a lost state and the second state is a tracking state; the monitoring overlap area between the third layout and the current layout is determined; the overlap area, the number of targets, and the monitoring overlap area are weighted and summed to obtain the reward value.
[0119] In an exemplary embodiment, the adjustment module 48 can determine the fourth camera device included in the first camera device based on the redundant area by: determining the redundancy contribution of each sixth camera device monitoring the redundant area; determining the target contribution of the redundancy contribution that meets a third preset threshold; and determining the sixth camera device corresponding to the target contribution as the fourth camera device.
[0120] In an exemplary embodiment, the adjustment module 48 can determine the second layout based on the fourth camera device by performing the following operations for each of the fourth camera devices to determine the second layout: adjusting the fourth camera device according to the fourth layout to obtain a fifth layout, wherein the fourth layout includes one of the following: removing the fourth camera device; adjusting the second device parameters of the fourth camera device; determining a third state obtained by the fourth camera device in the fifth layout monitoring the target object, wherein the target object moves according to the target trajectory data; determining a third number of lost states included in the third state; determining a first ratio of the third number to the target length, and a first percentage of the first ratio; determining a fourth number of lost states included in the first state; determining a second ratio of the fourth number to the target length, and a second percentage of the second ratio; determining the difference between the first percentage and the second percentage; determining a target difference value that is less than a fourth preset threshold included in the difference; and determining the fifth layout corresponding to the target difference as the second layout.
[0121] In an exemplary embodiment, the first determining module 42 can determine the first state of the target object obtained by the first camera device monitoring the target object in the target area in the following manner: when the target object changes from the initial tracking state to the initial lost state, a predicted area is determined based on the target trajectory data; multiple first objects included in the predicted area within a preset time period are determined; the similarity between the first feature vector of each first object and the second feature vector of the target object is determined; if there is a target similarity in the similarity, the first state is determined to be a tracking state, wherein the target similarity is greater than or equal to a fifth preset threshold; if there is no target similarity in the similarity, the first state is determined to be a lost state.
[0122] In an exemplary embodiment, the apparatus is further configured to: acquire historical trajectory data of other objects included in the target area before determining a first state of the target object obtained by the first camera device monitoring the target object in the target area; and construct a target database based on the historical trajectory data, the target database including multiple target trajectory data.
[0123] In an exemplary embodiment, the apparatus can construct a target database based on the historical trajectory data in the following manner: segmenting each historical trajectory data to obtain trajectory segments, wherein each trajectory segment includes a start point and an end point; dividing the trajectory segments into sub-trajectory segment sets, wherein each sub-trajectory segment set includes a type of sub-trajectory segment, and each trajectory segment includes the sub-trajectory segment; determining a fifth number of the sub-trajectory segments included in each sub-trajectory segment set; determining the proportion of the sub-trajectory segment set based on the fifth number; constructing a target matrix based on the proportion and the sub-trajectory segment set; and constructing the target database based on the target matrix.
[0124] In an exemplary embodiment, the apparatus can construct the target database based on the target matrix in the following manner: generating an initial trajectory; repeatedly performing the following operations to update the initial trajectory until the updated initial trajectory meets a preset condition, and determining the updated initial trajectory as the target trajectory data included in the target database: determining a connection point from the target matrix; determining a first trajectory category, wherein the category of a trajectory whose starting point is the end point of the initial trajectory and whose ending point is the connection point is the first trajectory type; determining a first trajectory in a set of sub-trajectory segments with the same first trajectory category; connecting the first trajectory to the initial trajectory to obtain an updated initial trajectory, and updating the end point of the updated initial trajectory to the end point of the first trajectory; wherein the preset condition includes the updated initial trajectory being greater than a preset length, or the end point of the updated initial trajectory being a preset point.
[0125] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0126] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes the steps in any of the above method embodiments when it is run.
[0127] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.
[0128] According to another aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is configured to perform the steps of any of the method embodiments described above via the computer program. In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0129] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0130] According to another aspect of the embodiments of this application, a computer program product is also provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit 501, it performs various functions provided in the embodiments of this application. The sequence numbers of the embodiments of this application above are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0131] Figure 5 A schematic block diagram of a computer system architecture for implementing embodiments of the present application is shown. Figure 5 As shown, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes based on programs stored in ROM 502 or programs loaded into RAM 503 from storage section 508. Random Access Memory 503 also stores various programs and data required for system operation. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An Input / Output (I / O) interface 505 is also connected to the bus 504.
[0132] The following components are connected to I / O interface 505: input section 506 including keyboard, mouse, etc.; output section 507 including cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; storage section 508 including hard disk, etc.; and communication section 509 including network interface card, modem, etc. Communication section 509 performs communication processing via a network such as the Internet. Drive 510 is also connected to I / O interface 505 as needed. Removable media 511, such as disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 510 as needed so that computer programs read from them can be installed into storage section 508 as needed.
[0133] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit 501, it performs various functions defined in the system of this application.
[0134] It should be noted that, Figure 5 The computer system 500 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0135] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0136] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for arranging a camera device, characterized in that, include: The first state of the target object is determined by the first camera device monitoring the target object in the target area, wherein the target object moves according to predetermined target trajectory data; When the first state is a lost state, the blind spot of the camera device is determined based on the lost location; When the first state is a tracking state, the redundant regions included in the target region are determined based on the tracking state; The current layout of the first camera device is adjusted based on the blind spot and the redundant area to obtain the target layout.
2. The method according to claim 1, characterized in that, Determining the blind spot of the first camera device based on the lost location includes: The target region is divided into multiple target grids; For each target grid, the following operations are performed to determine the density value of the target grid: if the target grid includes the missing location, the missing coordinate point is determined based on the missing location, and the density value is determined based on the missing coordinate point; if the target grid does not include the missing location, the density value is set to a preset value. Determine the target density value that is greater than or equal to a first preset threshold among the density values; The target grid corresponding to the target density value is determined as the blind spot of the field of view.
3. The method according to claim 1, characterized in that, Determining redundant regions within the target region based on the tracking status includes: The target region is divided into multiple target grids; For each target grid, the following operations are performed to determine a first quantity corresponding to each target grid: determining an image obtained by the first camera device capturing the target grid, determining a target image included in the image, wherein the first state of the target object included in the target image is a tracking state, and determining a second quantity of the second camera device capturing the target image as the first quantity; Determine the target number that is greater than the second preset threshold included in the first quantity; The target grid corresponding to the target quantity is determined as the redundant region.
4. The method according to claim 1, characterized in that, The current layout of the camera device is adjusted based on the blind spot and the redundant area to obtain the target layout, including: Based on the aforementioned blind spots, a first layout of the third camera device to be added in the target area is determined; Based on the redundant area, a fourth camera device is determined to be included in the first camera device, wherein the fourth camera device is the device to be adjusted; The second layout is determined based on the fourth camera device; The target layout is obtained by adjusting the current layout based on the first layout and the second layout.
5. The method according to claim 4, characterized in that, Determining a first layout for the third camera device to be added in the target area based on the blind spot includes: Multiple initial layouts are generated based on the blind spot and the building structure of the target area; The reward value for each initial layout is determined based on the installation location of the third camera device included in the initial layout and the first device parameters of the third camera device. Determine the maximum value among the multiple reward values; The initial layout corresponding to the maximum value is determined as the first layout.
6. The method according to claim 5, characterized in that, The reward value for each initial layout is determined based on the installation location of the third camera device included in the initial layout and the first device parameters of the third camera device, including: For each of the initial layouts, the following operations are performed to determine the reward value for that initial layout: When the third camera is installed at the installation location and the target area is monitored using the first device parameters, the overlap area between the field of view and the blind spot of the third camera is determined. The current layout is updated according to the initial layout to obtain the third layout; The second state of the target object is determined by the fifth camera device in the third layout monitoring the target object, wherein the target object moves according to the target trajectory data; The number of targets included in the repair trajectory in the target trajectory corresponding to the target trajectory data is determined, and the first state corresponding to the repair trajectory is the lost state and the second state is the tracking state; Determine the monitoring overlap area between the third layout and the current layout; The reward value is obtained by weighted summing of the overlapping area, the number of targets, and the monitored overlapping area.
7. The method according to claim 4, characterized in that, The fourth camera device included in the first camera device is determined based on the redundant region, including: Determine the redundancy contribution of each sixth camera device monitoring the redundant area; Determine the target contribution that meets the third preset threshold among the redundant contribution values; The sixth camera device corresponding to the target contribution is identified as the fourth camera device.
8. The method according to claim 4, characterized in that, Determining the second layout based on the fourth camera device includes: For each of the fourth camera devices, the following operations are performed to determine the second layout: The fourth camera device is adjusted according to the fourth layout to obtain the fifth layout, wherein the fourth layout includes one of the following: removing the fourth camera device or adjusting the second device parameters of the fourth camera device; A third state is determined by the fourth camera device in the fifth layout monitoring the target object, wherein the target object moves according to the target trajectory data; Determine a third number of the lost states included in the third state; Determine a first ratio of the third quantity to the target length, and a first percentage of the first ratio; Determine a fourth number of the lost states included in the first state; Determine a second ratio of the fourth quantity to the target length, and a second percentage of the second ratio; Determine the difference between the first percentage and the second percentage; Determine the target difference value that is less than the fourth preset threshold value among the differences; The fifth layout corresponding to the target difference is determined as the second layout.
9. The method according to claim 1, characterized in that, Determining the first state of the target object obtained by the first camera device monitoring the target object in the target area includes: When the target object changes from the initial tracking state to the initial loss state, a prediction area is determined based on the target trajectory data; Determine multiple first objects included in the prediction region within a preset time period; Determine the similarity between the first feature vector of each first object and the second feature vector of the target object; If a target similarity exists in the similarity, the first state is determined to be a tracking state, wherein the target similarity is greater than or equal to a fifth preset threshold; If no target similarity is found in the similarity, the first state is determined to be a lost state.
10. The method according to claim 1, characterized in that, Before determining the first state of the target object obtained by the first camera device monitoring the target object in the target area, the method further includes: Obtain historical trajectory data of other objects included in the target area; A target database is constructed based on the historical trajectory data, and the target database includes multiple target trajectory data.
11. The method according to claim 10, characterized in that, A target database is constructed based on the historical trajectory data, including: Each of the historical trajectory data is segmented to obtain trajectory segments, wherein each trajectory segment includes a starting point and an ending point; The trajectory segment is divided into a set of sub-trajectory segments, wherein the set of sub-trajectory segments includes a class of sub-trajectory segments, and the trajectory segment includes the sub-trajectory segments; Determine the fifth number of the sub-trajectory segments included in each set of sub-trajectory segments; The proportion of the sub-trajectory segment set is determined based on the fifth quantity; Construct a target matrix based on the stated proportion and the set of sub-trajectory segments; The target database is constructed based on the target matrix.
12. The method according to claim 11, characterized in that, Constructing the target database based on the target matrix includes: Generate the initial trajectory; Repeat the following operations to update the initial trajectory until the updated initial trajectory meets a preset condition, and then determine the updated initial trajectory as the target trajectory data included in the target database: The connection point is determined from the target matrix; Determine a first trajectory category, wherein the category of the trajectory whose starting point is the end point in the initial trajectory and whose ending point is the connecting point is the first trajectory type; The first trajectory is determined from the set of sub-trajectory segments that are the same as the first trajectory category; The first trajectory is appended to the initial trajectory to obtain the updated initial trajectory, and the tail point of the updated initial trajectory is updated to the end point of the first trajectory. The preset conditions include the updated initial trajectory being greater than a preset length, or the tail point of the updated initial trajectory being a preset point.
13. A layout device for a camera device, characterized in that, include: The first determining module is used to determine the first state of the target object obtained by the first camera device monitoring the target object in the target area, wherein the target object moves according to the predetermined target trajectory data; The second determining module is used to determine the blind spot of the camera device based on the location of loss when the first state is a lost state. The third determining module is used to determine the redundant region included in the target region based on the tracking state when the first state is a tracking state. The adjustment module is used to adjust the current layout of the first camera device based on the blind spot and the redundant area to obtain the target layout.
14. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 12.
16. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 12.