CN110677670A - Image compression method, image decompression method, image compression device, image decompression device, electronic equipment and image decompression system - Google Patents

Image compression method, image decompression method, image compression device, image decompression device, electronic equipment and image decompression system Download PDF

Info

Publication number
CN110677670A
CN110677670A CN201910772133.3A CN201910772133A CN110677670A CN 110677670 A CN110677670 A CN 110677670A CN 201910772133 A CN201910772133 A CN 201910772133A CN 110677670 A CN110677670 A CN 110677670A
Authority
CN
China
Prior art keywords
image
key elements
frame
processor
compressed
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.)
Pending
Application number
CN201910772133.3A
Other languages
Chinese (zh)
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.)
China Mobile Communications Group Co Ltd
MIGU Video Technology Co Ltd
MIGU Culture Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
MIGU Video Technology Co Ltd
MIGU Culture Technology 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 China Mobile Communications Group Co Ltd, MIGU Video Technology Co Ltd, MIGU Culture Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201910772133.3A priority Critical patent/CN110677670A/en
Publication of CN110677670A publication Critical patent/CN110677670A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display

Abstract

The embodiment of the invention relates to the technical field of computers, and discloses a method for compressing images, which comprises the following steps: acquiring an image to be compressed; identifying and matting non-key elements in the image; and compressing the image without the non-key elements to obtain a compressed image, and recording the non-key elements. The embodiment of the invention provides a method, a device, an electronic device and a system for compressing and decompressing an image, which can greatly reduce the volume of a compressed video, save the storage capacity and accelerate the transmission rate.

Description

