An image compression method, device, equipment and storage medium

By employing a precise image capture mode to acquire and compress target image data when DDR bandwidth and network bandwidth are limited, the problem of excessive DDR bandwidth requirements is solved, achieving more efficient image data transmission and display.

CN115643408BActive Publication Date: 2026-02-03SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211102419.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-09
Publication Date
2026-02-03
Estimated Expiration
2042-09-09

AI Technical Summary

Technical Problem

In existing technologies, the storage and retrieval rates of image data decrease in scenarios with limited DDR bandwidth, affecting the transmission and display of image data and resulting in excessive demand for DDR bandwidth.

Method used

When DDR bandwidth and network transmission bandwidth are limited, a precise image capture mode is adopted to determine the image capture rate and capture pixel address, acquire target image data, and perform image compression in a preset format to reduce the amount of data that needs to be compressed.

Benefits of technology

It reduces the demand for DDR bandwidth, improves the efficiency of the compression engine, reduces network transmission bandwidth requirements, and enhances the processing speed and display effect of image data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115643408B_ABST
    Figure CN115643408B_ABST
Patent Text Reader

Abstract

The application discloses an image compression method, device and equipment, and a storage medium, and relates to the technical field of image transmission.The method comprises the following steps: if the current preset random memory bandwidth is smaller than a preset bandwidth threshold or the current network transmission bandwidth is smaller than a preset transmission bandwidth threshold, then the image capture rate and the capture pixel address of the to-be-captured image pixel are determined based on the original image data stored in the preset random memory; the original image data is subjected to image capture processing based on the image capture rate and the capture pixel address, so that target image data is obtained; and the target image data is subjected to image compression in a preset image format.It can be seen that the image data is subjected to image capture processing under the condition that both the bandwidths are limited before image compression, image compression is realized, the demand for the memory bandwidth is reduced, the amount of image data that needs to be compressed is reduced, the efficiency of the compression engine is improved, and the network transmission bandwidth requirement is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image transmission technology, and in particular to an image compression method, apparatus, device, and storage medium. Background Technology

[0002] In server applications, a Baseboard Manager Controller (BMC) is needed to monitor and control system hardware. The BMC is an independent system, independent of other hardware such as the CPU and memory, as well as the BIOS (Basic Input Output System) and OS (Operating System). It monitors system temperature, voltage, fans, power supply, etc., and makes corresponding adjustments to ensure the system is in a healthy state. In case of system abnormalities, it restarts the system through a reset. In management and control, a KVM (Keyboard Video Mouse) system uses a single keyboard, mouse, and monitor to switch between multiple hosts or servers with different operating systems and implement access and control management. The transmission and display of the host's screen image data is achieved through a VGA (Video Graphics Array) display module. In existing technologies, to achieve remote client image display, the VGA module stores the image data in DDR (Double Data Rate) storage. A JPEG compression engine captures the image data in the DDR, performs image compression based on the JPEG standard, and then stores the compressed data back in the DDR. The EMAC module reads the compressed image data from the DDR and transmits it remotely via Ethernet for display. This results in a very high bandwidth requirement for the DDR. In scenarios with limited DDR bandwidth, the image data storage and retrieval rates decrease, affecting image data transmission and display.

[0003] In summary, how to achieve image compression during image transmission, reduce the bandwidth requirements of DDR, decrease the amount of image data to be compressed, improve the efficiency of the compression engine, and reduce network transmission bandwidth requirements are technical problems that need to be solved in this field. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide an image compression method, apparatus, device, and storage medium that can achieve image compression during image transmission, reduce the bandwidth requirements of DDR, reduce the amount of image data to be compressed, improve the efficiency of the compression engine, and reduce network transmission bandwidth requirements. The specific solution is as follows:

[0005] In a first aspect, this application discloses an image compression method, comprising:

[0006] If the current preset random access memory bandwidth is less than the preset bandwidth threshold or the current network transmission bandwidth is less than the preset transmission bandwidth threshold, then the image capture rate and the capture pixel address of the image pixel to be captured are determined based on the original image data stored in the preset random access memory.

[0007] Based on the image capture rate and the captured pixel address, the original image data is processed to obtain the target image data;

[0008] The target image data is compressed using a preset image format.

[0009] Optionally, before determining the image capture rate and the capture pixel address of the image pixel to be captured based on the original image data stored in the preset random access memory, the method further includes:

