Multi-channel video stream processing method and device, equipment and storage medium
By determining the available video streaming algorithm and relative position information of the camera and splicing multiple video streams, the problem of confusion in the video stream structure in the prior art is solved, and clear video stream integration and environmental understanding are achieved.
Patent Information
- Application Number
- CN202410946120.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, the processing of multiple video streams is chaotic after the synthesis of picture-in-picture, which is not conducive to users' review and understanding of the surrounding environment.
By determining the available video streaming algorithm for any camera, the associated video stream collection is obtained, and the image is converted into the same pixel coordinates for splicing according to the relative position information of the camera to generate the final video stream.
It realizes the integration of multiple video streams, with a clear video structure, which is conducive to users' review and understanding of the surrounding environment.
Smart Images

Figure CN118945392A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for processing multiple video streams. Background Art
[0002] The multi-channel video of a camera refers to the video shooting at different positions and directions, or different orientations and angles of the same position. The purpose of this is to have a more comprehensive understanding of the changes in things, objects and environment, and to collect more accurate evidence, so as to make more accurate judgments on the things, objects and environment being filmed.
[0003] In the prior art, the traditional processing of multi-channel video streams is to obtain multiple data from multiple cameras, perform picture-in-picture processing on the multiple camera data, mark them, encode and compress the marked images, and send them to a storage unit for subsequent use.
[0004] However, in the prior art, multiple camera data are processed into a picture-in-picture format and then marked and compressed, resulting in a chaotic structure of the processed multi-channel video streams, which is not conducive to users viewing and understanding the surrounding environment. Summary of the invention
[0005] The present application provides a method, device, equipment and storage medium for processing multiple video streams to solve the problem that the structure of the processed multiple video streams is chaotic, which is not conducive to users to view and understand the surrounding environment by synthesizing multiple camera data through picture-in-picture processing and then marking and compressing.
[0006] In a first aspect, the present application provides a method for processing multiple video streams, which is applied to a computer device, comprising:
[0007] Determine a corresponding available video stream algorithm for any camera, wherein the available video stream algorithm corresponds to an algorithm container;
[0008] In response to a user's configuration operation on a video stream parameter type of the algorithm container according to the camera, a corresponding video stream configuration parameter is generated, wherein the video stream configuration parameter is at least used to indicate one or more associated cameras corresponding to the camera;
[0009] When the target video stream of the camera is input into the algorithm container, the algorithm container is run;
[0010] The video stream configuration parameters are input into the running algorithm container to control the algorithm container to perform the following steps:
[0011] Acquire a set of associated video streams corresponding to the target video stream according to the one or more associated cameras;
[0012] According to the determined relative position information of the camera and the one or more associated cameras, all images in the associated video stream set are converted to the same pixel coordinates, and the associated images in the same pixel coordinates are spliced to obtain a final video stream.
[0013] In one possible design, the method of obtaining a set of associated video streams corresponding to the target video stream based on the one or more associated cameras includes: obtaining all video streams corresponding to the one or more associated cameras; searching for one or more associated video streams associated with the target video stream among all the video streams, wherein the associated video streams are configured with the same available video stream algorithm and there are overlapping areas between video images; continuing to search for one or more associated video streams corresponding to the one or more associated video streams, and querying in a loop until the last associated video stream that is not configured with the available video stream algorithm is found; obtaining all associated video streams before the last associated video stream; and generating the associated video stream collection based on the target video stream and all the associated video streams.
[0014] In one possible design, the video stream parameter types include one or more of the following types: a preset area of interest, a video stream effective time, an algorithm threshold parameter, one or more associated cameras, posture information of a specific position corresponding to one or more associated cameras, and posture information of the specific position corresponding to the camera.
[0015] In one possible design, the process of determining the relative position information of the camera and the one or more associated cameras specifically includes: determining the relative position information of the camera and the one or more associated cameras based on the posture information of the specific position corresponding to the camera and the posture information of the specific position corresponding to the one or more associated cameras.
[0016] In a possible design, after determining the corresponding available video stream algorithm for any camera, it also includes: generating corresponding basic configuration parameters in response to the user's parameter configuration operation on the available video stream algorithm, wherein the basic configuration parameters at least include algorithm container parameters; and initializing the corresponding algorithm container according to the algorithm container parameters.
[0017] In a possible design, after converting all images in the associated video stream set to the same pixel coordinates based on the determined relative position information of the camera and the one or more associated cameras, and splicing the associated images in the same pixel coordinates to obtain the final video stream, it also includes: sampling the final video stream to obtain a sampled image; performing image analysis on the sampled image according to the available video stream algorithm to obtain an image analysis result; reprojecting the sampled image to a corresponding original image based on the image analysis result and the relative position information of the camera and the one or more associated cameras, and generating a corresponding reporting event based on the reprojected original image; recording the reporting event according to a preset event data type to generate a recorded reporting event; searching the recorded reporting event according to a preset retrieval type to generate a retrieval result.
[0018] In a possible design, after sampling the final video stream to obtain the sampled picture, it also includes: determining an image of a region of interest in the spliced video stream set according to a preset region of interest; accordingly, reprojecting the sampled picture to a corresponding original picture according to the picture analysis result and the relative position information of the camera and the one or more associated cameras, includes: reprojecting the sampled picture and the image of the region of interest to a corresponding original picture according to the picture analysis result and the relative position information of the camera and the one or more associated cameras.
[0019] In a second aspect, the present application provides a multi-channel video stream processing device, which is applied to a computer device, including:
[0020] A first determination module is used to determine a corresponding available video stream algorithm for any camera, wherein the available video stream algorithm corresponds to an algorithm container;
[0021] A first generating module, configured to generate corresponding video stream configuration parameters in response to a configuration operation of a user on a video stream parameter type of the algorithm container according to the camera, wherein the video stream configuration parameters are at least used to indicate one or more associated cameras corresponding to the camera;
[0022] A running module, used for running the algorithm container when the target video stream of the camera is input into the algorithm container;
[0023] An input module is used to input the video stream configuration parameters into the running algorithm container to control the algorithm container to perform the following steps:
[0024] An acquisition module, configured to acquire a set of associated video streams corresponding to the target video stream according to the one or more associated cameras;
[0025] A stitching module is used to convert all images in the associated video stream set to the same pixel coordinates according to the determined relative position information of the camera and the one or more associated cameras, and stitch the associated images in the same pixel coordinates to obtain a final video stream.
[0026] In a third aspect, the present application provides a computer device, comprising: at least one processor and a memory;
[0027] The memory stores computer-executable instructions;
[0028] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the method for processing multiple video streams as described in the first aspect and various possible designs of the first aspect.
[0029] In a fourth aspect, the present application provides a computer storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the method for processing multiple video streams as described in the first aspect and various possible designs of the first aspect is implemented.
[0030] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the method for processing multiple video streams as described in the first aspect and various possible designs of the first aspect.
[0031] The processing method, device, equipment and storage medium of multiple video streams provided by the present application determine the available video stream algorithm of any camera and correspond to an algorithm container; in response to the user's configuration operation of the video stream parameter type of the algorithm container according to the camera, generate video stream configuration parameters corresponding to at least one or more associated cameras; when the target video stream is input into the algorithm container, run the algorithm container; input the video stream configuration parameters into the running algorithm container to control the algorithm container to execute the following steps: obtain the associated video stream set corresponding to the target video stream; according to the relative position information of all corresponding cameras, convert all images in the associated video stream set to the same pixel coordinates, and splice the associated images in the same pixel coordinates to obtain the final video stream, so that the multiple video streams are integrated into one video, and the video structure is clear, which is conducive to users to check and understand the surrounding environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0033] Figure 1 A schematic diagram of an application scenario of a method for processing multiple video streams provided in an embodiment of the present application;
[0034] Figure 2 Schematic diagram of the process of processing multiple video streams provided in the embodiment of the present application Figure 1 ;
[0035] Figure 3 Schematic diagram of the process of processing multiple video streams provided in the embodiment of the present application Figure 2 ;
[0036] Figure 4 A schematic diagram of the structure of a device for processing multiple video streams provided in an embodiment of the present application;
[0037] Figure 5 A schematic diagram of the hardware structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0039] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of financial data or user data and other information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals. It should be noted that in the embodiments of this application, some existing solutions in the industry such as certain software, components, models, etc. may be mentioned, and they should be considered as exemplary. Their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0040] The multi-channel video of a camera refers to the video shooting at different positions, different directions, or different orientations and angles of the same position. The purpose of this is to have a more comprehensive understanding of the changes in things, objects, and the environment, and to collect more accurate evidence, so as to make more accurate judgments on the things, objects, and the environment being filmed. In the prior art, the traditional processing of multi-channel video streams is to obtain multiple data from multiple cameras, perform picture-in-picture processing and synthesis on the multiple camera data, mark them, and encode and compress the marked image, and send it to the storage unit for subsequent use. This prior art can reduce the requirements for computing power for multi-channel video analysis, and can realize low computing power analysis of multi-channel videos to obtain the motion trajectory of the target in the picture. However, in the prior art, by performing picture-in-picture processing and synthesis on multiple camera data, marking and compressing them, the structure of the processed multi-channel video stream is chaotic, which is not conducive to users to check and understand the surrounding environment.
[0041] In order to solve the above technical problems, the embodiments of the present application propose the following technical concept: Taking into account that the structure of the picture-in-picture videos of multiple cameras is relatively chaotic, the inventor obtains the corresponding associated video stream set based on the target video stream of any camera, and uses the relative position of the camera corresponding to the associated video stream set and the associated camera to convert all images in the associated video stream set to the same pixel coordinates, and splices the associated images in the same pixel coordinates to obtain the final video stream, so that multiple video streams are integrated into one video with a clear video structure, which is conducive to users to check and understand the surrounding environment.
[0042] Figure 1 It is a schematic diagram of an application scenario of the method for processing multiple video streams provided in an embodiment of the present application.
[0043] like Figure 1 As shown, the scene includes: a display terminal 101 and a computer device 102.
[0044] The display terminal 101 may be a display screen or a terminal such as a personal computer.
[0045] The computer device 102 may be an independent device or a cluster consisting of multiple devices.
[0046] The display terminal 101 receives the configuration operation of the user on the video stream parameter type of the determined available video stream algorithm, generates the corresponding video stream configuration parameters, wherein the video stream configuration parameters are at least used to indicate one or more associated cameras corresponding to the camera, and transmits the video stream configuration parameters to the computer device 102 via a wireless network. When the target video stream is input into the algorithm container, the computer device 102 runs the algorithm container and inputs the video stream configuration parameters into the running algorithm container to perform the following steps: obtaining the associated video stream set corresponding to the target video stream; according to the relative position information of all corresponding cameras, converting all images in the associated video stream set to the same pixel coordinate, and splicing the associated images in the same pixel coordinate to obtain the final video stream. The following is a detailed description using a detailed embodiment.
[0047] Figure 2 Schematic diagram of the process of processing multiple video streams provided in the embodiment of the present application Figure 1 , the execution subject of this embodiment can be Figure 1 The computer device in the embodiment shown is not particularly limited in this embodiment. Figure 2 As shown, the method includes:
[0048] S201: Determine a corresponding available video stream algorithm for any camera, wherein the available video stream algorithm corresponds to an algorithm container.
[0049] In this embodiment, there are three ways to obtain the available video stream algorithm: Method 1, the available video stream algorithm is a newly added algorithm, which is an executable mature algorithm uploaded by the operator, and the algorithm name and algorithm version need to be confirmed; Method 2, the available video stream algorithm is an upgraded algorithm, in which the operator uploads an updated version of an executable mature algorithm for the existing algorithm, and the storage device records it; Method 3, the available video stream algorithm is a restoration algorithm, in which the operator rolls back to an executable mature version from the updated version, and the storage device records it.
[0050] In addition, algorithms that are no longer used by the device in the short term are deleted and recorded by the storage device.
[0051] In this embodiment, the algorithm container is a lightweight virtualization technology.
[0052] In addition, after determining the corresponding available video stream algorithm for any camera, steps a and b are also included:
[0053] Step a: In response to the user's parameter configuration operation on the available video stream algorithm, corresponding basic configuration parameters are generated, wherein the basic configuration parameters at least include algorithm container parameters.
[0054] Step b: Initialize the corresponding algorithm container according to the algorithm container parameters.
[0055] In addition, the corresponding algorithm container can be closed to upgrade, restore or delete the available video streaming algorithms.
[0056] S202: In response to a user's configuration operation on a video stream parameter type of an algorithm container according to a camera, a corresponding video stream configuration parameter is generated, wherein the video stream configuration parameter is at least used to indicate one or more associated cameras corresponding to the camera.
[0057] In this embodiment, the video stream parameter types include one or more of the following types: a preset area of interest, a video stream effective time, an algorithm threshold parameter, one or more associated cameras, posture information of a specific position corresponding to one or more associated cameras, and posture information of a specific position corresponding to the camera.
[0058] The preset region of interest may be one region of interest in the location to be monitored, or may be multiple regions of interest.
[0059] Exemplarily, the preset area of interest is a non-smoking area and a production line in a certain workshop.
[0060] The video stream effective time can be working hours or other times.
[0061] Among them, the algorithm threshold parameters have different parameters in different areas.
[0062] Exemplarily, in a no-smoking area, the smoke concentration threshold is set lower; in a non-no-smoking area, the smoke concentration threshold is set higher.
[0063] Among them, the posture information is a physical and quantifiable expression of the relative position relationship between specific cameras.
[0064] In addition, it also includes channel address information of one or more associated cameras and channel address information of the camera.
[0065] Exemplarily, one or more associated cameras are set as V 1 and V 3 , the channel address information of one or more associated cameras is V 1 and V 3 The IP address information of the camera.
[0066] In addition, one or more associated cameras can also be represented by associated channels.
[0067] In addition, there are cases where a video stream has no associated video stream.
[0068] S203: When the target video stream of the camera is input into the algorithm container, the algorithm container is run.
[0069] S204: Input the video stream configuration parameters into the running algorithm container to control the algorithm container to perform the following steps:
[0070] S2041: Obtain a set of associated video streams corresponding to the target video stream according to one or more associated cameras.
[0071] Specifically, step S2041 includes:
[0072] S20411: Obtain all video streams corresponding to one or more associated cameras.
[0073] In this embodiment, each video stream among all video streams may be associated or unassociated, which needs to be determined according to the video stream time or other specific factors.
[0074] In this embodiment, all video streams are real-time video streams.
[0075] S20412: Searching for one or more associated video streams associated with the target video stream in all video streams, wherein the associated video streams are configured with the same available video stream algorithm and there are overlapping areas between the video images.
[0076] For example, starting with the target video stream A, find the associated video stream A of A. 1 , and check A 1 Is there a video streaming algorithm available for configuration? 1 There is an overlapping area between the images of and A; if so, then A 1 It is the associated video stream of target video stream A.
[0077] S20413: Continue to search for one or more associated video streams corresponding to one or more associated video streams, and query in a loop until the last associated video stream that is not configured with an available video stream algorithm is found.
[0078] For example, the target video stream A 1 Find A for the start 1 The associated video stream A 2 , and check A 2 Is there a video streaming algorithm that can be configured and is compatible with A 1 There is an overlapping area between the images; if so, then A 2 The target video stream A 1 ; loop query, continue searching until the last associated video stream A without configuring an available video stream algorithm is found n+1 (n+1=1,2,…,n+1).
[0079] S20414: Obtain all associated video streams before the last associated video stream.
[0080] Exemplarily, all associated video streams before the last associated video stream are obtained as A 1 , A 2 , …, A n-1 and A n .
[0081] S20415: Generate a collection of associated video streams based on the target video stream and all associated video streams.
[0082] For example, according to the target video stream A and the associated video stream A 1 , A 2 , …, A n-1 and A n Generate a collection of associated video streams [A,A 1 ,…,A n ].
[0083] In addition, in certain environments, A n+1 Merge into the collection of associated video streams.
[0084] S2042: According to the relative position information of the determined camera and one or more associated cameras, all images in the associated video stream set are converted to the same pixel coordinates, and the associated images in the same pixel coordinates are spliced to obtain a final video stream.
[0085] Specifically, the associated images in step S2042 are converted to the same pixel coordinates, specifically: the coordinates of the associated images are mapped so that all pixels in the associated images are in the same observation coordinates and angles.
[0086] Specifically, step S2042 includes steps I to II, as shown below:
[0087] Step I: Due to the relative angle and relative distance between the determined camera and one or more associated cameras, the images of the same object taken from different camera perspectives will have differences in size and shape. For example, the associated image taken by a farther camera is smaller, while the associated image taken by a closer camera is larger; the appearance of the object seen from the top, front, top, and side is also different. Therefore, it is further necessary to map the pixel coordinates of the images taken by different cameras so that all images are mapped to the same coordinate system, so that the associated images can be accurately spliced.
[0088] Step II: stitch the associated images in the same pixel coordinates to obtain the final video stream.
[0089] In this embodiment, the associated images may have an overlapping portion of 10%, 15% or 30%, or may have associated portions of other proportions.
[0090] Specifically, the process of determining the relative position information of the camera and one or more associated cameras in step S2042 specifically includes: determining the relative position information of the camera and one or more associated cameras based on the posture information of the specific position corresponding to the camera, and the posture information of the specific position corresponding to one or more associated cameras.
[0091] In summary, the method for processing multiple video streams provided in this embodiment determines the available video stream algorithm of any camera and corresponds to an algorithm container; in response to the user's configuration operation of the video stream parameter type of the algorithm container according to the camera, generates video stream configuration parameters corresponding to at least one or more associated cameras; when the target video stream is input into the algorithm container, the algorithm container is run; the video stream configuration parameters are input into the running algorithm container to control the algorithm container to perform the following steps: obtaining the associated video stream set corresponding to the target video stream; according to the relative position information corresponding to all cameras, all images in the associated video stream set are converted to the same pixel coordinate, and the associated images in the same pixel coordinate are spliced to obtain the final video stream, so that multiple video streams are integrated into one video, and the video structure is clear, which is conducive to users to check and understand the surrounding environment.
[0092] In addition, by converting all images in the associated video stream set to the same pixel coordinates based on the relative position information of the determined camera and one or more associated cameras, and splicing the associated images in the same pixel coordinates to obtain the final video stream, and processing through the same algorithm container, the user can obtain the final video stream at a preset time or in real time, which is conducive to the user to check and understand the surrounding environment in time.
[0093] In addition, by configuring the parameters of the available video stream algorithm outside the algorithm container, the corresponding basic configuration parameters are generated, so that the operation interface is visualized and the operation difficulty is reduced.
[0094] In addition, by setting the effective time of the video stream and using the same algorithm container to process the video stream, resources can be saved and data security can be guaranteed.
[0095] Figure 3 Schematic diagram of the process of processing multiple video streams provided in the embodiment of the present application Figure 2 In the embodiment of the present application, Figure 2 Based on the embodiment provided, the retrieval of the reported event of the final video stream after step S2042 is described in detail. Figure 3 As shown, the method includes:
[0096] S301: Determine a corresponding available video stream algorithm for any camera, wherein the available video stream algorithm corresponds to an algorithm container.
[0097] In this embodiment, the discussion on the available video stream algorithms and algorithm containers has been described in detail in step S201 and will not be repeated here.
[0098] S302: In response to a user's configuration operation on a video stream parameter type of an algorithm container according to a camera, a corresponding video stream configuration parameter is generated, wherein the video stream configuration parameter is at least used to indicate one or more associated cameras corresponding to the camera.
[0099] In this embodiment, the discussion on the video stream parameter type and the video stream configuration parameters has been described in detail in step S202, and will not be repeated here.
[0100] S303: When the target video stream of the camera is input into the algorithm container, the algorithm container is run.
[0101] S304: Input the video stream configuration parameters into the running algorithm container to control the algorithm container to perform the following steps:
[0102] S3041: Obtain a set of associated video streams corresponding to the target video stream according to one or more associated cameras.
[0103] In this embodiment, the specific discussion about step S3041 has been described in detail in step S2041 and will not be repeated here.
[0104] S3042: According to the relative position information of the determined camera and one or more associated cameras, all images in the associated video stream set are converted to the same pixel coordinates, and the associated images in the same pixel coordinates are spliced to obtain a final video stream.
[0105] In this embodiment, the specific discussion about step S3042 has been described in detail in step S2042 and will not be repeated here.
[0106] S305: Sampling the final video stream to obtain a sampled picture.
[0107] Specifically, the final video stream may be subjected to one or more frame extractions to obtain sampled pictures.
[0108] In this embodiment, after step S305, the method further includes: determining an image of a region of interest in the spliced video stream set according to a preset region of interest.
[0109] In this embodiment, the image sampling and the image of the region of interest are processed synchronously to ensure consistent resolution when processing the images.
[0110] In this embodiment, the final video stream is subjected to frame extraction processing, and the event scene is analyzed, recorded, and displayed in combination with a preset region of interest.
[0111] Exemplarily, in a no-smoking area, in the spliced video stream set, the video stream is frame-processed, and the image is analyzed based on a preset region of interest to determine whether there is smoking time, and the event is recorded and displayed.
[0112] S306: Perform image analysis on the sampled image according to the available video stream algorithm to obtain an image analysis result.
[0113] S307: According to the image analysis result and the relative position information of the camera and one or more associated cameras, the sampled image is reprojected to the corresponding original image, and a corresponding reporting event is generated according to the reprojected original image.
[0114] For example, the reported event is an employee smoking in a non-smoking area.
[0115] In this embodiment, based on step S305, step S307 is specifically as follows: according to the analysis result of the stitched image and the relative position information of the camera and one or more associated cameras, the sampled image and the image of the region of interest are reprojected to the corresponding original image.
[0116] S308: Record the reported event according to a preset event data type to generate a recorded reported event.
[0117] In this embodiment, the preset event data type may be a motion track data type or other data types.
[0118] Exemplarily, an employee smoking in a no-smoking area is taken as a reporting event, and the movement trajectory of the employee is recorded according to the movement trajectory data type to generate a no-smoking area smoking reporting event with the movement trajectory of the employee.
[0119] S309: Search the recorded reported events according to a preset search type to generate search results.
[0120] In this embodiment, the preset search types are event search types such as time, event type and channel.
[0121] Exemplarily, the smoking report events in the no-smoking area with the employee's movement trajectory are searched to generate search results such as the smoking events in the no-smoking area, the smoking time, and the area to which they belong.
[0122] In addition, the recorded reported events can also be stored in the cloud, and searched in the cloud according to the preset search type to generate search results.
[0123] In addition, the search results are used to instruct the user to review the reported event or play back the corresponding video.
[0124] In summary, the method for processing multiple video streams provided in this embodiment performs image sampling on the final video stream to obtain a sampled image; performs image analysis on the sampled image to obtain an image analysis result; based on the image analysis result and the relative position information of all cameras, the sampled image is reprojected to the corresponding original image, and a corresponding reported event is generated; the reported event is recorded according to a preset event data type to generate a recorded reported event; the recorded reported event is searched according to a preset retrieval type to generate a retrieval result, so that the user can check the reported event or the corresponding video playback according to the retrieval result, which is beneficial for the user to check and understand the environmental conditions when the event occurred.
[0125] In addition, the reporting event is used to report the same event only once to save computer resources.
[0126] It should be noted that, in the present application, if the final video stream is acquired from other different cameras, the same method as the above embodiment can also be adopted.
[0127] Figure 4 The structure diagram of the apparatus for processing multiple video streams provided in the embodiment of the present application is shown in FIG. Figure 4 As shown, the multi-channel video stream processing device includes: a first determination module 401, a first generation module 402, an operation module 403, an input module 404, an acquisition module 405 and a splicing module 406.
[0128] A first determination module 401 is used to determine a corresponding available video stream algorithm for any camera, wherein the available video stream algorithm corresponds to an algorithm container;
[0129] A first generating module 402, configured to generate corresponding video stream configuration parameters in response to a configuration operation of a video stream parameter type of the algorithm container by a user according to the camera, wherein the video stream configuration parameters are at least used to indicate one or more associated cameras corresponding to the camera;
[0130] An operation module 403 is used to operate the algorithm container when the target video stream of the camera is input into the algorithm container;
[0131] The input module 404 is used to input the video stream configuration parameters into the running algorithm container to control the algorithm container to perform the following steps:
[0132] An acquisition module 405 is used to acquire a set of associated video streams corresponding to the target video stream according to the one or more associated cameras;
[0133] The stitching module 406 is used to convert all images in the associated video stream set to the same pixel coordinates according to the determined relative position information of the camera and the one or more associated cameras, and stitch the associated images in the same pixel coordinates to obtain a final video stream.
[0134] In a possible implementation, the acquisition module 405 specifically includes:
[0135] A first acquisition unit 4051 is used to acquire all video streams corresponding to the one or more associated cameras;
[0136] A first searching unit 4052 is configured to search, among all the video streams, one or more associated video streams associated with the target video stream, wherein the associated video streams are configured with the same available video stream algorithm and there is an overlapping area between the video images;
[0137] The second search unit 4053 is used to continue searching for one or more associated video streams corresponding to the one or more associated video streams, and to perform a cyclic query until the last associated video stream that is not configured with the available video stream algorithm is found;
[0138] The second acquisition unit 4054 is used to acquire all associated video streams before the last associated video stream;
[0139] The generating unit 4055 is used to generate the associated video stream collection according to the target video stream and all the associated video streams.
[0140] In one possible implementation, the video stream parameter types include one or more of the following types: a preset area of interest, a video stream effective time, an algorithm threshold parameter, one or more associated cameras, posture information of a specific position corresponding to one or more associated cameras, and posture information of a specific position corresponding to the camera.
[0141] In a possible implementation manner, the device further includes:
[0142] The second determination module 407 is used to determine the relative position information of the camera and the one or more associated cameras according to the channel address information of the camera and the channel address information of the one or more associated cameras.
[0143] In a possible implementation manner, the device further includes:
[0144] A second generating module 408, configured to generate corresponding basic configuration parameters in response to a user's parameter configuration operation on the available video stream algorithm, wherein the basic configuration parameters at least include algorithm container parameters;
[0145] The initialization module 409 is used to initialize the corresponding algorithm container according to the algorithm container parameters.
[0146] In a possible implementation manner, the device further includes:
[0147] The sampling module 410 is used to perform picture sampling on the final video stream to obtain a sampled picture;
[0148] An analysis module 411 is used to perform image analysis on the sampled image according to the available video stream algorithm to obtain an image analysis result;
[0149] A projection module 412, configured to reproject the sampled image to a corresponding original image according to the image analysis result and the relative position information of the camera and the one or more associated cameras, and generate a corresponding reporting event according to the reprojected original image;
[0150] The third generating module 413 is used to record the reported event according to a preset event data type and generate a recorded reported event;
[0151] The fourth generating module 414 is used to search the recorded reported events according to a preset search type to generate search results.
[0152] In a possible implementation manner, the device further includes:
[0153] A third determining module 415 is used to determine an image of a region of interest in the spliced video stream set according to a preset region of interest;
[0154] Correspondingly, the projection module 412 is specifically used to: reproject the sampled image and the image of the region of interest to the corresponding original image according to the image analysis result and the relative position information of the camera and the one or more associated cameras.
[0155] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0156] Figure 5 Schematic diagram of the hardware structure of the computer device provided in the embodiment of the present application. Figure 5As shown, the computer device of this embodiment includes: a processor 501 and a memory 502; the memory stores computer execution instructions; at least one processor executes the computer execution instructions stored in the memory, so that at least one processor executes the above multi-channel video stream processing method.
[0157] Optionally, the memory 502 may be independent or integrated with the processor 501 .
[0158] When the memory 502 is independently provided, the computer device further includes a bus 503 for connecting the memory 502 and the processor 501 .
[0159] The embodiment of the present application further provides a computer storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the method for processing multiple video streams as described above is implemented.
[0160] An embodiment of the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method for processing multiple video streams as described above is implemented.
[0161] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0162] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
[0163] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0164] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application.
[0165] It should be understood that the above processor can be a graphics processing unit (GPU) or a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.
[0166] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0167] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0168] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0169] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.
[0170] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for processing multi-channel video streams, characterized in that: Applicable to computer equipment, including: Determine a corresponding available video stream algorithm for any camera, wherein the available video stream algorithm corresponds to an algorithm container; In response to a user's configuration operation on a video stream parameter type of the algorithm container according to the camera, a corresponding video stream configuration parameter is generated, wherein the video stream configuration parameter is at least used to indicate one or more associated cameras corresponding to the camera; When the target video stream of the camera is input into the algorithm container, the algorithm container is run; The video stream configuration parameters are input into the running algorithm container to control the algorithm container to perform the following steps: Acquire a set of associated video streams corresponding to the target video stream according to the one or more associated cameras; According to the determined relative position information of the camera and the one or more associated cameras, all images in the associated video stream set are converted to the same pixel coordinates, and the associated images in the same pixel coordinates are spliced to obtain a final video stream.
2. The method according to claim 1, characterized in that The step of obtaining a set of associated video streams corresponding to the target video stream according to the one or more associated cameras includes: Obtain all video streams corresponding to the one or more associated cameras; Searching for one or more associated video streams associated with the target video stream in all the video streams, wherein the associated video streams are configured with the same available video stream algorithm, and there are overlapping areas between the video stream images; Continue to search for one or more associated video streams corresponding to the one or more associated video streams, and query in a loop until the last associated video stream that is not configured with the available video stream algorithm is found; Obtain all associated video streams before the last associated video stream; The associated video stream collection is generated according to the target video stream and all the associated video streams.
3. The method according to claim 1, characterized in that: The video stream parameter type includes one or more of the following types: Preset the area of interest, video stream effective time, algorithm threshold parameters, one or more associated cameras, the posture information of the specific position corresponding to one or more associated cameras, and the posture information of the specific position corresponding to the camera.
4. The method according to claim 3, characterized in that The process of determining the relative position information of the camera and the one or more associated cameras specifically includes: The relative position information of the camera and the one or more associated cameras is determined according to the posture information of the specific position corresponding to the camera and the posture information of the specific position corresponding to the one or more associated cameras.
5. The method according to any one of claims 1 to 4, characterized in that: After determining the corresponding available video stream algorithm for any camera, the method further includes: In response to a user's parameter configuration operation on the available video stream algorithm, generating corresponding basic configuration parameters, wherein the basic configuration parameters at least include algorithm container parameters; Initialize the corresponding algorithm container according to the algorithm container parameters.
6. The method according to claim 1, characterized in that After converting all images in the associated video stream set to the same pixel coordinates according to the determined relative position information of the camera and the one or more associated cameras, and splicing the associated images in the same pixel coordinates to obtain a final video stream, the method further includes: Performing picture sampling on the final video stream to obtain a sampled picture; Performing picture analysis on the sampled picture according to the available video stream algorithm to obtain a picture analysis result; According to the image analysis result and the relative position information of the camera and the one or more associated cameras, reproject the sampled image to a corresponding original image, and generate a corresponding reporting event according to the reprojected original image; Recording the reported event according to a preset event data type to generate a recorded reported event; The recorded reported events are searched according to a preset search type to generate search results.
7. The method according to claim 6, characterized in that After sampling the final video stream to obtain a sampled picture, the method further includes: According to the preset region of interest, determining a region of interest image in the spliced video stream set; Accordingly, the reprojecting the sampled image to the corresponding original image according to the image analysis result and the relative position information of the camera and the one or more associated cameras includes: According to the image analysis result and the relative position information of the camera and the one or more associated cameras, the sampled image and the image of the region of interest are reprojected to the corresponding original image.
8. A device for processing multiple video streams, characterized in that: Applicable to computer equipment, including: A first determination module is used to determine a corresponding available video stream algorithm for any camera, wherein the available video stream algorithm corresponds to an algorithm container; A first generating module, configured to generate corresponding video stream configuration parameters in response to a configuration operation of a user on a video stream parameter type of the algorithm container according to the camera, wherein the video stream configuration parameters are at least used to indicate one or more associated cameras corresponding to the camera; A running module, used for running the algorithm container when the target video stream of the camera is input into the algorithm container; An input module is used to input the video stream configuration parameters into the running algorithm container to control the algorithm container to perform the following steps: An acquisition module, configured to acquire a set of associated video streams corresponding to the target video stream according to the one or more associated cameras; A stitching module is used to convert all images in the associated video stream set to the same pixel coordinates according to the determined relative position information of the camera and the one or more associated cameras, and stitch the associated images in the same pixel coordinates to obtain a final video stream.
9. A computer device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the method for processing multiple video streams according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The computer storage medium stores computer executable instructions. When the processor executes the computer executable instructions, the method for processing multiple video streams according to any one of claims 1 to 7 is implemented.
11. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the method for processing multiple video streams as claimed in any one of claims 1 to 7.
Citation Information
Cited By
Video monitoring method and device for park hazardous chemical substance warehouse, equipment and storage medium
CN119723467A
Object monitoring method and device based on multi-source data and storage medium
CN121462725A