Image compression method, image decompression method, image compression device, image decompression device, electronic equipment and image decompression system
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, electronic equipment and a system for compressing and decompressing an image.
Background
With the continuous development of multimedia technology and network technology, it is becoming more and more convenient to transmit a large amount of data through a network. However, the "explosion of information" brought by the information age has increased the amount of data, and therefore, efficient compression of data is required regardless of transmission or storage. In practical applications, image compression technology is usually used to compress original video data, so as to obtain smaller transmission bandwidth in data transmission or occupy less space in storage, and the compressed data is converted into original video data by decompression technology before being sent to display.
However, the inventors found that at least the following problems exist in the prior art: video is generally compressed by encoding compression, such as h.264 and h.265, and the compressed video has a large volume, a slow transmission rate and a large memory capacity for storage.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, an electronic device, and a system for compressing and decompressing an image, which can greatly reduce the volume of a compressed video, save storage capacity, and increase transmission rate.
To solve the above technical problem, an embodiment of the present invention provides an image compression method, including: acquiring an image to be compressed; identifying and matting non-key elements in the image; and compressing the image without the non-key elements to obtain a compressed image, and recording the non-key elements.
The embodiment of the invention also provides an image decompression method, which comprises the following steps: acquiring a compressed image and non-key elements; decompressing the compressed image to obtain an image of non-key elements; and integrating the image of the non-key elements and the non-key elements to obtain complete image information.
An embodiment of the present invention further provides an apparatus for image compression, including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of image compression.
An embodiment of the present invention further provides an apparatus for image decompression, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of image decompression described above.
An embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of image compression described above and/or the method of image decompression described above.
The embodiment of the invention also provides an image compression and decompression system, which comprises: such an image compression apparatus and such an image decompression apparatus are described above.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program which, when executed by a processor, implements a method of image compression as described above or a method of image decompression as described above.
Compared with the prior art, the embodiment of the invention provides an image compression method, which can greatly reduce the volume of the compressed image, save the storage capacity and accelerate the transmission rate by scratching the non-key elements in the image, compressing the image scratched except the key elements and recording the non-key elements.
In addition, recording non-important elements specifically includes: recording format information of the non-key elements, wherein the format information at least comprises one or more of the following types: image frame, size, position, direction of movement, facing angle, motion map, cycle parameter, and label.
In addition, the acquiring of the image to be compressed specifically includes: acquiring a video stream to be compressed; splitting a video stream to obtain an image to be compressed; the located image frame of the image comprises: starting a frame and ending the frame; the size of the image includes: starting frame target width, starting frame target height, ending frame target width, and ending frame target height; the positions of the images include: the coordinate of the center point x of the starting frame, the coordinate of the center point y of the starting frame, the coordinate of the center point x of the ending frame and the coordinate of the center point y of the ending frame; the cyclic parameters of the image include: target circulation playing times, circulation starting frame and circulation ending frame; the label of the image includes: name, color, style, quantity.
In addition, acquiring an image to be compressed specifically includes: acquiring a video stream to be compressed; splitting a video stream to obtain an image to be compressed and audio data; after compressing the image after the non-key element to obtain the compressed image, the method further comprises the following steps: the audio data is stored. The scheme splits and stores the audio data of the video stream, and is favorable for recovering the audio data lost after the video frame splitting.
In addition, non-emphasized elements include: format information of non-key elements; the format information includes at least one or more of: the image frame, the size, the position, the moving direction, the facing angle, the motion picture, the circulation parameter and the label; integrating the image of the non-key elements and the non-key elements to obtain complete image information, which specifically comprises the following steps: and generating non-key elements in the image with the non-key elements removed by utilizing a pre-trained generation type confrontation network according to the format information.
In addition, the image of the non-key elements is a continuous image frame; utilizing the well trained generative confrontation network in advance to generate non-key elements in the image of removing the non-key elements according to the format information, specifically comprising: merging continuous image frames of non-key elements to obtain a cutout video stream; playing the buckling picture video stream; and generating non-key elements frame by frame in continuous image frames of the deduction video stream in real time according to the format information by utilizing a pre-trained generation type countermeasure network.
In addition, before merging the continuous image frames of the non-key elements to obtain the cutout video stream, the method further comprises the following steps: acquiring audio data; merging continuous image frames of non-key elements to obtain a cutout video stream, which specifically comprises the following steps: merging the continuous image frames of the non-key elements to obtain a continuous video stream; combining the audio data with the continuous video stream results in a thumbnail video stream. In the scheme, the cutout video stream is combined with the audio data, so that the decompressed image can normally play audio.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a schematic flow diagram of a method of image compression according to a first embodiment of the present invention;
FIG. 2 is a schematic flow chart of a method of image decompression according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of an apparatus for image compression according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for image decompression according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the invention;
fig. 6 is a schematic structural diagram of a system for compressing and decompressing an image according to a sixth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
The first embodiment of the invention relates to an image compression method, and the core of the embodiment lies in providing an image compression method, which comprises the following steps: acquiring an image to be compressed; identifying and matting non-key elements in the image; and compressing the image without the non-key elements to obtain a compressed image, and recording the non-key elements. By removing the non-key elements in the image, compressing the image without the key elements and recording the non-key elements, the volume of the compressed image can be greatly reduced, the storage capacity can be saved and the transmission rate can be increased.
The following describes the implementation details of the image compression method of the present embodiment in detail, and the following is only provided for the convenience of understanding and is not necessary for implementing the present embodiment.
Fig. 1 is a schematic flow chart of the image compression method according to the present embodiment:
step 101: an image to be compressed is acquired.
Specifically, the image to be compressed in this embodiment may be a single-frame image or a multi-frame image; may be discontinuous image frames or may be continuous image frames. When the image to be compressed is a continuous image frame, the video stream may be acquired first, and then the video stream is split to obtain the continuous image frame to be compressed. In the present embodiment, the video stream may be deframed by using a tool such as ffmpeg (fast forward mpeg), and the number of frames to be deframed is determined by time and a frame rate. For example: the video name is: mp4 performs frame splitting at a time point 00:00:01, which requires starting frame splitting, and at a time point 00:00:13, which ends frame splitting, so that the process of frame splitting at this time may be: ffmpeg-i video name, mp4-ss 00:00:01-t00:00: 13% d.jpg.
It is worth noting that, for the scenes of monitoring video streams, live streams and the like which need to compress a large amount of video streams, the number of frames needing to be disassembled at one time is often large, and if the frames are disassembled in a windows system, the problem of efficiency reduction caused by the fact that the number of frames needing to be disassembled at one time is larger than 65535 frames (the number of files in a single folder) is often caused, so that in order to avoid the problem of efficiency reduction caused by the fact that the number of files is too large, the number of frames needing to be disassembled at one time does not exceed 65535 frames (the number of files in a single folder), the time length of frame disassembling of each time is smaller than 65535/frame rate, and the frames are disassembled by a plurality of folders and stored. In addition, each folder may be assigned a sequence number in chronological order of the video streams, thereby facilitating merging of subsequent video streams.
Step 102: non-key elements in the image are identified and scratched out.
Specifically, in the present embodiment, the elements in the image are classified into the important elements and the non-important elements, and the important elements can be classified into the following four types: (1) a human face; (2) when no person with an exposed face exists in the picture, the picture can be a weapon object; (3) scenes with large variation amplitude, such as: natural disasters and explosions; (4) no character, or a background with characters less than 5% of the screen in the segment, such as: astronauts are in space. Other elements than the above four types of elements are considered to be non-essential elements, such as: clouds, grass, highways, etc. The above is merely an example, and in practical applications, the important elements and the non-important elements in the image may be determined according to practical situations.
In this embodiment, a trained object recognition model may be used to recognize non-key elements in an image to be compressed, where the object recognition model is specifically trained in the following manner: firstly, acquiring a training image set and real labels of non-key elements on each frame of training images in the training image set; for example: if the non-emphasized elements in the training image include: clouds, grass and highways; then the true tags of the cloud are: cloud, 1 flower, white, cartoon; the real labels of grass are: grassland, green, cartoon; the real label of the road is: highways, cartoon. Then, inputting the training image and the label into an object recognition model to obtain a prediction label of the training image, calculating a loss function value of the object recognition model according to the prediction label, continuing to train the object recognition model until the loss function value reaches a preset threshold value, finishing the training of the object recognition model, and inputting the image to be compressed containing the non-key elements into the trained object recognition model to recognize the non-key elements in the image, wherein the preset threshold value is set by a user. The visual focus object in the image can be obtained through eyeball tracking, and the important elements and the non-important elements in the training image are distinguished according to the average observation time of the user; the emphasized elements and the non-emphasized elements in the image can also be distinguished by means of manual marking.
After identifying non-key elements in the image to be compressed by using the object identification model, the identified non-key elements are scratched out by using an image processing function. How to specifically remove non-key elements in an image is the prior art, and the embodiment is not described too much.
Step 103: and compressing the image without the non-key elements to obtain a compressed image, and recording the non-key elements.
Specifically, after non-key elements in the image to be compressed are scratched, the volume of the image can be greatly reduced. For example: a picture containing characters, clouds, grass and roads, wherein the volume size of the picture is 154KB, and the occupied space size is 156 KB; after the cloud and the grassland in the image are scratched, the size of the image after the cloud and the grassland are scratched is 80.3KB, and the occupied space size is 84 KB; after the cloud, the grassland and the road in the image are scratched, the size of the image after the cloud, the grassland and the road are scratched is 52.9KB, and the occupied space is 56 KB. It can be seen that compared with the original image, the occupied space of about 2/3 is reduced for the image without the non-key element, the compressed image obtained by compressing the image without the non-key element has smaller volume and smaller occupied space, and the transmission rate of the image is greatly improved.
In order to facilitate recovery of the image after matting the non-key elements, the embodiment also needs to record the non-key elements in the image, and specifically includes: recording format information of the non-key elements, wherein the format information at least comprises one or more of the following types: image frame, size, position, direction of movement, facing angle, motion map, cycle parameter, and label. In practical applications, when the image is a continuous image frame, all the format information may be included, and when the image is a discontinuous image frame, the format information may not include "dynamic state" and "loop parameter". It is understood that the format information of the non-key elements may be increased or decreased according to actual requirements.
When the image frame is a continuous video frame, the image frame of the image comprises: starting a frame and ending the frame; the size of the image includes: starting frame target width, starting frame target height, ending frame target width, and ending frame target height; the positions of the images include: the coordinate of the center point x of the starting frame, the coordinate of the center point y of the starting frame, the coordinate of the center point x of the ending frame and the coordinate of the center point y of the ending frame; the cyclic parameters of the image include: target circulation playing times, circulation starting frame and circulation ending frame; the label of the image includes: name, color, style, quantity.
The specific recording format may be: start frame, end frame | target width of start frame, target height of start frame, target width of end frame, target height of end frame | center point x coordinate of start frame, center point y coordinate of start frame, center point x coordinate of end frame, center point y coordinate of end frame | face angle | whether move image | target circulation play time | circulation start frame | circulation end frame | label, for example: 1110, 1200|200, 455, 250, 500|123, 123, 444, 365|14|1|4|1110|1200| cloud, white, cartoon, 1 piece. It can be seen that the image frame in the example is 1110 to 1200 frames; according to the label, the non-key elements (namely, the target) are a white cartoon cloud, the width in the starting frame is 200 and the height in the starting frame is 250, and the width in the ending frame is 250 and the height in the ending frame is 500; the x coordinate of the center point in the start frame is 123, the y coordinate is 123, the x coordinate of the center point in the end frame is 444, the y coordinate is 365; the orientation angle is 14, 1 indicates a motion picture, the number of loop plays is 4, the loop start frame is 1110, and the loop end frame is 1200. It should be noted that when the movement direction of the non-important element is changed, a line of records needs to be opened again, the format of the records is only an example, and the records can be set by the user according to the use habit of the user in actual use.
It is worth noting that for some video streams with audio data, the audio data lost after video frame-dropping is convenient to recover. In this embodiment, acquiring an image to be compressed specifically includes: acquiring a video stream to be compressed; splitting a video stream to obtain an image to be compressed and audio data; after compressing the image after the non-key element to obtain the compressed image, the method further comprises the following steps: storing the audio data. Splitting audio data in the video stream, wherein the audio data comprises: the bit rate, the channel, the audio sampling frequency and the like can be checked through the attributes of the video, and the obtained audio data is stored, so that the audio data can be conveniently recovered when the video is subsequently decompressed.
It should be noted that, in this embodiment, the recorded non-key elements may be used as the plug-in files of the compressed image, and the compressed image, the plug-in files, and the audio data are stored in the same path, which is convenient for viewing and processing.
Compared with the prior art, the embodiment provides an image compression method, which comprises the following steps: acquiring an image to be compressed; identifying and matting non-key elements in the image; and compressing the image without the non-key elements to obtain a compressed image, and recording the non-key elements. By removing the non-key elements in the image, compressing the image without the key elements and recording the non-key elements, the volume of the compressed image can be greatly reduced, the storage capacity can be saved and the transmission rate can be increased.
A second embodiment of the invention relates to a method of image decompression. The method of image decompression in the present embodiment can be implemented in combination with the method of image compression in the first embodiment.
As shown in fig. 2, the method for decompressing an image in the present embodiment specifically includes:
step 301: and acquiring a compressed image and non-key elements.
Specifically, the non-important elements mentioned in this embodiment are the same as those in the first embodiment, and are not described again in this embodiment. The compressed image includes an image of non-key elements, and the compressed device and the decompressed device do not belong to the same device, so the compressed image generally needs to be sent to the decompressed device. Specifically, in this embodiment, the second implementation is specifically described, and the format information of the non-key element at least includes one or more of the following: the image frame, size, position, moving direction, facing angle, motion picture, cyclic parameter and label are not described in detail in this embodiment.
Step 302: decompressing the compressed image to obtain an image with non-key elements.
Step 303: and integrating the image of the non-key elements and the non-key elements to obtain complete image information.
With respect to the above steps 301 and 302, specifically, since the compressed image includes the image with the non-key elements, the compressed image is decompressed to obtain the image with the non-key elements. The image of the non-key elements is a discontinuous image frame or a continuous image frame. In the present embodiment, a Generation Adaptive Network (GAN) trained in advance is used to generate non-essential elements in the image from which the non-essential elements are extracted according to the format information of the non-essential elements.
In the present embodiment, the description is made by taking the image of the non-key element as a continuous image frame, and specifically includes: merging continuous image frames of non-key elements to obtain a cutout video stream; playing the buckling picture video stream; and generating non-key elements frame by frame in continuous image frames of the deduction video stream in real time according to the format information by utilizing a pre-trained generation type countermeasure network.
Specifically, when the image of the non-key element is a continuous image frame, firstly, the continuous image frame is subjected to video synthesis processing to obtain a cutout video stream, and the merging procedure is as follows: ffmpeg-threads 2-y-r 25-i tmp/%% d.jpg-vocodec libx264 video name. mp4, wherein, the threads are operated, r25 indicates that fps (frame number of transmission of pictures per second) is set to be 25 frames/second, the value needs to be consistent with the original video frame rate, the threads are operated, the codes are H.264, and the threads are operated to be controlled to be V.O.N.M.M.M.M.M.4. It should be noted that, for images separately stored in a plurality of folders, in the process of composition, the images in each folder may be video-composited first, and then the matting video stream is composited according to the tags of the representation sequence of the folders or the time sequence of the composited video.
Secondly, the matting video stream is aligned with the non-key elements, that is, the video playing time points are aligned with the script time points of the non-key elements. For example: the start frame and the end frame of the non-key elements are 1110 and 1200, and the corresponding time period is (taking 25 frames/second as an example): 1110/25, 1200/25 ═ 00:00:44:40 ', 00:00:48: 00'. And then playing the scratch video stream, and generating corresponding non-emphasis elements frame by frame in real time by using a pre-trained generation type countermeasure network at a specified position (which can be determined according to the attribute information) in the image according to the attribute information of the non-emphasis elements (such as 1110, 1200|200, 455, 250, 500|123, 123, 444, 365|14|1|4|1110|1200| cloud, white, cartoon and 1 piece), so as to obtain complete video stream information. Because the key elements in the image are not processed but directly compressed, the key elements in the decompressed video stream or picture are still clear, and the influence on the viewing experience of the user is low. It should be noted that the training process of the generative countermeasure network is the prior art, and the training process is not described in detail in this embodiment.
Further, for some compressed images containing audio data, the audio is played normally after the decompressed images are decompressed. Before merging consecutive image frames of non-key elements to obtain a cutout video stream in the embodiment, the method further includes: acquiring audio data; merging continuous image frames of non-key elements to obtain a cutout video stream, which specifically comprises the following steps: merging the continuous image frames of the non-key elements to obtain a continuous video stream; combining the audio data with the continuous video stream results in a thumbnail video stream.
Specifically, for some compressed images containing audio data, the continuous video stream, for example, named video name1.mp4, is obtained by combining the continuous image frames of non-key elements, and the obtained continuous video stream, video name1.mp4, is synthesized with audio by the following procedure: ffmpeg-i video Name1.mp4-i 1.m4 a-vocodeccopy-acodec copy output. mp4, where-i 1.m4a represents an audio file and output. mp4 represents a matte video stream after merging audio. For the synthesized new video, an identification ID, and a play URL (Uniform resource locator) are required. Usually, the decompressed video and the video before compression are stored in the same directory, and the storage path or name follows a certain specification. For example: the video ID before compression is 123456.mp4, and the video after decompression is ID123456_1.mp4, so that the view is convenient for the user.
Compared with the prior art, the embodiment of the invention provides an image decompression method, which comprises the following steps: acquiring a compressed image and non-key elements; decompressing the compressed image to obtain an image of non-key elements; and integrating the image of the non-key elements and the non-key elements to obtain complete image information. Because the key elements in the image are not processed but directly compressed, the key elements in the decompressed video stream or picture are still clear, and the influence on the viewing experience of the user is low.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A third embodiment of the present invention relates to an apparatus for image compression, as shown in fig. 3, comprising at least one processor 301; and a memory 302 communicatively coupled to the at least one processor 301; the memory 302 stores instructions executable by the at least one processor 301, and the instructions are executed by the at least one processor 301, so that the at least one processor 301 can execute the method of image compression according to the first embodiment.
Where the memory 302 and the processor 301 are coupled in a bus, the bus may comprise any number of interconnected buses and bridges, the buses coupling one or more of the various circuits of the processor 301 and the memory 302. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 301 is transmitted over a wireless medium through an antenna, which further receives the data and transmits the data to the processor 301.
The processor 301 is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory 302 may be used to store data used by processor 301 in performing operations.
A fourth embodiment of the present invention relates to an apparatus for image decompression, as shown in fig. 4, comprising at least one processor 401; and a memory 402 communicatively coupled to the at least one processor 401; wherein the memory 402 stores instructions executable by the at least one processor 401, the instructions being executable by the at least one processor 401 to enable the at least one processor 401 to perform the method of image decompression in the second embodiment.
Where the memory 402 and the processor 401 are coupled by a bus, which may include any number of interconnected buses and bridges that couple one or more of the various circuits of the processor 401 and the memory 402 together. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 401 may be transmitted over a wireless medium via an antenna, which may receive the data and transmit the data to the processor 401.
The processor 401 is responsible for managing the bus and general processing, and may provide various functions including timing, peripheral interfaces, and bus transactions,
Voltage regulation, power management, and other control functions. And memory 402 may be used to store data used by processor 401 in performing operations.
A fifth embodiment of the present invention relates to an electronic apparatus, as shown in fig. 5, including: comprises at least one processor 501; and a memory 502 communicatively coupled to the at least one processor 501; wherein the memory 502 stores instructions executable by the at least one processor 501, the instructions being executable by the at least one processor 501 to enable the at least one processor 501 to perform the method of image compression in the first embodiment and/or the method of image decompression in the second embodiment.
The memory 502 and the processor 501 are coupled by a bus, which may include any number of interconnected buses and bridges that couple one or more of the various circuits of the processor 501 and the memory 502 together. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 501 is transmitted over a wireless medium through an antenna, which further receives the data and transmits the data to the processor 501.
The processor 501 is responsible for managing the bus and general processing, and may also provide various functions including timing, peripheral interfaces, and bus transactions,
Voltage regulation, power management, and other control functions. And memory 502 may be used to store data used by processor 401 in performing operations.
A sixth embodiment of the present invention relates to a system for compressing and decompressing an image, as shown in fig. 6, including: the image compression apparatus 1 according to the third embodiment and the image decompression apparatus 2 according to the fourth embodiment may be connected to each other by wire or wirelessly.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described method of image compression or method of image decompression.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (13)