[0010] Collect raw image data transmitted through a preset video interface and store the raw image data in a preset random access memory.

[0011] Optionally, after collecting the raw image data transmitted through a preset video interface and storing the raw image data in a preset random access memory, the method further includes:

[0012] If the current preset random access memory bandwidth is greater than the preset bandwidth threshold and the current network transmission bandwidth is greater than the preset transmission bandwidth threshold, then the first address of the original image data stored in the preset random access memory is output.

[0013] The step of performing image capture processing on the original image data based on the image capture rate and the captured pixel address to obtain target image data includes:

[0014] Obtain the original image data within a continuous address at a preset displacement starting from the original address, and use it as the target image data.

[0015] Optionally, determining the image capture rate and the capture pixel address of the image pixel to be captured based on the original image data stored in the preset random access memory includes:

[0016] The starting address of the original image data is determined based on the original image data stored in the preset random access memory, and the image capture rate is determined according to the configuration information corresponding to the capture mode.

[0017] The address of the captured pixel is determined based on the starting address and the image capture rate.

[0018] Optionally, the step of performing image capture processing on the original image data based on the image capture rate and the captured pixel address to obtain target image data includes:

[0019] The location information of the image pixels to be captured is determined based on the captured pixel address, and the target image data is captured based on a preset on-chip bus protocol.

[0020] Optionally, before performing image compression on the target image data in a preset image format, the method further includes:

[0021] Determine whether to perform a restoration operation on the target image data;

[0022] If the current network transmission bandwidth is greater than the preset transmission bandwidth threshold, then the data restoration operation will be initiated.

[0023] Image data of uncaptured image pixels is obtained based on the four-directional adjacency method, and the target image data is restored to obtain the restored target image data.

[0024] Optionally, the image compression of the target image data in a preset image format includes:

[0025] The restored target image data is compressed using standard JPEG image compression, and the compressed target image data is stored in a preset random access memory.

[0026] Secondly, this application discloses an image compression apparatus, comprising:

[0027] The information acquisition module is used to determine the image capture rate and the capture pixel address of the image pixel to be captured based on the original image data stored in the preset random access memory if the current preset random access memory bandwidth is less than the preset bandwidth threshold or the current network transmission bandwidth is less than the preset transmission bandwidth threshold.

[0028] The image capture module is used to perform image capture processing on the original image data based on the image capture rate and the captured pixel address to obtain target image data;

[0029] The image compression module is used to compress the target image data in a preset image format.

[0030] Thirdly, this application discloses an electronic device, including:

[0031] Memory, used to store computer programs;

[0032] A processor is configured to execute the computer program to implement the steps of the aforementioned disclosed image compression method.

[0033] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed image compression method.

[0034] Therefore, this application discloses an image compression method, comprising: if the current preset random access memory bandwidth is less than a preset bandwidth threshold or the current network transmission bandwidth is less than a preset transmission bandwidth threshold, then determining an image capture rate and the capture pixel address of the image pixel to be captured based on the original image data stored in the preset random access memory; performing image capture processing on the original image data based on the image capture rate and the capture pixel address to obtain target image data; and performing image compression on the target image data in a preset image format. It is evident that by performing image capture processing on the image data before image compression when both bandwidths are limited, and by determining the image capture rate and the capture pixel address of the image pixel to be captured based on the actual situation during the image capture processing, determining the specific image pixels to be captured, and generating the final target image data to be captured, the amount of original image data that needs to be compressed is reduced, only the target image data is compressed, compression efficiency is improved, the requirement for network transmission bandwidth is reduced, the image data processing rate is increased, and the transmission and display of image data are further improved. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0036] Figure 1 This is a flowchart of an image compression method disclosed in this application;

[0037] Figure 2 This is a block diagram of a remotely managed video image transmission system disclosed in this application;

[0038] Figure 3 This is an image pixel capture diagram disclosed in this application when the simplified capture mode is 1 / 2;

[0039] Figure 4 This application discloses an image pixel capture map when the simplified capture mode is 1 / 3.

[0040] Figure 5 This application discloses an image pixel capture map when the simplified capture mode is 1 / 4.

[0041] Figure 6 This is a flowchart of a specific image compression method disclosed in this application;

[0042] Figure 7 This is a schematic diagram of the structure of an image compression device disclosed in this application;

