A video transmission method for security monitoring system combined with weak current network optimization
Through differential and optimized video signal processing technology, combined with Huffman coding, it solves the problem of difficulty in balancing video accuracy and transmission effect with traditional video compression methods in security monitoring systems, and achieves efficient video transmission.
Patent Information
- Application Number
- CN202411140528.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-08-20
AI Technical Summary
Traditional video compression methods are difficult to guarantee the transmission effect without reducing video accuracy. Especially in security monitoring systems, it may cause the loss of key information in video frame images and affect the monitoring effect.
By acquiring each frame of the surveillance video, an image group is formed based on the corner point difference characteristics of the two connected images. The grayscale feature difference is performed to obtain the correlation range and importance of the differential pixels. The difference is analyzed based on the preset normal distribution curve. Loss the maximum range value, adjust the differential value to optimize the model, iterate the differential optimization model, and finally use Huffman coding for compression.
The compression quality is improved to ensure that the accuracy of the decoded video is not reduced, the transmission effect is improved, the number of iterations is reduced, and the compressed data capacity is smaller.
Smart Images

Figure CN118660163B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video signal compression, and in particular to a video transmission method for a security monitoring system combined with weak current network optimization. Background Art
[0002] With the development of information technology, security monitoring systems have become an indispensable part of society; they play a vital role in ensuring public safety and maintaining social stability. However, due to the large amount of video data in the security monitoring system, the transmission network has high requirements; in order to reduce the transmission requirements, the video data can be compressed, and the occupancy of the weak current transmission network can be optimized to achieve better transmission effects.
[0003] In the process of compressing video signals, if lossless compression is used, the compression effect will be poor due to the large amount of data, making it difficult to optimize the transmission network occupancy and improving the transmission effect; if lossy compression is used, key information in the video frame image may be lost, the accuracy will decrease, and the monitoring effect will be affected. Therefore, it is difficult for traditional video compression methods to ensure the transmission effect without reducing the video accuracy. Summary of the invention
[0004] In order to solve the technical problem that the above-mentioned traditional video compression method is difficult to ensure the transmission effect without reducing the video accuracy, the purpose of the present invention is to provide a security monitoring system video transmission method combined with weak current network optimization, and the technical solution adopted is as follows:
[0005] Obtain a surveillance image of each frame in the surveillance video; obtain different image groups according to the difference characteristics of the corner points in the surveillance images of two consecutive frames; perform differential analysis according to the grayscale characteristics of the surveillance images in the image groups to obtain differential values and differential images;
[0006] Obtaining the correlation range and the difference distribution curve of the difference pixel points according to the distribution characteristics of the difference values in the difference image; obtaining the importance of the difference pixel points according to the discrete characteristics of the difference values within the correlation range of the difference pixel points and the distribution characteristics of the difference values in the difference image; obtaining the maximum range value of the difference loss according to the difference characteristics between the difference distribution curve and the preset normal distribution curve and the distribution characteristics of the difference values in the difference image;
[0007] The final loss value is obtained according to the maximum range value of the differential loss and the importance of the differential pixel point; the lossable pixel point and the loss range are obtained according to the maximum range value of the differential loss and the final loss value of the differential pixel point in the differential image, and the differential value of the lossable pixel point is adjusted according to the loss range to obtain a differential optimization model and a long-tail distribution model; the differential optimization model is iterated according to the difference characteristics of the differential optimization model and the long-tail distribution model until the optimized differential value of the lossable pixel point is obtained;
[0008] The differential image is compressed according to the optimized differential values of the lossable pixels and the differential values of the non-lossable pixels of the differential image to obtain compressed data; and the monitoring video is transmitted according to the compressed data of all the differential images.
[0009] Furthermore, the step of obtaining different image groups according to the difference features of corner points in two consecutive surveillance images includes:
[0010] The corner points and corresponding feature vectors in the surveillance image are obtained through the SIFT algorithm, and the corner points with the same feature vectors in the surveillance images of two consecutive frames are used as matching corner points; the average number of corner points in the surveillance images of two consecutive frames is calculated to obtain the average number of corner points; the ratio of the number of matching corner points to the average number of corner points is calculated to obtain the matching degree of the surveillance images of two consecutive frames; the surveillance images of consecutive frames with a matching degree greater than a preset matching threshold are taken as an image group; the surveillance images of consecutive frames with a matching degree not greater than the preset matching threshold are taken as an image group.
[0011] Furthermore, the step of performing differentiation according to the grayscale features of the monitoring images in the image group to obtain differential values and differential images includes:
[0012] The grayscale value difference between the monitoring pixel points at the same position in the first monitoring image frame and other monitoring image frames in the image group is calculated to obtain the differential value, and the differential image of the other monitoring image frames is constructed according to the differential value at each monitoring pixel position.
[0013] Furthermore, the step of obtaining the correlation range of the differential pixel points and the differential distribution curve according to the distribution characteristics of the differential values in the differential image includes:
[0014] Constructing a two-dimensional rectangular coordinate system about the differential values in the differential image, where the horizontal axis is the differential values of different types, and the vertical axis is the number of differential pixel points corresponding to the differential values of different types, and smoothly connecting the obtained coordinate points to obtain the differential distribution curve;
[0015] Calculate the extreme value difference of the difference value in the difference image to obtain the difference interval value; calculate the difference between the preset maximum correlation value and the preset minimum correlation value to obtain the first difference value; calculate the sum of the first difference value and the constant 1 to obtain the number of correlation intervals; calculate the ratio of the difference interval value to the number of correlation intervals to obtain the unit value of the correlation interval;
[0016] Calculate the minimum value of the differential value in the differential image and the sum of the associated interval unit value to obtain an interval maximum value; calculate the sum of the interval maximum value and the associated interval unit value to obtain a second interval maximum value, and repeat the interval maximum value acquisition step until the number of associated interval values is obtained. If the differential value of any differential pixel point in the differential image is within the range of the minimum value of the differential value and the maximum value of the first interval, the associated boundary of the arbitrary differential pixel point is the preset minimum associated value; if the differential value of any differential pixel point is within the range of the maximum value of the first interval and the maximum value of the second interval, the associated boundary of the arbitrary differential pixel point is the sum of the preset minimum associated value and a constant 1; in the differential image, take the arbitrary differential pixel point as the window center and construct an associated range with a side length of the associated boundary.
[0017] Furthermore, the step of obtaining the importance of the differential pixel points according to the discrete characteristics of the differential values within the differential pixel point association range and the distribution characteristics of the differential values in the differential image includes:
[0018] The product of the variance of the corresponding differential value within the associated range of the differential pixel point and a preset first value is calculated and normalized to obtain a discrete eigenvalue; the absolute value of the ratio of the differential value of the differential pixel point to the maximum differential value in the differential image is calculated to obtain a weight coefficient, and the product of the weight coefficient and the discrete eigenvalue is calculated to obtain the importance of the differential pixel point.
[0019] Furthermore, the step of obtaining the maximum range value of the differential loss according to the difference characteristics of the differential distribution curve and the preset normal distribution curve and the distribution characteristics of the differential values in the differential image includes:
[0020] Calculate the dynamic time-warped distance between the difference distribution curve and the preset normal distribution curve and normalize them by negative correlation to obtain the distribution similarity; calculate the sum of the distribution similarity and the constant 1 to obtain the similarity characterization value; calculate the product of the similarity characterization value and the preset minimum differential loss value to obtain the maximum range value of the differential loss.
[0021] Furthermore, the step of obtaining the final loss value according to the maximum range value of the differential loss and the importance of the differential pixel point includes:
[0022] Calculate the difference between the constant 1 and the importance level to obtain the loss coefficient of the differential pixel; calculate the product of the loss coefficient and the maximum range value of the differential loss to obtain the initial loss value of the differential pixel; take the differential pixel in the differential image whose importance exceeds a preset importance threshold as the important pixel; sort the important pixel in ascending order of importance to obtain a pixel sequence; starting from the first pixel in the pixel sequence, overwrite the initial loss values of other differential pixels in a preset neighborhood with the initial loss value of the first pixel, and continue with the covering step of the next pixel after the covering is completed. When the differential pixel is covered multiple times, the final covered initial loss value is used as the final covering result; after the covering step is completed, the current initial loss value of each differential pixel in the differential image is used as the final loss value.
[0023] Furthermore, the steps of obtaining the loseable pixel points and the loss range according to the maximum range value of the differential loss and the final loss value of the differential pixel points in the differential image, and adjusting the differential value of the loseable pixel points according to the loss range to obtain the differential optimization model and the long-tail distribution model include:
[0024] Calculate the product of the preset first coefficient and the maximum range value of the differential loss to obtain a loss threshold, and use the differential pixel point whose final loss value is greater than the loss threshold as the lossable pixel point; calculate the difference between the differential value of the lossable pixel point and the corresponding final loss value to obtain a loss lower limit; calculate the sum of the differential value of the lossable pixel point and the corresponding final loss value to obtain a loss upper limit; use the range formed by the loss lower limit and the loss upper limit as the loss range of the lossable pixel point;
[0025] A numerical value is arbitrarily selected in the loss range as the updated differential value of the lossable pixel point; a differential data set is constructed according to the updated differential value of the lossable pixel point and the differential value of the non-lossable pixel point in the differential image; a differential optimization model is constructed according to the differential data set, the horizontal axis of the differential optimization model is the differential data points of different types in the differential data set, the number of differential data points of each type in the horizontal axis decreases from left to right, and the vertical axis is the number corresponding to different types of data, the obtained coordinates are smoothly connected to obtain the differential optimization model; a long-tail distribution model is constructed according to the horizontal axis interval corresponding to the differential optimization model, and the model parameters of the long-tail model are obtained by maximum likelihood estimation.
[0026] Furthermore, the step of iterating the differential optimization model according to the difference characteristics between the differential optimization model and the long-tail distribution model until the optimized differential value of the lost pixel point is obtained comprises:
[0027] The dynamic time warping distance between the differential optimization model and the long-tail distribution model is calculated and negatively correlated to obtain the degree of optimization; when the degree of optimization does not exceed the preset optimization threshold, the updated differential value of the lost pixel point is reselected and the corresponding differential optimization model is obtained until the degree of optimization exceeds the preset optimization threshold, and the updated differential value of the lost pixel point finally obtained is used as the optimized differential value.
[0028] Furthermore, the step of compressing the differential image according to the optimized differential values of the lossable pixels and the differential values of the non-lossable pixels of the differential image to obtain compressed data comprises:
[0029] The optimized differential values of the lossable pixels and the differential values of the non-lossable pixels in the differential image are compressed by Huffman coding to obtain compressed data.
[0030] The present invention has the following beneficial effects:
[0031] In the present invention, obtaining different image groups can make the differential value obtained after performing differentiation within the image group smaller, which is beneficial to improving the compression quality. Obtaining the correlation range of differential pixels can make the importance of differential pixels be combined with the differential value characteristics within the correlation range, and the calculation of importance is more accurate; obtaining the differential distribution curve can analyze the proportion of different areas in the differential image, so that the subsequent adjustment of differential pixels is more accurate. Obtaining the importance can determine the loss range of differential pixels, so that the video accuracy can be guaranteed during the compression process; obtaining the maximum range value of differential loss can determine the initial adjustment interval of the differential value. Obtaining the final loss value can determine the range size of the differential pixel that can be adjusted, ensuring that the video accuracy after transmission decoding does not affect normal viewing. Obtaining the lossable pixels and the loss range can determine the differential pixels that are more suitable for iteration and reduce the number of iterations; obtaining the differential optimization model and the long-tail distribution model can determine whether the distribution of the number of differential pixels of different types of differential values in the differential image after the adjustment of the lossable pixels is close to the power law distribution. Obtaining the optimized differential value of the lossy pixel point can make the differential pixel point data of different types of differential values close to the power law distribution after adjustment, improve the compression effect of Huffman coding, and make the compressed data capacity smaller after compression; ultimately, during transmission, the transmission effect can be improved without reducing the video accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 A flow chart of a video transmission method for a security monitoring system combined with weak current network optimization provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a video transmission method of a security monitoring system combined with weak current network optimization proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0035] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0036] The following is a detailed description of a specific solution of a video transmission method for a security monitoring system combined with weak current network optimization provided by the present invention in conjunction with the accompanying drawings.
[0037] See also Figure 1 , which shows a flow chart of a video transmission method of a security monitoring system combined with weak current network optimization provided by an embodiment of the present invention, the method comprising the following steps:
[0038] Step S1, obtaining a surveillance image of each frame in the surveillance video; obtaining different image groups according to the difference features of the corner points in the surveillance images of two consecutive frames; performing differential analysis according to the grayscale features of the surveillance images in the image groups to obtain differential values and differential images.
[0039] In an embodiment of the present invention, the implementation scenario is to compress and transmit the surveillance video to improve the transmission effect without reducing the video accuracy. First, the surveillance image of each frame in the surveillance video is obtained. Since most areas in the surveillance video are static, most areas in the surveillance images of adjacent frames are similar. In order to reduce the amount of data in the compression process, the surveillance image can be differentiated, and the original grayscale value is replaced by the value obtained according to the differential result, thereby reducing the data size in the compression process, reducing the transmission network requirements, and improving the transmission effect. Therefore, it is necessary to group the surveillance images in the surveillance video, divide similar surveillance images into the same group, and perform differentiation within the same group to further reduce the size of the differential result; therefore, different image groups are obtained according to the difference characteristics of the corner points in the surveillance images of two consecutive frames.
[0040] Preferably, in an embodiment of the present invention, the step of obtaining different image groups includes: obtaining corner points and corresponding feature vectors in the surveillance image by using the SIFT algorithm. It should be noted that the SIFT scale-invariant feature conversion algorithm belongs to the prior art and can obtain corner points and corresponding feature vectors in the image. The specific steps are not repeated. Corner points with the same feature vector in the surveillance images of two consecutive frames are used as matching corner points. Corner points can represent key information in the surveillance images. If the number of matching corner points in the surveillance images of two consecutive frames is larger, it means that the two surveillance images are more similar. The average value of the number of corner points in the surveillance images of two consecutive frames is calculated to obtain the average number of corner points; the ratio of the number of matching corner points to the average number of corner points is calculated to obtain the matching degree of the surveillance images of the two consecutive frames; when the proportion of the number of matching angles is larger, the matching degree is larger, and the surveillance images of the two consecutive frames are more similar. The surveillance images of consecutive frames with a matching degree greater than a preset matching threshold are taken as an image group, and the surveillance images of consecutive frames with a matching degree not greater than the preset matching threshold are taken as an image group. In the embodiment of the present invention, the preset matching threshold is 0.7, which can be determined by the implementer according to the implementation scenario; for example, if the matching degree corresponding to each two consecutive frames of monitoring images in 5 consecutive frames of monitoring images is greater than 0.7, it means that the monitoring images of the 5 frames are similar and can be analyzed in one image group, thereby reducing the size of the difference value. If the matching degree corresponding to each two consecutive frames of monitoring images in 5 consecutive frames of monitoring images is not greater than 0.7, it means that the images in the 5 frames of monitoring images are less similar, but the amount of data will not increase after the difference, so for the convenience of analysis, the 5 frames of monitoring images are also placed in one image group; then the monitoring images of all frames in the monitoring video are grouped, and different image groups are obtained according to the matching degree.
[0041] Furthermore, the monitoring images in the image group can be differentiated to reduce the size of the data during the compression process, so that the compression transmission effect is better. Therefore, the grayscale features of the monitoring images in the image group are differentiated to obtain differential values and differential images. Preferably, in an embodiment of the present invention, the step of obtaining differential values and differential images includes: calculating the grayscale value difference between the monitoring pixels at the same position in the first frame monitoring image and other frame monitoring images in the image group to obtain differential values, and constructing differential images of the other frame monitoring images according to the differential values at the position of each monitoring pixel. The grayscale value of each differential pixel in the differential image is a differential value, which is smaller than the grayscale value of the pixel in the original monitoring image, and can greatly improve the compression quality and transmission effect.
[0042] Step S2, obtaining the association range and difference distribution curve of the differential pixel points according to the distribution characteristics of the differential values in the differential image; obtaining the importance of the differential pixel points according to the discrete characteristics of the differential values within the association range of the differential pixel points and the distribution characteristics of the differential values in the differential image; obtaining the maximum range value of the differential loss according to the difference characteristics between the difference distribution curve and the preset normal distribution curve and the distribution characteristics of the differential values in the differential image.
[0043] In the process of viewing surveillance videos, the scenes in non-moving areas are fixed, so the importance of non-moving areas is low, and the main purpose is to monitor the moving areas. Therefore, in order to further improve the compression quality and transmission effect, the accuracy of non-moving areas can be reduced, and the accuracy of pixels in the moving areas can be mainly retained. First, the non-moving areas and moving areas in the image group are determined. In the surveillance images of consecutive frames, the grayscale values of the pixels in the non-moving areas are similar, so the differential values of the corresponding areas in the obtained differential images tend to 0, while the absolute value of the differential values in the moving areas is larger; however, noise may appear in a certain frame of the surveillance image, resulting in a large differential value corresponding to the noise, which affects the accuracy of the moving area selection. Noise often appears independently, while the moving area is a range. Due to movement, the differential values of adjacent differential pixels in some areas of the differential image are not similar; however, the differential values of differential pixels in the non-moving areas tend to 0, so the differential pixel can be determined to belong to the moving area or the non-moving area in combination with the associated range of the differential pixel to avoid analysis errors caused by noise. When the absolute value of the differential value is larger, it is more necessary to consider the differential values of other differential pixels in the neighborhood of the differential pixel point. Therefore, the correlation range of the differential pixel point and the differential distribution curve are obtained according to the distribution characteristics of the differential values in the differential image.
[0044] Preferably, in an embodiment of the present invention, the step of obtaining the associated range and the difference distribution curve includes: constructing a two-dimensional plane rectangular coordinate system about the differential value in the differential image, the horizontal axis is the different types of differential values, and the vertical axis is the number of differential pixel points corresponding to the different types of differential values, and the obtained coordinate points are smoothly connected to obtain the difference distribution curve; the difference distribution curve is used in subsequent steps to analyze the size of the moving area and the non-moving area in the differential image.
[0045] Further, the extreme value difference of the differential value in the differential image is calculated to obtain the differential interval value; the differential interval value can reflect the distribution size of the differential value. The difference between the preset maximum associated value and the preset minimum associated value is calculated to obtain the first difference value; the sum of the first difference value and the constant 1 is calculated to obtain the number of associated intervals; the number of associated intervals represents the number of intervals that the differential value needs to be divided. The ratio of the differential interval value to the number of associated intervals is calculated to obtain the associated interval unit value; the associated interval unit value is the size of each differential value interval. In the embodiment of the present invention, the preset maximum associated value is 15, and the preset minimum associated value is 3, which can be determined by the implementer according to the implementation scenario. The minimum value of the differential value in the differential image is calculated and the sum of the associated interval unit value is obtained to obtain an interval maximum value; the sum of the maximum value of an interval and the associated interval unit value is calculated to obtain a second interval maximum value, and the steps of obtaining the interval maximum value are repeated until the maximum value of the number of associated interval values is obtained; for example, in the implementation of the present invention, the number of associated intervals is 13, then a total of 13 associated intervals are obtained, and the maximum value of the thirteenth interval is obtained, and the maximum value of the thirteenth interval is equal to the maximum value of the differential value in the differential image. If the differential value of any differential pixel in the differential image is within the range of the minimum differential value and the maximum value of an interval, the association boundary of the arbitrary differential pixel is the preset minimum association value; if the differential value of the arbitrary differential pixel is within the range of the maximum value of an interval and the maximum value of two intervals, the association boundary of the arbitrary differential pixel is the sum of the preset minimum association value and the constant 1; that is, each interval range corresponds to an association boundary, and in the embodiment of the present invention, there are 13 association boundaries. The larger the interval range, the larger the association boundary. In the differential image, with the arbitrary differential pixel as the window center, an association range with a side length of the association boundary is constructed; for example, if the association boundary of the arbitrary differential pixel is 3, then in the differential image, with the arbitrary differential pixel as the center, a 3*3 window range is constructed as the association range; the larger the differential value of the differential pixel, the larger the area of the association range.
[0046] After determining the correlation range of the differential pixel in the differential image, when the differential values of other differential pixels within the correlation range of the differential pixel are greatly different, and the absolute value of the differential value of the differential pixel is larger, it means that the differential pixel is more likely to be in the motion area, and the accuracy of the differential pixel needs to be retained more during the compression process. Therefore, the importance of the differential pixel is obtained based on the discrete characteristics of the differential value within the correlation range of the differential pixel and the distribution characteristics of the differential value in the differential image.
[0047] Preferably, in an embodiment of the present invention, the step of obtaining the importance includes: calculating the product of the variance of the differential value corresponding to the associated range of the differential pixel point and a preset first value and normalizing it to obtain a discrete characteristic value; the larger the variance, the less similar the differential values within the associated range, and the more likely the differential pixel point is to be in a motion area; in an embodiment of the present invention, the preset first value is 0.01 to avoid the situation where the minimum value of the importance is larger when the minimum value of the variance is larger, which affects the accuracy of subsequent analysis. Calculate the absolute value of the ratio of the differential value of the differential pixel point to the maximum value of the differential value in the differential image to obtain a weight coefficient. When the absolute value of the differential value of the differential pixel point is larger, it means that the differential pixel point is more likely to be in a motion area, and the weight coefficient is larger. Calculate the product of the weight coefficient and the discrete eigenvalue to obtain the importance of the differential pixel. The greater the importance, the more likely the differential pixel is to be in the motion area. During the compression process, try to retain the accuracy of the differential pixel to ensure the quality of video surveillance after transmission. For differential pixels with lower importance, it means that they are more likely to be in the non-motion area. During the compression process, in order to improve the compression quality and transmission effect, the differential value of this type of differential pixel can be adjusted to reduce the accuracy.
[0048] Furthermore, if the number of differential pixels in the non-motion area of the differential image is greater, the accuracy of the differential pixels can be lost more during the compression process, and the corresponding loss range of the differential value can be larger; if the number of differential pixels in the motion area of the differential image is greater, the number of differential pixels that can lose accuracy during the compression process is smaller, and the corresponding loss range of the differential value needs to be smaller. Therefore, it is necessary to analyze the size relationship between the non-motion area and the motion area in the differential image, so the maximum range of differential loss is obtained according to the difference characteristics of the difference distribution curve and the preset normal distribution curve, and the distribution characteristics of the differential value in the differential image.
[0049] Preferably, in an embodiment of the present invention, the step of obtaining the maximum range value of the differential loss includes: calculating the dynamic time-warped distance between the difference distribution curve and the preset normal distribution curve and normalizing the negative correlation to obtain the distribution similarity; when the difference distribution curve conforms to the normal distribution characteristics, the more differential pixels correspond to the mean of the differential value, and the number of differential pixels corresponding to the difference distribution curve from the mean of the differential value to the two ends of the horizontal axis is getting smaller and smaller, which means that the proportion of non-moving areas in the differential image is greater; because the proportion of differential pixels corresponding to the mean of the differential value in the differential image is larger, it means that most of the differential values in the differential image are relatively similar and tend to 0, and most areas in the monitoring images of continuous frames are static; therefore, when the difference distribution curve is closer to the preset normal distribution curve, the distribution similarity is greater, and the proportion of non-moving areas in the differential image is greater. In an embodiment of the present invention, the preset normal distribution curve is a normal distribution curve constructed at the mean position of the differential value of the differential image in the same coordinate system as the difference distribution curve; the dynamic time warping distance is obtained by the DTW dynamic time warping algorithm, which belongs to the prior art, and the specific steps are not repeated. When the dynamic time warping distance is smaller, it means that the change characteristics of the two curves are more similar. When the distribution similarity is smaller, it means that the difference distribution curve is less in line with the normal distribution characteristics, and the proportion of motion areas in the differential image is larger. Calculate the sum of the distribution similarity and the constant 1 to obtain a similarity representation value with a range of 1 to 2, calculate the product of the similarity representation value and the preset minimum differential loss value, and obtain the maximum range value of the differential loss; when the similarity representation value is larger, it means that the proportion of non-motion areas in the differential image is larger, and more differential pixel accuracy can be lost during the compression process, and the corresponding differential value loss range can be larger. In the embodiment of the present invention, the preset minimum differential loss value is the sum of the mean of the differential values in the differential distribution curve and a corresponding standard deviation, and the maximum value of the maximum range of differential loss in the embodiment of the present invention is the sum of the mean of the differential values and two corresponding standard deviations; the implementer can determine the preset minimum differential loss value according to the implementation scenario.
[0050] Step S3, obtaining the final loss value according to the maximum range value of the differential loss and the importance of the differential pixels; obtaining the loseable pixels and the loss range according to the maximum range value of the differential loss and the final loss value of the differential pixels in the differential image, adjusting the differential values of the loseable pixels according to the loss range to obtain the differential optimization model and the long-tail distribution model; iterating the differential optimization model according to the difference characteristics of the differential optimization model and the long-tail distribution model until the optimized differential value of the loseable pixels is obtained.
[0051] The smaller the importance of the differential pixel, the greater the precision that can be lost, so the final loss value is obtained according to the maximum range of the differential loss and the importance of the differential pixel; preferably, in an embodiment of the present invention, the step of obtaining the final loss value includes: calculating the difference between the constant 1 and the importance, and obtaining the loss coefficient of the differential pixel; when the importance is smaller, the greater the precision that can be lost, the greater the loss coefficient. Calculate the product of the loss coefficient and the maximum range of the differential loss to obtain the initial loss value of the differential pixel; the larger the initial loss value, the larger the differential value range that can be adjusted for the differential pixel. The formula for obtaining the initial loss value includes:
[0052]
[0053] In the formula, R represents the initial loss value of the differential pixel, E represents the importance of the differential pixel, S represents the similarity representation value, and F represents the preset minimum differential loss value. represents the loss coefficient, Indicates the maximum range of differential loss.
[0054] Furthermore, since the monitoring image is a two-dimensional matrix with spatial information, if only the loss of the differential pixel itself is considered in the differential image, it may cause excessive distortion after transmission decoding, so it is necessary to consider the neighborhood relationship to ensure the degree of detail retention. Therefore, the differential pixel points whose importance in the differential image exceeds the preset importance threshold are regarded as important pixels. Important pixels mean the positions where obvious changes occur in the monitoring image. It is necessary to first ensure that the details of such positions are not lost; the important pixels are sorted from small to large according to the importance to obtain a pixel sequence; starting from the first pixel in the pixel sequence, the initial loss value of the first pixel is overwritten with the initial loss values of other differential pixels in the preset neighborhood. In the embodiment of the present invention, the preset neighborhood is the eight neighborhoods of the first pixel, which can be determined by the implementer according to the implementation scenario; for example, the initial loss value of the first pixel is 5, and the initial loss values of other differential pixels in the preset neighborhood are 3, 4, 8, etc., which are all covered by the value 5, thereby ensuring that the gradient characteristics in the neighborhood of the important pixel remain unchanged, so that the details are not lost as much as possible. After the coverage is completed, continue with the next pixel coverage step. When a differential pixel is covered multiple times, the final coverage initial loss value is used as the final coverage result; for example, if the initial loss value of a differential pixel is covered three times, the initial loss value of the last coverage is used as the final coverage result. Because the later the differential pixel is in the pixel sequence, the greater the importance, it is necessary to give priority to the gradient detail features of the more important differential pixel. After the coverage step is completed, the current initial loss value of each differential pixel in the differential image is used as the final loss value.
[0055] The existing Huffman coding is often used for data compression coding. The Huffman coding has a better compression effect when different types of data present power-law distribution characteristics, and can further reduce the amount of compressed data, thereby improving the transmission effect. For example, the proportion of the number of different types of data corresponding to the compression process is distributed as follows: , it means that the data to be compressed presents a power-law distribution. In this case, Huffman coding is more effective and the capacity after compression is smaller. Huffman coding belongs to the prior art and the specific coding principle will not be described in detail. Therefore, the differential value in the differential image can be adjusted within the range of the final loss value. When the quantity distribution corresponding to the different types of differential values after adjustment is closer to the long-tail distribution, the compression effect can be better because the long-tail distribution is closer to the form of the power-law distribution. Therefore, the lossable pixels and the loss range are obtained according to the maximum range value of the differential loss and the final loss value of the differential pixels in the differential image. The differential optimization model and the long-tail distribution model are obtained by adjusting the differential value of the lossable pixels according to the loss range.
[0056] Preferably, in the embodiment of the present invention, the steps of obtaining the lossable pixel points and the corresponding loss range, the differential optimization model and the long-tail distribution model include: calculating the product of the preset first coefficient and the maximum range value of the differential loss to obtain the loss threshold, and taking the differential pixel points whose final loss value is greater than the loss threshold as the lossable pixel points; in the embodiment of the present invention, the preset first coefficient is 0.2, and the implementer can determine it by himself according to the implementation scenario. The differential pixel points greater than the loss threshold are selected as the lossable pixel points because such differential pixel points can change more values, and it is easier to meet the requirements of the long-tail distribution and reduce iterations as much as possible. Calculate the difference between the differential value of the lossable pixel point and the corresponding final loss value to obtain the loss lower limit; calculate the sum of the differential value of the lossable pixel point and the corresponding final loss value to obtain the loss upper limit; take the range formed by the loss lower limit and the loss upper limit as the loss range of the lossable pixel point; for example, if the differential value of the loss pixel point is 10 and the final loss value is 2, then the loss lower limit is 8 and the loss upper limit is 12.
[0057] Furthermore, a value is arbitrarily selected in the loss range as the updated differential value of the lossable pixel point, for example, 11 can be selected as an updated differential value of the lossable pixel point. A differential data set is constructed according to the updated differential value of the lossable pixel point and the differential value of the non-lossable pixel point in the differential image, and the non-lossable pixel point is a differential pixel point that is restricted from differential value adjustment; the differential data set is a data set composed of all adjusted updated differential values and restricted unadjusted differential values in this round of adjustment. A differential optimization model is constructed according to the differential data set, and the horizontal axis of the differential optimization model is the differential data points of different types in the differential data set. The number of differential data points of each type in the horizontal axis decreases from left to right, that is, the height of the vertical axis data is getting lower and lower from left to right, so as to judge whether it conforms to the long-tail distribution; the vertical axis is the number corresponding to different types of data, and the obtained coordinates are smoothly connected to obtain a differential optimization model, which characterizes the distribution characteristics of the number of differential pixels corresponding to different types of differential values after adjusting some differential pixels. Then, a long-tail distribution model is constructed according to the horizontal axis interval corresponding to the differential optimization model, and the model parameters of the long-tail model are obtained by the maximum likelihood estimation method. It should be noted that the maximum likelihood estimation method belongs to the existing technology and can be used to calculate the model parameters, and the specific steps will not be repeated.
[0058] When the difference optimization model is closer to the corresponding long-tail distribution model, it means that the effect of the updated differential value of the lossable pixel adjustment is better. If it is not close to the long-tail distribution model, it is necessary to continue to iterate the updated differential value to make it as close to the long-tail distribution model as possible. Therefore, according to the difference characteristics of the difference optimization model and the long-tail distribution model, the difference optimization model is iterated until the optimized differential value of the lossable pixel is obtained, which specifically includes: calculating the dynamic time warping distance of the difference optimization model and the long-tail distribution model and negatively mapping them to obtain the optimization degree; the dynamic time warping distance is obtained by the DTW dynamic time warping algorithm, which belongs to the prior art, and the specific steps are not repeated. When the dynamic time warping distance is smaller, it means that the two curve models are more similar; the greater the optimization degree, the closer the difference optimization model and the long-tail distribution model are, and the selection effect of the updated differential value of the lossable pixel is better. When the degree of optimization does not exceed the preset optimization threshold, in the embodiment of the present invention, the preset optimization threshold is 0.8, and the implementer can determine it by himself according to the implementation scenario, re-select the updated differential value of the lossable pixel point and obtain the corresponding differential optimization model until the degree of optimization exceeds the preset optimization threshold, and use the updated differential value of the lossable pixel point finally obtained as the optimized differential value. If the preset optimization threshold is not exceeded after all iterations, all differential pixels are treated as lossable pixels and iterated again.
[0059] Step S4, compressing the differential image according to the optimized differential values of the lossable pixels and the differential values of the non-lossable pixels of the differential image to obtain compressed data; transmitting the monitoring video according to the compressed data of all differential images.
[0060] After obtaining the optimized differential value of the lossable pixel in the differential image, the differential image can be compressed according to the optimized differential value of the lossable pixel and the differential value of the non-lossable pixel in the differential image to obtain compressed data, which specifically includes: compressing the optimized differential value of the lossable pixel and the differential value of the non-lossable pixel in the differential image through Huffman coding to obtain compressed data. It should be noted that Huffman coding belongs to the prior art, and the specific compression coding process will not be repeated. When the differential value in the differential image conforms to the power law distribution, the better the compression effect of using Huffman coding, the smaller the capacity of the compressed data after compression, and the more conducive to improving the transmission effect. Furthermore, the surveillance video is transmitted according to the compressed data of all differential images, which can improve the transmission effect without reducing the video accuracy. After the transmission is completed, the decoding is completed by the reverse operation.
[0061] In summary, the embodiment of the present invention provides a video transmission method for a security monitoring system combined with weak current network optimization; obtain the associated range and the difference distribution curve according to the distribution characteristics of the differential value in the differential image corresponding to the image group; obtain the importance according to the discrete characteristics of the differential value in the associated range of the differential pixel point and the distribution characteristics of the differential value in the differential image; obtain the final loss value according to the difference distribution curve, the distribution characteristics of the differential value, and the importance of the differential pixel point; obtain the differential optimization model and the long-tail distribution model according to the maximum range value of the differential loss and the final loss value of the differential pixel point and perform iterative optimization until the optimized differential value of the lossable pixel point is obtained. The present invention compresses the differential image according to the different differential values after optimization, obtains the compressed data and transmits it, which can improve the transmission effect without reducing the video accuracy.
[0062] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0063] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A video transmission method for a security monitoring system combined with weak current network optimization, characterized in that: The method comprises the following steps: Obtain a surveillance image of each frame in the surveillance video; obtain different image groups according to the difference characteristics of the corner points in the surveillance images of two consecutive frames; perform differential analysis according to the grayscale characteristics of the surveillance images in the image groups to obtain differential values and differential images; Obtaining the correlation range and the difference distribution curve of the difference pixel points according to the distribution characteristics of the difference values in the difference image; obtaining the importance of the difference pixel points according to the discrete characteristics of the difference values within the correlation range of the difference pixel points and the distribution characteristics of the difference values in the difference image; obtaining the maximum range value of the difference loss according to the difference characteristics between the difference distribution curve and the preset normal distribution curve and the distribution characteristics of the difference values in the difference image; The final loss value is obtained according to the maximum range value of the differential loss and the importance of the differential pixel point; the lossable pixel point and the loss range are obtained according to the maximum range value of the differential loss and the final loss value of the differential pixel point in the differential image, and the differential value of the lossable pixel point is adjusted according to the loss range to obtain a differential optimization model and a long-tail distribution model; the differential optimization model is iterated according to the difference characteristics of the differential optimization model and the long-tail distribution model until the optimized differential value of the lossable pixel point is obtained; Compressing the differential image according to the optimized differential value of the lossable pixel points and the differential value of the non-lossable pixel points of the differential image to obtain compressed data; transmitting the monitoring video according to the compressed data of all the differential images; The step of obtaining different image groups according to the difference characteristics of corner points in two consecutive surveillance images comprises: The corner points and corresponding feature vectors in the surveillance image are obtained by SIFT algorithm, and the corner points with the same feature vectors in the surveillance images of two consecutive frames are used as matching corner points; the average number of corner points in the surveillance images of two consecutive frames is calculated to obtain the average number of corner points; the ratio of the number of matching corner points to the average number of corner points is calculated to obtain the matching degree of the surveillance images of two consecutive frames; the surveillance images of consecutive frames with matching degrees greater than a preset matching threshold are taken as an image group; the surveillance images of consecutive frames with matching degrees not greater than the preset matching threshold are taken as an image group; The step of obtaining the correlation range of the differential pixel points and the differential distribution curve according to the distribution characteristics of the differential values in the differential image comprises: Constructing a two-dimensional rectangular coordinate system about the differential values in the differential image, where the horizontal axis is the differential values of different types, and the vertical axis is the number of differential pixel points corresponding to the differential values of different types, and smoothly connecting the obtained coordinate points to obtain the differential distribution curve; Calculate the extreme value difference of the difference value in the difference image to obtain the difference interval value; calculate the difference between the preset maximum correlation value and the preset minimum correlation value to obtain the first difference value; calculate the sum of the first difference value and the constant 1 to obtain the number of correlation intervals; calculate the ratio of the difference interval value to the number of correlation intervals to obtain the unit value of the correlation interval; Calculate the sum of the minimum value of the differential value in the differential image and the unit value of the associated interval to obtain an interval maximum value; calculate the sum of the maximum value of the interval and the unit value of the associated interval to obtain a second interval maximum value, and repeat the steps of obtaining the interval maximum value until the number of interval maximum values of the associated interval values is obtained; if the differential value of any differential pixel point in the differential image is within the range of the minimum value of the differential value and the maximum value of the interval, the associated boundary of the any differential pixel point is the preset minimum associated value; if the differential value of any differential pixel point is within the range of the maximum value of the interval and the maximum value of the second interval, the associated boundary of the any differential pixel point is the sum of the preset minimum associated value and a constant 1; in the differential image, take the arbitrary differential pixel point as the window center and construct an associated range with a side length of the associated boundary; The step of obtaining the importance of the differential pixel points according to the discrete characteristics of the differential values within the differential pixel point association range and the distribution characteristics of the differential values in the differential image comprises: Calculate the product of the variance of the differential value corresponding to the associated range of the differential pixel point and a preset first value and normalize them to obtain a discrete eigenvalue; calculate the absolute value of the ratio of the differential value of the differential pixel point to the maximum differential value in the differential image to obtain a weight coefficient, calculate the product of the weight coefficient and the discrete eigenvalue to obtain the importance of the differential pixel point; The step of obtaining the maximum range value of the differential loss according to the difference characteristics of the differential distribution curve and the preset normal distribution curve and the distribution characteristics of the differential values in the differential image comprises: Calculate the dynamic time warping distance between the difference distribution curve and the preset normal distribution curve and normalize the negative correlation to obtain the distribution similarity; calculate the sum of the distribution similarity and a constant 1 to obtain a similarity characterization value, calculate the product of the similarity characterization value and a preset minimum differential loss value to obtain the maximum range value of the differential loss; The step of obtaining the final loss value according to the maximum range value of the differential loss and the importance of the differential pixel point comprises: Calculate the difference between the constant 1 and the importance level to obtain the loss coefficient of the differential pixel; calculate the product of the loss coefficient and the maximum range value of the differential loss to obtain the initial loss value of the differential pixel; take the differential pixel in the differential image whose importance level exceeds the preset importance threshold as the important pixel; sort the important pixel points in order of importance from small to large to obtain a pixel sequence; starting from the first pixel in the pixel sequence, overwrite the initial loss values of other differential pixel points in a preset neighborhood with the initial loss value of the first pixel, and continue the overwriting step of the next pixel after the overwriting is completed. When the differential pixel is overwritten multiple times, the final overwritten initial loss value is taken as the final overwriting result; after the overwriting step is completed, the current initial loss value of each differential pixel in the differential image is taken as the final loss value; The steps of obtaining the lossable pixel points and the loss range according to the maximum range value of the differential loss and the final loss value of the differential pixel points in the differential image, and adjusting the difference value of the lossable pixel points according to the loss range to obtain the difference optimization model and the long-tail distribution model include: Calculate the product of the preset first coefficient and the maximum range value of the differential loss to obtain a loss threshold, and use the differential pixel point whose final loss value is greater than the loss threshold as the lossable pixel point; calculate the difference between the differential value of the lossable pixel point and the corresponding final loss value to obtain a loss lower limit; calculate the sum of the differential value of the lossable pixel point and the corresponding final loss value to obtain a loss upper limit; use the range formed by the loss lower limit and the loss upper limit as the loss range of the lossable pixel point; Randomly select a value in the loss range as the updated differential value of the lossable pixel point; construct a differential data set according to the updated differential value of the lossable pixel point and the differential value of the non-lossable pixel point in the differential image; construct a differential optimization model according to the differential data set, the horizontal axis of the differential optimization model is the differential data points of different types in the differential data set, the number of differential data points of each type in the horizontal axis decreases from left to right, and the vertical axis is the number corresponding to different types of data, the obtained coordinates are smoothly connected to obtain the differential optimization model; construct a long-tail distribution model according to the horizontal axis interval corresponding to the differential optimization model, and obtain the model parameters of the long-tail model by maximum likelihood estimation method; The step of iterating the differential optimization model according to the difference characteristics between the differential optimization model and the long-tail distribution model until the optimized differential value of the lossable pixel point is obtained comprises: The dynamic time warping distance between the differential optimization model and the long-tail distribution model is calculated and negatively correlated to obtain the degree of optimization; when the degree of optimization does not exceed the preset optimization threshold, the updated differential value of the lost pixel point is reselected and the corresponding differential optimization model is obtained until the degree of optimization exceeds the preset optimization threshold, and the updated differential value of the lost pixel point finally obtained is used as the optimized differential value.
2. According to claim 1, a video transmission method for a security monitoring system combined with weak current network optimization is characterized in that: The step of performing differentiation according to the grayscale features of the monitoring images in the image group to obtain differential values and differential images comprises: The grayscale value difference between the monitoring pixel points at the same position in the first monitoring image frame and other monitoring image frames in the image group is calculated to obtain the differential value, and the differential image of the other monitoring image frames is constructed according to the differential value at each monitoring pixel position.
3. The video transmission method of a security monitoring system combined with weak current network optimization according to claim 1 is characterized in that: The step of compressing the differential image according to the optimized differential value of the lossable pixel points and the differential value of the non-lossable pixel points of the differential image to obtain compressed data comprises: The optimized differential values of the lossable pixels and the differential values of the non-lossable pixels in the differential image are compressed by Huffman coding to obtain compressed data.
Citation Information
Patent Citations
High-efficiency monitoring video storage method
CN115297289A
Road performance live broadcast and data transmission platform based on Internet of Things technology
CN118283348A
Improved Video Compression using Perceptual Modeling
US20150334422A1
Generating depth images for image data
US20230281843A1
Training method for image detection model, related apparatus, device, and storage medium
WO2022088581A1