1. A method of image compression, comprising:
acquiring an image to be compressed;
identifying and matting non-key elements in the image;
and compressing the image subjected to the removal of the non-key elements to obtain a compressed image, and recording the non-key elements.
2. The method according to claim 1, wherein the recording the non-emphasized elements specifically comprises:
recording format information of the non-emphasis elements, wherein the format information at least comprises one or more of the following types: image frame, size, position, direction of movement, facing angle, motion map, cycle parameter, and label.
3. The method according to claim 2, wherein the obtaining the image to be compressed specifically comprises: acquiring a video stream to be compressed; splitting the video stream to obtain the image to be compressed;
the located image frame of the image comprises: starting a frame and ending the frame;
the size of the image includes: starting frame target width, starting frame target height, ending frame target width, and ending frame target height;
the position of the image includes: the coordinate of the center point x of the starting frame, the coordinate of the center point y of the starting frame, the coordinate of the center point x of the ending frame and the coordinate of the center point y of the ending frame;
the cycle parameters of the image include: target circulation playing times, circulation starting frame and circulation ending frame;
the label of the image includes: name, color, style, quantity.
4. The method according to claim 1, wherein the obtaining of the image to be compressed specifically comprises:
acquiring a video stream to be compressed;
splitting the video stream to obtain the image to be compressed and audio data;
after the image after the non-key element is removed by compression is obtained as a compressed image, the method further comprises the following steps: storing the audio data.
5. A method of image decompression, comprising:
acquiring a compressed image and non-key elements;
decompressing the compressed image to obtain an image with non-key elements;
and integrating the image of the non-key elements and the non-key elements to obtain complete image information.
6. The method of image decompression according to claim 5, wherein the non-emphasized elements comprise: format information of the non-key elements; the format information at least comprises one or more of the following: the image frame, the size, the position, the moving direction, the facing angle, the motion picture, the circulation parameter and the label;
the integrating of the image of the non-key element and the non-key element to obtain complete image information specifically comprises:
and generating the non-key elements in the images of the non-key elements according to the format information by using a pre-trained generation type confrontation network.
7. The method of image decompression according to claim 5, wherein the image of the non-emphasized element is a continuous image frame;
the generating the non-key elements in the image of the key elements according to the format information by using the pre-trained generating type confrontation network specifically comprises:
merging the continuous image frames of the non-key elements to obtain a cutout video stream;
playing the deduction video stream;
and generating the non-key elements frame by frame in the continuous image frames of the deduction video stream in real time according to the format information by utilizing a pre-trained generative confrontation network.
8. The method of image decompression according to claim 7, wherein before merging the consecutive image frames of the matte non-key elements to obtain a matte video stream, further comprising: acquiring audio data;
the merging the continuous image frames of the non-key elements to obtain the cutout video stream specifically includes:
merging the continuous image frames of the non-key elements to obtain a continuous video stream;
and combining the audio data and the continuous video stream to obtain the buckling image video stream.
9. An apparatus for image compression, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of image compression as claimed in any one of claims 1 to 4.
10. An apparatus for image decompression, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of image decompression as claimed in any one of claims 5 to 8.
11. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of image compression as claimed in any one of claims 1 to 4 and/or a method of image decompression as claimed in any one of claims 5 to 8.
12. A system for image compression and decompression, comprising: an apparatus for image compression as claimed in claim 9 and an apparatus for image decompression as claimed in claim 10.
13. A computer-readable storage medium, characterized in that a computer program is stored which, when being executed by a processor, carries out the method of image compression according to one of claims 1 to 4 or the method of image decompression according to one of claims 5 to 8.
CN201910772133.3A 2019-08-21 2019-08-21 Image compression method, image decompression method, image compression device, image decompression device, electronic equipment and image decompression system Pending CN110677670A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910772133.3A CN110677670A (en) 2019-08-21 2019-08-21 Image compression method, image decompression method, image compression device, image decompression device, electronic equipment and image decompression system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910772133.3A CN110677670A (en) 2019-08-21 2019-08-21 Image compression method, image decompression method, image compression device, image decompression device, electronic equipment and image decompression system

