Security camera high-definition video optimization acquisition method
By performing technical means such as gradient background processing, security disturbance detection and fragmentation processing on security cameras, the high-definition video acquisition process of security cameras is optimized, and the video transmission congestion and storage space occupation caused by redundant data is solved, and efficient video data acquisition and transmission is achieved.
Patent Information
- Application Number
- CN202510358572.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-06-24
AI Technical Summary
There is a large amount of redundant data during the high-definition video acquisition process of existing security cameras, resulting in congestion and lag in video transmission and invalid storage space.
By performing security shooting control on the target camera, performing gradient background processing, determining the boundary of the security line segment, and performing security disturbance detection. When there is monitoring security disturbance, select the disturbance period for collection and upload; when there is no monitoring security disturbance, perform fragmentation processing and local cyclic storage, and select representative frame images for collection and upload.
It effectively avoids the acquisition and transmission of redundant video data, avoids the congestion and lag of video transmission, and reduces the invalid footprint of storage space.
Smart Images

Figure CN120201296A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of video acquisition, and particularly relates to a method for optimizing the acquisition of high-definition video by a security camera. Background Art
[0002] Security cameras are cameras used for security monitoring. They are widely used in homes, enterprises, public places, etc. to improve security. The video acquisition of security cameras is a process of using specially designed monitoring cameras to capture, collect, and transmit video data, which involves the comprehensive application of optics, electronics, signal processing, and computer technology, aiming to provide clear, reliable, and real-time video monitoring.
[0003] In the prior art, the high-definition video acquisition of security cameras is usually a continuous acquisition process. Therefore, in the acquired and transmitted high-definition video, there are often a large amount of redundant data, which is likely to cause congestion and jamming in video transmission and also likely to cause a large amount of ineffective occupation of storage space. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide a method for optimizing the acquisition of high-definition video by a security camera, aiming to solve the technical problems existing in the prior art mentioned in the background art.
[0005] The embodiments of the present invention are implemented as follows:
[0006] A method for optimizing the acquisition of high-definition video by a security camera, the method specifically includes the following steps:
[0007] Perform security shooting control on the target camera to obtain a security shooting video, and perform periodic gradient background processing on the security shooting video to obtain the current monitoring background;
[0008] Obtain the security monitoring requirements, determine the boundaries of the security line segments, and based on the current monitoring background, perform security disturbance detection on the security shooting video to determine whether there is a monitoring security disturbance;
[0009] When there is a monitoring security disturbance, determine the security disturbance time, and select the video of the disturbance period from the security shooting video for acquisition and upload;
[0010] When there is no monitoring security disturbance, perform fragmentation processing on the security shooting video to obtain a plurality of security segment videos, and perform local circular storage;
[0011] Perform comparative analysis on the representative frames of the plurality of security segment videos, and select a plurality of representative frame images for acquisition and upload.
[0012] As a further limitation of the technical solution of the embodiment of the present invention, the security shooting control of the target camera, obtaining the security shooting video, and performing periodic gradient background processing on the security shooting video to obtain the current monitoring background specifically include the following steps:
[0013] Receive the security shooting requirement and determine multiple security shooting parameters;
[0014] According to the multiple security shooting parameters, perform security shooting control on the target camera to obtain the security shooting video;
[0015] Obtain the previous monitoring background;
[0016] According to the preset gradient processing period, periodically select the gradient processing image and the adjacent processing image from the security shooting video;
[0017] Based on the previous monitoring background, perform background update calculation on the gradient processing image and the adjacent processing image to generate the current monitoring background.
[0018] As a further limitation of the technical solution of the embodiment of the present invention, the formula for performing background update calculation on the gradient processing image and the adjacent processing image based on the previous monitoring background to generate the current monitoring background is:
[0019]
[0020]
[0021] Among them, (x, y) is the pixel coordinate, B q (x, y) is the gray value of the current monitoring background at (x, y), X is the length of the image x-axis, Y is the length of the image y-axis, G q (x, y) is the gray value of the gradient processing image at (x, y), G q-1 (x, y) is the gray value of the adjacent processing image at (x, y), p is the preset weight coefficient, B q-1 (x, y) is the gray value of the previous monitoring background at (x, y), V a Is the preset comparison threshold.
[0022] As a further limitation of the technical solution of the embodiment of the present invention, the steps of obtaining the security monitoring requirement, determining the security line segment boundary, and performing security disturbance detection on the security shooting video based on the current monitoring background to determine whether there is a monitoring security disturbance specifically include the following steps:
[0023] Obtain the security monitoring requirement;
[0024] Analyze the security monitoring requirement to determine the security line segment boundary;
[0025] Process the frame rate of the security surveillance video according to a preset disturbance detection period, and periodically select disturbance detection frames and corresponding detected frame images;
[0026] Based on the current monitoring background, calculate the disturbance detection value of the security line segment boundary in the detected frame image;
[0027] Compare the disturbance detection value with a preset standard disturbance value to determine whether there is a security surveillance disturbance.
[0028] As a further limitation of the technical solution of the embodiment of the present invention, the calculation formula for calculating the disturbance detection value of the security line segment boundary in the detected frame image based on the current monitoring background is:
[0029]
[0030] Among them, f represents the disturbance detection frame, D f is the disturbance detection value, k is a preset detection coefficient, (x, y d ) represents the pixel coordinates of the security line segment boundary, (i, y d ) represents the starting pixel coordinates of the security line segment boundary, G f (x, y d ) is the grayscale value of the detected frame image at (x, y d ), B q (x, y d ) is the grayscale value of the current monitoring background at (x, y d ), V b is a preset detection threshold, and N is the total number of pixel points of the security line segment boundary.
[0031] As a further limitation of the technical solution of the embodiment of the present invention, when there is a security surveillance disturbance, determining the security disturbance time and selecting and collecting and uploading the video of the disturbance period from the security surveillance video specifically includes the following steps:
[0032] When there is a security surveillance disturbance, determine the security disturbance time;
[0033] According to the security disturbance time, select the video of the disturbance period from the security surveillance video;
[0034] Monitor the resources of the target camera to obtain network resource data;
[0035] Analyze the network resource data to determine whether there is wireless network congestion;
[0036] When there is no wireless network congestion, continuously collect and upload the video of the disturbance period through the target camera;
[0037] When there is wireless network congestion, select an auxiliary security device in the transmission idle state, and through the auxiliary security device, assist in collecting and uploading the video during the disturbance period.
[0038] As a further limitation of the technical solution of the embodiment of the present invention, the specific steps of fragmenting the security shooting video into multiple security segment videos and performing local circular storage when there is no monitoring security disturbance are as follows:
[0039] When there is no monitoring security disturbance, obtain the fragmentation period;
[0040] According to the fragmentation period, fragment the security shooting video to obtain multiple security segment videos;
[0041] Locally store multiple security segment videos;
[0042] Perform space monitoring of local storage, and perform pre-release of local storage when the preset storage occupancy ratio is reached.
[0043] As a further limitation of the technical solution of the embodiment of the present invention, the specific steps of comparing and analyzing representative frames of multiple security segment videos and selecting multiple representative frame images for collection and upload are as follows:
[0044] Select multiple comparison frame images from multiple security segment videos;
[0045] Perform comparison calculation of adjacent approximation degrees of multiple comparison frame images to obtain multiple approximation degree comparison values;
[0046] Select representative frame images according to multiple approximation degree comparison values;
[0047] Collect and upload representative frame images corresponding to multiple security segment videos.
[0048] As a further limitation of the technical solution of the embodiment of the present invention, the calculation formula for performing comparison calculation of adjacent approximation degrees of multiple comparison frame images to obtain multiple approximation degree comparison values is:
[0049]
[0050] Where C j is the jth approximation degree comparison value, is the gray-scale mean value of the jth comparison frame image, is the gray-scale mean value of the (j - 1)th comparison frame image, and M is a preset comparison coefficient.
[0051] Compared with the prior art, the beneficial effects of the present invention are:
[0052] In the embodiments of the present invention, security shooting control is performed to process the gradient background; the boundaries of the security line segments are determined to detect security disturbances; when security disturbances are monitored, the video of the disturbance period is selected for acquisition and upload; when no security disturbances are monitored, fragmentation processing and local circular storage are performed; and multiple representative frame images are selected for acquisition and upload. It is possible to perform periodic gradient background processing on the security shooting video and detect security disturbances. When security disturbances are monitored, the video of the disturbance period is selected for acquisition and upload; when no security disturbances are monitored, fragmentation processing and local circular storage are performed, and representative frame images are selected for acquisition and upload, thereby avoiding redundant video data acquisition and transmission, which can not only avoid congestion and lag in video transmission but also reduce the ineffective occupation of storage space. Description of the Drawings
[0053] Figure 1 Shows the flowchart of the high-definition video optimization acquisition method for a security camera provided by the embodiments of the present invention;
[0054] Figure 2 Shows the flowchart of security shooting control and gradient background processing in the method provided by the embodiments of the present invention;
[0055] Figure 3 Shows the flowchart of monitoring and judging security disturbances in the method provided by the embodiments of the present invention;
[0056] Figure 4 Shows the flowchart of video acquisition and upload during the disturbance period in the method provided by the embodiments of the present invention;
[0057] Figure 5 Shows the flowchart of video fragmentation processing and local circular storage in the method provided by the embodiments of the present invention;
[0058] Figure 6 Shows the flowchart of representative frame image acquisition and upload in the method provided by the embodiments of the present invention. Detailed Embodiments
[0059] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0060] It can be understood that in the prior art, the high-definition video acquisition of security cameras is usually a continuous acquisition process. Therefore, the high-definition videos acquired and transmitted often contain a large amount of redundant data, which is likely to cause congestion and lag in video transmission and also likely to cause a large amount of ineffective occupation of storage space.
[0061] To solve the above problems, an optimized acquisition method for high-definition video of a security camera disclosed in an embodiment of the present invention controls the security shooting of a target camera to obtain a security shooting video, and performs periodic gradient background processing on the security shooting video to obtain the current monitoring background; obtains security monitoring requirements, determines the boundaries of security line segments, and based on the current monitoring background, performs security disturbance detection on the security shooting video to determine whether there is a monitoring security disturbance; when there is a monitoring security disturbance, determines the security disturbance time, and selects the video of the disturbance period from the security shooting video for acquisition and upload; when there is no monitoring security disturbance, performs fragmentation processing on the security shooting video to obtain multiple security segment videos, and performs local cyclic storage; performs comparative analysis on the representative frames of the multiple security segment videos, and selects multiple representative frame images for acquisition and upload. It can perform periodic gradient background processing on the security shooting video, and perform security disturbance detection. When there is a monitoring security disturbance, select the video of the disturbance period for acquisition and upload; when there is no monitoring security disturbance, perform fragmentation processing and local cyclic storage, and select representative frame images for acquisition and upload, thereby avoiding redundant video data acquisition and transmission, which can not only avoid congestion and jamming of video transmission, but also reduce the ineffective occupation of storage space.
[0062] Specifically, Figure 1 Fig. shows the flowchart of the optimized acquisition method for high-definition video of a security camera provided by an embodiment of the present invention.
[0063] In a preferred embodiment provided by the present invention, an optimized acquisition method for high-definition video of a security camera, the method specifically includes the following steps:
[0064] Step S101, control the security shooting of the target camera to obtain a security shooting video, and perform periodic gradient background processing on the security shooting video to obtain the current monitoring background.
[0065] In an embodiment of the present invention, by receiving security shooting requirements, analyzing the security shooting requirements, determining multiple security shooting parameters including shooting angle, resolution, sensitivity, aperture, frame rate, etc., and then controlling the security shooting of the target camera according to the multiple security shooting parameters, so that the target camera shoots and obtains a security shooting video, and obtains the previous monitoring background. According to the preset gradient processing period, periodically select gradient processing images from the security shooting video, and obtain the adjacent processing images of the previous frame of the gradient processing image from the security shooting video. Based on the previous monitoring background, perform background update processing on the gradient processing image and the adjacent processing image, calculate the gray values of different pixel coordinates in the background update, and then construct and generate the current monitoring background according to the multiple pixel coordinates and the corresponding gray values. Specifically, the calculation formula for the gray values of different pixel coordinates is:
[0066]
[0067]
[0068] Among them, (x, y) are pixel coordinates, and B q (x, y) is the gray value of the current monitored background at (x, y), X is the length of the x-axis of the image, Y is the length of the y-axis of the image, and G q (x, y) is the gray value of the gradient-processed image at (x, y), and G q-1 (x, y) is the gray value of the adjacent processed image at (x, y), p is a preset weight coefficient, and B q-1 (x, y) is the gray value of the previous monitored background at (x, y), and V a is a preset comparison threshold.
[0069] It can be understood that the monitored background will be affected by various factors (such as lighting conditions, object movement, air quality, etc.) and will change to a certain extent over time. Therefore, it is necessary to perform gradient background processing to periodically update the current monitored background.
[0070] It can be understood that when q = 1, the current monitored background is the previous monitored background and is also the initial monitored background. Therefore, the calculation formula for the gray values of different pixel coordinates in the embodiments of the present invention is only applicable to the case where q > 1.
[0071] Specifically, Figure 2 shows the flow chart of security shooting control and gradient background processing in the method provided by the embodiments of the present invention.
[0072] Among them, in the preferred embodiment provided by the present invention, the security shooting control of the target camera, obtaining the security shooting video, and performing periodic gradient background processing on the security shooting video to obtain the current monitored background specifically include the following steps:
[0073] Step S1011: Receive the security shooting requirement and determine multiple security shooting parameters.
[0074] Step S1012: Perform security shooting control on the target camera according to the multiple security shooting parameters to obtain the security shooting video.
[0075] Step S1013: Obtain the previous monitored background.
[0076] Step S1014: Periodically select the gradient-processed image and the adjacent processed image from the security shooting video according to the preset gradient processing period.
[0077] Step S1015: Based on the previous monitoring background, perform background update calculation on the gradient-processed image and the adjacent processed image to generate the current monitoring background.
[0078] Further, the high-definition video optimized acquisition method for the security camera further includes the following steps:
[0079] Step S102: Obtain the security monitoring requirements, determine the boundaries of the security line segments, and based on the current monitoring background, perform security disturbance detection on the security captured video to determine whether there is a monitored security disturbance.
[0080] In the embodiment of the present invention, by obtaining the security monitoring requirements, analyzing the security monitoring requirements, determining the boundaries of the security line segments that need to be key-monitored, then performing frame rate processing on the security captured video according to the preset disturbance detection period, periodically selecting disturbance detection frames, extracting the detection frame images corresponding to the disturbance detection frames from the security captured video, then performing grayscale processing on the detection frame images, and based on the current monitoring background, calculating the disturbance detection value of the security line segment boundaries in the detection frame images. By comparing the disturbance detection value with the preset standard disturbance value, when the disturbance detection value is greater than the standard disturbance value, it is determined that there is a monitored security disturbance; while when the disturbance detection value is not greater than the standard disturbance value, it is determined that there is no monitored security disturbance. Specifically, the calculation formula for calculating the disturbance detection value of the security line segment boundaries in the detection frame images is:
[0081]
[0082] where f represents the disturbance detection frame, D f is the disturbance detection value, k is the preset detection coefficient, (x, y d ) represents the pixel coordinates of the security line segment boundary, (i, y d ) represents the starting pixel coordinates of the security line segment boundary, G f (x, y d ) is the grayscale value of the detection frame image at (x, y d ), B q (x, y d ) is the grayscale value of the current monitoring background at (x, y d ), V b is the preset detection threshold, and N is the total number of pixel points of the security line segment boundary.
[0083] It can be understood that in the video surveillance of security cameras, it is necessary to conduct key security monitoring on some objects, locations, etc. These objects, locations, etc. that require key security monitoring are all composed of multiple security line segment boundaries in the image. Therefore, it is possible to detect security disturbances on the security line segment boundaries to determine whether there are monitoring security disturbances. Specifically, the monitoring security disturbances can be situations such as moving the objects that require key security monitoring or entering the locations that require key security monitoring.
[0084] It can be understood that in the embodiments of the present invention, the security line segment boundaries are set to be parallel to the x-axis.
[0085] Specifically, Figure 3 The flowchart of monitoring security disturbance judgment in the method provided by the embodiments of the present invention is shown.
[0086] Among them, in the preferred embodiment provided by the present invention, the steps of obtaining the security monitoring requirements, determining the security line segment boundaries, performing security disturbance detection on the security surveillance video based on the current monitoring background, and determining whether there are monitoring security disturbances specifically include the following steps:
[0087] Step S1021: Obtain the security monitoring requirements.
[0088] Step S1022: Analyze the security monitoring requirements to determine the security line segment boundaries.
[0089] Step S1023: Perform frame rate processing on the security surveillance video according to a preset disturbance detection period, and periodically select disturbance detection frames and corresponding detected frame images.
[0090] Step S1024: Calculate the disturbance detection value of the security line segment boundaries in the detected frame image based on the current monitoring background.
[0091] Step S1025: Compare the disturbance detection value with a preset standard disturbance value to determine whether there are monitoring security disturbances.
[0092] Furthermore, the method for optimizing the acquisition of high-definition video of the security camera further includes the following steps:
[0093] Step S103: When there are monitoring security disturbances, determine the security disturbance time, and select the video of the disturbance period from the security surveillance video for acquisition and upload.
[0094] In an embodiment of the present invention, when there is a monitored security disturbance, the security disturbance time is determined according to the disturbance detection frames corresponding to multiple disturbance detection values being greater than the standard disturbance value. Then, according to the security disturbance time, the video of the disturbance period is intercepted from the security surveillance video, and the resources of the target camera are monitored to obtain network resource data. The network resource data is analyzed to determine whether there is a wireless network congestion. In the case of no wireless network congestion, the video of the disturbance period is continuously collected and uploaded through the target camera; while in the case of having a wireless network congestion, the device operating states of multiple other security devices that are in wired communication connection with the target camera are obtained, and an auxiliary security device in a transmission idle state is selected from the multiple other security devices. The video of the disturbance period is transmitted to the auxiliary security device through the wired communication channel between the target camera and the auxiliary security device, and then the auxiliary security device is used for auxiliary collection and uploading.
[0095] Specifically, Figure 4 FIG. shows the flowchart of the collection and upload of the video of the disturbance period in the method provided by the embodiment of the present invention.
[0096] Among them, in the preferred embodiment provided by the present invention, when there is a monitored security disturbance, determining the security disturbance time and selecting the video of the disturbance period from the security surveillance video for collection and upload specifically include the following steps:
[0097] Step S1031: When there is a monitored security disturbance, determine the security disturbance time.
[0098] Step S1032: According to the security disturbance time, select the video of the disturbance period from the security surveillance video.
[0099] Step S1033: Monitor the resources of the target camera to obtain network resource data.
[0100] Step S1034: Analyze the network resource data to determine whether there is a wireless network congestion.
[0101] Step S1035: When there is no wireless network congestion, continuously collect and upload the video of the disturbance period through the target camera.
[0102] Step S1036: When there is a wireless network congestion, select an auxiliary security device in a transmission idle state, and perform auxiliary collection and upload of the video of the disturbance period through the auxiliary security device.
[0103] Furthermore, the method for optimizing the high-definition video collection of the security camera further includes the following steps:
[0104] Step S104: When there is no monitoring of security disturbances, fragment the security surveillance video to obtain multiple security fragment videos, and perform local circular storage.
[0105] In an embodiment of the present invention, when there is no monitoring of security disturbances, obtain the fragmentation period, and then fragment the security surveillance video according to the fragmentation period to obtain multiple security fragment videos. Furthermore, locally store the multiple security fragment videos, and perform real-time monitoring of the local storage space to obtain the local storage status. When the local storage reaches a preset storage occupancy ratio, format the video data with the longest time according to a preset space release ratio to achieve pre-release of local storage.
[0106] Specifically, Figure 5 shows a flowchart of video fragmentation processing and local circular storage in the method provided by the embodiment of the present invention.
[0107] Among them, in the preferred embodiment provided by the present invention, the step of fragmenting the security surveillance video to obtain multiple security fragment videos and performing local circular storage when there is no monitoring of security disturbances specifically includes the following steps:
[0108] Step S1041: When there is no monitoring of security disturbances, obtain the fragmentation period.
[0109] Step S1042: Fragment the security surveillance video according to the fragmentation period to obtain multiple security fragment videos.
[0110] Step S1043: Locally store the multiple security fragment videos.
[0111] Step S1044: Monitor the local storage space, and when the preset storage occupancy ratio is reached, perform pre-release of local storage.
[0112] Furthermore, the high-definition video optimized acquisition method for the security camera further includes the following steps:
[0113] Step S105: Compare and analyze the representative frames of the multiple security fragment videos, and select multiple representative frame images for acquisition and upload.
[0114] In an embodiment of the present invention, during the local cyclic storage of multiple security segment videos, according to a preset comparison frame requirement, image selection processing of comparison frames is performed on the multiple security segment videos. Multiple comparison frame images are selected from the multiple security segment videos. By performing grayscale processing on the multiple comparison frame images, and then performing comparison calculations on the adjacent approximation degrees of the multiple comparison frame images, multiple approximation degree comparison values are obtained. From the multiple approximation degree comparison values, the largest approximation degree comparison value is selected. Furthermore, one representative frame image can be randomly selected from the two comparison frame images corresponding to the largest approximation degree comparison value, and then the representative frame images corresponding to the multiple security segment videos are collected and uploaded. Specifically, the calculation formula for the approximation degree comparison value is:
[0115]
[0116] Where C j is the j-th approximation degree comparison value, is the grayscale average value of the j-th comparison frame image, is the grayscale average value of the (j - 1)-th comparison frame image, and M is a preset comparison coefficient.
[0117] Specifically, Figure 6 shows the flowchart of collecting and uploading representative frame images in the method provided by the embodiment of the present invention.
[0118] Among them, in the preferred embodiment provided by the present invention, the comparison and analysis of representative frames for the multiple security segment videos, and the selection of multiple representative frame images for collection and upload specifically include the following steps:
[0119] Step S1051: Select multiple comparison frame images from the multiple security segment videos.
[0120] Step S1052: Perform comparison calculations on the adjacent approximation degrees of the multiple comparison frame images to obtain multiple approximation degree comparison values.
[0121] Step S1053: Select representative frame images according to the multiple approximation degree comparison values.
[0122] Step S1054: Collect and upload the representative frame images corresponding to the multiple security segment videos.
[0123] It should be understood that although the steps in the flowcharts of the embodiments of the present invention are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0124] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0125] The above embodiments only represent several implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be subject to the appended claims.
Claims
1. A security camera high-definition video optimization acquisition method, characterized in that: The method specifically comprises the following steps: Perform security shooting control on the target camera to obtain the security shooting video, and perform periodic gradient background processing on the security shooting video to obtain the current monitoring background; Obtain security monitoring requirements, determine security line segment boundaries, and perform security disturbance detection on security shooting videos based on the current monitoring background to determine whether there is monitoring security disturbance; When there is a security disturbance being monitored, determining the security disturbance time, and selecting the disturbance period video from the security shooting video for collection and uploading; When there is no monitoring security disturbance, the security video is processed into segments to obtain multiple security segment videos, and the videos are stored locally in a loop; Comparative analysis is performed on representative frames of the plurality of security clip videos, and a plurality of representative frame images are selected for collection and uploading.
2. The security camera high-definition video optimization acquisition method according to claim 1 is characterized in that: The security shooting control of the target camera, obtaining the security shooting video, and periodically performing gradual background processing on the security shooting video to obtain the current monitoring background specifically includes the following steps: Receive security shooting requirements and determine multiple security shooting parameters; According to the plurality of security shooting parameters, security shooting control is performed on the target camera to obtain security shooting video; Get the previous monitoring background; According to a preset gradual processing cycle, periodically selecting a gradual processing image and an adjacent processing image from the security shooting video; Based on the previous monitoring background, background update calculation is performed on the gradient processed image and the adjacent processed image to generate a current monitoring background.
3. The security camera high-definition video optimization acquisition method according to claim 2 is characterized in that: The calculation formula for performing background update calculation on the gradient processed image and the adjacent processed image based on the previous monitored background to generate the current monitored background is: Among them, (x, y) is the pixel coordinate, B q (x, y) is the gray value of the current monitoring background at (x, y), X is the length of the image x-axis, Y is the length of the image y-axis, G q (x, y) is the gray value of the gradient processed image at (x, y), G q-1 (x, y) is the gray value of the adjacent processed image at (x, y), p is the preset weight coefficient, B q-1 (x, y) is the gray value of the previous monitoring background at (x, y), V a is the preset comparison threshold.
4. The security camera high-definition video optimization acquisition method according to claim 1 is characterized in that: The obtaining of security monitoring requirements, determining the security line segment boundary, performing security disturbance detection on the security shooting video based on the current monitoring background, and judging whether there is a monitoring security disturbance specifically include the following steps: Obtain security monitoring requirements; Analyze the security monitoring requirements and determine the security line segment boundaries; According to a preset disturbance detection period, frame rate processing is performed on the security shooting video, and disturbance detection frames and corresponding detection frame images are periodically selected; Based on the current monitoring background, calculating a disturbance detection value of the security line segment boundary in the detection frame image; The disturbance detection value is compared with a preset standard disturbance value to determine whether there is a monitoring security disturbance.
5. The security camera high-definition video optimization acquisition method according to claim 4 is characterized in that: The calculation formula for calculating the disturbance detection value of the security line segment boundary in the detection frame image based on the current monitoring background is: Where f represents the disturbance detection frame, D f is the disturbance detection value, k is the preset detection coefficient, (x,y d ) represents the pixel coordinates of the security line segment boundary, (i,y d ) represents the pixel starting point coordinates of the security line segment boundary, G f (x,y d ) is the detection frame image at (x,y d ) gray value, B q (x,y d ) is the current monitoring background at (x,y d ) grayscale value, V b is the preset detection threshold, and N is the total number of pixels on the security line segment boundary.
6. The security camera high-definition video optimization acquisition method according to claim 1 is characterized in that: When there is a security disturbance being monitored, determining the security disturbance time, and selecting the disturbance period video from the security shooting video for collection and uploading specifically comprises the following steps: Determine the security disturbance time when there is monitoring security disturbance; According to the security disturbance time, selecting a disturbance period video from the security shot videos; Perform resource monitoring on the target camera to obtain network resource data; Analyze the network resource data to determine whether there is wireless network congestion; When there is no wireless network congestion, continuously collecting and uploading the video during the disturbance period through the target camera; When the wireless network is congested, an auxiliary security device that is in a transmission idle state is selected, and the auxiliary security device is used to assist in collecting and uploading the video during the disturbance period.
7. The security camera high-definition video optimization acquisition method according to claim 1 is characterized in that: When there is no monitoring security disturbance, the security video is processed into segments to obtain multiple security segment videos, and the local loop storage specifically includes the following steps: Obtaining fragmented time periods when there is no monitoring security disturbance; According to the fragmentation period, the security video is fragmented to obtain a plurality of security fragment videos; Locally storing a plurality of the security video clips; Monitor local storage space and release local storage in advance when the preset storage occupancy ratio is reached.
8. The security camera high-definition video optimization acquisition method according to claim 1 is characterized in that: The comparative analysis of the representative frames of the plurality of security video clips and the selection of a plurality of representative frame images for collection and uploading specifically include the following steps: Selecting a plurality of comparison frame images from the plurality of security video clips; Comparing and calculating adjacent similarities of the plurality of comparison frame images to obtain a plurality of similarity comparison values; Selecting a representative frame image according to a plurality of the similarity comparison values; The representative frame images corresponding to the plurality of security clip videos are collected and uploaded.
9. The security camera high-definition video optimization acquisition method according to claim 8 is characterized in that: The calculation formula for performing adjacent similarity comparison calculation on the plurality of comparison frame images to obtain a plurality of similarity comparison values is: Among them, C j is the jth similarity comparison value, is the grayscale mean of the j-th comparison frame image, is the grayscale mean of the j-1th comparison frame image, and M is the preset comparison coefficient.