CN112637598B - Video compression and decompression method, device, equipment and readable storage medium - Google Patents

Video compression and decompression method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN112637598B
CN112637598B CN202011504707.8A CN202011504707A CN112637598B CN 112637598 B CN112637598 B CN 112637598B CN 202011504707 A CN202011504707 A CN 202011504707A CN 112637598 B CN112637598 B CN 112637598B
Authority
CN
China
Prior art keywords
image
sub
image frame
video
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011504707.8A
Other languages
Chinese (zh)
Other versions
CN112637598A (en
Inventor
朱京
赵子岩
张素香
刘雯静
何珉
曹津平
许言路
陈雅群
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Information and Telecommunication Co Ltd
Original Assignee
State Grid Information and Telecommunication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Information and Telecommunication Co Ltd filed Critical State Grid Information and Telecommunication Co Ltd
Priority to CN202011504707.8A priority Critical patent/CN112637598B/en
Publication of CN112637598A publication Critical patent/CN112637598A/en
Application granted granted Critical
Publication of CN112637598B publication Critical patent/CN112637598B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/167Position within a video image, e.g. region of interest [ROI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/87Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving scene cut or scene change detection in combination with video compression

Abstract

The embodiment of the application provides a method, a device, equipment and a readable storage medium for compressing and decompressing video, wherein a first image frame of the video is divided into sub-images to obtain a sub-image to be processed, whether a target sub-image exists or not is judged, further, first index information and a compressed sub-image are added into a file to be compressed, and the file to be compressed is compressed to obtain a video compressed file. The compressed sub-image includes: the method comprises the steps of adding one sub-image into a file to be compressed under the condition that the same plurality of sub-images exist in the sub-image set of a video, wherein the first index information comprises the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-image.

Description

Video compression and decompression method, device, equipment and readable storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for compressing and decompressing video.
Background
The file size of the video is generally larger, and the image frames forming the video generally contain a large number of repeated images, so that the compression method of the file in the prior art has low compression rate of the compressed video, and the compressed video has larger compressed file, thereby causing waste of a large amount of storage space and occupation of network transmission bandwidth resources.
Disclosure of Invention
The application provides a video compression and decompression method, a device, equipment and a readable storage medium, aiming at improving the compression rate and saving the storage space, and comprising the following steps:
a method of compressing video, comprising:
dividing a first image frame of a video into sub-images to obtain sub-images to be processed;
judging whether a target sub-image exists or not, wherein the target sub-image is the sub-image to be processed with the same image in a sub-image set of the video, and the sub-image set is obtained by dividing image frames of the video;
adding first index information and a compressed sub-image into a file to be compressed, wherein the first index information comprises the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-image; the compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video;
And compressing the file to be compressed to obtain a video compressed file.
Optionally, before dividing the first image frame of the video into the sub-images, further comprising:
judging whether the first image frame is a target image frame or not, wherein the target image frame is an image frame with the same image in the image frames of the video;
adding second index information and compressed image frames into the file to be compressed if the first image frame is the target image frame, wherein the second index information comprises the corresponding relation between the identification of the first image frame and the identification of the repeated image frame; the compressed image frame includes: the first image frame or the repeated image frame; the repeated image frames are the same as the first image frame in the image frames of the video;
optionally, dividing the first image frame of the video into sub-images comprises:
if the first image frame is not the target image frame, the first image frame of video is divided into sub-images.
Optionally, the method further comprises:
judging whether the repetition proportion is larger than a preset proportion threshold value, wherein the repetition proportion is the ratio of the number of the target sub-images to the number of the sub-images to be processed;
And if the repetition ratio is not greater than a preset ratio threshold, adding the first image frame into the file to be compressed.
Optionally, adding the first index information and the compressed sub-image to the file to be compressed includes:
and if the repetition ratio is greater than a preset ratio threshold, adding the first index information and the compressed sub-image into the file to be compressed.
A method of decompressing video, comprising:
decompressing the video compression file to obtain a file set, wherein the file set comprises first index information and compressed sub-images, and the first index information comprises the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-images; the target sub-image is a sub-image to be processed with the same image in a sub-image set of the video, the sub-image to be processed is obtained by dividing a first image frame of the video, and the sub-image set is obtained by dividing an image frame of the video; the compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video;
and restoring the first image frame according to the first index information and the compressed sub-image.
Optionally, the file set further includes second index information and compressed image frames, where the second index information includes a correspondence between an identifier of the target image frame and an identifier of the repeated image frame; the target image frame is a first image frame in which the same image exists among image frames of the video, and the compressed image frame includes: the target image frame or the duplicate image frame; the repeated image frames are the same image frames as the target image frames among the image frames of the video.
A video compression apparatus comprising:
the sub-image dividing module is used for dividing a first image frame of the video into sub-images to obtain sub-images to be processed;
the judging module is used for judging whether a target sub-image exists or not, wherein the target sub-image is the sub-image to be processed with the same image in a sub-image set of the video, and the sub-image set is obtained by dividing an image frame of the video;
the first information acquisition module is used for adding first index information and compressed sub-images into a file to be compressed, wherein the first index information comprises the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-images; the compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video;
And the compression module is used for compressing the file to be compressed to obtain a video compression file.
A video decompression apparatus comprising:
the file extraction module is used for decompressing the video compression file to obtain a file set, wherein the file set comprises first index information and compressed sub-images, and the first index information comprises the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-images; the target sub-image is a sub-image to be processed with the same image in a sub-image set of the video, the sub-image to be processed is obtained by dividing a first image frame of the video, and the sub-image set is obtained by dividing an image frame of the video; the compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video;
and the image restoration module is used for restoring the first image frame according to the first index information and the compressed sub-image.
A video compression and decompression apparatus comprising: a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement the steps of the method as described above.
A readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method as described above.
As can be seen from the above technical solutions, in the video compression and decompression method, apparatus, device, and readable storage medium provided in the embodiments of the present application, a first image frame of a video is divided into sub-images, to-be-processed sub-images are obtained, whether a target sub-image exists is determined, and further, first index information and a compressed sub-image are added to a file to be compressed, and the file to be compressed is compressed, so as to obtain a video compressed file. The compressed sub-image includes: the method comprises the steps of adding one sub-image into a file to be compressed under the condition that the same plurality of sub-images exist in the sub-image set of a video, wherein the first index information comprises the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-image.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a video compression and decompression method according to an embodiment of the present application;
fig. 2 is a flowchart of a specific implementation of another video compression method according to an embodiment of the present application;
fig. 3 is a flowchart of a specific implementation of another video compression method according to an embodiment of the present application;
fig. 4 is a flowchart of a specific implementation of another video decompression method according to an embodiment of the present application;
fig. 5 is a flow chart of a method for decompressing video according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a video compression device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a video decompression device according to an embodiment of the present application;
Fig. 8 is a schematic structural diagram of a video compression and decompression apparatus according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
One specific application scenario of the video compression and decompression method provided by the embodiment of the application is the compression and decompression process of each video in a video material in the field of scientific and technological achievement data processing.
The video material is applied to describing and presenting the subject intersecting type technological innovation in a video mode, and it is required to be explained that along with the continuous emergence of the subject intersecting type technological innovation, requirements on description, presentation and analysis of the subject intersecting type technological innovation are higher and higher, and requirements on basic materials including text materials, picture materials, audio materials and video materials are also met. The storage occupied by the text material, the picture material and the audio material is small, the occupied space of the video material is large, and the video in the video material contains a large number of repeated images, so that the waste of a large number of storage spaces and the occupation of network transmission bandwidth resources are caused, and the intelligent technology achievement management is not facilitated.
Therefore, in the video compression and decompression method provided by the embodiment, the video is compressed after the repeated image is acquired and the repeated image (including the repeated image frame and the repeated partial image) is removed, and the compressed video is decompressed, so that the storage space is reduced, and the network transmission bandwidth resource is saved.
It should be noted that, the video compression and decompression method provided in the embodiment of the present application is not limited to the application in the field of scientific and technological achievement data processing, and may be applied to any compression and decompression process of video.
Fig. 1 is a schematic flow chart of a video compression and decompression method according to an embodiment of the present application, which needs to be described, specifically, the following S101 to S113 may be included.
S101, extracting an image frame sequence of the video.
The image frame sequence of the video includes n image frames to be compressed arranged according to the display order, and in this embodiment, the image frame sequence is recorded as x= { X1, X2,..once, xj,..once, xn }, where n is the number of image frames included in the image frame sequence, the value of n is determined according to the attribute (for example, the frame rate) of the video, xj (1. Ltoreq.j. Ltoreq.n-1) is the jth image frame, and recorded as the jth image frame.
In this embodiment, the time stamp of each image frame is obtained, and the time stamp of any image frame indicates the time when the image frame is displayed in the video, it can be understood that the difference between the time stamps of two adjacent image frames is the time interval between two adjacent image frames of the video.
It should be noted that, the process of extracting the image frame sequence of the video may be referred to in the prior art,
s102, determining that the image information of the image frame x1 includes the image frame x1 and a time stamp of the image frame x 1.
It should be noted that, the storage form of any image (including an image frame or a sub-image) may be pixel data of the image, specifically, see the prior art.
S103, judging whether the image frames and the adjacent image frames positioned before the image frames are the same image frame by frame according to the sequence of the image frames in the image frame sequence.
For convenience of description, the method for determining whether the first target image frame is the currently processed image frame, that is, the image frame xj+1, and the adjacent image frame before the target frame is the second target image frame, that is, the image frame xj, may be to compare whether the difference value of the pixel values of the pixels located at the same position of the image frame is less than a preset threshold value, and if the difference value of the pixel values of all the pixels is less than the preset threshold value, determine that the image frame xj+1 and the image frame xj are the same image. Specific judging methods can be seen in the prior art.
S104, if the first target image frame and the second target image frame are the same image, determining that the image information of the first target image frame includes the image frame index information and the time stamp of the first target image frame.
In this embodiment, the image frame index information includes: the correspondence between the identification of the first target image frame and the identification of the second target image frame; it should be noted that, the method obtains any information of the image frames by identifying the identification of any image frame.
For example, if the image frame x2 and the image frame x1 are duplicate images, the image information of the image frame x2 includes an identification of the image frame x1 and a time stamp of the image frame x 2.
S105, if the first target image frame and the second target image frame are not repeated images, dividing the first target image frame and the second target image frame into a preset number of sub-images.
In this embodiment, the method of dividing the first target image frame and the second target image frame is the same, and the preset number is set according to the image attribute of the image frames.
Specifically, dividing the image frame xj+1 to obtain m sub-images of y1, y2, yi, ym, where i is 1 or less than m, dividing the image frame xj to obtain m sub-images of z1, z2, z, zm. It should be noted that the sub-image of the image frame xj+1 corresponds to the sub-image of the image frame xj one by one, that is, the positions of yi corresponding to zi, yi and zi in the image frame are the same.
S106, acquiring the number of target sub-images in the sub-images of the first target image frame.
In this embodiment, the target sub-image is a sub-image that is the same as the corresponding sub-image in the second target image frame, and the method for determining whether any two sub-images are the same image may refer to S103.
And S107, if the ratio of the number of the target sub-images to the total number of the sub-images of the first target image frame is greater than a preset ratio threshold, acquiring the sub-image index information of the target sub-images of the first target image frame, the image information of other sub-images and the time stamp of the first target image frame as the image information of the first target image frame.
In this embodiment, for any target sub-image, the sub-image index information includes a correspondence between position information of the target sub-image and position information of the repeated sub-image. The repeated sub-image is a sub-image of the same image as the target sub-image. The image information of the other sub-images includes the other sub-images and the position information of the other sub-images.
It should be noted that, the other sub-images are sub-images except the target sub-image in the first target image frame, and the position information of any sub-image includes the identification of the image frame in which the sub-image is located and the position of the sub-image in the image frame.
And S108, when the ratio of the number of the target sub-images to the total number of the sub-images of the first target image frame is not greater than a preset ratio threshold, acquiring the first target image frame and the time stamp of the first target image frame as the image information of the first target image frame.
It should be noted that, in this embodiment, according to the methods described in S103 to S108, the image information of each image frame is obtained frame by frame.
And S109, taking the image information of all the image frames as information to be compressed of the video, and compressing the information to be compressed of the video to obtain a video compression file.
In this embodiment, the specific implementation process of the compressed video includes:
1. the image information of all image frames of the video is grouped into file packages.
2. And compressing the file package in a lossless compression mode of the image to form a compressed video file of the video.
It should be noted that, for specific embodiments of compressed video, reference may be made to the prior art.
As can be seen from the above technical solution, the method acquires image information of each image frame of a video frame by frame, specifically includes:
1. if the image frame is the first image frame or the image frame is not the same image as the adjacent image frame before the image frame, the image information of the image frame includes: image frames and time stamps for the image frames.
2. If the image frame and the adjacent image frame before the image frame are the same image, the image information of the image frame includes: image frame index information and time stamps of image frames.
3. If the image frame and the adjacent image frame before the image frame are not the same image, and the ratio of the number of target sub-images to the total number of sub-images is greater than a preset ratio threshold, the image information of the image frame includes: sub-image index information of the target sub-image, image information of other sub-images, and time stamp of the image frame.
4. If the image frame and the adjacent image frame before the image frame are not the same image, and the ratio of the number of target sub-images to the total number of sub-images is not greater than a preset ratio threshold, the image information of the image frame includes: image frames and time stamps for the image frames.
The image frame index information comprises a corresponding relation between an identification of an image frame with the same image as the image frame and an identification of the image frame. The sub-image index information of the target sub-image includes correspondence between position information of a sub-image that is the same image as the target sub-image and position information of the target sub-image. Therefore, when the video includes repeated images (the same plurality of image frames and/or the same plurality of sub-images), the information to be compressed of the video obtained by the method only contains one image of the repeated images, and the information amount of the information to be compressed of the video is small.
It should be noted that the present embodiment further includes a video decompression method, which corresponds to the compression method provided in the embodiment of the present application, that is, S110 to S113 in the decompression flow shown in fig. 1.
S110, extracting compression information of the video from the video compression file.
In this embodiment, the compression information includes image information of an image frame.
It should be noted that, in order of time stamps, image information of image frames is extracted frame by frame, and specific embodiments may refer to the prior art.
S111, acquiring the image frame x1 according to the image information of the image frame x1.
In the present embodiment, the image information of the image frame x1 includes the image frame x1 and a time stamp of the image frame, that is, a video start time.
S112, according to the sequence of the time stamps of the image frames, the image frames after the image frame x1 are acquired frame by frame according to the image information of the image frames.
In this embodiment, for convenience of description, the image frame xj+1 is the currently processed image frame. Based on the difference of the image information of the image frame xj+1, the method for acquiring the image frame at least comprises three optional specific embodiments, which are respectively as follows:
the image information of the image frame xj+1 includes: image frame xj+1 and the timestamp of image frame xj+1, image frame xj+1 is directly acquired from the image information of image frame xj+1.
The image information of the image frame xj+1 includes: image frame index information and a timestamp of the image frame xj+1, wherein the image frame index information comprises a correspondence between an identification of the image frame xj+1 and an identification of the image frame xj.
The method for acquiring the image frame xj+1 comprises the following steps: according to the corresponding relation between the identification of the image frame xj+1 and the identification of the image frame xj, the identification of the image frame xj is obtained, and the image frame xj is obtained according to the identification of the image frame xj.
The image information of the image frame xj+1 includes: sub-image index information of a target sub-image, image information of other sub-images, and a time stamp of an image frame xj+1, wherein the index information of the target sub-image includes: and the corresponding relation between the position information of the sub-image which is the same image as the target sub-image and the position information of the target sub-image.
The method for acquiring the image frame xj+1 comprises the following steps:
and acquiring the sub-image which is the same as the target sub-image from the image information of the image frame xj according to the position information of the sub-image which is the same as the target sub-image, and taking the sub-image as the target sub-image.
Other sub-images are acquired from image information of the other sub-images.
The image frame xj+1 is restored in accordance with the other sub-images, the positions of the other sub-images in the image frame xj+1, the target sub-image, and the positions of the target sub-image in the image frame xj+1.
S113, restoring the video according to the image frames and the time stamps of the image frames.
In this embodiment, the time stamp of the image frame indicates the time when the image frame is displayed in the video, so that the image frame is reorganized in the order of the time stamp, and the video can be restored.
It should be noted that, in the decompression method of the video shown in fig. 1, according to the sequence of the time stamps of the image frames, the image information of each image frame is obtained frame by frame, and because the second target image frame is the previous image frame adjacent to the first target image frame, correspondingly, in the decompression process, according to the sequence of the time stamps of the image frames, the image frames are obtained frame by frame according to the image information of the image frames, the efficiency of obtaining the image frames is higher, and the integrity of the video obtained by restoration is high.
Optionally, the method for decompressing the video further comprises: and sequencing all the image frames to obtain an image frame sequence, acquiring the time stamp difference value of two adjacent image frames in the image frame sequence, if the time stamp difference value of the two adjacent image frames is not equal to the time interval, searching the image information of the image frames corresponding to the time stamps between the two adjacent image frames, and acquiring the image frames, thereby further improving the integrity and fluency of the restored video.
The embodiment of the present application also provides other specific embodiments of a method for compressing video, for example, in the method for compressing video, it is determined whether an image frame and other image frames are the same image, that is, the second target image frame shown in fig. 1 is any image frame of the video except for the first target image frame, and for example, the method is not limited to obtaining the image information of the image frames frame by frame according to the time stamp sequence of the image frames, alternatively, each image frame may be processed according to any sequence.
Fig. 2 illustrates another embodiment of an alternative video compression method, specifically including:
s201, judging whether the first image frame is a target image frame or not.
In this embodiment, the target image frame is an image frame in which the same image exists among the image frames of the video. The method for judging whether two frames of image frames are the same image can be seen in the prior art.
And S202, if the first image frame is the target image frame, adding the second index information and the compressed image frame into the file to be compressed.
Specifically, an image frame that is the same as the first image frame is taken as the repeated image frame. The second index information includes a correspondence of an identification of the first image frame and an identification of the repeated image frame. It can be understood that the second index information is the image frame index information in the flow shown in fig. 1. The identification of an image frame uniquely indicates one image frame. Compressing the image frames includes: a first image frame or a repeated image frame.
For example, the image frame x5 is a target image frame, the image frame x3 is a repeated image frame, and the second index information includes a correspondence between the identification of the image frame x5 and the identification of the image frame x 3. The compressed image frame is either image frame x3 or image frame x5.
It should be noted that, after the first image frame or the repeated image frame is added as the compressed image frame to the file to be compressed, when the first image frame or the repeated image frame is processed to the repeated image frame, the repeated image frame is the target image frame, and the second index information of the target image frame is directly added to the file to be compressed.
S203, if the first image frame is not the target image frame, dividing the first image frame of the video into sub-images to obtain sub-images to be processed.
The method of dividing the first image frame of the video into sub-images can be seen in the prior art.
S204, judging whether a target sub-image exists.
In this embodiment, the target sub-image is a sub-image to be processed in which the same image exists in the sub-image set of the video. Wherein the sub-image set is divided by image frames of the video. If the target sub-image exists, the sub-image which is the same as the target sub-image is taken as the repeated sub-image.
It should be noted that, the method for dividing any image frame and the number of divided sub-images are not limited in this method, and may be specifically referred to the prior art.
And S205, adding the first index information and the compressed sub-image into the file to be compressed.
In this embodiment, the first index information includes a correspondence between position information of the target sub-image and position information of the repeated sub-image. The position information of any sub-image includes an identification of the image frame in which the sub-image is located, and a position of the sub-image in the image frame. It can be understood that the first index information is sub-image index information in the flow shown in fig. 1, and compressing the sub-image includes: a target sub-image or a repeated sub-image.
For example, if the sub-image y41 divided by the image frame x4 is the target sub-image and the sub-image identical to the sub-image y41 is the sub-image y71 of the image frame x7, the first index information includes a correspondence between the position information of the sub-image y41 (the identification of the image frame x4 and the position of the sub-image y41 in the image frame x 4) and the position information of the sub-image y71 (the identification of the image frame x7 and the position of the sub-image y71 in the image frame x 7). The compressed sub-image is sub-image y41 or sub-image y71.
It should be noted that, after the target sub-image or the repeated sub-image is added as the compressed sub-image to the file to be compressed, when the target sub-image or the repeated sub-image is processed to the repeated sub-image, the repeated sub-image is the target sub-image, and the first index information of the repeated sub-image is directly added to the file to be compressed.
S206, compressing the file to be compressed to obtain a video compressed file.
In this embodiment, the compression file includes the information added to the video compression file obtained in S202 and S205, and further includes other information, and it should be noted that the other information may be specifically referred to the prior art. For example, when the first image frame does not have the target sub-image, the first image frame is added to the video compression file.
It should be noted that, a specific method for compressing a file to be compressed is referred to the prior art.
As can be seen from the flow shown in fig. 2, in the video compression method provided in the embodiment of the present application, when the video includes repeated images (the same plurality of image frames and/or the same plurality of sub-images), only one image of the repeated images is added to the information to be compressed, so that the information amount of the obtained information to be compressed is small, and because the information to be compressed of the video includes the correspondence (i.e., the first index information) between the position information of the target sub-image and the position information of the repeated sub-image, and the correspondence (i.e., the first index information) between the identification of the first image frame and the identification of the repeated image frame, the information to be compressed of the video includes the information for restoring each image frame in the video. Therefore, the method compresses the image information of all the image frames as the information to be compressed of the video, improves the compression rate, ensures that the size of the compressed video file is obviously smaller than that of the video before compression, saves the storage space, and further avoids occupation of a large amount of network transmission bandwidth resources.
Fig. 3 is a schematic diagram showing a specific implementation of another video compression method according to an embodiment of the present application, in which further processing of a target image frame is added with respect to the flow shown in fig. 2. Specifically, the method comprises the following steps:
s301, judging whether the first image frame is a target image frame.
And S302, if the first image frame is the target image frame, adding the second index information and the compressed image frame into the file to be compressed.
S303, if the first image frame is not the target image frame, dividing the first image frame of the video into sub-images to obtain sub-images to be processed.
S304, judging whether a target sub-image exists.
It should be noted that, specific embodiments of S301 to S304 may refer to S201 to S204, which are not described in detail in this embodiment.
S305, judging whether the repetition proportion is larger than a preset proportion threshold value.
In this embodiment, the repetition ratio is a ratio of the number of target sub-images to the number of sub-images to be processed. For example, the number of image frames to be processed obtained by dividing the image frame x5 is m, wherein the number of target image frames is r, and the repetition ratio is r/m.
S306, if the repetition rate is not greater than a preset rate threshold, adding the first image frame into the file to be compressed.
S307, if the repetition ratio is greater than a preset ratio threshold, adding the first index information and the compressed sub-image into the file to be compressed.
The specific method is S205, and will not be described in detail.
S308, compressing the file to be compressed to obtain a video compressed file.
In this embodiment, the compression file includes the information added to the video compression file obtained in S302, S306, and S307, and further includes other information, and it should be noted that the other information may be specifically referred to the prior art. For example, when the first image frame does not have the target sub-image, the first image frame is added to the video compression file.
It should be noted that, a specific method for compressing a file to be compressed is referred to the prior art.
As can be seen from the flow shown in fig. 3, in the video compression method provided by the embodiment of the present application, when the repetition rate is not greater than the preset ratio threshold, the first image frame is added to the file to be compressed, and because the repetition rate is smaller, the number of target sub-images is smaller, and the calculation resources can be saved by directly adding the first image frame to the file to be compressed.
In fig. 2 or fig. 3, only two optional specific implementations of the video compression method provided by the embodiment of the present application may be any other optional specific implementations, and it can be seen that summarizing and summarizing all the foregoing embodiments of the video compression method provided by the embodiment of the present application, a first image frame of a video is divided into sub-images to obtain a sub-image to be processed, whether a target sub-image exists or not is determined, and further, the first index information and the compressed sub-image are added to a file to be compressed to compress the file to be compressed to obtain a video compressed file. Since the compressed sub-image includes: the method comprises the steps of adding one sub-image into a file to be compressed, adding first index information into the file to be compressed, wherein the first index information comprises the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-image, so that the compression rate can be improved and the storage resource can be saved on the premise of ensuring the completeness of the file to be compressed.
The embodiments of the present application also provide specific embodiments of other video decompression methods, for example, when the compression information of the image frame xj+1 includes index information of the image frame xj+1 and a timestamp of the image frame xj+1, where the index information of the image frame xj+1 includes an identifier of any other image frame.
Fig. 4 is a specific implementation manner of an alternative video decompression method provided in the embodiment of the present application, which may specifically include:
s401, decompressing the video compression file to obtain a decompressed file.
In this embodiment, the decompressed file includes image information of each frame of image frames, specifically, the image frames include a first type of image frame, a second type of image frame, and a third type of image frame.
The image information of the first type image frame includes: image frames and time stamps for the image frames.
The image information of the second type image frame includes: image frame index information and time stamps of image frames. Image frame index information. The image frame index information includes correspondence between an identification of an image frame that is the same image as the image frame and an identification of the image frame.
The image information of the third type of image frame includes: sub-image index information of the target sub-image, image information of other sub-images, and time stamp of the image frame. The sub-image index information of the target sub-image includes correspondence between position information of a sub-image which is the same image as the target sub-image and position information of the target sub-image, and the image information of the other sub-images includes position information of the other sub-images and other sub-images.
S402, acquiring the first type image frame from the image information of the first type image frame.
S403, acquiring image information of the image frame which is the same image as the second type image frame according to the image frame index information of the second type image frame.
Specifically, according to the identification of the image frame which is the repeated image with the second type of image frame, the image information of the image frame which is the repeated image with the second type of image frame is inquired.
S404, acquiring the second type image frame according to the image information of the image frame which is the same as the second type image frame.
When the image frame which is the same as the second image frame is the first image frame, the first image frame is acquired as the second image frame.
The image frames of the same image as the second type image frames belong to any one of the first type image frames, the second type image frames, and the third type image frames. When the image frame of the same image as the second type image frame belongs to the second type image frame or the third type image frame, the image frame of the same image as the second type image frame can be acquired as the second type image frame by referring to the image acquisition method (S403 to S404) of the second type image frame or the image acquisition method (S405 to S406) of the third type image frame.
S405, obtaining a sub-image which is the same as the target sub-image according to the sub-image index information of the target sub-image in the third type image frame.
Specifically, the position information of the sub-image which is the same as the target sub-image is acquired according to the position information of the target sub-image and the sub-image index information, and further, the sub-image which is the same as the target sub-image is acquired as the target sub-image according to the position information of the sub-image which is the same as the target sub-image.
S406, acquiring a third type of image frame according to the target sub-image and other sub-images.
Specifically, the target sub-image and other sub-images are obtained by dividing the third type of image frame, and the third type of image frame is obtained according to the position information of all sub-images and sub-images of the third type of image frame.
It should be noted that, S402 to S406 are specific embodiments for acquiring an image frame according to image information of the image frame, and the decompression method provided in the embodiment of the present application may further include other methods for acquiring an image frame. For example, the method is not limited to the order in which the image frames are acquired, and alternatively, the image frames may be acquired in the order of the first type of image frames, the second type of image frames, and the third type of image frames, or the image frames may be acquired in the order of time stamps of the image frames, frame by frame.
S407, reorganizing all the image frames according to the time stamps of the image frames to obtain the video.
According to the technical scheme, according to the video decompression method, each image frame is obtained according to the compression information of each image frame in the video decompression file, the video is obtained by reorganizing the image frames according to the time stamps of the image frames, and the time stamps of the image frames indicate the time of displaying the image frames in the video, so that the image frames are reorganized according to the sequence of the time stamps, and the video can be restored.
In summary, the above embodiments are summarized as a method for reducing an image frame in a video decompression method, which may specifically include:
s501, decompressing the video compression file to obtain a file set.
In this embodiment, the file set includes the first index information and the compressed sub-image.
The first index information includes a correspondence between the position information of the target sub-image and the position information of the repeated sub-image, see the above embodiment.
Specifically, the target sub-image is a sub-image to be processed, which has the same image in a sub-image set of the video, wherein the sub-image to be processed is obtained by dividing a first image frame of the video, and the sub-image set is obtained by dividing an image frame of the video.
The compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video.
S502, restoring the first image frame according to the first index information and the compressed sub-image.
Specifically, the compressed sub-image is taken as the target sub-image according to the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-image, and the first image frame is restored according to the position of the target sub-image in the first image frame in the position information of the target sub-image.
It should be noted that, the specific embodiments for restoring the first image frame according to the first index information and the compressed sub-image include various embodiments, which are not described herein.
It should be further noted that, in an optional scenario, the acquired file set further includes second index information and compressed image frames, where the second index information includes a correspondence between an identifier of the target image frame and an identifier of the repeated image frame; the target image frame is a first image frame in which the same image exists among image frames of the video, and the compressed image frame includes: a target image frame or a duplicate image frame; the repeated image frames are the same image frames as the target image frames among the image frames of the video. The method further obtains a first image frame according to the second index information and the compressed image frame.
As can be seen from the above technical solution, according to the video decompression method provided by the embodiments of the present application, a first image frame is restored according to first index information and a compressed sub-image, and because the first index information includes a correspondence between position information of a target sub-image and position information of a repeated sub-image, the target sub-image is a sub-image to be processed having the same image in a sub-image set of the video, the sub-image to be processed is obtained by dividing a first image frame of the video, the sub-image set is obtained by dividing an image frame of the video, and the compressed sub-image includes: the target sub-image or the repeated sub-image is the same as the target sub-image in the sub-image set of the video, so that the accuracy of the restored image frame is high.
Fig. 6 shows a schematic structural diagram of a video compression device according to an embodiment of the present application, where, as shown in fig. 6, the device may include:
the sub-image dividing module 601 is configured to divide a first image frame of a video into sub-images, to obtain sub-images to be processed;
a judging module 602, configured to judge whether a target sub-image exists, where the target sub-image is the sub-image to be processed in which the same image exists in a sub-image set of the video, and the sub-image set is obtained by dividing an image frame of the video;
A first information obtaining module 603, configured to add first index information and a compressed sub-image to a file to be compressed, where the first index information includes a correspondence between position information of the target sub-image and position information of a repeated sub-image; the compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video;
and the compression module 604 is configured to compress the file to be compressed to obtain a video compressed file.
Optionally, the method further comprises a second information acquisition module, which is used for judging whether the first image frame is a target image frame before dividing the first image frame of the video into sub-images, wherein the target image frame is an image frame with the same image in the image frames of the video; adding second index information and compressed image frames into the file to be compressed if the first image frame is the target image frame, wherein the second index information comprises the corresponding relation between the identification of the first image frame and the identification of the repeated image frame; the compressed image frame includes: the first image frame or the repeated image frame; the repeated image frames are the same as the first image frame in the image frames of the video;
Optionally, the sub-image dividing module, configured to divide the first image frame of the video into sub-images includes: the sub-image dividing module is specifically configured to: if the first image frame is not the target image frame, the first image frame of video is divided into sub-images.
Optionally, the method further comprises: the third information acquisition module is used for judging whether the repetition proportion is larger than a preset proportion threshold value, wherein the repetition proportion is the ratio of the number of the target sub-images to the number of the sub-images to be processed; and if the repetition ratio is not greater than a preset ratio threshold, adding the first image frame into the file to be compressed.
Optionally, the first information obtaining module is configured to add the first index information and the compressed sub-image to the file to be compressed, and includes: the first information acquisition module is specifically configured to: and if the repetition ratio is greater than a preset ratio threshold, adding the first index information and the compressed sub-image into the file to be compressed.
Fig. 7 is a schematic structural diagram of a video decompression device according to an embodiment of the present application, where, as shown in fig. 7, the device may include:
the file extraction module 701 is configured to decompress a video compressed file to obtain a file set, where the file set includes first index information and compressed sub-images, and the first index information includes a correspondence between position information of a target sub-image and position information of a repeated sub-image; the target sub-image is a sub-image to be processed with the same image in a sub-image set of the video, the sub-image to be processed is obtained by dividing a first image frame of the video, and the sub-image set is obtained by dividing an image frame of the video; the compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video;
The image restoration module 702 is configured to restore the first image frame according to the first index information and the compressed sub-image.
Optionally, the file set further includes second index information and compressed image frames, where the second index information includes a correspondence between an identifier of the target image frame and an identifier of the repeated image frame; the target image frame is a first image frame in which the same image exists among image frames of the video, and the compressed image frame includes: the target image frame or the duplicate image frame; the repeated image frames are the same image frames as the target image frames among the image frames of the video.
Fig. 8 shows a schematic structural diagram of the video compression and decompression apparatus, which may include: at least one processor 801, at least one communication interface 802, at least one memory 803, and at least one communication bus 804;
in the embodiment of the present application, the number of the processor 801, the communication interface 802, the memory 803, and the communication bus 804 is at least one, and the processor 801, the communication interface 802, and the memory 803 complete communication with each other through the communication bus 804;
the processor 801 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention, etc.;
The memory 803 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory), etc., such as at least one magnetic disk memory;
the memory stores a program, and the processor may execute the program stored in the memory to implement each step of the video compression and decompression method provided in the embodiment of the present application, as follows:
a method of compressing video, comprising:
dividing a first image frame of a video into sub-images to obtain sub-images to be processed;
judging whether a target sub-image exists or not, wherein the target sub-image is the sub-image to be processed with the same image in a sub-image set of the video, and the sub-image set is obtained by dividing image frames of the video;
adding first index information and a compressed sub-image into a file to be compressed, wherein the first index information comprises the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-image; the compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video;
and compressing the file to be compressed to obtain a video compressed file.
Optionally, before dividing the first image frame of the video into the sub-images, further comprising:
judging whether the first image frame is a target image frame or not, wherein the target image frame is an image frame with the same image in the image frames of the video;
adding second index information and compressed image frames into the file to be compressed if the first image frame is the target image frame, wherein the second index information comprises the corresponding relation between the identification of the first image frame and the identification of the repeated image frame; the compressed image frame includes: the first image frame or the repeated image frame; the repeated image frames are the same as the first image frame in the image frames of the video;
optionally, dividing the first image frame of the video into sub-images comprises:
if the first image frame is not the target image frame, the first image frame of video is divided into sub-images.
Optionally, the method further comprises:
judging whether the repetition proportion is larger than a preset proportion threshold value, wherein the repetition proportion is the ratio of the number of the target sub-images to the number of the sub-images to be processed;
and if the repetition ratio is not greater than a preset ratio threshold, adding the first image frame into the file to be compressed.
Optionally, adding the first index information and the compressed sub-image to the file to be compressed includes:
and if the repetition ratio is greater than a preset ratio threshold, adding the first index information and the compressed sub-image into the file to be compressed.
A method of decompressing video, comprising:
decompressing the video compression file to obtain a file set, wherein the file set comprises first index information and compressed sub-images, and the first index information comprises the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-images; the target sub-image is a sub-image to be processed with the same image in a sub-image set of the video, the sub-image to be processed is obtained by dividing a first image frame of the video, and the sub-image set is obtained by dividing an image frame of the video; the compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video;
and restoring the first image frame according to the first index information and the compressed sub-image.
Optionally, the file set further includes second index information and compressed image frames, where the second index information includes a correspondence between an identifier of the target image frame and an identifier of the repeated image frame; the target image frame is a first image frame in which the same image exists among image frames of the video, and the compressed image frame includes: the target image frame or the duplicate image frame; the repeated image frames are the same image frames as the target image frames among the image frames of the video.
The embodiment of the application also provides a readable storage medium, which can store a computer program suitable for being executed by a processor, and when the computer program is executed by the processor, the steps of the video compression and decompression method provided by the embodiment of the application are implemented as follows:
a method of compressing video, comprising:
dividing a first image frame of a video into sub-images to obtain sub-images to be processed;
judging whether a target sub-image exists or not, wherein the target sub-image is the sub-image to be processed with the same image in a sub-image set of the video, and the sub-image set is obtained by dividing image frames of the video;
adding first index information and a compressed sub-image into a file to be compressed, wherein the first index information comprises the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-image; the compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video;
and compressing the file to be compressed to obtain a video compressed file.
Optionally, before dividing the first image frame of the video into the sub-images, further comprising:
Judging whether the first image frame is a target image frame or not, wherein the target image frame is an image frame with the same image in the image frames of the video;
adding second index information and compressed image frames into the file to be compressed if the first image frame is the target image frame, wherein the second index information comprises the corresponding relation between the identification of the first image frame and the identification of the repeated image frame; the compressed image frame includes: the first image frame or the repeated image frame; the repeated image frames are the same as the first image frame in the image frames of the video;
optionally, dividing the first image frame of the video into sub-images comprises:
if the first image frame is not the target image frame, the first image frame of video is divided into sub-images.
Optionally, the method further comprises:
judging whether the repetition proportion is larger than a preset proportion threshold value, wherein the repetition proportion is the ratio of the number of the target sub-images to the number of the sub-images to be processed;
and if the repetition ratio is not greater than a preset ratio threshold, adding the first image frame into the file to be compressed.
Optionally, adding the first index information and the compressed sub-image to the file to be compressed includes:
And if the repetition ratio is greater than a preset ratio threshold, adding the first index information and the compressed sub-image into the file to be compressed.
A method of decompressing video, comprising:
decompressing the video compression file to obtain a file set, wherein the file set comprises first index information and compressed sub-images, and the first index information comprises the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-images; the target sub-image is a sub-image to be processed with the same image in a sub-image set of the video, the sub-image to be processed is obtained by dividing a first image frame of the video, and the sub-image set is obtained by dividing an image frame of the video; the compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video;
and restoring the first image frame according to the first index information and the compressed sub-image.
Optionally, the file set further includes second index information and compressed image frames, where the second index information includes a correspondence between an identifier of the target image frame and an identifier of the repeated image frame; the target image frame is a first image frame in which the same image exists among image frames of the video, and the compressed image frame includes: the target image frame or the duplicate image frame; the repeated image frames are the same image frames as the target image frames among the image frames of the video.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by a difference from other embodiments, and identical and similar parts between the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (6)

1. A method of compressing video, comprising:
judging whether a first image frame of a video is a target image frame or not, wherein the target image frame is an image frame with the same image in the image frames of the video, the image frame with the same image is a second image frame, and the second image frame is an adjacent image frame positioned in front of the first image frame; wherein, the liquid crystal display device comprises a liquid crystal display device,
adding second index information and compressed image frames into a file to be compressed if the first image frame is the target image frame, wherein the second index information comprises the corresponding relation between the identification of the first image frame and the identification of the repeated image frame; the compressed image frame includes: the first image frame or the repeated image frame; the repeated image frames are the same as the first image frame in the image frames of the video;
if the first image frame is not the target image frame, dividing the first image frame of the video into sub-images to obtain sub-images to be processed;
judging whether a target sub-image exists or not, wherein the target sub-image is the sub-image to be processed with the same image in a sub-image set of the video, and the sub-image set is obtained by dividing image frames of the video; wherein the target sub-image and the corresponding sub-image in the second image frame are sub-images of the same image;
Judging whether the repetition proportion is larger than a preset proportion threshold value, wherein the repetition proportion is the ratio of the number of the target sub-images to the number of the sub-images to be processed;
if the repetition rate is not greater than a preset rate threshold, adding the first image frame into the file to be compressed;
if the repetition proportion is larger than a preset proportion threshold value, adding first index information and a compressed sub-image into a file to be compressed, wherein the first index information comprises a corresponding relation between the position information of the target sub-image and the position information of the repeated sub-image; the compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video; the position information of the target sub-image includes an identification of the first image frame and a position of the target sub-image in the first image frame, and the position information of the repeated sub-image includes: an identification of an image frame to which a repeated sub-image belongs and a position of the repeated sub-image in the image frame to which the repeated sub-image belongs;
and compressing the file to be compressed to obtain a video compressed file.
2. A method of decompressing video, comprising:
Decompressing the video compression file to obtain a file set, wherein the file set comprises first index information and compressed sub-images, and the first index information comprises the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-images; the position information of the target sub-image includes an identification of the first image frame and a position of the target sub-image in the first image frame, and the position information of the repeated sub-image includes: an identification of an image frame to which a repeated sub-image belongs and a position of the repeated sub-image in the image frame to which the repeated sub-image belongs; the target sub-image is a sub-image to be processed with the same image in a sub-image set of the video, the sub-image to be processed is obtained by dividing a first image frame of the video, and the sub-image set is obtained by dividing an image frame of the video; the compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video; wherein the target sub-image and the corresponding sub-image in the second image frame are sub-images of the same image;
restoring the first image frame according to the first index information and the compressed sub-image;
The file set further comprises:
the image frame compression device comprises second index information and compressed image frames, wherein the second index information comprises a corresponding relation between the identification of the target image frame and the identification of the repeated image frame; the target image frame is a first image frame in which the same image exists among image frames of the video, and the compressed image frame includes: the target image frame or the duplicate image frame; the repeated image frames are the same as the target image frame in the image frames of the video, and the second image frame is an adjacent image frame positioned before the first image frame;
in the compression process, if the repetition ratio is not greater than a preset ratio threshold, adding the first image frame into a file to be compressed, wherein the repetition ratio is the ratio of the number of target sub-images to the number of sub-images to be processed; and if the repetition ratio is greater than a preset ratio threshold, adding the first index information and the compressed sub-image into the file to be compressed.
3. A video compression apparatus, comprising:
the sub-image dividing module is used for dividing a first image frame of the video into sub-images to obtain sub-images to be processed;
the first judging module is used for judging whether a target sub-image exists or not, wherein the target sub-image is the sub-image to be processed with the same image in a sub-image set of the video, and the sub-image set is obtained by dividing an image frame of the video; wherein the target sub-image and the corresponding sub-image in the second image frame are sub-images of the same image; judging whether the repetition proportion is larger than a preset proportion threshold value, wherein the repetition proportion is the ratio of the number of the target sub-images to the number of the sub-images to be processed; if the repetition proportion is not greater than a preset proportion threshold, adding the first image frame into a file to be compressed;
The first information acquisition module is used for adding first index information and compressed sub-images into a file to be compressed if the repetition proportion is larger than a preset proportion threshold value, wherein the first index information comprises the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-images; the position information of the target sub-image includes an identification of the first image frame and a position of the target sub-image in the first image frame, and the position information of the repeated sub-image includes: an identification of an image frame to which a repeated sub-image belongs and a position of the repeated sub-image in the image frame to which the repeated sub-image belongs; the compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video;
the compression module is used for compressing the file to be compressed to obtain a video compression file;
a second judging module, configured to judge, before the dividing the first image frame of the video into sub-images, whether the first image frame is a target image frame, where the target image frame is an image frame in which the same image exists in the image frames of the video, and the image frame of the same image is a second image frame, and the second image frame is an adjacent image frame located before the first image frame;
A second information acquisition module, configured to add second index information and a compressed image frame to the file to be compressed if the first image frame is the target image frame, where the second index information includes a correspondence between an identifier of the first image frame and an identifier of a repeated image frame; the compressed image frame includes: the first image frame or the repeated image frame; the repeated image frames are the same as the first image frame in the image frames of the video; the dividing the first image frame of the video into sub-images includes:
if the first image frame is not the target image frame, the first image frame of video is divided into sub-images.
4. A video decompression apparatus, comprising:
the file extraction module is used for decompressing the video compression file to obtain a file set, wherein the file set comprises first index information and compressed sub-images, and the first index information comprises the corresponding relation between the position information of the target sub-image and the position information of the repeated sub-images; the position information of the target sub-image includes an identification of the first image frame and a position of the target sub-image in the first image frame, and the position information of the repeated sub-image includes: an identification of an image frame to which a repeated sub-image belongs and a position of the repeated sub-image in the image frame to which the repeated sub-image belongs; the target sub-image is a sub-image to be processed with the same image in a sub-image set of the video, the sub-image to be processed is obtained by dividing a first image frame of the video, and the sub-image set is obtained by dividing an image frame of the video; the compressed sub-image includes: the target sub-image or the repeated sub-image is the same sub-image as the target sub-image in the sub-image set of the video; wherein the target sub-image and the corresponding sub-image in the second image frame are sub-images of the same image;
The image restoration module is used for restoring the first image frame according to the first index information and the compressed sub-image;
the file set further comprises: the image frame compression device comprises second index information and compressed image frames, wherein the second index information comprises a corresponding relation between the identification of the target image frame and the identification of the repeated image frame; the target image frame is a first image frame in which the same image exists among image frames of the video, and the compressed image frame includes: the target image frame or the duplicate image frame; the repeated image frames are the same as the target image frame in the image frames of the video, and the second image frame is an adjacent image frame positioned before the first image frame;
in the compression process, if the repetition ratio is not greater than a preset ratio threshold, adding the first image frame into a file to be compressed, wherein the repetition ratio is the ratio of the number of target sub-images to the number of sub-images to be processed; and if the repetition ratio is greater than a preset ratio threshold, adding the first index information and the compressed sub-image into the file to be compressed.
5. A video compression and decompression apparatus, comprising: a memory and a processor;
The memory is used for storing programs;
the processor being configured to execute the program to implement the steps of the method according to any one of claims 1 or 2.
6. A readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 or 2.
CN202011504707.8A 2020-12-18 2020-12-18 Video compression and decompression method, device, equipment and readable storage medium Active CN112637598B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011504707.8A CN112637598B (en) 2020-12-18 2020-12-18 Video compression and decompression method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011504707.8A CN112637598B (en) 2020-12-18 2020-12-18 Video compression and decompression method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112637598A CN112637598A (en) 2021-04-09
CN112637598B true CN112637598B (en) 2023-07-25

Family

ID=75316958

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011504707.8A Active CN112637598B (en) 2020-12-18 2020-12-18 Video compression and decompression method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112637598B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157873A (en) * 2021-11-25 2022-03-08 中国通信建设第四工程局有限公司 Video compression method and video compression system
CN114710474B (en) * 2022-03-24 2022-11-01 慧之安信息技术股份有限公司 Data stream processing and classifying method based on Internet of things
CN115086301B (en) * 2022-06-17 2022-12-27 嘉兴云切供应链管理有限公司 Data analysis system and method for compression uploading equalization
CN116166627A (en) * 2023-04-19 2023-05-26 启迪数字科技(深圳)有限公司 Experiment operation track recording method, device, equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005076627A1 (en) * 2004-02-09 2005-08-18 Nevil Soft Co., Ltd. Process method for compressing moving pictures and apparatus for performing said method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729840A (en) * 2009-12-17 2010-06-09 于培宁 Storage processing method utilizing video image characteristic sequence
US8542737B2 (en) * 2010-03-21 2013-09-24 Human Monitoring Ltd. Intra video image compression and decompression
AU2014202288B2 (en) * 2013-04-29 2017-10-05 Everi Technology Pty Ltd Gaming machine and method employing video compression
US20190014325A1 (en) * 2017-07-05 2019-01-10 Industrial Technology Research Institute Video encoding method, video decoding method, video encoder and video decoder

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005076627A1 (en) * 2004-02-09 2005-08-18 Nevil Soft Co., Ltd. Process method for compressing moving pictures and apparatus for performing said method

Also Published As

Publication number Publication date
CN112637598A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN112637598B (en) Video compression and decompression method, device, equipment and readable storage medium
CN101272442B (en) Digital image nondestructive compression method and device, resolution method and image encoder
CN108900843B (en) Monochrome image compression method, apparatus, medium, and electronic device
CN101099193A (en) Video display apparatus
CN107728892B (en) Picture display method, device, terminal and storage medium
CN104834597A (en) Method and system for measuring application response duration
CN110808738A (en) Data compression method, device, equipment and computer readable storage medium
CN105094975A (en) Method and device for calling application program
CN104869327A (en) High-definition display screen image file rapid display method and system
CN113839998B (en) Image data transmission method, apparatus, device, storage medium, and program product
CN108427704B (en) Compression tool calling method and device and storage medium
CN112836124A (en) Image data acquisition method and device, electronic equipment and storage medium
CN112650881A (en) Monitoring data processing method and device and storage medium
CN110650309B (en) Video conference video image transmission method, terminal and readable storage medium
CN110035289B (en) Layered compression method, system and related device for screen image
CN109710783B (en) Picture loading method and device, storage medium and server
US9098863B2 (en) Compressed analytics data for multiple recurring time periods
CN109683798B (en) Text determination method, terminal and computer readable storage medium
CN115380267A (en) Data compression method and device, data compression equipment and readable storage medium
US6970265B2 (en) Digital image processing device and digital camera using this device
CN103345495A (en) Method for speedy presentation of ultra-precise image in network environment
CN114567787B (en) Video compression method, system and related device applied to BMC
CN114782249A (en) Super-resolution reconstruction method, device and equipment for image and storage medium
CN106156169B (en) Discrete data processing method and device
CN109388726A (en) A kind of image display method, device, equipment and computer-readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant