CN-121985127-A - High-definition monitoring video storage method and system based on RGB color pixel point coding
Abstract
The application relates to the technical field of security monitoring video storage, in particular to a high-definition monitoring video storage method and system based on RGB color pixel point coding. And analyzing the dynamic degree of the picture in real time, and automatically matching the acquisition frame rate with the pixel change judgment threshold. And then, collecting the subsequent frames according to the matching frame rate, calculating the color change degree relative to the previous frame pixel by pixel, and judging whether the pixels need to be updated according to the threshold value. And storing the coordinates, new RGB codes and time stamps of the pixels to be updated, and storing the RGB data of the pixels which are not updated, and caching the complete RGB data of the pixels when the whole frame is judged to be a static frame. And during playback, the RGB picture is directly rendered by combining the cached static data and the stored dynamic data on the basis of the initial database, so that lossless, efficient and low-delay playback is realized.
Inventors
- LIU JINGFU
Assignees
- 山东新矿绿色智能科技发展有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260130
Claims (10)
- 1. A high-definition monitoring video storage method based on RGB color pixel point coding is characterized by comprising the following steps: step 1, acquiring an initial frame of a monitoring video stream, distributing a unique coordinate identifier for each pixel, collecting original RGB data of the pixel, and constructing a pixel coordinate-RGB coding initial database; step 2, analyzing the duty ratio of the moving object in the picture in real time, and automatically matching the corresponding acquisition frame rate and pixel change judgment threshold value according to the duty ratio range; Step 3, collecting the subsequent frames according to the matched frame rate, calculating the change degree of RGB data of the subsequent frames relative to the RGB data of the same-coordinate pixels of the previous frame pixel by pixel, and judging whether the pixels need to be updated or not based on the judging threshold value; Step 4, regarding the pixel judged to be updated, taking the RGB code in the current video frame as the updated RGB code, storing the coordinate identification, the updated RGB code and the frame time sequence information, regarding the pixel judged to be not updated, not storing the RGB code data, and writing the complete RGB code data of the static frame into an inter-frame buffer unit when one frame is judged to be the static frame; and step 5, when video playback is carried out, calling corresponding static frame data in the inter-frame buffer unit according to frame time sequence information on the basis of the initial database, and carrying out RGB color rendering pixel by combining stored dynamic updating pixel data to restore a high-definition monitoring picture.
- 2. The high-definition monitoring video storage method based on RGB color pixel point coding of claim 1, wherein the step 1 specifically comprises: Step 11, identifying the resolution specification of the monitoring video stream, and determining the total pixel number of the picture according to the resolution specification to form a corresponding pixel point matrix; step 12, a two-dimensional rectangular coordinate system is established by taking the upper left corner of a video picture as an origin, a unique coordinate mark is allocated to each pixel point in the pixel point matrix, and the coordinate mark is an (X, Y) coordinate pair, wherein X represents a column sequence number and Y represents a row sequence number; Step 13, acquiring primary red, green and blue component values of each pixel point one by one; Step 14, combining the red, green and blue component values acquired by each pixel point to generate RGB codes of the pixel point; And 15, storing the coordinate identifications of all the pixel points and the corresponding RGB codes in an associated mode, constructing a pixel coordinate-RGB code initial database, and storing the initial database in a nonvolatile storage unit of a storage device to serve as a reference data source for picture rendering during video playback.
- 3. The high-definition monitoring video storage method based on RGB color pixel point coding of claim 1, wherein the step 2 specifically comprises: Step 21, calculating the percentage of the moving object pixels in the current video frame to the total pixels of the whole frame in real time, and judging the current scene as one of the following three types according to the preset range to which the percentage belongs: the static scene is that the percentage is smaller than a first percentage threshold value; a medium dynamic scene, wherein the percentage is between a first percentage threshold value and a second percentage threshold value; a high dynamic scene, wherein the percentage is larger than a second percentage threshold value; step 22, according to the determined scene category, automatically matching and enabling the corresponding acquisition frame rate and pixel change determination threshold combination, wherein: When the static scene is judged, the matched acquisition frame rate is a first frame rate threshold range, and the matched pixel change judgment threshold is a first judgment threshold range; When the medium dynamic scene is judged, the matched acquisition frame rate is a second frame rate threshold range, and the matched pixel change judgment threshold is a second judgment threshold; When the high dynamic scene is judged, the matched acquisition frame rate is a third frame rate threshold range, and the matched pixel change judgment threshold is a third judgment threshold range.
- 4. The method for storing high-definition monitoring video based on RGB color pixel-point encoding according to claim 1, wherein in step 3, for each frame of video acquired at a matching frame rate, the following operations are performed: Step 31, traversing each pixel point of the current frame to obtain the current red color thereof Green and environment-friendly Blue color Component values and obtain the red color of the same coordinate pixel in the previous frame Green and environment-friendly Blue color Component values; Step 32, calculating the color change degree of the pixel according to the following formula : In the formula, Is the sum of the maximum differences of RGB three colors; step 33, calculating the color change degree Pixel change decision threshold matching current scene Comparison is performed: If it is Judging the pixel as the pixel to be updated; If it is Then the pixel is determined to be an un-updated pixel.
- 5. The high-definition monitoring video storage method based on RGB color pixel point coding of claim 1, wherein the step 4 specifically comprises: step 41, regarding the pixel judged to be updated, taking the RGB code of the pixel in the current video frame as the updated RGB code, and storing the RGB code, the coordinate identification of the pixel and the frame time sequence information of the current video frame as a record; Step 42, for the pixels determined to be not updated, not writing the RGB encoded data to the main storage system; Step 43, when the proportion of the pixels in the whole frame of picture, which is determined to be not updated, exceeds the preset proportion, the frame is determined to be a static frame, and the complete RGB encoded data of the static frame is written into the inter-frame buffer unit.
- 6. The method for storing high-definition monitoring video based on RGB color pixel point encoding of claim 5, wherein step 5 specifically comprises: Step 51, calling and loading a pixel coordinate-RGB coding initial database as a complete initial picture for video playback; Step 52, sequentially reading the stored frame timing information according to the time period to be played back, and for each frame timing, performing the following operations: a. according to the frame time sequence information, RGB coding data of a complete static frame corresponding to the time sequence is retrieved and obtained from an inter-frame buffer unit; b. According to the same frame time sequence information, searching all records which are judged to be required to update pixels under the time sequence from a storage system, wherein each record comprises a coordinate identifier and an updated RGB code; step 53, filling the RGB coding data of the static frame to the corresponding coordinates by taking the initial picture as a substrate, and then replacing the RGB coding of the corresponding coordinates in the substrate with the updated RGB coding carried by the dynamic updating pixel record according to the coordinate identification in the dynamic updating pixel record, thereby synthesizing the complete picture frame of the current time sequence; And 54, directly outputting the RGB data of the synthesized picture frame to a display unit for rendering and displaying.
- 7. The high definition surveillance video storage method based on RGB color pixel encoding of claim 3, further comprising: Setting at least one key monitoring area in a monitoring picture; Setting a lower bias threshold for the key monitoring area and an upper bias threshold for the non-key monitoring area based on the matched pixel change judging threshold in the step 22; In step 3, the pixels located in the important monitoring area are compared and judged by using the downward bias threshold value, and the pixels located in the non-important monitoring area are compared and judged by using the upward bias threshold value.
- 8. The high definition surveillance video storage method based on RGB color pixel encoding of claim 1, further comprising: periodically performing a cyclic redundancy check on the stored pixel coordinate identifications and their associated RGB encoded data; When the data error is found by verification, an error recovery or alarm mechanism is triggered.
- 9. The high-definition monitoring video storage method based on RGB color pixel point coding of claim 4, further comprising abnormal pixel repair: If the pixel determined to be updated in step 33 has a color change degree greater than a preset high anomaly threshold value, and the average value of the color change degrees of all other pixels in a preset neighborhood centered on the pixel is less than a preset low anomaly threshold value, determining the pixel as an anomaly pixel; And replacing the RGB codes of the abnormal pixels by using the arithmetic average value of the RGB codes of other pixels in the preset neighborhood.
- 10. High definition monitoring video storage system based on RGB color pixel point code, characterized by comprising: the initial database building module is used for obtaining an initial frame of the monitoring video stream, distributing a unique coordinate identifier for each pixel, collecting original RGB data of the pixel, and constructing a pixel coordinate-RGB coding initial database; The scene self-adaptive analysis module is used for analyzing the duty ratio of a moving object in a picture in real time and automatically matching the corresponding acquisition frame rate and the pixel change judgment threshold value according to the duty ratio range; the pixel change detection and judgment module is used for collecting subsequent frames according to the matched frame rate, calculating the change degree of RGB data of the subsequent frames relative to the RGB data of the same-coordinate pixels of the previous frame pixel by pixel, and judging whether the pixels need to be updated or not based on the judgment threshold value; the differential storage and buffer management module is used for taking the RGB code of the pixel which is judged to be updated in the current video frame as the updated RGB code and storing the coordinate identification, the updated RGB code and the frame time sequence information of the pixel; And the video playback rendering module is used for calling corresponding static frame data in the inter-frame buffer unit according to the frame time sequence information on the basis of the initial database when video playback is carried out, and carrying out RGB color rendering pixel by combining with stored dynamic update pixel data so as to restore a high-definition monitoring picture.
Description
High-definition monitoring video storage method and system based on RGB color pixel point coding Technical Field The application relates to the technical field of security monitoring video storage, in particular to a high-definition monitoring video storage method and system based on RGB color pixel point coding. Background High definition/ultra-high definition (1080P/4K/8K) monitoring has become a core requirement in the fields of public safety, unattended machine room and the like, and the technical key is focused on image quality lossless fidelity, efficient storage, saving and retrieval of low delay. However, the existing mainstream technical solutions have significant drawbacks, and cannot meet the above requirements at the same time. Taking traditional coding techniques such as H.265 and the like as an example, although compression is realized through intra-frame prediction and transform coding, visual information can be irreversibly discarded, so that the edge ambiguity rate of key details such as license plates in 4K video is as high as 15% -20%, and the remote retrieval needs to be subjected to a complex decoding process, and the delay is generally over 100 milliseconds. In addition, the static scene is still stored by adopting a fixed code rate, the redundant data accounts for over 60 percent, and the storage cost is high. Another class of improvements attempts to break through the coding logic, using pixel level change detection. However, the method adopts a fixed change threshold value and frame rate, lacks scene self-adaptation capability, generates frame rate redundancy in a static scene, and causes detail loss in a high dynamic scene. Meanwhile, the scheme does not combine with the monitoring scene requirement to distinguish key areas, has weak capability of resisting interference such as environmental light mutation and the like, and has a picture distortion rate of 8% -12%. In summary, in the prior art, image quality loss and high delay are caused by coding inherent mechanism, or complex and changeable monitoring scenes cannot be adapted due to rigid design of pixel level processing, so that a common technical gap exists in aspects of image quality fidelity, dynamic adaptation, intelligent compression and anti-interference, and an innovative storage method is needed to be solved. Disclosure of Invention The invention provides a high-definition monitoring video storage method and a high-definition monitoring video storage system based on RGB color pixel point coding, which solve the problems of image quality loss, poor scene adaptation and low storage efficiency in the prior art. In a first aspect, the present invention provides a high definition monitoring video storage method based on RGB color pixel point coding, including the following steps: step 1, acquiring an initial frame of a monitoring video stream, distributing a unique coordinate identifier for each pixel, collecting original RGB data of the pixel, and constructing a pixel coordinate-RGB coding initial database; step 2, analyzing the duty ratio of the moving object in the picture in real time, and automatically matching the corresponding acquisition frame rate and pixel change judgment threshold value according to the duty ratio range; Step 3, collecting the subsequent frames according to the matched frame rate, calculating the change degree of RGB data of the subsequent frames relative to the RGB data of the same-coordinate pixels of the previous frame pixel by pixel, and judging whether the pixels need to be updated or not based on the judging threshold value; Step 4, regarding the pixel judged to be updated, taking the RGB code in the current video frame as the updated RGB code, storing the coordinate identification, the updated RGB code and the frame time sequence information, regarding the pixel judged to be not updated, not storing the RGB code data, and writing the complete RGB code data of the static frame into an inter-frame buffer unit when one frame is judged to be the static frame; and step 5, when video playback is carried out, calling corresponding static frame data in the inter-frame buffer unit according to frame time sequence information on the basis of the initial database, and carrying out RGB color rendering pixel by combining stored dynamic updating pixel data to restore a high-definition monitoring picture. The pixel-level primary RGB data is used as a processing core, so that irreversible compression and discarding of pixel information by traditional video coding are avoided, and each pixel detail of a 4K/8K ultra-high definition monitoring picture is ensured to be completely and accurately recorded and restored from a data source. The frame rate and the judging threshold value are automatically adjusted through scene dynamic adaptation, and the accurate storage strategy of multiplexing static data is combined with only changed pixels, so that the data redundancy in the static scene is eliminated. And when