Compression method and device capable of dynamically controlling image code rate and image acquisition equipment
By designing a compression method that dynamically controls the image code rate in a telemetry device, the problem of image quality and bandwidth matching under fixed compression ratio is solved, high-definition image transmission under narrow bandwidth conditions is realized, and the design efficiency and effect of image acquisition equipment are improved.
Patent Information
- Application Number
- CN202411970319.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-11
AI Technical Summary
When the prior art uses fixed compression magnification to transmit images in telemetry devices, it is impossible to dynamically match the image quality and bandwidth, resulting in a degradation of image quality or poor transmission clarity.
A compression method for dynamically controlling the image code rate is designed. Through the coordinated work of the image compressed data reading module, the data flow control module and the image cache data reading module, the real-time adjustment of the image code rate and dynamic frame extraction are realized to ensure that the image maintains clarity when transmitted under narrow bandwidth conditions.
It has achieved the ability to significantly reduce the image code rate while ensuring image clarity, adapt to changes in telemetry bandwidth, realize high-definition image transmission, improve the level of software engineering design, and achieve significant results in space flight tests.
Smart Images

Figure CN119815027A_ABST
Abstract
Description
Technical Field
[0001] The invention provides a compression method, a device and an image acquisition device capable of dynamically controlling the image code rate, belonging to the technical field of image compression. Background Art
[0002] Currently in the field of telemetry, many devices have the function of image signal acquisition and transmission. Since the telemetry equipment is affected by the telemetry distance during the transmission process, the telemetry transmission bandwidth will be subject to certain limitations. The acquisition and transmission of image signals must be compressed. The existing compression technology uses the H.264 / H.265 compression mode and a fixed compression ratio to compress the image signal within the bandwidth specified by the telemetry equipment.
[0003] When using this compression method, the image compression ratio needs to be determined in advance. However, the image compression ratio needs to be determined by factors such as the quality, signal richness, and pixels of the image signal in the actual environment. In the actual process, the image signal is always in a changing state. Therefore, when designing telemetry equipment, a more complex image (with a larger amount of data after compression) is often selected according to the actual image to formulate the compression ratio, so as to output image compression data that is less than or equal to the specified bandwidth of the telemetry. Every time the designer designs image compression software, he must formulate the compression ratio according to the actual image signal. However, it is often difficult to obtain the actual image signal. Therefore, a more complex image signal is generally selected for the formulation of the compression ratio. During the entire test process, most of the image signals are in an over-compressed state, which will lead to a decrease in image quality and fail to achieve the design of "optimal image quality within the effective bandwidth"; at the same time, for the application of images in a telemetry system with narrow bandwidth, the image must choose a large compression ratio to meet the requirements of the narrow bandwidth, but after the compression ratio increases, the clarity of the image actually transmitted will drop sharply, and the image quality is poor. Summary of the invention
[0004] In order to solve the problem that image quality and bandwidth cannot be dynamically matched when images are transmitted using a fixed compression ratio, the present invention proposes a compression method, device and image acquisition equipment that can dynamically control the image code rate.
[0005] The technical solution adopted by the present invention is: an image compression device capable of dynamically controlling the bit rate, comprising: Image compression data reading module: used to read compressed images in real time; Image compression data buffer area: used to write and store the compressed data read by the image compression data reading module, and also used to output image capacity feedback signals to the data flow control module and the image buffer data reading module; Data flow control module: used to control the image compression data reading module to turn on and off the data signal written to the image compression data buffer area according to the image capacity feedback signal; Image cache data reading module: used to read data according to the code rate of the autonomous synchronization signal generating module or the external synchronization signal receiving module and the capacity feedback signal fed back by the data flow control module; Autonomous synchronization signal generation module: used to output internal synchronization signal according to a preset code rate; External synchronization signal receiving module: used to receive synchronization signals from external systems.
[0006] Furthermore, the image capacity feedback signal includes the highest proportion and the lowest proportion of the data in the image compression data buffer to the total capacity.
[0007] Furthermore, the image cache data reading module outputs the compressed data through the external device communication interface.
[0008] Furthermore, the compressed image read by the image compression data reading module is compressed based on the JPEG2000 image compression standard.
[0009] An image compression method capable of dynamically controlling the code rate, using an image compression device capable of dynamically controlling the code rate, comprises the following steps: S1: power on initialization; S2: working mode judgment; S3: When working in the synchronous output mode, the image cache data reading module selects the external synchronization signal received by the external synchronization signal receiving module, and reads the data in the image compression data cache area according to the synchronization signal and outputs it according to the set protocol; At the same time, the image compression data buffer generates an image capacity feedback signal, which is transmitted to the data flow control module to determine whether the image capacity feedback signal is within the set capacity range. If so, the compressed image data writing function is turned on through the data flow control module. If not, the compressed image data writing function is turned off through the data flow control module, and the compressed image data read by the image compression data reading module at this time is discarded, so as to realize dynamic frame extraction of the image signal; S4: When working in the asynchronous output mode, the autonomous synchronization signal generation module outputs the internal synchronization signal through the preset code rate, and the image buffer data reading module selects the internal synchronization signal, and reads the data in the image compression data buffer area according to the synchronization signal and outputs it according to the set protocol; At the same time, the image compression data cache generates an image capacity feedback signal, which is transmitted to the data flow control module to determine whether the image capacity feedback signal is within the set capacity range. If so, the compressed image data writing function is turned on through the data flow control module. If not, the compressed image data writing function is turned off through the data flow control module, and the compressed image data read by the image compression data reading module at this time is discarded to achieve dynamic frame extraction of the image signal.
[0010] Furthermore, the set capacity range is 20%~80% of the total capacity.
[0011] Furthermore, the calculation of the compressed data output code rate in the synchronous output mode and the asynchronous output mode is the same, and the calculation formula is as follows: R=m*n*8; Where: R is the output code rate of the image compression data, in bit / s; n is the synchronization signal sending frequency, in Hz; m is the number of bytes per packet of compressed data, m represents m bytes, i.e. m*8 bits, included in the synchronization signal.
[0012] Furthermore, in the synchronous output mode, the data flow control module will make corresponding adjustments to the cached data according to the changes in the external synchronization signal, so that the data output code rate is consistent with the external synchronization signal, thereby dynamically adjusting the code rate of the compressed image output.
[0013] An image acquisition device capable of dynamically controlling a code rate comprises an image acquisition unit, an image compression unit, a main control unit and a data transmission unit. The image acquisition unit is used to convert an analog image into a digital image and send the digital image to the image compression unit. The image compression unit performs image compression based on the JPEG2000 image compression standard. An embedded image compression method capable of dynamically controlling a code rate is integrated in the main control unit and is used to adjust the image output code rate in real time. The data transmission unit is used to output a compressed image and receive a synchronization signal from an external system.
[0014] Furthermore, the image acquisition unit is used to convert the PAL format image into a digital image in a required format.
[0015] The beneficial effects of the present invention over the prior art are as follows: the method for dynamically controlling the compressed image bit rate proposed in the present invention adds a "picture frame extraction" method on the basis of previous compression methods, reduces the image bit rate but does not increase the image compression ratio, and realizes dynamic output of the image bit rate by dynamically extracting pictures under the compression ratio of ensuring image clarity, thereby achieving a significant reduction in the image bit rate while ensuring image clarity. At the same time, this method can adaptively change the image bit rate according to the telemetry bandwidth, thereby realizing a method for high-definition image transmission in the narrow-bandwidth telemetry field.
[0016] When using this method to develop software, the image bit rate can be changed by only changing the synchronization instruction or setting the compression ratio, without manual intervention in the main control software, which greatly improves the software engineering design. At the same time, the image acquisition equipment using the method of the present invention has been widely used in space flight tests, with continuous and clear images and significant bandwidth reduction effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present invention will be further described below in conjunction with the accompanying drawings: Figure 1 It is a structural block diagram of the device of the present invention; Figure 2 Flowchart for compressed image transmission; Figure 3 A flowchart for dynamic control of compressed image code stream; Figure 4 Synchronize data output timing diagram for image acquisition devices; Figure 5 Asynchronous data output timing diagram for image acquisition devices; Figure 6 It is a schematic diagram of an image signal compressed by the method of the present invention. DETAILED DESCRIPTION
[0018] like Figures 1 to 6 As shown, the present invention provides a compression method capable of dynamically controlling the image bit rate, and can dynamically control the compressed image output bit rate based on the JPEG2000 image compression standard. The method of the present invention adopts a method of dynamically extracting frames of pictures in controlling the image bit rate, replacing the previous method of increasing the compression ratio. The method is applied to narrow bandwidth fields such as wireless transmission, especially in telemetry systems. Under the premise of not affecting the image clarity, the image output bit rate is greatly reduced, and the image transmission quality is greatly improved. In actual transmission, the optimal image data can be transmitted within the effective bandwidth. At the same time, the image output rate can be dynamically adjusted according to the richness of the image in the actual environment to ensure that the image is continuous and not lost, thereby providing a good method for transmitting image signals in narrow bandwidth fields.
[0019] The image compression method of the present invention is based on Figure 1The device shown is implemented, and the device includes a data flow control module, an image compression data reading module, an image compression data buffer area, an image buffer data reading module, an autonomous synchronization signal generating module and an external synchronization signal receiving module. The device is connected to the compressed image input interface and the device communication interface of the image compression unit. The compressed image input interface and the device communication interface of the image compression unit are also respectively connected to the image compression data buffer area to realize the input and output of compressed data; wherein the compressed image input interface is used to realize the reading of image compression data according to the image compression data bus, and after compressing the image collected by the image acquisition device, the image data output code stream is adjusted according to the dynamic frame extraction method of the picture to ensure that the image output code stream does not exceed the bandwidth specified by the telemetry, replacing the previous method of increasing the compression ratio, and reducing the image output code rate to within the specified bandwidth without reducing the image clarity; the device communication interface includes a synchronization instruction input interface and an image buffer data output interface.
[0020] The image compression data reading module is used to read the compressed image data output by the image compression unit in real time. The image compression data reading module turns on or off the data writing signal function according to the data flow control module, thereby realizing the control of compressed data writing. The image cache data reading module realizes data reading according to the code rate of the autonomous synchronization signal generating module or the external synchronization signal receiving module and the image capacity feedback signal.
[0021] The method of the present invention can work in synchronous output mode and asynchronous output mode. Before data transmission, the working mode needs to be judged. Figure 2 and 3 The specific implementation steps of the compression method of the present invention are as follows: S1: power on initialization; S2: working mode judgment; S3: When working in the synchronous output mode, the image cache data reading module selects an external synchronization signal, reads the data in the image compression data cache area according to the synchronization signal, and outputs it according to the RS422 or RS485 protocol. At the same time, the image compression data cache area generates an image capacity feedback signal, which is transmitted to the data flow control module. If the capacity feedback signal indicates that the data in the image cache area is less than 20% of the total capacity, the data flow control module turns on the image compression data writing function, and inputs the image signal compressed by the image compression unit into the image compression data cache area; if the capacity feedback signal indicates that the data in the image compression data cache area is greater than 80% of the total capacity, the data flow control module turns off the image compression data writing function, and discards the image data input by the image compression unit at this time, thereby realizing dynamic frame extraction of the image signal. The frame extraction is performed for each picture, and no image abnormality will occur. Through the above-mentioned capacity feedback adjustment mechanism, the data in the image compression data cache area always maintains 20%~80% of the total capacity, and there will be no data empty area or data overflow. As the external synchronization signal continues to change, the data flow control module will also make corresponding adjustments to the cached data to ensure that the data output code rate is consistent with the external synchronization signal, thereby realizing dynamic adjustment of the compressed image output code rate.
[0022] S4: When working in the asynchronous output mode, the autonomous synchronization signal generation module outputs the internal synchronization signal through the preset code rate, the image cache data reading module selects the internal synchronization signal, and reads the data in the image compression data cache area according to the synchronization signal and outputs it according to the RS422 or RS485 protocol. At the same time, the image compression data cache area generates an image capacity feedback signal and transmits it to the data flow control module. If the capacity feedback signal indicates that the data in the image compression data cache area is less than 20% of the total capacity, the data flow control module turns on the image compression data writing function. If the capacity feedback signal indicates that the data in the image compression data cache area is greater than 80% of the total capacity, the data flow control module turns off the image compression data writing function. Through the above capacity feedback adjustment mechanism, the data in the image compression data cache area always maintains 20%~80% of the total capacity, and there will be no data empty area and data overflow, ensuring that the image compression data is stably output according to the autonomous synchronization signal.
[0023] The calculation of the compressed data output code rate in synchronous output mode and asynchronous output mode is the same, such as Figure 4 As shown, the synchronization signal transmission frequency is nHz, the number of compressed data per packet is m bytes, and the image compression data output code rate calculation formula is as follows: R=m*n*8; R is the output code rate of the image compression data, in bit / s; n is the synchronization signal transmission frequency, in Hz; m is the number of bytes per packet of compressed data, m represents m bytes, i.e. m*8 bits, included in the synchronization signal. And R≤T*80%, T is the RS422 or RS485 baud rate of the image compression data transmission.
[0024] The synchronous command transmission complies with the following format (as shown in Table 1). The 16-bit integer is transmitted first with the high 8 bits and then with the low 8 bits. The 32-bit integer is sent in order from the high 8 bits to the low 8 bits. The checksum is the low 8 bits of the sum of the data length and all bytes (3 to 6) of the data packet. The transmission method adopts RS422 or RS485, and the transmission baud rate is 3686400bps.
[0025] Table 1 Synchronous instruction transmission format.
[0026] Image compression data transmission complies with the following format (as shown in Table 2). The 16-bit integer is transmitted first with the high 8 bits and then with the low 8 bits. The 32-bit integer is sent in order from the high 8 bits to the low 8 bits. 5~N-1 is the compressed image data. The data length comes from the synchronization instruction 5~6 bytes. The checksum is the low 8 bits of the data length and the cumulative result of all bytes (3~N-1) of the data packet. The transmission method adopts RS422 or RS485, and the transmission baud rate is 3686400bps.
[0027] Table 2 Image compression data transmission format.
[0028] The method of the present invention can also be applied to an image acquisition device. The image acquisition device is provided with an image acquisition unit, an image compression unit, a main control unit and a data transmission unit. The embedded program of the method of the present invention can be embedded in the chip of the main control unit. The image acquisition unit mainly realizes AD acquisition of PAL analog images and converts the analog images into digital images. The image compression unit compresses the digital images input by the image acquisition unit in JPEG2000 mode. The compression adopts the picture compression method. After each picture is compressed, it is sent to the main control unit. The compression code stream control method of the present invention can be implemented in the main control unit. The main control unit adopts this method to dynamically extract frames of image signals according to pictures and then outputs them through the data transmission unit.
[0029] The present invention will be further described below based on specific embodiments.
[0030] Embodiment 1: The image acquisition device operates in synchronous output mode When the image acquisition device works in synchronous output mode, the image output code rate will change with the frequency of the external synchronization signal. When the frequency of the external synchronization signal increases, the image output code rate will increase accordingly; when the frequency of the external synchronization signal decreases, the image output code rate will decrease accordingly.
[0031] After the image acquisition device is powered on, the initial work of the image acquisition unit, image compression unit and data transmission unit is completed first. The image acquisition unit is responsible for converting the PAL format image into a digital image in 8-bit ITU-R BT.656 YCrCb 4:2:2 format. The image compression unit is responsible for compressing the digital image in the JPEG2000 format (the compression ratio is determined according to the actual situation). The data transmission unit is responsible for receiving the external synchronization signal and outputting the image compression data. After the initialization is completed, wait for the external synchronization signal to be valid. When the external synchronization signal is valid, data is sent according to the beat of the synchronization signal. The number of data sent in each beat is included in the synchronization beat instruction. The baud rate of the synchronization signal is 3686400bps, the transmission cycle is 100Hz, and the output data is 1024 bytes per packet. According to the output code rate calculation formula, R=100*1024*8=819200bps. At this time, the synchronization signal transmission cycle changes from 100Hz to 200Hz, and the others remain unchanged. After calculation, R=200*1024*8=1638400bps. The synchronous transmission instructions are shown in Table 3, and the transmission timing is as follows Figure 4 shown.
[0032] Table 3.
[0033] The image signal compressed by this method is as follows: Figure 6 As shown, the image is clear and complete, and can characterize the image characteristics in the actual environment. At the same time, this image acquisition device has been widely used in various types of telemetry equipment and has obtained very valuable data.
[0034] Embodiment 2: Image acquisition device operates in asynchronous output mode When the image acquisition device works in asynchronous output mode, the output code rate of the compressed image can be set through the external serial bus. The preset code rate parameters are composed of two sub-parameters, namely the synchronous instruction cycle n (Hz), and the number of data output per packet m (Byte). For example, if the code rate to be set is 1638400bps, it can be calculated according to the formula R=m*n*8. m and n can be flexibly combined, which can be m=1024, n=200, or m=2048, n=100.
[0035] After the image acquisition device is powered on, it first completes the device initialization work, including image acquisition unit initialization, image compression unit initialization, data transmission unit initialization (transmission baud rate is 3686400bps), and reading the pre-set code rate (m=2048, n=100). After the initialization is completed, the code rate parameters are loaded, and the image acquisition device outputs image compression data according to the loaded code rate, with a cycle of 100Hz and a data packet size of 2048 bytes. The transmission timing is as follows: Figure 5 shown.
[0036] When the method of the present invention is applied to image acquisition equipment, the image output code rate can be adaptively configured as the telemetry bandwidth changes, and the maximum data within the telemetry bandwidth is always output, so as to output the optimal image data within the effective bandwidth. At the same time, when the method of the present invention is used to perform the top-level design of image compression software, after the designer formulates a suitable compression ratio according to the image clarity, the image compression software can use the dynamic picture frame extraction method according to the telemetry bandwidth to adjust the image data output code stream, ensuring that the image output code stream does not exceed the bandwidth specified by the telemetry, thereby improving the software development efficiency and engineering design level.
[0037] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image compression device capable of dynamically controlling the bit rate, characterized in that: include: Image compression data reading module: used to read compressed images in real time; Image compression data buffer area: used to write and store the compressed data read by the image compression data reading module, and also used to output image capacity feedback signals to the data flow control module and the image buffer data reading module; Data flow control module: used to control the image compression data reading module to turn on and off the data signal written to the image compression data buffer area according to the image capacity feedback signal; Image cache data reading module: used to read data according to the code rate of the autonomous synchronization signal generating module or the external synchronization signal receiving module and the capacity feedback signal fed back by the data flow control module; Autonomous synchronization signal generation module: used to output internal synchronization signal according to a preset code rate; External synchronization signal receiving module: used to receive synchronization signals from external systems.
2. The image compression device capable of dynamically controlling the bit rate according to claim 1, characterized in that: The image capacity feedback signal includes the highest proportion and the lowest proportion of the data in the image compression data buffer to the total capacity.
3. The image compression device capable of dynamically controlling the bit rate according to claim 1, characterized in that: The image cache data reading module outputs the compressed data through the external device communication interface.
4. The image compression device capable of dynamically controlling the bit rate according to claim 1, characterized in that: The compressed image read by the image compression data reading module is compressed based on the JPEG2000 image compression standard.
5. An image compression method capable of dynamically controlling the bit rate, using the image compression device capable of dynamically controlling the bit rate as claimed in any one of claims 1 to 4, characterized in that: The steps include: S1: power on initialization; S2: working mode judgment; S3: When working in the synchronous output mode, the image cache data reading module selects the external synchronization signal received by the external synchronization signal receiving module, and reads the data in the image compression data cache area according to the synchronization signal and outputs it according to the set protocol; At the same time, the image compression data buffer generates an image capacity feedback signal, which is transmitted to the data flow control module to determine whether the image capacity feedback signal is within the set capacity range. If so, the compressed image data writing function is turned on through the data flow control module. If not, the compressed image data writing function is turned off through the data flow control module, and the compressed image data read by the image compression data reading module at this time is discarded, so as to realize dynamic frame extraction of the image signal; S4: When working in the asynchronous output mode, the autonomous synchronization signal generation module outputs the internal synchronization signal through the preset code rate, and the image buffer data reading module selects the internal synchronization signal, and reads the data in the image compression data buffer area according to the synchronization signal and outputs it according to the set protocol; At the same time, the image compression data cache generates an image capacity feedback signal, which is transmitted to the data flow control module to determine whether the image capacity feedback signal is within the set capacity range. If so, the compressed image data writing function is turned on through the data flow control module. If not, the compressed image data writing function is turned off through the data flow control module, and the compressed image data read by the image compression data reading module at this time is discarded to achieve dynamic frame extraction of the image signal.
6. The image compression method capable of dynamically controlling the bit rate according to claim 5, characterized in that: The set capacity range is 20%~80% of the total capacity.
7. The image compression method capable of dynamically controlling the bit rate according to claim 5, characterized in that: The calculation of the compressed data output code rate in synchronous output mode and asynchronous output mode is the same, and the calculation formula is as follows: R=m*n*8; Where: R is the output code rate of the image compression data, in bit / s; n is the synchronization signal sending frequency, in Hz; m is the number of bytes per packet of compressed data, m represents m bytes, i.e. m*8 bits, included in the synchronization signal.
8. The image compression method capable of dynamically controlling the bit rate according to claim 5, characterized in that: In the synchronous output mode, the data flow control module will make corresponding adjustments to the cached data according to the changes in the external synchronization signal, so that the data output code rate is consistent with the external synchronization signal, thereby dynamically adjusting the code rate of the compressed image output.
9. An image acquisition device capable of dynamically controlling the bit rate, characterized in that: The invention comprises an image acquisition unit, an image compression unit, a main control unit and a data transmission unit. The image acquisition unit is used to convert an analog image into a digital image and send the digital image to the image compression unit. The image compression unit performs image compression based on the JPEG2000 image compression standard. The main control unit is integrated with an embedded program of the image compression method capable of dynamically controlling the code rate as described in any one of claims 1 to 8, and is used to adjust the image output code rate in real time. The data transmission unit is used to output a compressed image and receive a synchronization signal from an external system.
10. The image acquisition device capable of dynamically controlling the bit rate according to claim 9, characterized in that: The image acquisition unit is used to convert the PAL format image into a digital image in a required format.