[0043] Figure 8 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0045] In server applications, a Base Monitoring and Control System (BMC) is needed to monitor and control system hardware. The BMC is an independent system, independent of other hardware such as the CPU and memory, as well as BIOS and OS. It monitors system temperature, voltage, fans, power supply, etc., and makes corresponding adjustments to ensure the system is in a healthy state. In case of system abnormalities, it restarts the system through a reset. In management and control, KVM systems use a single keyboard, mouse, and monitor to switch between multiple hosts or servers with different operating systems and implement access and control management. The transmission and display of image data on the host is achieved through a VGA display module. In existing technology, to achieve remote client image display, the VGA module stores the image data in DDR storage. A JPEG compression engine captures the image data in DDR, performs image compression based on the JPEG standard, and then stores the compressed data back in DDR. The EMAC module reads the compressed image data from DDR and transmits it remotely via Ethernet for remote display. This results in a very high demand for DDR bandwidth. In scenarios with limited DDR bandwidth, the storage and retrieval rates of image data decrease, affecting image data transmission and display.

[0046] Therefore, this application discloses an image compression scheme that can compress images during image transmission, reduce the bandwidth requirements of DDR, reduce the amount of image data to be compressed, improve the efficiency of the compression engine, and reduce network transmission bandwidth requirements.

[0047] Reference Figure 1 As shown, an embodiment of the present invention discloses an image compression method, including:

[0048] Step S11: If the current preset random access memory bandwidth is less than the preset bandwidth threshold or the current network transmission bandwidth is less than the preset transmission bandwidth threshold, then the image capture rate and the capture pixel address of the image pixel to be captured are determined based on the original image data stored in the preset random access memory.

[0049] In this embodiment, the BMC chip acts as a server to implement KVM functionality in a remote server application scenario. The VGA module and JPEG compression engine in the KVM system share a single data storage unit (DDR). The VGA module stores and retrieves raw image data for both local and remote display from the DDR. The JPEG compression engine module reads image data from the DDR for remote display, compresses the image, and then stores the compressed data back into the DDR. The EMAC module reads the already compressed image data from the DDR. Therefore, the bandwidth requirements for both the DDR and network transmission are very high. Thus, when the current DDR bandwidth is less than a preset bandwidth threshold and the network transmission bandwidth is less than a preset transmission bandwidth threshold, the precise image capture mode is activated. The pre-configured settings in the precise image capture mode are selected to determine the image capture rate and the capture pixel address of the image pixel to be captured from the raw image data.

[0050] In this embodiment, before determining the image capture rate and the capture pixel address of the image pixel to be captured based on the raw image data stored in the preset random access memory, the method further includes: collecting the raw image data transmitted through a preset video interface and storing the raw image data in the preset random access memory. It can be understood that the VGA module stores the host's video image data without cursor information in the DDR memory. The DDR memory is used to receive raw image data and compressed image data. Furthermore, the DDR memory is also used to transmit image data, allowing the EMAC to read the corresponding image data from the DDR memory for remote network transmission.

[0051] In this embodiment, after collecting the raw image data transmitted through a preset video interface and storing the raw image data in a preset random access memory, the method further includes: if the current preset random access memory bandwidth is greater than a preset bandwidth threshold and the current network transmission bandwidth is greater than a preset transmission bandwidth threshold, then outputting the starting address of the raw image data stored in the preset random access memory; wherein, the method of performing image capture processing on the raw image data based on the image capture rate and the captured pixel address to obtain target image data includes: obtaining the raw image data within a continuous address at a preset displacement starting from the original address as the target image data. It is understandable that after the DDR memory collects and stores the raw image data, if the current DDR bandwidth and network transmission bandwidth are both ample, that is, the bandwidth is greater than the preset threshold, it proves that the bandwidth occupied by the data transmission task is very small. At this time, all the raw image data can be directly used as the target image data. The specific process is as follows: first, determine the starting address in the DDR memory used to store the raw image data. Then, according to the storage rules of the DDR memory, the image data stored in the consecutive addresses after the starting address is all raw image data. Therefore, capture the image data stored in the consecutive addresses starting from the starting address and use this image data as the target image data.

[0052] In this embodiment, refer to Figure 2 As shown in the figure, the KVM system block diagram for remote video image transmission is illustrated. Specifically, a simplified capture module, an address calculation module, and an image restoration module are added to the existing KVM system. When capturing source image data, the system performs simplified capture according to the configured functions. In scenarios with limited DDR bandwidth and network bandwidth, the simplified capture rate can reduce image data by 1 / 2, 1 / 3, or 1 / 4. In scenarios with limited DDR bandwidth and sufficient network bandwidth, the restoration module can restore the simplified image data to obtain the original high-resolution image data. In scenarios with both sufficient DDR bandwidth and network bandwidth, the source image data can be captured without simplification, i.e., all image data can be captured, avoiding image distortion.

