Video compression method and video compression system
By dividing the video into important and non-important segments, and using lossless compression and image feature extraction technology to cut and compress the non-important segments, the problem of resource waste and information neglect in traditional technology is solved, and the volume of the video compression package is reduced.
Patent Information
- Application Number
- CN202111415339.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-25
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-11-25
AI Technical Summary
Traditional block-based video coding and decoding technology ignores a large amount of repeated picture information when compressing video data, resulting in a waste of resources, and it is difficult to reduce invalid pictures while retaining video information.
By dividing the video into important video segments and non-important video segments, lossless compression and image feature extraction technology are used to cut and compare the non-important video segments, extract low-information video segments and information video segments, and put them in chronological order Splicing and compression, and finally encapsulating important and non-important video compression packages in the same file.
Under the condition of retaining video information to the maximum extent, invalid video frames are effectively removed and the size of the compressed package is reduced.
Smart Images

Figure CN114157873B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a video compression method and a video compression system. Background Art
[0002] At present, mainstream codec technologies include H.264 / H.265 / H.266 and MPEG2 / MPEG4, all of which rely on block-based video codec technology. However, the implementation of traditional block-based video codec technology is based on human visual perception. For example, it is highly dependent on the fact that the human eye is insensitive to high-frequency information, which leads to a large degree of compression of high-frequency components in video data by block-based video codec technology.
[0003] However, as video coding and decoding technology is used more and more widely and has more and more applications, if video coding and decoding is still performed according to the conventional human visual perception, useful information will be ignored in many cases. The collected videos often contain a large number of repeated images, and these repeated images often waste a lot of resources. Therefore, how to reduce invalid images while preserving the information contained in the video as much as possible is a current research topic. Summary of the invention
[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a video compression method, comprising the following steps:
[0005] Step 1: Obtain video information of the video to be compressed, and segment the video according to the video information, so as to segment the video into important video segments and unimportant video segments;
[0006] Step 2: Losslessly compress the important video segments to obtain important video compression packages, and time-stamp the important video compression packages;
[0007] Step 3: split the non-important video segments, extract all the objects in the first frame of the non-important video and mark them with numbers respectively; take the numbered objects in the first frame as a reference, extract objects from all the image frames of the non-important video, and compare them with the numbered objects in the first frame respectively, and cut the non-important video into low-information video segments and information video segments;
[0008] Step 4: extract the first image frame of the low-information video segment, and mark the duration information of the low-information video segment on the first image frame to obtain a marked frame of the low-information video segment, arrange the marked frame and the information video segment in chronological order and splice them to obtain a spliced video, perform lossless compression on the spliced video to obtain a non-important video compression package, and perform time stamping on the non-important video compression package;
[0009] Step 5: Arrange the important video compression packages and the unimportant video compression packages in chronological order and encapsulate them in the same file to complete the video compression.
[0010] Furthermore, the method of selecting a video segmentation strategy based on video information and video mode, segmenting the video according to the video segmentation strategy, and segmenting the video into important video segments and unimportant video segments includes the following process: according to the set working time and non-working time, segmenting the video within the working time period into the important video segments, and segmenting the video within the non-working time period into the unimportant video segments.
[0011] Furthermore, the cutting of the non-important video into low-information video segments and information video segments includes the following process: extracting all objects in the first frame of the non-important video and marking them with numbers respectively; taking the numbered objects in the first frame as a reference, extracting objects from all the image frames of the non-important video respectively, and comparing them with the numbered objects in the first frame respectively; when an image frame different from the numbered objects in the first frame is compared, the image frame is used as the cutting point image frame, and the first frame to the previous frame of the cutting point image frame is cut to obtain a first low-information video segment; taking the cutting point image frame as the starting point, the comparison with the first frame is continued until the image frame identical to the first frame is compared, and the image frame is the cutting end point image frame, and the image frame from the cutting point image frame to the previous frame of the cutting end point image frame is the first information video segment, and the comparison is continued until the non-important video is completely cut to obtain a low-information video segment and an information video segment.
[0012] The video compression system according to the video compression method comprises a data processing module, a compression module, a data storage module, an image feature extraction module, and a display module; the compression module, the data storage module, the image feature extraction module, and the display module are respectively connected to the data processing module;
[0013] The compression module is used to compress important video segments and non-important video segments respectively and encapsulate them in the same data packet; the data storage module is used to store video data; the image feature extraction module is used to extract objects in the image frame; and the display module is used to display video data and compressed data.
[0014] The beneficial effect of the present invention is that through the technical solution disclosed by the present invention, invalid video images can be removed while retaining video information to the maximum extent, thereby reducing the size of the compressed package. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 The figure is a flow chart of the principle of a video compression method. DETAILED DESCRIPTION
[0016] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited to the following.
[0017] like Figure 1 As shown, a video compression method comprises the following steps:
[0018] Step 1: Obtain video information of the video to be compressed, and segment the video according to the video information, so as to segment the video into important video segments and unimportant video segments;
[0019] Step 2: Losslessly compress the important video segments to obtain important video compression packages, and time-stamp the important video compression packages;
[0020] Step 3: split the non-important video segments, extract all the objects in the first frame of the non-important video and mark them with numbers respectively; take the numbered objects in the first frame as a reference, extract objects from all the image frames of the non-important video, and compare them with the numbered objects in the first frame respectively, and cut the non-important video into low-information video segments and information video segments;
[0021] Step 4: extract the first image frame of the low-information video segment, and mark the duration information of the low-information video segment on the first image frame to obtain a marked frame of the low-information video segment, arrange the marked frame and the information video segment in chronological order and splice them to obtain a spliced video, perform lossless compression on the spliced video to obtain a non-important video compression package, and perform time stamping on the non-important video compression package;
[0022] Step 5: Arrange the important video compression packages and the unimportant video compression packages in chronological order and encapsulate them in the same file to complete the video compression.
[0023] The method of selecting a video segmentation strategy according to video information and video mode, segmenting the video according to the video segmentation strategy, and segmenting the video into important video segments and unimportant video segments includes the following process: according to the set working time and non-working time, segmenting the video within the working time period into the important video segment, and segmenting the video within the non-working time period into the unimportant video segment.
[0024] The method of cutting the non-important video into low-information video segments and information video segments includes the following process: extracting all objects in the first frame of the non-important video and marking them with numbers respectively; taking the numbered objects in the first frame as a reference, extracting objects from all the frames of the non-important video respectively, and comparing them with the numbered objects in the first frame respectively; when an image frame different from the numbered objects in the first frame is compared, the image frame is used as the cutting point image frame, and the first frame to the previous frame of the cutting point image frame is cut to obtain a first low-information video segment; taking the cutting point image frame as the starting point, the comparison with the first frame is continued until the image frame identical to the first frame is compared, and the image frame is ended, and the image frame is the cutting end point image frame, and the image frame from the cutting point image frame to the previous frame of the cutting end point image frame is the first information video segment, and the comparison is continued until the non-important video is completely cut to obtain a low-information video segment and an information video segment.
[0025] The video compression system comprises a data processing module, a compression module, a data storage module, an image feature extraction module and a display module; the compression module, the data storage module, the image feature extraction module and the display module are respectively connected to the data processing module;
[0026] The compression module is used to compress important video segments and non-important video segments respectively and encapsulate them in the same data packet; the data storage module is used to store video data; the image feature extraction module is used to extract objects in the image frame; and the display module is used to display video data and compressed data.
[0027] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. A video compression method, It is characterized in that Applied to a video compression system, comprising a data processing module, a compression module, a data storage module, an image feature extraction module, and a display module; the compression module, the data storage module, the image feature extraction module, and the display module are respectively connected to the data processing module; The compression module is used to compress important video segments and non-important video segments respectively and encapsulate them in the same data packet; the data storage module is used to store video data; the image feature extraction module is used to extract objects in the image frame; the display module is used to display video data and compressed data; The steps include: Step 1: Obtain video information of the video to be compressed, and segment the video according to the video information, so as to segment the video into important video segments and unimportant video segments; Step 2: Losslessly compress the important video segments to obtain important video compression packages, and time-stamp the important video compression packages; Step 3: split the non-important video segments, extract all the objects in the first frame of the non-important video and mark them with numbers respectively; take the numbered objects in the first frame as a reference, extract objects from all the image frames of the non-important video, and compare them with the numbered objects in the first frame respectively, and cut the non-important video into low-information video segments and information video segments; Step 4: extract the first image frame of the low-information video segment, and mark the duration information of the low-information video segment on the first image frame to obtain a marked frame of the low-information video segment, arrange the marked frame and the information video segment in chronological order and splice them to obtain a spliced video, perform lossless compression on the spliced video to obtain a non-important video compression package, and perform time stamping on the non-important video compression package; Step 5: Arrange the important video compression packages and the non-important video compression packages in chronological order and encapsulate them in the same file to complete the video compression; The method of selecting a video segmentation strategy according to video information and video mode, segmenting the video according to the video segmentation strategy, and segmenting the video into important video segments and non-important video segments includes the following processes: according to the set working time and non-working time, segmenting the video in the working time period as the important video segment, and segmenting the video in the non-working time period as the non-important video segment; The cutting of the non-important video into the low-information video segment and the information video segment includes the following process: Extract all the objects in the first frame of the non-important video and mark them with numbers respectively; take the numbered objects in the first frame as a reference, extract objects from all the frames of the non-important video respectively, and compare them with the numbered objects in the first frame respectively. When an image frame with a different numbered object from the first frame is compared, take the image frame as the cutting point image frame, cut the first frame to the previous frame of the cutting point image frame to obtain a first low-information video segment; take the cutting point image frame as the starting point and continue to compare with the first frame until the image frame that is the same as the first frame is compared, which is the cutting end point image frame, and the image frame from the cutting point image frame to the previous frame of the cutting end point image frame is the first information video segment. Continue to compare until the non-important video is completely cut to obtain a low-information video segment and an information video segment.