Publications (1)

Publication Number Publication Date
CN110677670A true CN110677670A (en) 2020-01-10

Family

ID=69075440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910772133.3A Pending CN110677670A (en) 2019-08-21 2019-08-21 Image compression method, image decompression method, image compression device, image decompression device, electronic equipment and image decompression system

Country Status (1)

Country Link
CN (1) CN110677670A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060228029A1 (en) * 2005-03-29 2006-10-12 Microsoft Corporation Method and system for video clip compression
CN101316366A (en) * 2008-07-21 2008-12-03 北京中星微电子有限公司 Method and arrangement for encoding and decoding images
CN101882316A (en) * 2010-06-07 2010-11-10 深圳市融创天下科技发展有限公司 Method, device and system for regional division/coding of image
CN106210612A (en) * 2015-04-30 2016-12-07 杭州海康威视数字技术股份有限公司 Method for video coding, coding/decoding method and device thereof
CN109309833A (en) * 2017-07-28 2019-02-05 黑芝麻国际控股有限公司 The ultralow bit rate coding method for the subgraph rebuild and extracted based on three-dimensional map

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060228029A1 (en) * 2005-03-29 2006-10-12 Microsoft Corporation Method and system for video clip compression
CN101316366A (en) * 2008-07-21 2008-12-03 北京中星微电子有限公司 Method and arrangement for encoding and decoding images
CN101882316A (en) * 2010-06-07 2010-11-10 深圳市融创天下科技发展有限公司 Method, device and system for regional division/coding of image
CN106210612A (en) * 2015-04-30 2016-12-07 杭州海康威视数字技术股份有限公司 Method for video coding, coding/decoding method and device thereof
CN109309833A (en) * 2017-07-28 2019-02-05 黑芝麻国际控股有限公司 The ultralow bit rate coding method for the subgraph rebuild and extracted based on three-dimensional map

