CN114339226A - Method, device and medium for improving fluency of picture - Google Patents

Method, device and medium for improving fluency of picture Download PDF

Info

Publication number
CN114339226A
CN114339226A CN202111629863.1A CN202111629863A CN114339226A CN 114339226 A CN114339226 A CN 114339226A CN 202111629863 A CN202111629863 A CN 202111629863A CN 114339226 A CN114339226 A CN 114339226A
Authority
CN
China
Prior art keywords
image data
source image
data
compressed
decompressed
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.)
Granted
Application number
CN202111629863.1A
Other languages
Chinese (zh)
Other versions
CN114339226B (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.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center 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 Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202111629863.1A priority Critical patent/CN114339226B/en
Publication of CN114339226A publication Critical patent/CN114339226A/en
Application granted granted Critical
Publication of CN114339226B publication Critical patent/CN114339226B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method, a device and a medium for improving the fluency of pictures, which are applied to the field of chip design and used for carrying out image compression on source image data to obtain compressed image data; judging whether the source image data is data obtained after decompression; if not, counting the write data volume of the compressed image data corresponding to the source image data which is not decompressed; judging whether the write data quantity is larger than a threshold value; and if the write data quantity is larger than the threshold value, decompressing the compressed image data with the write data quantity larger than the threshold value to obtain decompressed image data. By detecting the write data volume of compressed image data obtained by compressing original source image data, when the write data volume is larger than a threshold value, the compressed data is overlarge, the image data needs to be compressed again after decompression so as to obtain smaller compressed data volume and larger compression ratio, the phenomenon of picture blocking under the condition that the network bandwidth of a KVM system is limited is avoided, and the smoothness of pictures is improved.

Description

Method, device and medium for improving fluency of picture
Technical Field
The present invention relates to the field of chip design, and in particular, to a method, an apparatus, and a medium for improving fluency of a picture.
Background
With the rapid development of science and technology, digital images become the main carriers of knowledge and information, and the data volume of digital images is huge along with the annual increase of the resolution of image pickup equipment and display equipment. It is necessary to compress the digital image during storage and transmission and reproduction.
In a server remote management application, digital image data is transmitted to a remote terminal for display over a network in addition to being displayed locally. Due to the limited network bandwidth, digital image data needs to be compressed locally before it can be transmitted to a remote terminal via ethernet. In a Joint Photographic Experts Group (JPEG) image compression system, the JPEG compression principle is to entropy encode a source image in block units, so the data rule and data amount of the source image affect the data amount of a compressed image. After a high-resolution source image or a source image with a sudden change of an adjacent area picture is compressed by a JPEG system, the data volume of the compressed image is still overlarge. When the network bandwidth of a Keyboard Video Mouse (KVM) system is limited, a picture pause phenomenon occurs, thereby reducing the smoothness of the picture.
Therefore, it is an urgent need to solve the problem of improving the smoothness of the screen.
Disclosure of Invention
The invention aims to provide a method, a device and a medium for improving the fluency of pictures, which avoid the picture pause phenomenon and improve the fluency of the pictures.
To solve the above technical problem, the present invention provides a method for improving fluency of a picture, comprising:
capturing source image data of a current frame in a source image memory;
carrying out image compression on source image data to obtain compressed image data;
judging whether the source image data is data obtained after decompression;
if the source image data is not the data obtained after decompression, counting the data writing quantity of the compressed image data corresponding to the source image data which is not decompressed;
judging whether the write data quantity is larger than a threshold value;
if the write data volume is larger than the threshold value, decompressing the compressed image data with the write data volume larger than the threshold value to obtain decompressed image data;
and storing the decompressed image data into a source image memory.
Preferably, the image compression of the source image data to obtain compressed image data includes:
and (3) obtaining compressed image data by the source image data through a DCT (discrete cosine transform) transformation compression algorithm.
Preferably, decompressing the compressed image data with the write data amount larger than the threshold to obtain decompressed image data, including:
and obtaining the decompressed image data by the compressed image data with the writing data quantity larger than the threshold through an inverse DCT (discrete cosine transform) decompression algorithm.
Preferably, the method further comprises the following steps:
and if the source image data is the data obtained after decompression, the step of capturing the source image data of the current frame in the source image memory is carried out.
Preferably, the method further comprises the following steps:
and if the data writing amount is equal to or less than the threshold value, capturing source image data of the current frame in the source image memory.
Preferably, the method further comprises the following steps:
after the capturing of the source image data of the current frame is finished, judging whether the capturing of the source image data of the current frame in the source image memory is started within preset time;
if not, outputting prompt information.
Preferably, the method further comprises the following steps:
and when the capturing of the source image data of the current frame is finished, outputting prompt information.
In order to solve the above technical problem, the present invention further provides a device for improving fluency of a picture, including:
the capturing module is used for capturing source image data of a current frame in a source image memory;
the compression module is used for carrying out image compression on the source image data to obtain compressed image data;
the first judgment module is used for judging whether the source image data is the data obtained after decompression, and if the source image data is not the data obtained after decompression, the statistical module is triggered;
the statistical module is used for counting the write data volume of the compressed image data corresponding to the source image data which is not decompressed;
the second judgment module is used for judging whether the data writing quantity is larger than a threshold value or not, and if the data writing quantity is larger than the threshold value, the decompression module is triggered;
the decompression module is used for decompressing the compressed image data with the write data volume larger than the threshold value to obtain decompressed image data;
and the storage module is used for storing the decompressed image data into the source image memory.
In order to solve the above technical problem, the present invention further provides a device for improving fluency of a picture, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for improving the fluency of the picture when executing the computer program.
In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method for improving the smoothness of the picture.
The method for improving the fluency of the picture, provided by the invention, captures the source image data of the current frame in the memory of the source image; carrying out image compression on source image data to obtain compressed image data; judging whether the source image data is data obtained after decompression; if the source image data is not the data obtained after decompression, counting the data writing quantity of the compressed image data corresponding to the source image data which is not decompressed; judging whether the write data quantity is larger than a threshold value; if the write data volume is larger than the threshold value, decompressing the compressed image data with the write data volume larger than the threshold value to obtain decompressed image data; and storing the decompressed image data into a source image memory. According to the method, the data writing quantity of compressed image data obtained by compressing original source image data is detected, when the data writing quantity is larger than a threshold value, the compressed data is overlarge, the image data needs to be compressed again after being decompressed to obtain smaller compressed data quantity and larger compression ratio, the phenomenon of picture blocking under the condition that the network bandwidth of a KVM system is limited is avoided, and the smoothness of pictures is improved.
In addition, the invention also provides a device and a medium for improving the fluency of the picture, and has the same beneficial effects as the method for improving the fluency of the picture.
Drawings
In order to illustrate the embodiments of the present invention more clearly, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a method for improving fluency of a picture according to an embodiment of the present invention;
fig. 2 is a structural diagram of an apparatus for improving smoothness of a picture according to an embodiment of the present invention;
fig. 3 is a block diagram of another apparatus for improving smoothness of a screen according to an embodiment of the present invention;
fig. 4 is a flowchart of another method for improving smoothness of a frame according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative work belong to the protection scope of the present invention.
The core of the invention is to provide a method, a device and a medium for improving the fluency of pictures, which avoid the picture pause phenomenon and improve the fluency of the pictures.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
It should be noted that the method for improving the fluency of the screen provided by the present invention is applicable to a KVM system, wherein a KVM switch can access and control a computer by directly connecting a keyboard, video and mouse (KVM) port. KVM technology does not require the target server to modify the software. This means that the target computer can be accessed at any time in the Basic Input Output System (BIOS) environment. The KVM provides true motherboard level access and supports multi-platform servers and serial devices. For the image blocking phenomenon in the KVM system, based on the RGB format data, the computer displays a color image, and when the image is finally displayed, the computer needs to control the values of Red, Green, and Blue of one pixel to determine the color of the pixel, the computer cannot simulate the continuous storage from the darkest value to the brightest value, but can only represent the values in a digital manner, and the RGB is based on three basic colors and is overlapped to different degrees.
Fig. 1 is a flowchart of a method for improving fluency of a picture according to an embodiment of the present invention, as shown in fig. 1, the method includes:
s11: capturing source image data of a current frame in a source image memory.
It can be understood that, the source image data of multiple frames stored in the source image memory set in the memory includes original source image data and decompressed source image data, the original source image data is data that has not been decompressed, and the source image data of the current frame is captured, which only includes one kind of data, the original source image data or the decompressed source image data.
The method includes that original source image data are obtained through a Video Graphics Array (VGA) Interface, the VGA is a Video transmission standard of analog signals, the data form of the VGA is an RGB format, and source image data of a current frame are obtained in a source image memory through an Advanced eXtensible Interface (AXI) bus.
The decompressed source image data is obtained by compressing compressed data in an image memory, decompressing the compressed data and storing the decompressed compressed data in the source image memory, specifically, the refresh frequency for obtaining the source image data is different according to the source image data caused by the different frequencies of a display, and the refresh frequency is set according to actual conditions without specific requirements.
S12: and carrying out image compression on the source image data to obtain compressed image data.
Specifically, no matter the captured current frame is original source image data or decompressed source image data, image compression is required to obtain compressed image data. The obtained compressed image data is in a JPEG format, JPEG is an independent mode used for lossless compression in a JPEG standard, Differential Pulse Code Modulation (DPCM) prediction coding based on spatial domain non-quantization is used for carrying out Huffman coding on prediction errors, an image in the JPEG format is completely the same as an original image after being reconstructed, high-frequency information is mainly compressed in the JPEG format, color information is well reserved, the transmission time of the image can be reduced, lossy compression can be provided, and the compression ratio can reach the degree which cannot be compared with other traditional compression algorithms. The compression mode comprises sequential coding, incremental coding, distortion-free coding and step coding, and the compression process comprises blocking, compression algorithm transformation, quantization and entropy coding. And preprocessing the source image data by taking block as a unit.
It should be noted that, since JPEG only supports the YUV color mode, when RGB format data is compressed, it needs to be converted into YUV format, data sampling is also needed after conversion is completed, and then image data signals are converted in the frequency domain by compression algorithm conversion, a processing process of separating high-frequency and low-frequency information is performed, and a frequency coefficient matrix is obtained after conversion. Specifically, what compression algorithm is adopted is not specifically required, and the compression algorithm is set according to actual conditions. The transformed frequency coefficients are quantized and then encoded, using two mechanisms (run-length encoding and entropy encoding of 0 values), which is actually a statistical-based encoding method. The use of entropy coding by the present invention is only a preferred embodiment and is not specifically required. The obtained compressed image data is stored in the memory of the compressed image for transmission or calling.
S13: and judging whether the source image data is decompressed data or not, and if not, entering the step S14.
In step S11, the source image data of the current frame is captured, and the source image data may be original source image data or decompressed source image data, where it is necessary to determine what kind of captured source image data is. It should be noted that the original source image data is stored in the first frame in the source image memory, and the decompressed source image data is obtained by analyzing and processing the previously captured original source image data. Therefore, it is determined whether or not the source image data is decompressed to determine which data.
Specifically, the source image data is in RGB format, the RGB format data has formats of 888, 565, 555, 24, etc., 888 format, i.e. the lower 24 bits of 32-bit data are RGB data, the upper 8 bits of data are 0, 565 format, i.e. the lower 16 bits are RGB format, and 555 format, i.e. the lower 15 bits are RGB format. Thus, by looking at the source image data format, it is known what type of data the current frame captures. If the source image data of the current frame is not the decompressed data, it is the original source image data, and the process proceeds to step S14.
It can be understood that the highest flag bit setting of the original source image data is different from that of the decompressed source image data, and other flag bits in the original source image data may be set differently, as long as it is possible to distinguish which source image data, and no specific requirement is made.
S14: and counting the writing data quantity of the compressed image data corresponding to the source image data which is not decompressed.
In step S13, if the source image data of the current frame is the original source image data, the data writing amount of the compressed image data obtained by image compression from the original source image is counted. It should be noted that, the original source image data and the decompressed source image data are both source image data in the present invention. Therefore, in this embodiment, in order to distinguish the compressed image data corresponding to the original source image data, the write data amount of the compressed image corresponding to the source image data that is not decompressed is counted.
Specifically, the write data volume is obtained through a write address channel and a write data channel of the AXI bus, the AXI bus has a one-way channel architecture relative to other bus protocols, information flow is transmitted in a single direction, independent address and data channels are arranged, each channel can be optimized independently, delay is reduced to the minimum, and only the write data volume of compressed image data is counted.
S15: it is determined whether the write data amount is greater than the threshold, and if so, the process proceeds to step S16.
And counting the data writing quantity of the compressed image data corresponding to the source image data, and judging whether the data writing quantity is greater than a threshold value. The threshold is an empirical value constant of a user, and the threshold required to be set is different due to different lengths of data of the image when the source image data of the current frame is acquired, and needs to be set according to actual conditions.
In the above embodiment, the present invention determines whether the source image data is decompressed to obtain data, and if not, further determines whether the write data size of the compressed image data obtained by compressing the source image data meets the requirement, and if the write data size is greater than the threshold, it indicates that the compressed data is too large and further needs to be processed.
S16: and decompressing the compressed image data with the write data amount larger than the threshold value to obtain decompressed image data.
And when the write data volume is larger than the threshold value, further decompressing the compressed image data with the write data volume larger than the threshold value and then compressing the image again. It can be understood that there are two types of compressed image data obtained in step S12, one is compressed image data obtained by compressing original source image data, and the other is compressed image data obtained by compressing decompressed source image data again, in this embodiment, if the write data amount is greater than the threshold, then the compressed image data corresponding to the write data amount greater than the threshold needs to be decompressed to obtain decompressed image data.
It should be noted that the decompression process is a reverse process of the compression process, and mainly includes decoding, street quantization, decompression transformation algorithm and reconstructed image, and the decompression algorithm is not specifically limited in the present invention, and may be reverse transformation of the compression algorithm, or may select a specific decompression algorithm according to a specific decompression algorithm and an actual situation.
S17: and storing the decompressed image data into a source image memory.
Storing the obtained decompressed image data into the source image memory and returning to step S11, as the decompressed source image data, in order to distinguish from the original source image, the highest flag bit of the decompressed image data is set to 1, and the capture completion flag facilitates capturing the source image data in the source image memory, that is, capturing the next frame.
The method for improving the fluency of the picture, provided by the invention, captures the source image data of the current frame in the memory of the source image; carrying out image compression on source image data to obtain compressed image data; judging whether the source image data is data obtained after decompression; if the source image data is not the data obtained after decompression, capturing the write data volume of the compressed image data corresponding to the source image data which is not decompressed; judging whether the write data quantity is larger than a threshold value; if the write data volume is larger than the threshold value, decompressing the compressed image data with the write data volume larger than the threshold value to obtain decompressed image data; and storing the decompressed image data into a source image memory. According to the method, the data writing quantity of compressed image data obtained by compressing original source image data is detected, when the data writing quantity is larger than a threshold value, the compressed data is overlarge, the image data needs to be compressed again after being decompressed to obtain smaller compressed data quantity and larger compression ratio, the phenomenon of picture blocking under the condition that the network bandwidth of a KVM system is limited is avoided, and the smoothness of pictures is improved.
On the basis of the above embodiment, the image compressing the source image data in step S12 to obtain compressed image data includes:
and (3) obtaining compressed image data by the source image data through a DCT (discrete cosine transform) transformation compression algorithm.
It should be noted that the compression process includes blocking, compression algorithm transformation, quantization, and entropy coding, and this embodiment only relates to the transformation of the compression algorithm, and selects Discrete Cosine Transform (DCT) Transform compression algorithm to Transform the source image data into a coefficient set representing different frequency components in a block form, and transforms spatial domain signals into frequency domains, which has good decorrelation performance, and the DCT Transform itself is lossless, thereby creating good conditions for quantization and huffman coding of image coding. Compared with other compression algorithms, DCT transform concentrates most of signal energy in a small range of a frequency domain, only needs less bit number in the non-important component, applies DCT to image data compression, can reduce the digital information representing the image brightness (or chroma) level, and achieves the purpose of data compression. The DCT can be used to code the image, and the position of the image detail can be found in the coding transformation process, so as to eliminate or omit the part which is not sensitive to vision, but highlight the sensitive part of vision, and the image is transmitted and valued by selecting the main data.
The coding mode of the DCT transform compression algorithm is a sequential mode, a progressive mode, a lossless mode and a hierarchical mode, the invention does not make specific requirements on the specific coding mode, and only needs to obtain compressed image data through the DCT transform compression algorithm.
The source image data provided by the embodiment is subjected to a DCT transform compression algorithm to obtain compressed image data. The spatial redundancy of the image is eliminated, the layered compression and the hierarchical compression of the image sequence are conveniently realized, the decorrelation is good, the rapid compression of a compression algorithm is improved, and the statistical analysis of the image is convenient.
On the basis of the above embodiment, the decompressing the compressed image data of which the write data amount is larger than the threshold value in step S16 to obtain decompressed image data includes:
and obtaining the decompressed image data by the compressed image data with the writing data quantity larger than the threshold through an inverse DCT (discrete cosine transform) decompression algorithm.
It can be understood that the decompression algorithm of the compressed image data is the inverse transformation of the compression algorithm, the DCT transformation is the symmetric transformation algorithm, the original image information is restored at the receiving end of the image according to the reversibility of the DCT transformation, the JPEG encoding process needs to perform the normal phase DCT, and the decoding process needs the inverse DCT. The inverse DCT transform in the decompression process is only a preferred embodiment based on the DCT transform in the encoding process, and other decompression algorithms are also applicable without specific requirements. The decompression process is the reverse process of the compression process, and mainly includes decoding, street quantization, decompression transformation algorithm and reconstructed image.
The compressed image data with the data writing quantity larger than the threshold value provided by the embodiment is decompressed by the inverse DCT transform decompression algorithm. The method is convenient and symmetrical to the compression process, and improves the processing capacity of the decompression algorithm.
After determining whether the source image data is decompressed in step S13 in the above embodiment, the method further includes:
and if the source image data is the data obtained after decompression, the step of capturing the source image data of the current frame in the source image memory is carried out.
It can be understood that when the source image data is the data obtained by decompressing, decompression is not required, and the data writing amount of the compressed image data obtained by compressing the data obtained by decompressing is not required to be counted, and the decompressed source image data is decompressed only once. In order to maintain the lowest definition of the picture, the source image data is compressed and decompressed once without being decompressed again, the capture completion flag is set to 1, and the step of capturing the source image data of the current frame in the source image memory in the step S11 is returned to capture the source image data of the next frame.
If the source image data is decompressed, the step of capturing the source image data of the current frame in the source image memory is performed. Only once decompression is carried out, and the minimum definition of the picture is ensured.
On the basis of the above embodiment, after the step of determining whether the write data amount is larger than the threshold in step S15, the method further includes:
and if the data writing amount is equal to or less than the threshold value, capturing source image data of the current frame in the source image memory.
It can be understood that when the write data amount is equal to or less than the threshold, it indicates that the compressed image data obtained after the current source image data compression meets the requirement of the empirical value constant (threshold), and it is not necessary to decompress again to obtain a smaller compressed data amount and a larger compression ratio. In the normal range of the empirical value constant, the image does not have a pause phenomenon, and the current capture completion flag is set to 1, and the next frame of source image data needs to be captured, that is, the step of capturing the source image data of the current frame in the source image memory in step S11 is performed.
Specifically, the write data volume of the compressed image data is acquired, the acquisition function can be closed if the network bandwidth of the KVM system is sufficient, the occupied ratio of the network bandwidth of the KVM system needs to be compared with preset parameters, the name and information of the network card are seen by calling other functions, the current network bandwidth is checked, and the occupied ratio of the current network bandwidth is obtained through a conversion algorithm with the network speed. If the data transmission bandwidth is larger than the preset parameter, the bandwidth is insufficient, the data writing quantity of the compressed image data needs to be obtained, then the data writing quantity is compared with a threshold value, the source image data is further compressed, a smaller compressed data quantity is obtained, the data transmission bandwidth pressure is reduced, the data transmission delay is reduced, and the image blocking is avoided.
If the write data amount is equal to or less than the threshold value, the step of capturing the source image data of the current frame in the source image memory is performed. The threshold requirement is met, decompression does not need to be carried out again to obtain smaller compressed data volume and larger compression ratio, and the maximum clear transmission of the changed surfaces is ensured.
In order to avoid the delay of the time for acquiring the source image and the interference of other data transmission processes, a preset time needs to be set, and after the capturing of the source image data of the current frame is completed, the method specifically includes the following steps:
judging whether the step of capturing the source image data of the current frame in the source image memory is performed within preset time;
if not, outputting prompt information.
After the capturing of the source image data of the current frame is completed, before returning to step S11, it is determined whether to return to step S11 within a preset time, where the preset time may be set according to a specific capturing time interval between the current frame and the next frame, and the time of the compression process and the decompression process is considered, and certainly, the preset time is not set too long, so as to avoid a delay of data transmission from affecting the progress of obtaining the source image data of the next frame.
If the step S11 is not returned within the preset time, a prompt message is output to remind the user to check the current data transmission state, and the phenomenon of source image data blockage in the follow-up process is avoided. Aiming at the source image data of the next frame acquired within the preset time, the bus is prevented from being occupied by other data, priority information of the source image data and the like can be set, no specific requirement is made, and only the source image data of the current frame can be captured within the preset time. The prompt information may be information that a data transmission of a display page or a dialog box is wrong, and the like, and is not particularly limited.
After the capturing of the source image data of the current frame is completed, whether the capturing of the source image data of the current frame in the source image memory is performed within a preset time is judged; if not, outputting prompt information. The time delay of obtaining the source image and the interference of other data transmission processes are avoided, the smoothness of data transmission is ensured, and the picture is prevented from being blocked.
On the basis of the above embodiment, after the capturing of the source image data of the current frame is completed, the method further includes:
and outputting prompt information.
It should be noted that the output prompt information provided in this embodiment is different from the above-mentioned embodiment that the step S11 is not performed within the preset time, that is, the source image data of the next frame is captured, and the prompt information is used to remind the user that the transmission of the current data is finished, so that the user can conveniently transmit the picture data of the current frame to the remote terminal in time to complete the transmission. Specifically, the form of the cue information may be the same as or different from the above cue information, and the content of the cue information is convenient for obtaining the source image data of the next frame. And is not particularly limited.
After the capturing of the source image data of the current frame is completed, the prompt information is output. And reminding the user of completing compression of the data of the current frame in time so as to transmit the data to a remote terminal through a network for display.
On the basis that the embodiments corresponding to the method for improving the fluency of the picture are described in detail, the invention further discloses a device corresponding to the method for improving the fluency of the picture, and fig. 2 is a structural diagram of the device for improving the fluency of the picture provided by the embodiment of the invention. As shown in fig. 2, the apparatus for improving the smoothness of a screen includes:
the capturing module 11 is configured to capture source image data of a current frame in a source image memory;
the compression module 12 is configured to perform image compression on source image data to obtain compressed image data;
the first judging module 13 is configured to judge whether the source image data is decompressed data, and if the source image data is not decompressed data, trigger the statistical module 14;
the statistic module 14 is configured to count a write data amount of compressed image data corresponding to the uncompressed source image data;
the second judging module 15 is configured to judge whether the data writing amount is greater than a threshold, and if the data writing amount is greater than the threshold, trigger the decompressing module 16;
a decompression module 16, configured to decompress the compressed image data with a write data amount greater than a threshold value to obtain decompressed image data;
and the storage module 17 is used for storing the decompressed image data into the source image memory.
Since the embodiment of the apparatus portion corresponds to the above-mentioned embodiment, the embodiment of the apparatus portion is described with reference to the above-mentioned embodiment of the apparatus portion, and is not described again here.
The device for improving the fluency of the picture captures the source image data of the current frame in the memory of the source image; carrying out image compression on source image data to obtain compressed image data; judging whether the source image data is data obtained after decompression; if the source image data is not the data obtained after decompression, counting the data writing quantity of the compressed image data corresponding to the source image data which is not decompressed; judging whether the write data quantity is larger than a threshold value; if the write data volume is larger than the threshold value, decompressing the compressed image data with the write data volume larger than the threshold value to obtain decompressed image data; and storing the decompressed image data into a source image memory. The device detects the data writing quantity of compressed image data obtained by compressing original source image data, when the data writing quantity is larger than a threshold value, the compressed data is overlarge, the image data needs to be compressed again after decompression so as to obtain smaller compressed data quantity and larger compression ratio, the image blocking phenomenon which occurs under the condition that the network bandwidth of a KVM system is limited is avoided, and the smoothness of the image is improved.
Referring to fig. 3, a block diagram of another apparatus for improving smoothness of a screen according to an embodiment of the present invention is shown in fig. 3, where the apparatus includes:
a memory 21 for storing a computer program;
a processor 22 for implementing the steps of the method for improving the fluency of the picture when executing the computer program.
The device for improving the fluency of the picture provided by the embodiment can include, but is not limited to, a smart phone, a tablet computer, a notebook computer, or a desktop computer.
The processor 22 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The Processor 22 may be implemented in hardware using at least one of a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), and a Programmable Logic Array (PLA). The processor 22 may also include a main processor and a coprocessor, the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 22 may be integrated with a Graphics Processing Unit (GPU) that is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, processor 22 may also include an Artificial Intelligence (AI) processor for processing computational operations related to machine learning.
Memory 21 may include one or more computer-readable storage media, which may be non-transitory. Memory 21 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 21 is at least used for storing a computer program 201, wherein after being loaded and executed by the processor 22, the computer program can implement the relevant steps of the method for improving the fluency of the picture disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 21 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, Windows, Unix, Linux, and the like. Data 203 may include, but is not limited to, data involved in methods that improve the fluency of a picture, and the like.
In some embodiments, the device for improving the smoothness of the image may further include a display 23, an input/output interface 24, a communication interface 25, a power supply 26, and a communication bus 27.
As will be understood by those skilled in the art, fig. 3 is a block diagram of another apparatus for improving smoothness of a picture according to an embodiment of the present invention. The configuration shown in fig. 3 does not constitute a limitation of the means for improving the fluency of the picture, and may include more or fewer components than those shown.
The processor 22 calls the instructions stored in the memory 21 to implement the method for improving the smoothness of the picture provided by any of the above embodiments.
The device for improving the fluency of the picture captures the source image data of the current frame in the memory of the source image; carrying out image compression on source image data to obtain compressed image data; judging whether the source image data is data obtained after decompression; if the source image data is not the data obtained after decompression, counting the data writing quantity of the compressed image data corresponding to the source image data which is not decompressed; judging whether the write data quantity is larger than a threshold value; if the write data volume is larger than the threshold value, decompressing the compressed image data with the write data volume larger than the threshold value to obtain decompressed image data; and storing the decompressed image data into a source image memory. The device detects the data writing quantity of compressed image data obtained by compressing original source image data, when the data writing quantity is larger than a threshold value, the compressed data is overlarge, the image data needs to be compressed again after decompression so as to obtain smaller compressed data quantity and larger compression ratio, the image blocking phenomenon which occurs under the condition that the network bandwidth of a KVM system is limited is avoided, and the smoothness of the image is improved.
Further, the present invention also provides a computer readable storage medium, on which a computer program is stored, and the computer program, when executed by the processor 22, implements the steps of the method for improving the fluency of the picture as described above.
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and performs all or part of the steps of the methods according to the embodiments of the present invention, or all or part of the technical solution. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of a computer-readable storage medium provided by the present invention, please refer to the above method embodiment, which is not described herein again, and has the same beneficial effects as the above method for improving the fluency of the image.
In order to make those skilled in the art better understand the technical solution of the present invention, the method, apparatus and medium for improving the smoothness of the picture provided by the embodiments of the present invention are described in further detail below with reference to the accompanying drawings.
Fig. 4 is a flowchart of another method for improving fluency of a picture according to an embodiment of the present invention, as shown in fig. 4, the flowchart includes:
s21: capturing source image data from a source image memory;
s22: carrying out image compression on source image data to obtain compressed image data;
s23: storing the compressed image data into a compressed image memory;
s24: judging whether the highest flag bit of the source image data is 1, if not, entering the step S25, and if so, entering the step S30;
s25: judging whether the data writing amount of the compressed image data is larger than a threshold value, if so, entering a step S26, otherwise, entering a step S30;
s26: capturing compressed image data and capturing the number of frames unchanged;
s27: decompressing the compressed image data to obtain decompressed image data;
s28: setting the high-order indication position of the decompressed image data to 1;
s29: storing the decompressed image data with the indication bit into a source image memory;
s30: the current frame captures the completion flag, captures the next frame source image data and returns to step S21.
It should be noted that this embodiment provides only a preferred embodiment, and if the highest flag of the source image data is 1, the source image data is decompressed, and if the highest flag of the source image data is 0, the source image data is the original source image data.
The foregoing describes a flowchart of another method for improving fluency of a picture according to an embodiment of the present invention, which has the same beneficial effects as the aforementioned method for improving fluency of a picture.
The method, the device and the medium for improving the fluency of the picture provided by the invention are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
It is further noted that, in the present specification, 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method for improving fluency of a picture, comprising:
capturing source image data of a current frame in a source image memory;
carrying out image compression on the source image data to obtain compressed image data;
judging whether the source image data is data obtained after decompression;
if the source image data is not the data obtained after decompression, counting the data writing amount of the compressed image data corresponding to the source image data which is not decompressed;
judging whether the write data quantity is larger than a threshold value;
if the write data volume is larger than the threshold, decompressing the compressed image data with the write data volume larger than the threshold to obtain decompressed image data;
and storing the decompressed image data into the source image memory.
2. The method of claim 1, wherein the image compressing the source image data to obtain compressed image data comprises:
and obtaining the compressed image data by the source image data through a DCT (discrete cosine transform) transformation compression algorithm.
3. The method of claim 2, wherein the decompressing the compressed image data with the data writing amount greater than the threshold to obtain decompressed image data comprises:
and obtaining the decompressed image data by the compressed image data with the write data quantity larger than the threshold through an inverse DCT (discrete cosine transform) decompression algorithm.
4. The method of claim 1, further comprising:
and if the source image data is the data obtained after decompression, the step of capturing the source image data of the current frame in the source image memory is carried out.
5. The method of claim 1, further comprising:
and if the write data volume is equal to or smaller than the threshold value, the step of capturing the source image data of the current frame in the source image memory is carried out.
6. The method of claim 1, further comprising:
after the capturing of the source image data of the current frame is finished, judging whether the source image data of the current frame in the captured source image memory enters the captured source image memory within a preset time;
if not, outputting prompt information.
7. The method for improving fluency of pictures according to claim 4 or 5, further comprising:
and when the capturing of the source image data of the current frame is finished, outputting prompt information.
8. An apparatus for improving fluency of a picture, comprising:
the capturing module is used for capturing source image data of a current frame in a source image memory;
the compression module is used for carrying out image compression on the source image data to obtain compressed image data;
the first judgment module is used for judging whether the source image data is data obtained after decompression, and if the source image data is not the data obtained after decompression, the first judgment module triggers the statistical module;
the statistic module is used for counting the write data volume of the compressed image data corresponding to the source image data which is not decompressed;
the second judging module is used for judging whether the write data volume is larger than a threshold value or not, and if the write data volume is larger than the threshold value, the decompressing module is triggered;
the decompression module is configured to decompress the compressed image data with the write data amount larger than the threshold to obtain decompressed image data;
and the storage module is used for storing the decompressed image data into the source image memory.
9. An apparatus for improving fluency of a picture, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method for improving fluency of a picture according to any of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, having a computer program stored thereon, which, when being executed by a processor, implements the steps of the method for improving fluency of a picture according to any of claims 1 to 7.
CN202111629863.1A 2021-12-28 2021-12-28 Method, device and medium for improving smoothness of picture Active CN114339226B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111629863.1A CN114339226B (en) 2021-12-28 2021-12-28 Method, device and medium for improving smoothness of picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111629863.1A CN114339226B (en) 2021-12-28 2021-12-28 Method, device and medium for improving smoothness of picture