[0053] In this embodiment, the starting address of the original image data is determined based on the original image data stored in the preset random access memory, and the image capture rate is determined according to the configuration information corresponding to the capture mode; the capture pixel address is determined based on the starting address and the image capture rate. It can be understood that the image capture rate is determined based on the control signals included in the pre-configured configuration information in the precise image capture mode. The configuration information, i.e., the main control signals, specifically includes: whether simplified capture is required, the simplified capture rate, whether image restoration is required, the starting address of the image data in the DDR, the resolution information of the image data, and the clock and reset signals required for module operation, etc. The image capture rate and the starting address of the image data are determined through the control signals, and the pixel address of the image to be captured is determined based on the image capture rate, the starting address of the image data, and the original image information. For example, according to the simplified capture mode control signal output by the control module, the correct address for capturing the image data in the DDR memory is calculated and output. When the image data is 32bpp, each pixel data is 32 bits. In scenarios where a simplified capture mode is not required, the capture address is the starting address of the image data stored in the default DDR, capturing image data within consecutive addresses. In simplified mode 1 / 2, the address interval for captured pixels is 8 bytes, with capture pixel address offsets of 'h00, 'h08, 'h10...'. In simplified mode 1 / 3, the capture pixel address offsets are 'h00, 'h04, 'h0c, 'h10...'. In simplified mode 1 / 4, the capture pixel address offsets are 'h00, 'h04, 'h08, 'h10, 'h14...'. To maintain the overall visual experience of the image to the greatest extent possible, ensuring that the nearest neighbors of lost pixels are captured pixels, address calculations are performed on a per-line basis. The first pixel of each line serves as the starting point for address calculations until one line of pixels is captured; the second line is recalculated. For example, in simplified mode 1 / 4, after the first line of pixels is captured, the first and second pixels of the second line are discarded, and three consecutive pixels are captured starting from the third pixel.

[0054] Step S12: Perform image capture processing on the original image data based on the image capture rate and the captured pixel address to obtain target image data.

[0055] In this embodiment, the position information of the image pixels to be captured is determined based on the captured pixel address, and the target image data is captured based on a preset on-chip bus protocol. It can be understood that the capture module captures image data from the raw image data in the DDR memory based on the AXI protocol. (Refer to...) Figure 3As shown, in the simplified capture mode of 1 / 2, data capture is performed on the source image data in a one-pixel-one-pixel-discarding manner. In an 8*8 pixel image, filled circles represent pixels that need to be captured, and unfilled circles represent pixels that need to be discarded. (Refer to...) Figure 4 As shown, in the simplified mode of 1 / 3, data capture is performed by capturing two pixels and discarding one. In an 8*8 pixel image, filled circles represent pixels that need to be captured, while unfilled circles represent discarded pixels. (Refer to...) Figure 5 As shown, in the simplified mode of 1 / 4, data capture is performed by capturing three pixels and discarding one. In a 16*16 pixel image, filled circles represent pixels that need to be captured, while unfilled circles represent discarded pixels. Simplified capture reduces the amount of captured image data. For example, at a resolution of 1920*1080, the data size of one frame is approximately 66Mb (1920*1080*32 bits). In simplified mode of 1 / 2, this decreases to 33Mb; in simplified mode of 1 / 3, it decreases to 22Mb; and in simplified mode of 1 / 4, it decreases to 22Mb. This significantly reduces the overall image data size in multi-frame video applications.

[0056] Step S13: Compress the target image data using a preset image format.

[0057] In this embodiment, after the target image data is captured, the target image data is compressed in JPEG format. Under the condition of limited network transmission bandwidth, compared with compressing the original image data, the amount of image data to be compressed is reduced, the efficiency of the compression engine is improved, and the requirements for network transmission bandwidth are reduced.