Similar Documents

Publication Publication Date Title
KR102082816B1 (en) Method for improving the resolution of streaming files
CN107222795B (en) Multi-feature fusion video abstract generation method
US20020051081A1 (en) Special reproduction control information describing method, special reproduction control information creating apparatus and method therefor, and video reproduction apparatus and method therefor
CN110602554A (en) Cover image determining method, device and equipment
CN109195007B (en) Video generation method, device, server and computer readable storage medium
JP2002238027A (en) Video and audio information processing
JP4881210B2 (en) Imaging apparatus, image processing apparatus, and control method thereof
CN100433821C (en) Image processing apparatus
CN113596473B (en) Video compression method and device
CN104243886B (en) A kind of high speed image parsing and video generation method based on plug-in part technology
WO2021051912A1 (en) Media data transmission method and related device
CN115314713A (en) Method, system and device for extracting target segment in real time based on accelerated video
JPWO2014065033A1 (en) Similar image search device
KR102130076B1 (en) Method for improving the resolution of streaming files based on the learning importance of feature areas
JP6843409B1 (en) Learning method, content playback device, and content playback system
JP6368149B2 (en) Image transmission system, image processing apparatus, image storage apparatus, and control method thereof
CN110677670A (en) Image compression method, image decompression method, image compression device, image decompression device, electronic equipment and image decompression system
CN102047662B (en) Encoder
CN104219537B (en) The method, apparatus and system of video data processing
CN106791909B (en) Video data processing method and device and server
CN111034187A (en) Dynamic image generation method and device, movable platform and storage medium
US7403655B2 (en) Moving picture system and moving picture extraction method
JP2002204458A (en) Image matching method, and image processor and image processing method that can utilize the method
US20190215573A1 (en) Method and device for acquiring and playing video data
KR20220021495A (en) Method for improving the resolution of streaming files based on AI

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200110