Publications (2)

Publication Number Publication Date
CN114339226A true CN114339226A (en) 2022-04-12
CN114339226B CN114339226B (en) 2024-02-09

Family

ID=81014821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111629863.1A Active CN114339226B (en) 2021-12-28 2021-12-28 Method, device and medium for improving smoothness of picture

Country Status (1)

Country Link
CN (1) CN114339226B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030164975A1 (en) * 2002-02-21 2003-09-04 Canon Kabushiki Kaisha Image processing apparatus and image processing method
US20040141655A1 (en) * 2003-01-15 2004-07-22 Canon Kabushiki Kaisha Method and apparatus for image processing
US20040146206A1 (en) * 2003-01-14 2004-07-29 Akio Matsubara Image processing apparatus, program, recording medium, and data decompression method
US20070110155A1 (en) * 2005-11-15 2007-05-17 Sung Chih-Ta S Method and apparatus of high efficiency image and video compression and display
CN102547086A (en) * 2010-11-25 2012-07-04 卡西欧计算机株式会社 Image capturing apparatus, image capturing control method, and storage medium storing program for image capturing
CN102647590A (en) * 2012-04-17 2012-08-22 华为终端有限公司 Image compression method and device
CN103108179A (en) * 2011-11-15 2013-05-15 上海宝康电子控制工程有限公司 Self-adaptive compression method achieving matching of joint photographic experts group (JPEG) image size upper limits of intelligent transportation system
JP2013211608A (en) * 2012-03-30 2013-10-10 Hitachi Consumer Electronics Co Ltd Video receiver
US20130329069A1 (en) * 2011-02-18 2013-12-12 JVC Kenwood Corporation Image processing apparatus, image processing method, and program product
CN104025561A (en) * 2012-11-23 2014-09-03 华为技术有限公司 Image compression method and image processing apparatus
US20150256843A1 (en) * 2014-03-07 2015-09-10 Steven Roskowski Adaptive Security Camera Image Compression Apparatus and Method of Operation
US20150287217A1 (en) * 2012-11-19 2015-10-08 Tencent Technology (Shenzhen) Company Limited Method and apparatus for lossless image compression
CN113079379A (en) * 2021-03-26 2021-07-06 山东英信计算机技术有限公司 Video compression method, device, equipment and computer readable storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030164975A1 (en) * 2002-02-21 2003-09-04 Canon Kabushiki Kaisha Image processing apparatus and image processing method
US20040146206A1 (en) * 2003-01-14 2004-07-29 Akio Matsubara Image processing apparatus, program, recording medium, and data decompression method
US20040141655A1 (en) * 2003-01-15 2004-07-22 Canon Kabushiki Kaisha Method and apparatus for image processing
US20070110155A1 (en) * 2005-11-15 2007-05-17 Sung Chih-Ta S Method and apparatus of high efficiency image and video compression and display
CN102547086A (en) * 2010-11-25 2012-07-04 卡西欧计算机株式会社 Image capturing apparatus, image capturing control method, and storage medium storing program for image capturing
US20130329069A1 (en) * 2011-02-18 2013-12-12 JVC Kenwood Corporation Image processing apparatus, image processing method, and program product
CN103108179A (en) * 2011-11-15 2013-05-15 上海宝康电子控制工程有限公司 Self-adaptive compression method achieving matching of joint photographic experts group (JPEG) image size upper limits of intelligent transportation system
JP2013211608A (en) * 2012-03-30 2013-10-10 Hitachi Consumer Electronics Co Ltd Video receiver
CN102647590A (en) * 2012-04-17 2012-08-22 华为终端有限公司 Image compression method and device
US20150287217A1 (en) * 2012-11-19 2015-10-08 Tencent Technology (Shenzhen) Company Limited Method and apparatus for lossless image compression
CN104025561A (en) * 2012-11-23 2014-09-03 华为技术有限公司 Image compression method and image processing apparatus
US20150256843A1 (en) * 2014-03-07 2015-09-10 Steven Roskowski Adaptive Security Camera Image Compression Apparatus and Method of Operation
CN113079379A (en) * 2021-03-26 2021-07-06 山东英信计算机技术有限公司 Video compression method, device, equipment and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李津平;芮小平;杨崇俊;: "一种基于改进EZW算法的图像压缩方法", 计算机应用研究, no. 08 *

