A method and device for generating a moving path
By segmenting and optimizing the observation orientation in the three-dimensional space model, the problem of low target movement path recognition accuracy in multi-device fusion video is solved, and more accurate target movement path generation is achieved.
Patent Information
- Application Number
- CN202211619456.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2042-12-14
AI Technical Summary
When the target activity scene is large, the accuracy of identifying the target movement path is low when using multiple fixed-angle shooting devices for video fusion, which is limited by the influence of the device layout position and angle.
By projecting the video data of multiple shooting devices into a three-dimensional space model, the target area is divided into multiple recognition areas based on the device layout and the maximum recognition distance, and the target observation direction is determined in the fused video, and the position changes of the target to be identified are identified to generate a more accurate movement path.
The recognition accuracy of the target movement path is improved. By optimizing the segmentation and observation orientation, the position changes of the target in each subspace are clearly identified, and a complete and accurate movement path is generated.
Smart Images

Figure CN115830104B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and device for generating a mobile path. Background Art
[0002] Currently, when managing targets, cameras can be used to capture the target's activity scenes to determine the target's movement path. However, if the target's activity scene is large, due to the limited field of view of a single camera, multiple cameras can be deployed to capture the activity scene separately. The target's movement path captured by each camera can then be combined to obtain the target's complete movement path within the activity scene.
[0003] However, since the shooting angle of each shooting device is fixed when shooting an active scene, when the target moves in the scene, it is affected by the layout position and shooting angle of each shooting device. The shooting observation orientation of the fused video based on a single shooting device is single, resulting in low accuracy in identifying the target movement path in the fused video of a single shooting device. Summary of the Invention
[0004] The present application provides a method and device for generating a moving path, which can be used to improve the accuracy of generating a moving path.
[0005] To achieve the above technical objectives, this application adopts the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides a method for generating a moving path, which includes: first obtaining video data captured by multiple shooting devices arranged in a target area; the target area is the area where the target to be identified is located; projecting the video data captured by the multiple shooting devices into a three-dimensional space model of the target area to obtain a fused video based on the three-dimensional space model; based on the layout position and maximum recognition distance of each shooting device in the multiple shooting devices, dividing the target area into multiple recognition areas; wherein, one recognition area corresponds to one shooting device, the maximum recognition distance is the maximum distance at which the shooting device can identify the target to be identified when the shooting device is in the layout state, and the layout state of the shooting device includes the layout angle and layout position of the shooting device; determining the target observation orientation of the first recognition area based on the fused video, the target observation orientation is the virtual observation orientation when the video screen of the first recognition area is displayed in the fused video; in the fused video, the target to be identified is identified with each target observation orientation corresponding to each recognition area to generate a moving path of the target to be identified in the target area.
[0007] The mobile path generation method provided by the embodiment of the present application has at least the following beneficial effects: the method can obtain a fused video based on a three-dimensional space model based on the layout of the shooting equipment in the shooting scene and the video data. Furthermore, in the fused video, based on the maximum recognition distance of each shooting device, the target area is divided into multiple subspaces (i.e., the above-mentioned recognition areas). Each subspace includes a shooting device, and the subspaces do not overlap. Furthermore, the method can determine the target observation orientation in each subspace respectively, and based on the target observation orientation of each subspace, determine the movement path of the target to be identified in each subspace respectively. Among them, by viewing the fused video of the subspace based on the target observation orientation, the position change of the target to be identified in the fused video can be more clearly identified to generate a more accurate movement path. Furthermore, the movement path of the target to be identified in each of the above-mentioned subspaces can also be obtained based on each target area respectively, so as to generate a complete movement path of the target to be identified in the target area with a better fusion effect.
[0008] In one possible implementation, the above-mentioned determination of the target observation orientation of the first recognition area based on the fused video includes: adjusting the initial observation orientation of the first recognition area multiple times to obtain multiple candidate observation orientations; the initial observation orientation is the preset observation orientation of the first shooting device corresponding to the first recognition area in the fused video; obtaining the overlapping area of the maximum identifiable area of the second shooting device and the maximum identifiable area of the first shooting device under each of the multiple candidate observation orientations; the maximum identifiable area of the second shooting device is determined based on the maximum recognition distance of the second shooting device; and determining the candidate observation orientation corresponding to the maximum overlapping area as the target observation orientation.
[0009] In another possible implementation, the above-mentioned multiple adjustments to the initial observation orientation of the first identification area to obtain multiple candidate observation orientations include: determining a first virtual shooting device corresponding to the first shooting device in the three-dimensional space model based on the layout position and layout angle of the first shooting device; moving the first virtual shooting device and / or scaling and / or rotating the shooting screen multiple times, and determining the multiple virtual observation orientations of the first virtual shooting device as multiple candidate virtual observation orientations.
[0010] In another possible implementation, the target area is divided into multiple recognition areas based on the layout position and maximum recognition distance of each shooting device in the multiple shooting devices, including: determining the maximum recognizable area of each shooting device according to the layout position and maximum recognition distance of each shooting device; using the intersection surface between two adjacent maximum recognizable areas as the dividing surface of two adjacent recognition areas, so as to divide the target area into multiple recognition areas, wherein two adjacent recognition areas both include the intersection surface.
[0011] In yet another possible implementation, the method further includes: intercepting a target video in the three-dimensional fusion video, where the target video includes a movement path of the target to be identified in the target area; and outputting the target video.
[0012] In another possible implementation, the above-mentioned output target video includes: obtaining the position information of the target to be identified in the current frame of the target video; determining the displacement of the target to be identified based on the position information of the target to be identified in the current frame and the position information of the target to be identified in the previous frame of the current frame; in the three-dimensional space model, adjusting the position of the first observation orientation when the previous frame is output based on the displacement to obtain a second observation orientation; and outputting the current frame of the target video with the second observation orientation.
[0013] In another possible implementation, when outputting the video image of the first identification area in the target video, the observation angle of the first observation direction is the same as the observation angle of the target observation direction corresponding to the first identification area; or, the observation angle of the first observation direction is the same as the observation angle of the third observation direction corresponding to the first identification area, wherein the third observation direction is an observation direction determined based on the image of the target to be identified displayed in the video image of the first identification area in the target video.
[0014] In a second aspect, an embodiment of the present application provides a moving path generating device, which includes: an acquisition module for acquiring video data captured by multiple shooting devices arranged in a target area; the target area is the area where the target to be identified is located; a processing module for projecting the video data captured by multiple shooting devices into a three-dimensional space model of the target area to obtain a fused video based on the three-dimensional space model; the processing module is also used to divide the target area into multiple identification areas based on the arrangement position and maximum recognition distance of each shooting device in the multiple shooting devices; wherein, one identification area corresponds to one shooting device, the maximum recognition distance is the maximum distance at which the shooting device can identify the target to be identified when the shooting device is in the arrangement state, and the arrangement state of the shooting device includes the arrangement angle and arrangement position of the shooting device; the processing module is also used to determine the target observation orientation of the first identification area based on the fused video, the target observation orientation being the virtual observation orientation when the video screen of the first identification area is displayed in the fused video; the processing module is also used to identify the target to be identified in the fused video with each target observation orientation corresponding to each identification area to generate a moving path of the target to be identified in the target area.
[0015] In one possible implementation, the above-mentioned processing module is specifically used to: adjust the initial observation orientation of the first recognition area multiple times to obtain multiple candidate observation orientations; the initial observation orientation is the preset observation orientation of the first shooting device corresponding to the first recognition area in the fused video; obtain the overlapping area of the maximum recognizable area of the second shooting device and the maximum recognizable area of the first shooting device under each of the multiple candidate observation orientations; the maximum recognizable area of the second shooting device is determined based on the maximum recognition distance of the second shooting device; and determine the candidate observation orientation corresponding to the maximum overlapping area as the target observation orientation.
[0016] In another possible implementation, the processing module is further specifically used to: determine a first virtual shooting device corresponding to the first shooting device in the three-dimensional space model based on the layout position and layout angle of the first shooting device; move the first virtual shooting device and / or scale and / or rotate the shooting screen multiple times, and determine the multiple virtual observation orientations of the first virtual shooting device obtained as multiple candidate virtual observation orientations.
[0017] In another possible implementation, the processing module is further specifically used to: determine the maximum identifiable area of each shooting device based on the layout position and maximum recognition distance of each shooting device; use the intersection surface between two adjacent maximum identifiable areas as the dividing surface of two adjacent recognition areas to divide the target area into multiple recognition areas, wherein two adjacent recognition areas both include the intersection surface.
[0018] In another possible implementation, the device further includes an output module, and the processing module is further configured to capture a target video in the three-dimensional fusion video, where the target video includes a movement path of the target to be identified in the target area; and the output module is configured to output the target video.
[0019] In another possible implementation, the acquisition module is further configured to acquire position information of the target to be identified in the current frame of the target video. The processing module is further configured to determine the displacement of the target to be identified based on the position information of the target to be identified in the current frame and the position information of the target to be identified in the frame before the current frame; and, in the three-dimensional spatial model, adjust the position of the first output observation orientation when outputting the previous frame based on the displacement to obtain a second output observation orientation; and the output module is further configured to output the current frame of the target video using the second output observation orientation.
[0020] In a third aspect, the present application provides an electronic device comprising a memory and a processor. The memory and processor are coupled. The memory is configured to store computer program code, the computer program code comprising computer instructions. When the processor executes the computer instructions, the electronic device performs the movement path generation method described in the first aspect and any possible design thereof.
[0021] In a fourth aspect, the present application provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the mobile path generation method as described in the first aspect and any possible design method thereof.
[0022] In a fifth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are run on an electronic device, the electronic device executes the mobile path generation method described in the first aspect and any possible design method thereof.
[0023] For the specific descriptions of the second to fifth aspects and their various implementations in this application, reference can be made to the detailed descriptions in the first aspect and its various implementations; and for the beneficial effects of the second to fifth aspects and their various implementations, reference can be made to the analysis of the beneficial effects in the first aspect and its various implementations, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of a shooting system provided in an embodiment of the present application;
[0025] Figure 2 A schematic diagram of a shooting scene provided in an embodiment of the present application;
[0026] Figure 3 A schematic diagram of the hardware structure of a mobile path generation device provided in an embodiment of the present application;
[0027] Figure 4 A flow chart of a method for generating a moving path provided in an embodiment of the present application;
[0028] Figure 5 A schematic diagram of target area segmentation provided in an embodiment of the present application;
[0029] Figure 6 A schematic diagram of another target area segmentation method provided in an embodiment of the present application;
[0030] Figure 7 A flowchart of another method for generating a moving path provided in an embodiment of the present application;
[0031] Figure 8 A schematic diagram of the arrangement of a photographing device provided in an embodiment of the present application;
[0032] Figure 9 A schematic diagram of a movement path provided in an embodiment of the present application;
[0033] Figure 10A flowchart of another method for generating a moving path provided in an embodiment of the present application;
[0034] Figure 11 A schematic diagram of outputting an observation direction provided in an embodiment of the present application;
[0035] Figure 12 A schematic structural diagram of a movement path generating device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0037] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "a plurality" means two or more. Words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not limit them to be necessarily different.
[0038] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0039] In order to improve the fusion effect of the movement paths determined by multiple shooting devices in a scene, an embodiment of the present application provides a movement path generation method, and the specific method includes: first obtaining video data shot by multiple shooting devices arranged in a target area; the target area is the area where the target to be identified is located; projecting the video data shot by multiple shooting devices into a three-dimensional space model of the target area to obtain a fused video based on the three-dimensional space model; based on the layout position and maximum recognition distance of each shooting device in the multiple shooting devices, the target area is divided into multiple recognition areas; wherein, one recognition area corresponds to one shooting device, and the maximum recognition distance is the maximum distance at which the shooting device can identify the target to be identified when the shooting device is in the layout state, and the layout state of the shooting device includes the layout angle and layout position of the shooting device; based on the fused video, the target observation orientation of the first recognition area is determined, and the target observation orientation is the virtual observation orientation when the video screen of the first recognition area is displayed in the fused video; in the fused video, the target to be identified is identified with each target observation orientation corresponding to each recognition area to generate a movement path of the target to be identified in the target area. In this way, the method views the fused video of the subspace based on the target observation orientation, and can more clearly identify the position change of the target to be identified in the fused video, so as to generate a more accurate movement path.
[0040] like Figure 1 As shown, a shooting system 100 provided in an embodiment of the present application is shown. Figure 1 As shown, the photographing system 100 includes a photographing device 10 and a management device 20. The photographing device 10 is connected to the management device 20 so that the management device 20 can communicate with the photographing device 10.
[0041] It should be understood that the above-mentioned connection method can be a wireless connection, such as a Bluetooth connection, a Wi-Fi connection, etc.; or, the above-mentioned connection method can also be a wired connection, such as an optical fiber connection, etc., without limitation.
[0042] The shooting device 10 is used to collect video data of the shooting scene in real time. The shooting device 10 can be a device with basic functions such as video shooting / transmission and static image capture, such as a camera.
[0043] In some embodiments, the camera 10 identifies an object to be identified that appears within the field of view of the camera 10, tracks the movement of the object to be identified, generates a movement path of the object to be identified, and then sends the generated movement path of the object to be identified to the management device 20. Alternatively, the camera 10 may send the captured video data of the object to be identified to the management device 20, so that the management device 20 can determine the movement path of the object to be identified based on the acquired video data.
[0044] The target to be identified may be a target object whose moving path needs to be tracked, which is preset in the shooting system 100 . For example, the target to be identified may be a vehicle, a person, an animal, or other possible target objects.
[0045] Optionally, the number of the photographing devices 10 may include one or more. Figure 2 In the shooting scene shown, a shooting device 101 is arranged at the entrance of a building, and a shooting device 102 and a shooting device 103 are arranged beside a road. Each shooting device is connected to a management device 20.
[0046] The management device 20 is used to manage one or more cameras 10 deployed in a shooting scene. The management device 20 can be located within the shooting scene. For example, if the shooting scene is an office area, the management device 20 can be located anywhere within the office area. Alternatively, the management device 20 can be located outside the shooting scene. For example, if the shooting scene is an office area, the management device 20 can be located in a shooting room or other possible area outside the office area.
[0047] In some embodiments, the management device 20 can obtain the movement path of the target to be identified sent by each shooting device in the shooting scene in real time or periodically, so as to obtain the complete movement path of the target to be identified in the shooting scene. Alternatively, the management device 20 can receive the fused video data of the shooting scene shot by each shooting device in real time or periodically, and determine the complete movement path of the target to be identified in the shooting scene based on the acquired fused video data. Optionally, the management device 20 can also be used to display the acquired shooting data or display the acquired shooting data with the aid of necessary display components. The management device 20 can be various electronic devices with data processing capabilities, such as servers (or cloud servers), video recorders, cameras, computers, smart wearable devices, smart portable devices and other devices.
[0048] For example, the electronic device may be a server, which may be a single server, a server cluster consisting of multiple servers, or a cloud computing service center, without limitation.
[0049] For another example, the electronic device may be a terminal device, which may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook computer, cellular phone, personal digital assistant (PDA), augmented reality (AR) or virtual reality (VR) device, etc. Optionally, the electronic device may display to the user the video data captured by the camera 10, and display to the user the movement path of the target to be identified determined by the method provided in the embodiment of the present application.
[0050] The present application also provides a mobile path generation device, which is the execution entity of the mobile path generation method described above. The mobile path generation device has data processing capabilities. For example, the mobile path generation device can be the management device 20 in the above-mentioned shooting system 100, or the mobile path generation device can be a functional module in the management device 20, or the mobile path generation device can be any computing device connected to the management device 20. The present application is not limited to this embodiment.
[0051] The following combination Figure 3 A hardware structure of the moving path generating device 200 is introduced.
[0052] like Figure 3 As shown, the moving path generating device 200 includes a processor 210 , a communication line 220 and a communication interface 230 .
[0053] Optionally, the moving path generation device 200 may further include a memory 240 , wherein the processor 210 , the memory 240 and the communication interface 230 may be connected via a communication line 220 .
[0054] The processor 210 may be a central processing unit (CPU), a graphics processing unit (GPU), a graphics processor, a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 210 may also be any other device with processing capabilities, such as a circuit, a device, or a software module, without limitation.
[0055] In one example, the processor 210 may include one or more CPUs, such as Figure 3 CPU0 and CPU1 in.
[0056] As an optional implementation, the moving path generating apparatus 200 includes multiple processors, for example, in addition to the processor 210, it may also include a processor 270. The communication line 220 is used to transmit information between the various components included in the moving path generating apparatus 200.
[0057] Communication interface 230 is used to communicate with other devices or other communication networks. Such other communication networks may be Ethernet, radio access networks (RAN), wireless local area networks (WLAN), etc. Communication interface 230 may be a module, circuit, transceiver, or any other device capable of communication.
[0058] The memory 240 is used to store instructions, where the instructions may be computer programs.
[0059] Among them, the memory 240 can be a read-only memory (ROM) or other types of static storage devices that can store static information and / or instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and / or instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, etc., without limitation.
[0060] It should be noted that the memory 240 can exist independently of the processor 210 or can be integrated with the processor 210. The memory 240 can be used to store instructions, program codes, or some data. The memory 240 can be located within the movement path generation device 200 or outside the movement path generation device 200, without limitation.
[0061] The processor 210 is configured to execute instructions stored in the memory 240 to implement the communication method provided in the following embodiments of the present application. For example, when the mobile path generation device 200 is a terminal or a chip or system on a chip in the terminal, the processor 210 may execute instructions stored in the memory 240 to implement the mobile path generation method provided in the present application.
[0062] As an optional implementation, the movement path generation device 200 further includes an output device 250 and an input device 260. The output device 250 can be a device such as a display screen or a speaker that can output data from the movement path generation device 200 to a user. The input device 260 can be a device such as a keyboard, a mouse, a microphone, or a joystick that can input data into the movement path generation device 200.
[0063] It should be pointed out that Figure 3 The structure shown in the figure does not constitute a limitation of the device, except Figure 3 In addition to the components shown, the computing device may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0064] The embodiments provided in this application are described in detail below with reference to the accompanying drawings.
[0065] like Figure 4As shown, the embodiment of the present application provides a method for generating a moving path. Optionally, the method is composed of Figure 3 The moving path generating device 200 shown in the figure is executed, and the method includes the following steps:
[0066] S101: A moving path generating device obtains video data captured by multiple shooting devices arranged in a target area.
[0067] The target area is the area where the target to be identified is located in a shooting scene.
[0068] Optionally, the target area may be the entire shooting scene, or a portion of the shooting scene.
[0069] The shooting scene refers to the entire space in which the video is captured by the multiple cameras. For example, the shooting scene can be an indoor scene such as a hotel, a shopping mall, a supermarket, or a classroom. Alternatively, the shooting scene can be an outdoor scene such as an intersection, a playground, or a building entrance.
[0070] In addition, the above video data is the video data of the shooting scene shot by each shooting device.
[0071] Optionally, the movement path generation device may receive video data sent by multiple cameras in real time. Alternatively, the movement path generation device may also obtain video data sent by multiple cameras at a preset frequency. Alternatively, the movement path generation device may also obtain pre-stored historical video data.
[0072] The preset frequency may be 1 minute / time, 3 minutes / time, 30 seconds / time or other possible frequencies.
[0073] S102 : The moving path generating device projects the video data captured by multiple shooting devices into a three-dimensional space model of the target area to obtain a fused video based on the three-dimensional space model.
[0074] In an embodiment of the present application, the three-dimensional spatial model of the target area can be specifically as follows: in the process of one or more shooting devices of the target scene shooting the target area, the target analysis device uses the fused video data obtained based on the one or more shooting devices to use relevant software for modeling, so as to further obtain a three-dimensional fused video of the target scene. Optionally, the specific modeling process of the three-dimensional spatial model of the target area can also adopt a truncated signed distance function (TSDF) algorithm, etc. Specifically, based on this algorithm, the target analysis device can obtain the point cloud data of the target area, and then map the point cloud data into a predefined three-dimensional space, and use the truncated signed distance function to represent the area near the surface of the real scene to establish a three-dimensional spatial model of the target area.
[0075] Optionally, the specific modeling process of the three-dimensional spatial model of the above-mentioned shooting scene can also be performed by a cloud device, a high-performance computer or other possible devices, so that the target analysis device can obtain the three-dimensional spatial model of the shooting scene that has been constructed in the device.
[0076] In some embodiments, the target analysis device can project the video data captured by the shooting device in real time into a three-dimensional space model of the shooting scene, thereby obtaining a real-time fused video of the shooting scene.
[0077] Furthermore, during the process of performing target analysis, the target analysis device can extract the fused video data within a period of time during which the target analysis is required.
[0078] Optionally, for video frames captured simultaneously by various cameras, the target analysis device can utilize computer vision algorithms to calculate the spatial locations of corresponding points on the surfaces of spatial objects within the three-dimensional spatial model of the captured scene. Furthermore, through projective transformation, the video frames can be fused with the three-dimensional spatial model to form a fused image based on the three-dimensional spatial model.
[0079] A video frame is an independent still image in a video. A video is a seemingly continuous image composed of independent images, and each independent image is called a video frame.
[0080] Furthermore, based on the above-mentioned fusion process of the video frames captured by each shooting device at a moment, the video frames captured by each shooting device are sequentially fused to obtain the fused video data within the above-mentioned period of time.
[0081] In some embodiments, during target analysis, the target analysis device may retrieve video data captured by each camera during a period of time during which target analysis is required, from the target analysis device's storage space or from each camera. Furthermore, the target analysis device may project the acquired video data from each camera during that period into a three-dimensional spatial model of the captured scene to generate a fused video for that period.
[0082] Furthermore, the generated fused video supports viewing the video image from a virtual global viewpoint or virtual observation position. That is, the target analysis device can present the fused video image to the user from a virtual global viewpoint or virtual observation position. This viewpoint can be higher than the actual position of the physical camera, and the virtual observation position can also differ from the actual position and location of the physical camera.
[0083] The virtual observation position can be understood as the observation position of the user. Based on the virtual observation position, it can be understood that a virtual shooting device is arranged in the three-dimensional space model, so that the image captured by the virtual shooting device is the image displayed to the user, that is, the image viewed by the user under the virtual observation position. For example, Figure 5 Provide a three-dimensional spatial model of the target area. Figure 5 As shown, in the three-dimensional space model, the fused video of the three-dimensional space model can be displayed from the virtual observation position 111, the virtual observation position 112 and the virtual observation position 113.
[0084] It should be noted that the description of the virtual shooting device in the embodiment of the present application is only for facilitating the understanding of the virtual observation orientation. In actual implementation, the virtual shooting device may not be actually deployed in the three-dimensional space model.
[0085] S103 : The moving path generating device divides the target area into a plurality of recognition areas based on the layout position and maximum recognition distance of each of the plurality of shooting devices.
[0086] The maximum recognition distance refers to the maximum distance at which the camera can recognize the target when the camera is deployed.
[0087] The placement status of the shooting device includes the placement angle and placement position of the shooting device.
[0088] The placement position of the camera refers to the spatial position information of the camera in the target area. Optionally, the position of any point in the camera body, lens, or other components of the camera can be used as the spatial position information of the camera in the target area.
[0089] For example, a spatial rectangular coordinate system is established with any point in the target area as the origin. The spatial rectangular coordinate system includes mutually perpendicular X-axis, Y-axis, and Z-axis. Spatial position information can be expressed as a position point in the spatial rectangular coordinate system, such as (X1, Y1, Z1). It should be understood that within the same target area, the position information of each camera in the target area is represented by a position point in the same spatial coordinate system.
[0090] The deployment angle of the shooting device includes the pitch angle, yaw angle and roll angle of the shooting device when deployed.
[0091] Optionally, the moving path generating device may determine the maximum recognition distance of the first shooting device according to the video images shot by the first shooting device.
[0092] Exemplarily, the movement path generation device can use a preset recognition algorithm to identify the target to be identified in the video footage captured by the first camera. The movement path generation device can determine the image area of the target to be identified that the movement path generation device can identify during the recognition process of multiple video footages from the first camera. Furthermore, the movement path generation device can determine multiple distances between the target to be identified and the first camera based on the image area of the target to be identified. Furthermore, the movement path generation device can determine the maximum distance among the multiple distances as the maximum recognition distance of the first camera. It should be noted that the target to be identified can be a vehicle, a person, an animal, or other possible target object. Due to the actual size of different target objects and the recognition clarity of different target objects, the maximum recognition distance of the first camera may vary when identifying different target objects. Therefore, the maximum recognition distance of the first camera is also related to the target object identified by the preset recognition algorithm in the movement path generation device.
[0093] Therefore, the moving path generating device can calculate the maximum recognition distance of each of the multiple shooting devices in the target area based on the above process of determining the maximum recognition distance.
[0094] In some embodiments, the movement path generation device may determine the maximum identifiable area of each camera device based on the placement and maximum recognition distance of each camera device; use the intersection between two adjacent maximum identifiable areas as a dividing plane between two adjacent recognition areas to divide the target area into multiple recognition areas, where each of the two adjacent recognition areas includes the intersection. Each recognition area of the target area corresponds to one camera device.
[0095] Optionally, the moving path generating device may determine the recognition area corresponding to the first shooting device according to the layout position of the first shooting device and the maximum recognition distance of the first shooting device.
[0096] For example, Figure 5 As shown, the spatial model of the target area is a cubic space A. Based on the placement and angle of the first camera 111, the field of view of the first camera 111 is shown as area a1. Therefore, the movement path generation device uses the location of the first camera 111 as a starting point and, based on the maximum recognition distance of the first camera 111, determines the furthest recognizable boundary b1 of the first camera 111 within area a1. Based on this furthest recognizable boundary and the first camera 111, the recognition area c1 corresponding to the first camera 111 is segmented within the cubic space A.
[0097] It should be understood that the above-mentioned space A is only an example of the spatial model of the target area. In actual implementation, the spatial model of the target area may also be other possible irregular-shaped spaces.
[0098] Optionally, the movement path generation device may determine the order of identifying the corresponding recognition areas of each camera according to the position of each camera, and then determine the identification areas corresponding to each camera in sequence according to the order of identification to complete the spatial segmentation of the target area.
[0099] For example, Figure 5 As shown, the moving path generation device can set the determination order of the recognition area corresponding to the first shooting device 111 to be the first, and then the moving path generation device can set the determination order of the second shooting device 112 whose farthest recognizable area overlaps with the recognition area c1 to be the second according to the recognition area c1. Figure 6 As shown, the farthest recognizable distance of the second camera 112 is b2, so its farthest recognizable area a2 has an overlapping area with the recognition area c1 of the first camera 111. Alternatively, the second camera 112 whose farthest recognizable area is closest to the area c1 can be used as the second one, as shown in FIG. Figure 5 As shown, the recognition area c2 corresponding to the second camera 112 is adjacent to the area c1. Accordingly, the third camera 113 is the third, and the recognition area c3 corresponding to the third camera 113 is adjacent to c2.
[0100] S104: The moving path generating device determines the target observation direction of the first recognition area based on the fused video.
[0101] The target observation direction is a virtual observation direction when the video image of the first recognition area is displayed in the fused video. The target observation direction includes the observation position and observation angle when the video image of the first recognition area is displayed in the fused video.
[0102] In some embodiments, as Figure 7 As shown, the above step S104 can be specifically implemented as the following steps:
[0103] S1041: The moving path generating device adjusts the initial observation direction of the first recognition area multiple times to obtain multiple candidate observation directions.
[0104] The initial observation position is a preset observation position of the first shooting device corresponding to the first recognition area in the fused video.
[0105] Optionally, in the three-dimensional space model, the movement path generation device may determine a first virtual camera corresponding to the first camera in the three-dimensional space model based on the placement position and placement angle of the first camera. The first virtual camera may then be moved and / or its captured image scaled and / or rotated multiple times, and the resulting multiple virtual observation orientations of the first virtual camera may be determined as multiple candidate virtual observation orientations.
[0106] For example, if the corresponding virtual observation position (that is, the original observation position) of the first shooting device in the three-dimensional space model of the target area is as follows: Figure 8 As shown in (a), for the fused video in the three-dimensional space model, the moving path generating device can adjust the virtual observation orientation in the three-dimensional space model, so as to Figure 8 The position and angle shown in (b) of FIG, and the fused video image is displayed with the currently adjusted position and angle information. It should be noted that the movement path generation device can perform transformation processing such as rotation and translation on the original observation orientation corresponding to the first camera device in the three-dimensional spatial model of the target area, or perform image processing such as scaling on the original image displayed in the fused video at the original observation orientation.
[0107] Optionally, if in the spatial model, the initial position of the virtual camera corresponding to the first virtual observation orientation in the three-dimensional spatial model is translated, the observation orientation of the virtual camera obtained after the translation is the candidate virtual observation orientation. At this time, the position coordinates of the virtual camera can be (x0+t x ,y0+t y ,z0+t z), in addition, the shooting angle remains unchanged after translation, that is, the shooting angle of the candidate virtual observation position obtained by translation is the same as the shooting angle of the original observation position. Among them, the initial position coordinates corresponding to the original observation position in the three-dimensional space model are (x0, y0, z0), t x is the translation vector in the X-axis direction, t y is the translation vector in the Y-axis direction, t z is the translation vector in the Z-axis direction.
[0108] Optionally, if the first shooting device is rotated, the coordinates of the candidate virtual observation orientation obtained after the rotation process may have at least the following possible situations:
[0109] Scenario 1: In the space model, the moving path generating device rotates the virtual camera corresponding to the original observation orientation in the three-dimensional space model around the X-axis.
[0110] If the rotation angle is α, the coordinates of the virtual camera corresponding to the candidate virtual observation orientation obtained after the rotation process can be determined according to the following formula (1):
[0111]
[0112] Among them, (x′, y′, z′) are the coordinates of the candidate virtual observation orientation, and (x0, y0, z0) are the coordinates of the original observation orientation.
[0113] Scenario 2: In the space model, the moving path generating device rotates the virtual camera corresponding to the original observation orientation in the three-dimensional space model around the Y axis.
[0114] If the rotation angle is β, the coordinates of the virtual camera corresponding to the candidate virtual observation orientation obtained after the rotation process can be determined according to the following formula (2):
[0115]
[0116] Among them, (x′, y′, z′) are the coordinates of the above-mentioned candidate virtual observation orientation, and (x0, y0, z0) are the coordinates of the first virtual camera.
[0117] Scenario 3: In the space model, the moving path generating device rotates the virtual camera corresponding to the original observation orientation in the three-dimensional space model around the Z axis.
[0118] If the rotation angle is γ, the coordinates of the virtual camera corresponding to the candidate virtual observation orientation obtained after the rotation process can be determined according to the following formula (3):
[0119]
[0120] Among them, (x′, y′, z′) are the coordinates of the above-mentioned candidate virtual observation orientation, and (x0, y0, z0) are the coordinates of the first virtual camera.
[0121] Scenario 4: In the space model, the moving path generating device rotates the virtual camera corresponding to the original observation orientation in the three-dimensional space model around the X, Y, and Z axes simultaneously.
[0122] If the rotation angles are X-axis α, Y-axis β, and Z-axis γ, the coordinates of the virtual camera corresponding to the candidate virtual observation orientation obtained after the rotation process can be determined according to the following formula (4):
[0123]
[0124] Among them, (x′, y′, z′) are the coordinates of the above-mentioned candidate virtual observation orientation, and (x0, y0, z0) are the coordinates of the first virtual camera.
[0125] Optionally, if the original image is scaled, the coordinates of the candidate virtual observation positions corresponding to the scaled image can be determined according to the following formula (5):
[0126] For example, taking the scaling along the X, Y, and Z axes as n, m, and K times respectively, the candidate virtual observation positions are:
[0127]
[0128] Among them, (x′, y′, z′) are the coordinates of the candidate virtual observation orientation, and (x0, y0, z0) are the coordinates of the original observation orientation.
[0129] S1042: The moving path generating device respectively obtains the overlapping area of the maximum identifiable area of the second shooting device and the maximum identifiable area of the first shooting device under each of the multiple candidate observation directions.
[0130] The maximum recognizable area of the second shooting device is determined based on the maximum recognition distance of the second shooting device.
[0131] Optionally, the moving path generating device can determine the size of the overlapping area based on the number of pixel points with the same position coordinates corresponding to each pixel point in the image displayed under multiple candidate virtual observation positions of the first shooting device in the three-dimensional space model and each pixel point in the image under the virtual observation positions corresponding to other shooting devices.
[0132] Exemplarily, for the first recognition area corresponding to the first shooting device, the movement path generation device may first obtain the original image of the recognition area in the fused video according to the original viewpoint, that is, the virtual observation orientation of the first shooting device.
[0133] In addition, the moving path generating device can determine the position coordinates corresponding to each pixel point in the original picture in the three-dimensional space model, and multiple pixel points that are the same as the position coordinates corresponding to each pixel point in the image under the virtual observation orientation of other shooting devices in the space model, that is, the above-mentioned overlapping area.
[0134] S1043. The moving path generating device determines the candidate observation direction corresponding to the maximum overlapping area as the target observation direction.
[0135] Optionally, the moving path generating device may determine the target observation direction corresponding to each identification area according to the above process of determining the target observation direction.
[0136] S105 , the movement path generating device identifies the target to be identified in the fused video using each target observation orientation corresponding to each identification area, so as to generate a movement path of the target to be identified in the target area.
[0137] In some embodiments, the movement path generating device may first determine multiple movement paths of the target to be identified in multiple identification areas, and then splice the multiple movement paths to obtain the movement path information of the target to be identified in the target area.
[0138] Optionally, the movement path generating device may perform the following steps 1 and 2 to determine the movement path information of the target to be identified in the target area.
[0139] Step 1: Based on the display screen of the fused video under the target display observation direction, the movement path of the target to be identified in the first identification area is identified.
[0140] The fused video is a fused video obtained by projecting video data captured by multiple shooting devices onto the three-dimensional spatial model of the target area. The process of determining the fused video can refer to the relevant description in the above step S1031 and will not be repeated here.
[0141] Optionally, in the first recognition area, the number of targets to be recognized of the same type may include multiple, such as multiple vehicles, multiple human bodies, etc.
[0142] When there are multiple targets to be identified, the movement path generating device may generate a displacement marker for each target to be identified to distinguish each target to be identified, and further generate a movement path for each target to be identified in the first identification area.
[0143] Optionally, the movement path generating device can identify the video information (i.e., fused video information) in the spatial model based on the first target observation direction corresponding to the first recognition area, determine the position coordinates of the target to be identified in each video frame, and then generate the movement path of the target to be identified in the first recognition area. Exemplarily, the movement path of the target to be identified in the first recognition area can be as follows: Figure 9 As shown, the moving path is composed of multiple moving path points, and a moving path point is used to indicate the position information of the target to be identified in a video frame. For example, 91 is a moving path point in the moving path.
[0144] Step 2: The movement path generating device assembles multiple movement paths of the target to be identified in multiple identification areas to obtain a complete movement path of the target to be identified in the target area.
[0145] Optionally, if there are multiple targets to be identified in the target area, the movement path generation device can classify the movement paths in each area according to the identification of each target to be identified, determine multiple movement paths with the same identification, and then merge the multiple movement paths with the same identification to generate a complete movement path of the target to be identified corresponding to the identification in the target area.
[0146] In some embodiments, in the process of splicing multiple moving paths, the moving path generation device can obtain the shooting time of the video picture corresponding to each moving path point in the moving path, and then, the moving path generation device can merge the multiple moving paths based on the shooting time of the video picture corresponding to each moving path point.
[0147] The mobile path generation method provided by the embodiment of the present application has at least the following beneficial effects: the method can obtain a fused video based on a three-dimensional space model based on the layout of the shooting equipment in the shooting scene and the video data. Furthermore, in the fused video, based on the maximum recognition distance of each shooting device, the target area is divided into multiple subspaces (i.e., the above-mentioned recognition areas). Each subspace includes a shooting device, and the subspaces do not overlap. Furthermore, the method can respectively determine the target display observation orientation in each subspace, and based on the target display observation orientation of each subspace, respectively determine the movement path of the target to be identified in each subspace. Among them, by viewing the fused video of the subspace based on the target observation orientation, the position change of the target to be identified in the fused video can be more clearly identified to generate a more accurate movement path. Furthermore, the movement path of the target to be identified in each of the above-mentioned subspaces can also be obtained based on each target area, so as to generate a complete movement path of the target to be identified in the target area with a better fusion effect.
[0148] In some embodiments, Figure 4 The moving path generation method shown is based on Figure 10 As shown, the method may further include the following steps S201 and S202:
[0149] S201. A moving path generating device captures a target video in the fused video.
[0150] The target video includes the complete moving path of the target to be identified in the target area.
[0151] S202: The moving path generating device outputs the target video.
[0152] Optionally, the moving path generating device can Figure 3 The output device 250 (eg, a display) outputs the target video in the space model for the user to view. Alternatively, the moving path generation apparatus can also display the target video via a display device that is communicatively connected to the moving path generation apparatus.
[0153] In some embodiments, the moving path generating device adjusts the output observation direction of the target video according to the moving path of the target to be identified when outputting the target video. Optionally, step S202 can be specifically implemented as the following steps:
[0154] Step 1: The moving path generating device obtains the position information of the target to be identified in the current frame of the target video.
[0155] The above-mentioned position information may be the position coordinates of the target to be identified in the spatial model of the target area.
[0156] In addition, the current frame is the video frame currently being displayed during the playback of the target video.
[0157] Step 2: The movement path generating device determines the displacement of the target to be identified based on the position information of the target to be identified in the current frame and the position information of the target to be identified in the frame before the current frame.
[0158] The previous frame is the previous video frame of the current video frame during the process of playing the target video.
[0159] Step 3: The moving path generating device adjusts the position of the first output observation orientation when outputting the previous frame based on the displacement in the three-dimensional space model to obtain a second output observation orientation.
[0160] Optionally, when outputting the video image of the first identification area in the target video, the observation angle of the first observation position is the same as the observation angle of the target observation position corresponding to the first identification area; or, the observation angle of the first observation position is the same as the observation angle of the third observation position corresponding to the first identification area, wherein the third observation position is an observation position determined based on the image of the target to be identified displayed in the video image of the first identification area in the target video.
[0161] For example, Figure 11 As shown, the coordinates of the first output observation position are (X1, Y1, Z1), and the coordinates of the second output observation position can be (X2, Y2, Z2). The above displacement is (X2-X1, Y2-Y1, Z2-Z1). Furthermore, during the playback of the target video, as the displacement of the target to be identified changes, the position of the first output observation position is adjusted to obtain the second output observation position. In this way, the target video can more clearly display the target to be identified.
[0162] Step 4: The moving path generating device outputs the current frame of the target video at the second output observation orientation.
[0163] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy to realize that the technical goals in this field are combined with the units and algorithm steps of each example described in the embodiments disclosed herein, and the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technical goals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0164] like Figure 12 FIG. 3 is a schematic diagram of a moving path generating device 300 provided in an embodiment of the present application. The device 300 may include: an acquisition module 301 and a processing module 302. Optionally, the moving path generating device 300 may further include an output module 303.
[0165] The acquisition module 301 is used to acquire video data captured by multiple camera devices deployed in a target area, where the target to be identified is located.
[0166] The processing module 302 projects the video data captured by multiple shooting devices into the three-dimensional space model of the target area to obtain a fused video based on the three-dimensional space model.
[0167] The above-mentioned processing module 302 is also used to divide the target area into multiple recognition areas based on the layout position and maximum recognition distance of each shooting device among multiple shooting devices; wherein, one recognition area corresponds to one shooting device, and the maximum recognition distance is the maximum distance at which the shooting device can recognize the target to be identified when the shooting device is in the layout state. The layout state of the shooting device includes the layout angle and layout position of the shooting device.
[0168] The above-mentioned processing module 302 is also used to determine the target observation direction of the first identification area based on the fused video, and the target observation direction is a virtual observation direction when the video screen of the first identification area is displayed in the fused video; and is used to identify the target to be identified in the fused video with each target observation direction corresponding to each identification area, so as to generate a moving path of the target to be identified in the target area.
[0169] In one possible implementation, the processing module 302 is specifically used to: adjust the initial observation orientation of the first recognition area multiple times to obtain multiple candidate observation orientations; the initial observation orientation is the preset observation orientation of the first shooting device corresponding to the first recognition area in the fused video; obtain the overlapping area of the maximum recognizable area of the second shooting device and the maximum recognizable area of the first shooting device under each of the multiple candidate observation orientations; the maximum recognizable area of the second shooting device is determined based on the maximum recognition distance of the second shooting device; and determine the candidate observation orientation corresponding to the maximum overlapping area as the target observation orientation.
[0170] In another possible implementation, the processing module 302 is further specifically used to: determine a first virtual shooting device corresponding to the first shooting device in the three-dimensional space model based on the layout position and layout angle of the first shooting device; move the first virtual shooting device and / or scale and / or rotate the shooting screen multiple times, and determine the multiple virtual observation orientations of the first virtual shooting device as multiple candidate virtual observation orientations.
[0171] In another possible implementation, the processing module 302 is further specifically used to: determine the maximum identifiable area of each shooting device based on the layout position and maximum recognition distance of each shooting device; use the intersection surface between two adjacent maximum identifiable areas as the dividing surface of two adjacent recognition areas to divide the target area into multiple recognition areas, wherein two adjacent recognition areas both include the intersection surface.
[0172] In another possible implementation, the device further includes an output module 303, and the processing module 302 is further configured to intercept a target video in the 3D fused video, where the target video includes a movement path of the target to be identified in the target area. The output module 303 is configured to output the target video.
[0173] In another possible implementation, the acquisition module 301 is further configured to obtain position information of the target to be identified in the current frame of the target video. The processing module 302 is further configured to determine the displacement of the target to be identified based on the position information of the target to be identified in the current frame and the position information of the target to be identified in the frame before the current frame; and to adjust the position of the first output observation orientation when outputting the previous frame in the three-dimensional spatial model based on the displacement to obtain a second output observation orientation. The output module 303 is further configured to output the current frame of the target video using the second output observation orientation.
[0174] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation and description of the beneficial effects of any of the above-mentioned movement path generation devices 300 can refer to the above-mentioned corresponding method embodiments, which will not be repeated here.
[0175] As an example, combined with Figure 3 The function of the processing module 302 of the mobile path generation device can be realized by Figure 3 Processor 210 or processor 270 executes Figure 3 The functions implemented by the acquisition module 301 can be realized by the program code in the memory 240 in the memory 240. Figure 3 The communication line 220 in is implemented, but is certainly not limited to this.
[0176] It should be readily apparent to those skilled in the art that, in combination with the units and algorithmic steps of the various examples described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0177] It should be noted that Figure 12 The module division described is illustrative and represents only one logical functional division. Actual implementations may employ different divisions. For example, two or more functions may be integrated into a single processing module. These integrated modules may be implemented as either hardware or software functional modules.
[0178] The present application also provides a computer-readable storage medium including computer-executable instructions, which, when executed on a computer, enables the computer to execute any one of the methods provided in the above embodiments. For example, Figure 4 One or more features of S101 to S105 may be performed by one or more computer-executable instructions stored in the computer-readable storage medium.
[0179] An embodiment of the present application further provides a computer program product comprising computer-executable instructions, which, when executed on a computer, enables the computer to execute any one of the methods provided in the above embodiments.
[0180] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer execution instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more media that can be integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0181] Although the present application has been described with reference to specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely illustrative of the present application as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, the present application is intended to include such modifications and variations as fall within the scope of the claims of the present application and their equivalents.
[0182] The above is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A method for generating a moving path, characterized in that: The method comprises: Acquire video data captured by multiple cameras deployed in a target area; the target area is the area where the target to be identified is located; Projecting the video data captured by the multiple shooting devices into the three-dimensional space model of the target area to obtain a fused video based on the three-dimensional space model; Based on the placement position and maximum recognition distance of each of the multiple shooting devices, the target area is divided into multiple recognition areas; wherein each recognition area corresponds to one shooting device, and the maximum recognition distance is the maximum distance at which the shooting device can recognize the target to be recognized when the shooting device is in the placement state, and the placement state of the shooting device includes the placement angle and placement position of the shooting device; Determining, based on the fused video, a target virtual observation orientation corresponding to each of the identified areas when displaying a video image of each of the identified areas in the fused video; In the fused video, the target to be identified is identified by using each target virtual observation orientation corresponding to each identification area to generate a movement path of the target to be identified in the target area; The method for determining the target virtual observation direction corresponding to the first recognition area among the multiple recognition areas includes: Adjusting the initial observation orientation of the first recognition area multiple times to obtain multiple candidate virtual observation orientations; the initial observation orientation is a preset observation orientation of the first shooting device corresponding to the first recognition area in the fused video; respectively obtaining overlapping areas of the maximum recognizable area of the second shooting device and the maximum recognizable area of the first shooting device at each of the plurality of candidate virtual observation positions; the maximum recognizable area of the second shooting device is determined based on the maximum recognition distance of the second shooting device; The candidate virtual observation orientation corresponding to the maximum overlapping area is determined as the target virtual observation orientation.
2. The method according to claim 1, characterized in that The step of adjusting the initial observation orientation of the first recognition area multiple times to obtain multiple candidate virtual observation orientations includes: determining, in the three-dimensional space model, a first virtual shooting device corresponding to the first shooting device according to the placement position and placement angle of the first shooting device; The first virtual shooting device is moved and / or the shooting picture is scaled and / or rotated multiple times, and the obtained multiple virtual observation orientations of the first virtual shooting device are determined as the multiple candidate virtual observation orientations.
3. The method according to claim 1 or 2, characterized in that The step of dividing the target area into a plurality of recognition areas based on the layout position and maximum recognition distance of each of the plurality of shooting devices comprises: Determining the maximum identifiable area of each camera device according to the layout position and maximum recognition distance of each camera device; The intersection surface between two adjacent maximum identifiable areas is used as a dividing surface between two adjacent identification areas, so as to divide the target area into multiple identification areas, wherein the two adjacent identification areas both include the intersection surface.
4. The method according to claim 1 or 2, characterized in that The method further comprises: intercepting a target video in the fused video, where the target video includes a moving path of the target to be identified in the target area; The target video is output.
5. The method according to claim 4, characterized in that Outputting the target video includes: Obtaining position information of the target to be identified in the current frame of the target video; determining a displacement of the target to be identified based on position information of the target to be identified in the current frame and position information of the target to be identified in a frame previous to the current frame; In the three-dimensional space model, adjusting a position of the first observation orientation when the previous frame is output based on the displacement to obtain a second observation orientation; Outputting a current frame of the target video at a second observation orientation.
6. The method according to claim 5, characterized in that When outputting the video image of the first recognition area in the target video, the observation angle of the first observation orientation is the same as the observation angle of the target virtual observation orientation corresponding to the first recognition area; or The observation angle of the first observation orientation is the same as the observation angle of the third observation orientation corresponding to the first identification area, wherein the third observation orientation is an observation orientation determined based on the image of the target to be identified displayed in the target video and the video screen of the first identification area.
7. A moving path generating device, characterized in that: The device comprises: An acquisition module is used to acquire video data captured by multiple shooting devices arranged in a target area; the target area is the area where the target to be identified is located; a processing module, projecting the video data captured by the multiple shooting devices into the three-dimensional space model of the target area to obtain a fused video based on the three-dimensional space model; The processing module is further configured to divide the target area into a plurality of recognition areas based on the placement position and maximum recognition distance of each of the plurality of camera devices; wherein one recognition area corresponds to one camera device, and the maximum recognition distance is the maximum distance at which the camera device can recognize the target to be recognized when the camera device is in the placement state, and the placement state of the camera device includes the placement angle and placement position of the camera device; The processing module is further configured to determine, based on the fused video, a target virtual observation orientation corresponding to each of the identified areas when displaying a video image of each of the identified areas in the fused video; The processing module is further configured to identify the target to be identified in the fused video using each target virtual observation position corresponding to each identification area, so as to generate a movement path of the target to be identified in the target area; The processing module is specifically used to: Adjusting the initial observation orientation of the first recognition area multiple times to obtain multiple candidate virtual observation orientations; the initial observation orientation is a preset observation orientation of the first shooting device corresponding to the first recognition area in the fused video; respectively obtaining overlapping areas of the maximum recognizable area of the second shooting device and the maximum recognizable area of the first shooting device at each of the plurality of candidate virtual observation positions; the maximum recognizable area of the second shooting device is determined based on the maximum recognition distance of the second shooting device; The candidate virtual observation orientation corresponding to the maximum overlapping area is determined as the target virtual observation orientation.
8. The movement path generating device according to claim 7, wherein: The processing module is further specifically configured to: determining, in the three-dimensional space model, a first virtual shooting device corresponding to the first shooting device according to the placement position and placement angle of the first shooting device; The first virtual shooting device is moved and / or the shooting picture is scaled and / or rotated multiple times, and the obtained multiple virtual observation orientations of the first virtual shooting device are determined as the multiple candidate virtual observation orientations.
9. The movement path generating device according to claim 7 or 8, characterized in that: The processing module is further specifically configured to: Determining the maximum identifiable area of each camera device according to the layout position and maximum recognition distance of each camera device; The intersection surface between two adjacent maximum identifiable areas is used as a dividing surface between two adjacent identification areas, so as to divide the target area into multiple identification areas, wherein the two adjacent identification areas both include the intersection surface.
10. The movement path generation device according to claim 7 or 8, characterized in that: The processing module is further configured to: intercepting a target video in the 3D fusion video, where the target video includes a moving path of the target to be identified in the target area; The device further includes an output module, and the output module is configured to output the target video. The movement path generating device according to claim 10 , wherein: The acquisition module is further configured to acquire position information of the target to be identified in the current frame of the target video; The processing module is further configured to determine the displacement of the target to be identified based on the position information of the target to be identified in the current frame and the position information of the target to be identified in a frame previous to the current frame; and, in the three-dimensional space model, adjusting a position of the first output observation orientation when the previous frame is output based on the displacement to obtain a second output observation orientation; The output module is further configured to output the current frame of the target video at a second output observation orientation.
12. The movement path generating device according to claim 11, wherein: When outputting the video image of the first recognition area in the target video, the observation angle of the first observation orientation is the same as the observation angle of the target virtual observation orientation corresponding to the first recognition area; or The observation angle of the first observation orientation is the same as the observation angle of the third observation orientation corresponding to the first identification area, wherein the third observation orientation is an observation orientation determined based on the image of the target to be identified displayed in the target video and the video screen of the first identification area.
13. An electronic device, characterized in that: The electronic device includes a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions; When the processor executes the computer instructions, the electronic device executes the moving path generation method according to any one of claims 1 to 6.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the moving path generating method according to any one of claims 1 to 6.
Citation Information
Patent Citations
A sports building evacuation crowd track generation method based on video images and WiFi positioning
CN109583366A
Video fusion method, device and equipment and storage medium
CN112489121A