[0058] Therefore, this application discloses an image compression method, comprising: if the current preset random access memory bandwidth is less than a preset bandwidth threshold or the current network transmission bandwidth is less than a preset transmission bandwidth threshold, then determining an image capture rate and the capture pixel address of the image pixel to be captured based on the original image data stored in the preset random access memory; performing image capture processing on the original image data based on the image capture rate and the capture pixel address to obtain target image data; and performing image compression on the target image data in a preset image format. It is evident that by performing image capture processing on the image data before image compression when both bandwidths are limited, and by determining the image capture rate and the capture pixel address of the image pixel to be captured based on the actual situation during the image capture processing, determining the specific image pixels to be captured, and generating the final target image data to be captured, the amount of original image data that needs to be compressed is reduced, only the target image data is compressed, compression efficiency is improved, the requirement for network transmission bandwidth is reduced, the image data processing rate is increased, and the transmission and display of image data are further improved.

[0059] Reference Figure 6 As shown, this embodiment of the invention discloses a specific image compression method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically:

[0060] Step S21: If the current preset random access memory bandwidth is less than the preset bandwidth threshold or the current network transmission bandwidth is less than the preset transmission bandwidth threshold, then the image capture rate and the capture pixel address of the image pixel to be captured are determined based on the original image data stored in the preset random access memory.

[0061] Step S22: Perform image capture processing on the original image data based on the image capture rate and the captured pixel address to obtain target image data.

[0062] For more detailed processing procedures in steps S21 and S22, please refer to the aforementioned disclosed embodiments; they will not be repeated here.

[0063] Step S23: Determine whether to perform a restoration operation on the target image data; if the current network transmission bandwidth is greater than a preset transmission bandwidth threshold, then start the data restoration operation; obtain image data of uncaptured image pixels based on the four-way adjacency method, and restore the target image data to obtain the restored target image data.

[0064] In this embodiment, after acquiring the target image data, since the acquisition operation was performed under the given DDR bandwidth and network transmission bandwidth conditions, the bandwidth conditions at that time may not be consistent with the current bandwidth conditions. Therefore, it is necessary to compare the current network transmission bandwidth with the preset transmission bandwidth. If the current network transmission bandwidth is relatively good, the image data in the simplified capture mode is restored through the restoration module to output high-resolution image data. Because the four nearest neighbors of the discarded pixels in the simplified mode are captured, and considering the smoothness of the video image, the image is simplified to a maximum reduction of 1 / 2, while still maintaining the continuity of the pixels. Therefore, the image restoration can be performed by restoring the RGB values ​​of the discarded pixels using the four nearest neighbors method, with equal weights for the four nearest neighbors, thus obtaining the image data of the discarded pixels.

[0065] Step S24: Perform standard JPEG image compression on the restored target image data, and store the compressed target image data in a preset random access memory.

[0066] In this embodiment, the JPEG compression engine performs standard JPEG compression on the captured image data, stores the compressed image data in DDR memory, and the EMAC network module reads the image data from the DDR memory and transmits it remotely via Ethernet for remote display. Simultaneously, the VGA module converts the image data to a DVI signal according to the VSEA standard, and the DVI signal image data is displayed locally on the screen. The VGA module outputs video image data and stores it in DDR; this image data is displayed to the host server without cursor information. In the image compression scheme after restoring the target image data, it first determines whether the capture mode is a simplified capture mode. If the capture mode is not a simplified capture mode, the address module outputs the starting address of the image data stored in DDR, and then performs continuous address image data processing starting from the starting address. If the capture mode is a simplified capture mode, the control module provides a simplified capture rate according to the simplified capture mode configuration, and the address module calculates and outputs the address of the captured pixel. The capture module captures image data from DDR based on the AXI protocol according to the address output by the address calculation module. It then determines whether the captured image data needs to be restored. If not, the captured image data enters the compression module for image compression. If the image data is to be restored, the RGB values ​​of the discarded pixels are restored using the nearest neighbor method in four directions. The restored image data then enters the compression module for image compression.

[0067] Therefore, by optimizing the method of capturing image data in DDR before the JPEG compression engine module, the bandwidth requirements of DDR can be reduced, the remote display speed of KVM images can be improved, image stuttering can be prevented, and the smoothness of the KVM system can be improved. At the same time, in scenarios where both DDR bandwidth and network bandwidth are sufficient, the source image data can be captured without simplification. The simplification image data can be restored through the restoration module to obtain the original high-resolution image data, that is, all image data can be captured, avoiding image distortion.

[0068] Reference Figure 7 As shown, an embodiment of the present invention also discloses an image compression device, comprising:

[0069] The information acquisition module 11 is used to determine the image capture rate and the capture pixel address of the image pixel to be captured based on the original image data stored in the preset random access memory if the current preset random access memory bandwidth is less than the preset bandwidth threshold or the current network transmission bandwidth is less than the preset transmission bandwidth threshold.

[0070] Image capture module 12 is used to perform image capture processing on the original image data based on the image capture rate and the captured pixel address to obtain target image data;

[0071] Image compression module 13 is used to compress the target image data in a preset image format.

[0072] The information acquisition module 11 is specifically used in remote server application scenarios where the BMC chip acts as a server to implement KVM functionality. In the KVM system, the VGA module and JPEG compression engine share a data storage DDR. The VGA module stores and reads raw image data for local and remote display from the DDR. The JPEG compression engine module reads image data for remote display from the DDR, compresses the image, and then stores the compressed data back into the DDR. The EMAC module reads the already compressed image data from the DDR. Therefore, the bandwidth requirements for the DDR and network transmission bandwidth are very high. Thus, when the current DDR bandwidth is detected to be less than a preset bandwidth threshold and the network transmission bandwidth is also less than a preset transmission bandwidth threshold, a precise image capture mode is activated. The pre-configured settings in the precise image capture mode are selected to determine the image capture rate and the capture pixel address of the image pixel to be captured from the raw image data. Before determining the image capture rate and the capture pixel address of the image pixel to be captured based on the raw image data stored in the preset random access memory, the system further includes: collecting raw image data transmitted through a preset video interface and storing the raw image data in the preset random access memory. Understandably, the VGA module stores the host's video image data without cursor information into the DDR memory. The DDR memory is used to receive raw image data as well as compressed image data. Furthermore, the DDR memory is also used to transmit image data, which is read from the DDR memory by the EMAC for remote transmission over the network.

[0073] Therefore, this application discloses an image compression method, comprising: if the current preset random access memory bandwidth is less than a preset bandwidth threshold or the current network transmission bandwidth is less than a preset transmission bandwidth threshold, then determining an image capture rate and the capture pixel address of the image pixel to be captured based on the original image data stored in the preset random access memory; performing image capture processing on the original image data based on the image capture rate and the capture pixel address to obtain target image data; and performing image compression on the target image data in a preset image format. It is evident that by performing image capture processing on the image data before image compression when both bandwidths are limited, and by determining the image capture rate and the capture pixel address of the image pixel to be captured based on the actual situation during the image capture processing, determining the specific image pixels to be captured, and generating the final target image data to be captured, the amount of original image data that needs to be compressed is reduced, only the target image data is compressed, compression efficiency is improved, the requirement for network transmission bandwidth is reduced, the image data processing rate is increased, and the transmission and display of image data are further improved.

[0074] In some specific embodiments, the image compression device may specifically include:

[0075] The data collection unit is used to collect raw image data transmitted through a preset video interface and store the raw image data in a preset random access memory.

[0076] In some specific embodiments, the image compression device may specifically include:

[0077] The first address determination unit is used to output the first address of the original image data stored in the preset random access memory if the current preset random access memory bandwidth is greater than a preset bandwidth threshold and the current network transmission bandwidth is greater than a preset transmission bandwidth threshold.

[0078] The step of performing image capture processing on the original image data based on the image capture rate and the captured pixel address to obtain target image data includes:

[0079] Obtain the original image data within a continuous address at a preset displacement starting from the original address, and use it as the target image data.

[0080] In some specific embodiments, the information acquisition module 11 may specifically include:

[0081] The address determination unit is used to determine the starting address of the original image data based on the original image data stored in the preset random access memory, and to determine the image capture rate according to the configuration information corresponding to the capture mode; and to determine the capture pixel address based on the starting address and the image capture rate.

[0082] In some specific embodiments, the image capture module 12 may specifically include:

[0083] The location information of the image pixels to be captured is determined based on the captured pixel address, and the target image data is captured based on a preset on-chip bus protocol.

[0084] In some specific embodiments, the image compression device may specifically include:

[0085] The data restoration unit is used to determine whether to perform a restoration operation on the target image data; if the current network transmission bandwidth is greater than a preset transmission bandwidth threshold, the data restoration operation is initiated; image data of uncaptured image pixels is obtained based on the four-way adjacency method, and the target image data is restored to obtain the restored target image data.

[0086] In some specific embodiments, the image compression module 13 may specifically include:

[0087] The image compression unit is used to perform standard JPEG image compression on the restored target image data and store the compressed target image data in a preset random access memory.

[0088] Furthermore, embodiments of this application also disclose an electronic device, Figure 8 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0089] Figure 8 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the image compression method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0090] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0091] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0092] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0093] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the electronic device 20 to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system 221 can be Windows Server, Netware, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the image compression method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.

[0094] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned image compression method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0095] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0096] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can implement the described functions using different methods for each specific application, but such implementation should not be considered beyond the scope of this application. The steps of the methods or algorithms described in connection with the embodiments disclosed herein can be implemented directly in hardware, software modules executed by a processor, or a combination of both. Software modules can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art.

[0097] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0098] The above provides a detailed description of the image compression method, apparatus, device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An image compression method, characterized in that, include: If the current preset random access memory bandwidth is less than the preset bandwidth threshold or the current network transmission bandwidth is less than the preset transmission bandwidth threshold, then the image capture rate and the capture pixel address of the image pixel to be captured are determined based on the original image data stored in the preset random access memory; wherein, the preset random access memory bandwidth is the DDR memory bandwidth, and the DDR memory is a storage device shared by the VGA module and the JPEG compression engine. Based on the image capture rate and the captured pixel address, the original image data is processed to obtain the target image data; The target image data is compressed using a preset image format; The step of determining the image capture rate and the capture pixel address of the image pixel to be captured based on the original image data stored in the preset random access memory includes: The starting address of the original image data is determined based on the original image data stored in the preset random access memory, and the image capture rate is determined according to the configuration information corresponding to the capture mode. The address of the captured pixel is determined based on the starting address and the image capture rate.

2. The image compression method according to claim 1, characterized in that, Before determining the image capture rate and the capture pixel address of the image pixel to be captured based on the original image data stored in the preset random access memory, the method further includes: Collect raw image data transmitted through a preset video interface and store the raw image data in a preset random access memory.

3. The image compression method according to claim 2, characterized in that, After collecting the raw image data transmitted through a preset video interface and storing the raw image data in a preset random access memory, the process further includes: If the current preset random access memory bandwidth is greater than the preset bandwidth threshold and the current network transmission bandwidth is greater than the preset transmission bandwidth threshold, then the first address of the original image data stored in the preset random access memory is output. The step of performing image capture processing on the original image data based on the image capture rate and the captured pixel address to obtain target image data includes: Obtain the original image data within a consecutive address range of a preset displacement starting from the first address of the original image data, and use it as the target image data.

4. The image compression method according to claim 1, characterized in that, The step of performing image capture processing on the original image data based on the image capture rate and the captured pixel address to obtain target image data includes: The location information of the image pixels to be captured is determined based on the captured pixel address, and the target image data is captured based on a preset on-chip bus protocol.

5. The image compression method according to any one of claims 1 to 4, characterized in that, Before performing image compression on the target image data in a preset image format, the method further includes: Determine whether to perform a restoration operation on the target image data; If the current network transmission bandwidth is greater than the preset transmission bandwidth threshold, then the data restoration operation will be initiated. Image data of uncaptured image pixels is obtained based on the four-directional adjacency method, and the target image data is restored to obtain the restored target image data.

6. The image compression method according to claim 5, characterized in that, The image compression of the target image data in a preset image format includes: The restored target image data is compressed using standard JPEG image compression, and the compressed target image data is stored in a preset random access memory.

7. An image compression device, characterized in that, include: The information acquisition module is used to determine the image capture rate and the capture pixel address of the image pixel to be captured based on the original image data stored in the preset random access memory if the current preset random access memory bandwidth is less than the preset bandwidth threshold or the current network transmission bandwidth is less than the preset transmission bandwidth threshold; wherein, the preset random access memory bandwidth is the DDR memory bandwidth, and the DDR memory is a storage device shared by the VGA module and the JPEG compression engine. The image capture module is used to perform image capture processing on the original image data based on the image capture rate and the captured pixel address to obtain target image data; The image compression module is used to compress the target image data into a preset image format; The information acquisition module is specifically used to determine the starting address of the original image data based on the original image data stored in the preset random access memory, and to determine the image capture rate according to the configuration information corresponding to the capture mode; and to determine the capture pixel address based on the starting address and the image capture rate.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the image compression method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the image compression method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Systems and methods for bandwidth-limited video transport

    CN109314780A

  • Image processing system and method for reducing network bandwidth occupation

    CN115174915A