Also Published As

Publication number Publication date
CN114339226B (en) 2024-02-09

Similar Documents

Publication Publication Date Title
RU2710873C2 (en) Method and device for colour image decoding
WO2022252488A1 (en) Image compression method and apparatus, electronic device, and readable storage medium
CN111918065A (en) Information compression/decompression method and device
US10021398B2 (en) Adaptive tile data size coding for video and image compression
US20080085058A1 (en) Color image coding using inter-color correlation
KR101277712B1 (en) Method and apparatus for image processing
US9060171B2 (en) Image processing system and method
CN114125448B (en) Video coding method, decoding method and related devices
WO2024078066A1 (en) Video decoding method and apparatus, video encoding method and apparatus, storage medium, and device
CN110545446B (en) Desktop image encoding and decoding methods, related devices and storage medium
CN116567246A (en) AVC coding method and device
CN114339226B (en) Method, device and medium for improving smoothness of picture
KR20160082521A (en) Chroma down-conversion and up-conversion processing
CN114463453A (en) Image reconstruction method, image coding method, image decoding method, image coding device, image decoding device, and image decoding device
CN108933945B (en) GIF picture compression method, device and storage medium
JP2005522957A (en) Coding / decoding method and coding / decoding apparatus
CN111491166A (en) Dynamic compression system and method based on content analysis
CN108370442B (en) Method and device for processing high dynamic range image and computer readable storage medium
US20230262210A1 (en) Visual lossless image/video fixed-rate compression
US20070192393A1 (en) Method and system for hardware and software shareable DCT/IDCT control interface
WO2023185806A9 (en) Image coding method and apparatus, image decoding method and apparatus, and electronic device and storage medium
RU2782583C1 (en) Block-based image merging for context segmentation and processing
WO2022120829A1 (en) Image encoding and decoding methods and apparatuses, and image processing apparatus and mobile platform
US8340195B2 (en) Buffer size reduction for wireless analog TV receivers
Olena et al. Method of adaptive multi-scale transformation for image data compression

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