A real-time transmission method for a mobile satellite communication station
By calculating the pixel grayscale difference value, the Hoffman tree is constructed, and the target grayscale difference is selected for compression encoding, which solves the problem of limited Hoffman encoding and improves the transmission efficiency and real-timeness of image data of mobile satellite communication stations.
Patent Information
- Application Number
- CN202510585035.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-05-08
AI Technical Summary
The compression effect of Hoffman encoding is limited by the frequency of the coded objects, resulting in limited compression effect of image data in mobile satellite communication stations, affecting real-time transmission efficiency and reliability.
By calculating the difference in grayscale value between each pixel point and its previous pixel point as the forward grayscale difference, a Hoffman tree is constructed, and the preferred node with the target grayscale difference is selected for compression encoding, shortening the encoding result length, and improving the compression effect of image data.
It improves the compression effect and transmission efficiency of image data, ensures rapid and reliable data transmission under limited bandwidth, and supports fast decision-making and effective actions.
Smart Images

Figure CN120111235B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of signal transmission, and more particularly to a real-time transmission method for a mobile satellite communication station. Background Art
[0002] Mobile satellite communication stations include portable satellite stations and vehicle-mounted satellite stations. The image data transmitted by mobile satellite communication stations plays an important role in different scenarios. For example, in natural disaster monitoring scenarios, image data is mainly used to quickly assess the scope and extent of the disaster-stricken area; in emergency rescue scenarios, image data is used to quickly locate the accident site and assess rescue needs; in urban planning and traffic management scenarios, image data is used to monitor urban infrastructure and traffic flow.
[0003] In the related technology, for example, the Chinese patent application document with application publication number CN111080983A discloses a special transport vehicle alarm system based on Beidou satellite navigation and positioning, including a vehicle-mounted terminal, a Beidou satellite, a ground receiving station and a monitoring center; the vehicle-mounted terminal is used to obtain the status data of the special transport vehicle and send it to the Beidou satellite; the Beidou satellite is used to forward the status data to the ground receiving station; the ground receiving station is used to forward the status data to the monitoring center; the monitoring center is used to visualize the status data and issue an alarm reminder when the status data exceeds a preset threshold range.
[0004] In different application scenarios, the image data in mobile satellite communication stations have different characteristics, but all have the need for real-time transmission. The real-time transmission of image data in mobile satellite communication stations is crucial to supporting quick decision-making and effective actions. Therefore, the image data in mobile satellite communication stations needs to be compressed and encoded before transmission to improve transmission efficiency and real-time performance.
[0005] Huffman coding is a coding method based on the frequency of character occurrence. It achieves efficient compression coding by constructing an optimal binary tree to assign variable-length codes to characters. In other words, the compression effect of Huffman coding is limited by the frequency of the coded object. Therefore, the compression effect of using Huffman coding to compress image data in mobile satellite communication stations is limited. Summary of the Invention
[0006] In order to solve the technical problem that the compression effect of Huffman coding is limited by the frequency of the coded object and the compression effect of image data in a mobile satellite communication station using Huffman coding is limited, the present invention provides a real-time transmission method for a mobile satellite communication station, comprising: for a sequence composed of all pixels in the image data to be transmitted, constructing a Huffman tree according to the frequency of each grayscale value in the sequence, each grayscale value corresponds to a leaf node in the Huffman tree; taking the difference between the grayscale value of each pixel and its previous pixel as the forward grayscale difference of each pixel; for all the candidate grayscale differences in the forward grayscale differences, :Record the grayscale value corresponding to the leaf node as , and the grayscale value is equal to The minimum gray value of the previous pixel of all pixels and maximum value ;when and When the intersection of is empty, assign the leaf node to the candidate grayscale difference; obtain the preferred node with the shortest coding length among the leaf nodes assigned to the candidate grayscale difference; equalize the forward grayscale difference to And the encoding length of the gray value is greater than the encoding length of the preferred node , recorded as an optimizable pixel; calculate the compression contribution of the candidate grayscale difference according to the difference between the grayscale value of all optimizable pixels and the coding length of the preferred node; select a target grayscale difference from all forward grayscale differences with compression contribution greater than 0; compress and encode the optimizable pixel of the target grayscale difference by encoding the preferred node of the target grayscale difference, and compress and encode the other pixel points except the optimizable pixel by encoding the grayscale value to obtain the compression encoding result of the image data and transmit it.
[0007] The present invention calculates the difference between the grayscale value of each pixel and its previous pixel as the forward grayscale difference of each pixel; calculates the compression contribution of each forward grayscale difference according to the difference between the coding length of the grayscale values of all optimizable pixels of each forward grayscale difference and the coding length of the preferred node, thereby obtaining a target grayscale difference, wherein the coding length of the preferred node of the target grayscale difference is smaller than the coding length of the grayscale value of each optimizable pixel of the target grayscale difference; when compression encoding is performed on a sequence, compression encoding is performed on each optimizable pixel of the target grayscale difference through the coding of the preferred node of the target grayscale difference, thereby shortening the length of the compression encoding result of the sequence, improving the compression effect of the image data, and further improving the transmission efficiency and real-time performance, ensuring fast and reliable data transmission under limited bandwidth, thereby supporting fast decision-making and effective action.
[0008] Preferably, the method for acquiring the sequence composed of all pixel points in the image data to be transmitted is: arranging all pixel points in the image data into a sequence in order; the sequence includes row order, column order, and Z-shaped order.
[0009] Preferably, the method for obtaining the frequency of each gray value is: equalizing the gray value to The number of times a pixel appears in the sequence The total number of all pixels in the sequence Ratio , as the grayscale value frequency, The value range is .
[0010] Preferably, forward grayscale differences with the same value belong to the same type of forward grayscale difference.
[0011] Preferably, the method for obtaining the encoding of the grayscale value is: the labels of all paths between the root node and each leaf node in the Huffman tree are used to form the encoding of each leaf node; the encoding of the leaf node corresponding to each grayscale value in the Huffman tree is used as the encoding of each grayscale value.
[0012] Preferably, the calculation of the compression contribution of the target grayscale difference based on the difference between the grayscale values of all optimizable pixels and the coding length of the preferred node includes: Where, is the compression contribution of the candidate grayscale difference, is the candidate grayscale difference The encoding length of the gray value of the pixel can be optimized. is the encoding length of the preferred node of the candidate grayscale difference, is the number of all optimizable pixels of the candidate grayscale difference.
[0013] The present invention compares and calculates the encoding of the preferred node passing the candidate grayscale difference and the encoding of the grayscale value of the optimizable pixel point, and quantifies the compression contribution of the candidate grayscale difference by shortening the compression encoding result when the optimizable pixel point is compressed.
[0014] Preferably, the compression contribution of the target grayscale difference is calculated based on the difference between the grayscale values of all optimizable pixels and the coding length of the preferred node, including: when there is no optimizable pixel in the candidate grayscale difference, the compression contribution of the candidate grayscale difference is equal to 0.
[0015] Preferably, selecting a target grayscale difference from all forward grayscale differences whose compression contributions are greater than 0 includes randomly selecting a forward grayscale difference from all forward grayscale differences whose compression contributions are greater than 0 as the target grayscale difference.
[0016] When the present invention uses the forward grayscale difference with a compression contribution greater than 0 as the target grayscale difference and performs compression encoding on the sequence, the compression effect of the compression encoding result of the image data is enhanced.
[0017] Preferably, selecting a target grayscale difference from all forward grayscale differences whose compression contributions are greater than 0 includes: selecting a forward grayscale difference with the largest compression contribution from all forward grayscale differences whose compression contributions are greater than 0 as the target grayscale difference.
[0018] The present invention takes the forward grayscale difference with the largest compression contribution among all forward grayscale differences with compression contributions greater than 0 as the target grayscale difference, so as to maximize the compression effect of the compression coding result of the image data.
[0019] Preferably, the transmission further comprises: taking the frequency of each grayscale value, the target grayscale difference and the preferred node of the target grayscale difference as supplementary information and transmitting them.
[0020] The present invention ensures the decodability and decoding accuracy of the compression coding result of the image data by using the frequency of each grayscale value, the target grayscale difference and the preferred node of the target grayscale difference as supplementary information and transmitting them.
[0021] The beneficial effects of the present invention are:
[0022] The present invention calculates the difference between the grayscale value of each pixel and its previous pixel as the forward grayscale difference of each pixel; calculates the compression contribution of each forward grayscale difference according to the difference between the coding length of the grayscale values of all optimizable pixels of each forward grayscale difference and the coding length of the preferred node, thereby obtaining a target grayscale difference, wherein the coding length of the preferred node of the target grayscale difference is smaller than the coding length of the grayscale value of each optimizable pixel of the target grayscale difference; when compression encoding is performed on a sequence, compression encoding is performed on each optimizable pixel of the target grayscale difference through the coding of the preferred node of the target grayscale difference, thereby shortening the length of the compression encoding result of the sequence, improving the compression effect of the image data, and further improving the transmission efficiency and real-time performance, ensuring fast and reliable data transmission under limited bandwidth, thereby supporting fast decision-making and effective action. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0024] Figure 1 is a flow chart schematically illustrating a real-time transmission method of a mobile satellite communication station in the present invention;
[0025] Figure 2 is a diagram schematically illustrating a Huffman tree. DETAILED DESCRIPTION
[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
[0027] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0028] The embodiment of the present invention discloses a real-time transmission method for a mobile satellite communication station, referring to Figure 1 , including steps S1 to S5:
[0029] S1. Acquire image data to be transmitted in a mobile satellite communication station.
[0030] Mobile satellite communication stations include satellite portable stations and satellite vehicle-mounted stations. Among them, satellite portable stations are characterized by light weight, easy portability, high intelligence, and simple operation. They realize the functions of communication stations by integrating various communication terminals. Satellite vehicle-mounted stations are characterized by light weight and small size. They do not require modifications to the vehicle and can be installed and disassembled as needed. They are suitable for all types of vehicles and can provide high-speed data transmission services. At the same time, satellite vehicle-mounted stations can track satellites and other platforms in real time during movement, and continuously transmit multimedia information such as voice, data, and images, which can meet the needs of various emergency communications and multimedia communications under mobile conditions.
[0031] Specifically, the image data to be transmitted in the mobile satellite communication station is obtained. The image data to be transmitted may have different characteristics depending on different application scenarios, specifically:
[0032] (1) In natural disaster monitoring scenarios, image data is mainly used to quickly assess the scope and extent of the disaster-stricken area. For example, in flood monitoring, satellite images show the boundaries and depth of the flooded area, helping rescue teams plan rescue routes. In earthquake monitoring, image data is used to identify building damage and assist rescue teams in locating trapped people. Image data has the characteristics of high resolution and wide coverage, and needs to be transmitted in real time to support rapid response.
[0033] (2) In emergency rescue scenarios, image data is used to quickly locate the accident site and assess rescue needs. For example, in landslide rescue, satellite images help rescue teams quickly locate trapped people. In maritime search and rescue, image data is used to identify the location and surrounding environment of distressed ships. Image data needs to be transmitted quickly to ensure the timeliness of rescue operations.
[0034] (3) In urban planning and traffic management scenarios, image data is used to monitor urban infrastructure and traffic flow. For example, in traffic flow monitoring, real-time transmitted image data is used to analyze traffic congestion and assist traffic management departments in adjusting signal light settings. In urban infrastructure monitoring, image data is used to check for damage to infrastructure such as bridges and roads. This requires wide coverage and real-time updates.
[0035] In summary, in different application scenarios, the image data in mobile satellite communication stations have different characteristics, but all have the need for real-time transmission. Moreover, the real-time transmission of image data in mobile satellite communication stations is crucial to supporting quick decision-making and effective action.
[0036] Therefore, compressing and encoding the image data in the mobile satellite communication station before transmission can significantly reduce the amount of data, improve transmission efficiency and real-time performance, and ensure fast and reliable data transmission under limited bandwidth, thereby supporting rapid decision-making and effective action.
[0037] S2. All pixels in the image data are organized into a sequence; a Huffman tree is constructed based on the frequency of each grayscale value in the sequence, and a leaf node corresponding to each grayscale value in the Huffman tree is obtained.
[0038] It should be noted that Huffman coding is a well-known lossless compression algorithm. By compressing and encoding image data in mobile satellite communication stations through Huffman coding and then transmitting them, the amount of data can be reduced, the transmission efficiency and real-time performance can be improved, and fast and reliable data transmission can be ensured under limited bandwidth, thereby supporting quick decision-making and effective action.
[0039] Specifically, all pixel points in the image data are arranged into a sequence in order; the order includes but is not limited to row order, column order, and Z-shaped order; wherein, row order means arranging all pixel points in order from left to right and from top to bottom; column order means arranging pixel points in order from top to bottom and from left to right; and Z-shaped order means arranging from the upper left corner in a Z-shaped path.
[0040] Further, the gray value is equal to The number of times a pixel appears in the sequence The total number of all pixels in the sequence Ratio , as the grayscale value frequency, The value range is .
[0041] For example, when the grayscale values of pixels in a sequence are 228, 238, 248, 253, 251, 253, 253, 253, 249, 253, 250, and 249, respectively, there are 7 grayscale values in the sequence, namely 228, 238, 248, 249, 250, 251, and 253. The number of times pixels with grayscale values of 228, 238, 248, 249, 250, 251, and 253 appear in the sequence is 1, 1, 1, 2, 1, 1, and 5, respectively. The total number of pixels in the sequence is 12. Then, the frequencies of grayscale values 228, 238, 248, 249, 250, 251, and 253 are 0.083, 0.083, 0.167, 0.083, 0.083, and 0.417, respectively.
[0042] Furthermore, a Huffman tree is constructed based on the frequency of each grayscale value. The obtained Huffman tree is essentially a binary tree. In a binary tree, the top node is the root node, and a leaf node refers to a node that is no longer connected to other nodes. In the Huffman tree, each grayscale value corresponds to a leaf node in the Huffman tree, and accordingly, each leaf node in the Huffman tree corresponds to a grayscale value. The method of constructing a Huffman tree based on frequency is a well-known technology and will not be described in detail here.
[0043] Furthermore, the encoding of each leaf node is obtained through the Huffman tree, including: the labels of all paths between the root node and each leaf node in the Huffman tree are used to form the encoding of each leaf node; the encoding of the leaf node corresponding to each grayscale value in the Huffman tree is used as the encoding of each grayscale value.
[0044] In one embodiment, starting from the root node of the Huffman tree, the path on the left is marked as 0, and the path on the right is marked as 1; in another embodiment, starting from the root node of the Huffman tree, the path on the left is marked as 0, and the path on the right is marked as 1.
[0045] For example, when the frequencies of grayscale values 228, 238, 248, 249, 250, 251, and 253 are 0.083, 0.083, 0.167, 0.083, 0.083, and 0.417, respectively, a Huffman tree is constructed based on the frequencies of the grayscale values. The schematic diagram of the Huffman tree is as follows: Figure 2As shown, there are 7 leaf nodes in total, and each grayscale value corresponds to a leaf node. The labels of all paths from the root node to each leaf node in the Huffman tree constitute the encoding of each leaf node, and the encodings of the leaf nodes are: 0, 100, 111, 1010, 1011, 1100, 1101; the encoding of the leaf node corresponding to each grayscale value in the Huffman tree is used as the encoding of each grayscale value, and the encodings of the grayscale values 228, 238, 248, 249, 250, 251, and 253 are: 1100, 1101, 1010, 111, 1011, 100, 0 respectively.
[0046] S3. The difference between the grayscale value of each pixel and its previous pixel is used as the forward grayscale difference of each pixel; for the candidate grayscale differences among all forward grayscale differences, the preferred node and the optimizable pixel of the candidate grayscale difference are obtained; based on the difference between the coding length of the grayscale values of all optimizable pixel points and the coding length of the preferred node, the compression contribution of the candidate grayscale difference is calculated.
[0047] It should be noted that Huffman coding is a coding method based on the frequency of character occurrence. It assigns variable-length codes to characters by constructing an optimal binary tree, thereby achieving efficient compression coding. That is to say, the compression effect of Huffman coding is limited by the frequency of the coding object. Therefore, the compression effect of using Huffman coding to compress image data in mobile satellite communication stations is limited. In order to improve the compression effect of image data in mobile satellite communication stations, the present invention calculates the difference between the grayscale value of each pixel and its previous pixel as the forward grayscale difference of each pixel; according to the difference between the coding length of the grayscale values of all optimizable pixels of each forward grayscale difference and the coding length of the preferred node, the compression contribution of each forward grayscale difference is calculated, thereby obtaining the target grayscale difference, the coding length of the preferred node of the target grayscale difference is less than the coding length of the grayscale value of each optimizable pixel of the target grayscale difference, when compressing and coding the sequence, the optimizable pixels of the target grayscale difference are compressed and coded by coding the preferred node of the target grayscale difference, thereby shortening the length of the compression coding result of the sequence, thereby improving the compression effect of the image data.
[0048] Specifically, for any pixel in the sequence, the difference between the grayscale value of the pixel and the grayscale value of the previous pixel is used as the forward grayscale difference of the pixel; thus, the forward grayscale differences of all pixels in the sequence are obtained.
[0049] It should be noted that, for the first pixel in the sequence, since there is no pixel in front of the first pixel, that is, there is no pixel before the first pixel, the first pixel has no forward grayscale difference.
[0050] For example, when the grayscale values of the pixels in the sequence are 228, 238, 248, 253, 251, 253, 253, 253, 249, 253, 250, and 249, respectively, the difference between the grayscale value of each pixel and the grayscale value of the previous pixel is used as the forward grayscale difference of each pixel. The first pixel has no forward grayscale difference, and starting from the second pixel, the forward grayscale differences of each pixel are 10, 10, 5, -2, 2, 0, 0, -4, 4, -3, and -1, respectively; if the forward grayscale differences with the same value are taken as one forward grayscale difference, there are 9 different forward grayscale differences, namely 0, -1, -2, -3, -4, 2, 4, 5, and 10.
[0051] Furthermore, forward grayscale differences with the same value are regarded as a forward grayscale difference, that is, forward grayscale differences with the same value belong to the same forward grayscale difference; for all types of forward grayscale differences, any one of them is regarded as a candidate grayscale difference; for the candidate grayscale difference, the preferred node and the optimizable pixel point of the candidate grayscale difference are obtained; according to the difference between the coding length of the grayscale values of all optimizable pixel points and the coding length of the preferred node, the compression contribution of the candidate grayscale difference is calculated.
[0052] The method for obtaining the optimal node of the candidate grayscale difference is as follows: for any leaf node among all the leaf nodes of the Huffman tree, the grayscale value corresponding to the leaf node is recorded as , and the grayscale value is equal to The set of grayscale values of all pixels before the pixel is composed of the minimum and maximum values in the set are recorded as and ; The candidate grayscale difference is recorded as , when the interval With interval When the intersection of is empty, the leaf node is assigned to the candidate grayscale difference. With interval When the intersection of is not empty, the leaf node cannot be assigned to the candidate grayscale difference; from all the leaf nodes assigned to the candidate grayscale difference, the leaf node with the shortest coding length is obtained as the preferred node of the candidate grayscale difference; it should be noted that there is only one preferred node for the candidate grayscale difference, so when there are multiple leaf nodes with the shortest coding length among all the leaf nodes assigned to the candidate grayscale difference, any one of the leaf nodes will be used as the preferred node of the candidate grayscale difference.
[0053] It should be noted that when selecting the leaf node assigned to the candidate grayscale difference, the grayscale value corresponding to the leaf node is recorded as , by requiring the grayscale value to be equal to The minimum gray value of the previous pixel of all pixels and maximum value Difference with candidate grayscale Composed of and The intersection of is empty, so as to ensure that when the compressed encoding result of the image data is decoded later, when the code to be decoded is a grayscale value When the encoding is also the encoding of the preferred node of the target grayscale difference, by calculating the sum of the previous decoding result and the target grayscale difference (one of the candidate grayscale differences), and then judging whether the sum is in the range of [0,255], it is possible to accurately obtain whether the current decoding result should be the grayscale value or the target grayscale difference.
[0054] For example, the forward grayscale difference 5 is used as the candidate grayscale difference ,Right now When , the method for obtaining the optimal node of candidate grayscale difference is:
[0055] (1) For the leaf node corresponding to the grayscale value 238, obtain the set {228} consisting of the grayscale values of the previous pixel of all pixels with a grayscale value equal to 238, and the minimum value in the set and maximum value are equal to 228, then the interval =[233,233], the interval [233,233] is the same as the interval The intersection of is [233,233], that is, the interval With interval The intersection of is not empty, so the leaf node corresponding to the grayscale value 238 cannot be assigned to the candidate grayscale difference; similarly, the interval of the leaf nodes corresponding to the grayscale values 248, 249, and 253 With interval The intersection of is not empty, therefore, the leaf nodes corresponding to the grayscale values 248, 249, and 253 cannot be assigned to the candidate grayscale differences.
[0056] (2) For the leaf node corresponding to the grayscale value 250, obtain the set {253} consisting of the grayscale values of the previous pixel of all pixels with a grayscale value equal to 250, and the minimum value in the set and maximum value are equal to 253, then the interval =[258,258], the interval [258,258] is the same as the interval The intersection of is empty, so the leaf node corresponding to the grayscale value 250 is assigned to the candidate grayscale difference; similarly, the interval of the leaf nodes corresponding to the grayscale values 228 and 251 With interval The intersection of is empty, so the leaf nodes corresponding to the grayscale values 228 and 251 are assigned to the candidate grayscale differences.
[0057] (3) Finally, the grayscale difference is assigned to the candidate The leaf nodes include leaf nodes corresponding to grayscale values 228, 250, and 251; the encoding lengths of the leaf nodes corresponding to grayscale values 228, 250, and 251 are 4, 4, and 3, respectively. From all the leaf nodes assigned to the candidate grayscale difference, the leaf node with the shortest encoding length, that is, the leaf node corresponding to grayscale value 251, is obtained as the candidate grayscale difference. The preferred node.
[0058] For example, the forward grayscale difference 10 is used as the candidate grayscale difference ,Right now When , the method for obtaining the optimal node of candidate grayscale difference is:
[0059] (1) For the leaf node corresponding to the grayscale value 238, obtain the set {228} consisting of the grayscale values of the previous pixel of all pixels with a grayscale value equal to 238, and the minimum value in the set and maximum value are equal to 228, then the interval =[238,238], the interval [238,238] is the same as the interval The intersection of is [238,238], that is, the interval With interval The intersection of is not empty, so the leaf node corresponding to the grayscale value 238 cannot be assigned to the candidate grayscale difference; similarly, the interval of the leaf node corresponding to the grayscale value 248 With interval The intersection of is not empty, therefore, the leaf node corresponding to the grayscale value 248 cannot be assigned to the candidate grayscale difference.
[0060] (2) For the leaf node corresponding to the grayscale value 249, obtain the set {250, 253} consisting of the grayscale values of the previous pixel of all pixels with a grayscale value equal to 249. The minimum value in the set is and maximum value are 250 and 253 respectively, then the interval =[260,263], the interval [260,263] is the same as the interval The intersection of is empty, so the leaf node corresponding to the grayscale value 249 is assigned to the candidate grayscale difference; similarly, the interval of the leaf nodes corresponding to the grayscale values 228, 250, 251, and 253 With interval The intersection of is empty, so the leaf nodes corresponding to the grayscale values 228, 250, 251, and 253 are assigned to the candidate grayscale differences.
[0061] (3) Finally, the grayscale difference is assigned to the candidate The leaf nodes include leaf nodes corresponding to grayscale values 228, 249, 250, 251, and 253; the encoding lengths of the leaf nodes corresponding to grayscale values 228, 250, 251, and 253 are 4, 4, 3, and 1, respectively. From all the leaf nodes assigned to the candidate grayscale difference, the leaf node with the shortest encoding length, that is, the leaf node corresponding to grayscale value 253, is obtained as the candidate grayscale difference. The preferred node.
[0062] The method for obtaining the optimal pixel points of the candidate grayscale difference is as follows: the encoding length of the preferred node is recorded as , equal the forward grayscale difference to And the encoding length of the gray value is greater than The pixel point of is recorded as the optimizable pixel point of the candidate grayscale difference.
[0063] For example, for the candidate grayscale difference , candidate grayscale difference The encoding length of the preferred node Therefore, the forward grayscale difference is equal to 5 and the encoding length of the grayscale value is greater than 3. The forward grayscale difference of the fourth pixel in the sequence is equal to 5, the grayscale value of this pixel is equal to 253, and the encoding length of the grayscale value 253 is equal to 1. Therefore, the encoding length of the grayscale value of the fourth pixel in the sequence is less than 3, and the candidate grayscale difference is 5. There are no pixels that can be optimized.
[0064] For example, for the candidate grayscale difference , candidate grayscale difference The encoding length of the preferred node , Therefore, the forward grayscale difference is equal to 10 and the encoding length of the grayscale value is greater than 1. The forward grayscale difference of the 2nd and 3rd pixel points in the sequence is equal to 5, and the grayscale values of these two pixels are 238 and 248 respectively. The encoding lengths of the grayscale values 238 and 248 are both equal to 4. Therefore, the forward grayscale difference of the 2nd and 3rd pixel points in the sequence is equal to 10 and the encoding length of the grayscale value is greater than 1. Therefore, the candidate grayscale difference There are two pixels that can be optimized, the second and third pixels in the sequence.
[0065] Furthermore, the compression contribution of the candidate grayscale difference is calculated based on the difference between the coding length of the grayscale values of all optimizable pixels and the coding length of the preferred node. The calculation formula for the compression contribution of the candidate grayscale difference is:
[0066] ;
[0067] Where, is the compression contribution of the candidate grayscale difference, is the candidate grayscale difference The encoding length of the gray value of the pixel can be optimized. is the encoding length of the preferred node of the candidate grayscale difference, is the number of all optimizable pixels of the candidate grayscale difference.
[0068] It should be noted that when the optimizable pixels are compressed and encoded by encoding the preferred nodes of the candidate grayscale differences, the length of the compressed encoding result is equal to When the optimized pixel is compressed by encoding the gray value of the optimized pixel, the length of the compressed encoding result is equal to Therefore, compared with compressing the optimizable pixels by encoding the grayscale values of the optimizable pixels, when compressing the optimizable pixels by encoding the preferred nodes of the candidate grayscale differences, the length of the compression coding result can be shortened by The larger the value is, the better the compression effect is, and the greater the compression contribution of the corresponding candidate grayscale difference is. By comparing and calculating the encoding of the preferred node of the candidate grayscale difference and the encoding of the grayscale value of the optimizable pixel, when the optimizable pixel is compressed and encoded, the compression encoding result can be shortened to a length, thereby quantifying the compression contribution of the candidate grayscale difference.
[0069] It should be noted that, when there is no optimizable pixel in the candidate grayscale difference, that is, when the number of optimizable pixels in the candidate grayscale difference is equal to 0, the compression contribution of the candidate grayscale difference is equal to 0.
[0070] For example, due to the candidate grayscale difference There is no pixel that can be optimized, so the candidate grayscale difference The compression contribution is equal to 0; for the candidate grayscale difference , candidate grayscale difference The encoding length of the two grayscale values of the pixels can be optimized and are all equal to 4, the encoding length of the preferred node of the candidate grayscale difference , then the candidate grayscale difference Compression contribution .
[0071] S4. Select a target grayscale difference from all forward grayscale differences whose compression contributions are greater than 0.
[0072] Specifically, a target grayscale difference is selected from all forward grayscale differences whose compression contributions are greater than 0.
[0073] In one embodiment, a forward grayscale difference is randomly selected from all forward grayscale differences whose compression contributions are greater than 0 as the target grayscale difference.
[0074] It should be noted that, for the forward grayscale difference with a compression contribution greater than 0, when it is used as the target grayscale difference and the sequence is compression-encoded, the compression effect of the compression encoding result of the image data is enhanced compared to directly compressing the sequence through Huffman coding.
[0075] In another embodiment, from all forward grayscale differences with compression contributions greater than 0, the forward grayscale difference with the largest compression contribution is selected as the target grayscale difference.
[0076] It should be noted that, in order to maximize the compression effect of the compression encoding result of the image data, the forward grayscale difference with the largest compression contribution among all forward grayscale differences with compression contributions greater than 0 is used as the target grayscale difference.
[0077] For example, due to the candidate grayscale difference The compression contribution is equal to 0, and the candidate grayscale difference The compression contribution is equal to 6, so the candidate grayscale difference as the target grayscale difference.
[0078] S5. Compression-encode the optimizable pixel points and other pixel points of the target grayscale difference through encoding the preferred node and grayscale value of the target grayscale difference, obtain the compression encoding result of the image data, and transmit it.
[0079] Specifically, the encoding of the preferred node of the target grayscale difference is used as the encoding of the target grayscale difference; the sequence is compressed and encoded through the encoding of the target grayscale difference and each grayscale value, including: for a pixel point in the sequence, when the pixel point belongs to an optimizable pixel point of the target grayscale difference, the pixel point is compressed and encoded through the encoding of the target grayscale difference; when the pixel point does not belong to an optimizable pixel point of the target grayscale difference, the pixel point is compressed and encoded through the encoding of the grayscale value of the pixel point, thereby obtaining the compression encoding results of all the pixel points in the sequence, and the compression encoding results of all the pixel points in the sequence are combined into the compression encoding results of the image data; thereby, the compression encoding results of the image data are obtained and transmitted.
[0080] In addition, the frequency of each grayscale value, the target grayscale difference, and the preferred node of the target grayscale difference are used as supplementary information and transmitted to ensure the decodability and decoding accuracy of the compression coding result of the image data.
[0081] It should be noted that the present invention calculates the difference between the grayscale values of each pixel and its previous pixel as the forward grayscale difference of each pixel; calculates the compression contribution of each forward grayscale difference according to the difference between the coding length of the grayscale values of all optimizable pixels of each forward grayscale difference and the coding length of the preferred node, thereby obtaining the target grayscale difference, and the coding length of the preferred node of the target grayscale difference is smaller than the coding length of the grayscale value of each optimizable pixel of the target grayscale difference. When the sequence is compression-encoded, the optimizable pixels of the target grayscale difference are compression-encoded by encoding the preferred node of the target grayscale difference, thereby shortening the length of the compression coding result of the sequence, improving the compression effect of the image data, and further improving the transmission efficiency and real-time performance, ensuring fast and reliable data transmission under limited bandwidth, thereby supporting fast decision-making and effective action.
[0082] For example, when the grayscale values of the pixels in the sequence are 228, 238, 248, 253, 251, 253, 253, 253, 249, 253, 250, 249, the codes of the grayscale values 228, 238, 248, 249, 250, 251, 253 are 1100, 1101, 1010, 111, 1011, 100, 0, respectively; the sequence is compressed and encoded by Huffman coding, and the compression coding result obtained is 110011011010010000011101011111, and the length of the compression coding result is 30; when the sequence is compressed and encoded by the method of the present invention, the target grayscale difference is 10, and the code of the preferred node of the target grayscale difference is 0, the target grayscale difference has two optimizable pixels, and the compression coding result is 30. For the second and third pixels in the sequence, respectively, in the process of compression encoding the sequence by the method of the present invention, for the second and third pixels in the sequence, the two pixels are compression encoded by encoding the target grayscale difference 0, and for the other pixels in the sequence except the second and third, each pixel is compression encoded by encoding the grayscale value of each pixel, and the obtained compression encoding result is 110000010000011101011111, and the length of the compression encoding result is 24; in summary, the length of the compression encoding result obtained by compression encoding the sequence by the method of the present invention is shorter. Therefore, the method of the present invention can significantly reduce the amount of data, improve transmission efficiency and real-time performance, and ensure fast and reliable data transmission under limited bandwidth, thereby supporting fast decision-making and effective action.
[0083] Furthermore, when decoding the compressed coding result of the image data, a Huffman tree is first constructed according to the frequencies of all gray values in the supplementary information, and the coding of each gray value is obtained through the Huffman tree. According to the preferred node of the target gray difference, the coding of the preferred node of the target gray difference is determined from the Huffman tree; when decoding the compressed coding result of the image data through the coding of each gray value and the coding of the preferred node of the target gray difference, when the coding to be decoded is both the gray value When the encoding is the encoding of the preferred node of the target grayscale difference, first calculate the sum of the previous decoding result and the target grayscale difference, and then judge whether the sum is in the range of [0,255]. If the sum is in the range of [0,255], the sum is used as the decoding result of the encoding to be decoded. If the sum is not in the range of [0,255], the grayscale value is The decoding result of the encoding to be decoded.
[0084] Exemplarily, according to the codes 1100, 1101, 1010, 111, 1011, 100, 0 of the grayscale values 228, 238, 248, 249, 250, 251, 253, and the code 0 of the preferred node with the target grayscale difference C=10, the compressed coding result 1100, 0, 0, 0, 100, 0, 0, 0, 111, 0, 1011, 111 is decoded:
[0085] (1) First decode "1100" and the decoded result is a grayscale value of 228.
[0086] (2) When decoding “0”, since “0” is both the code of the grayscale value 253 and the code of the preferred node of the target grayscale difference, it is necessary to first calculate the sum of the previous decoding result, that is, the grayscale value 228 and the target grayscale difference C=10, which is equal to 238, and then determine whether the sum 238 is in the range of [0,255]. Since the sum 238 is in the range of [0,255], 238 is used as the decoding result of “0”.
[0087] (3) Similarly, when decoding the next “0”, the decoding result is 248.
[0088] (4) When decoding the next “0”, since “0” is both the code of the grayscale value 253 and the code of the preferred node of the target grayscale difference, it is necessary to first calculate the sum of the previous decoding result, that is, the grayscale value 248 and the target grayscale difference C=10, which is equal to 258, and then determine whether the sum 258 is in the range [0,255]. Since the sum 258 is not in the range [0,255], the grayscale value 253 is used as the decoding result of “0”.
[0089] (5) Similarly, the decoding results of “100”, “0”, “0”, “0”, “111”, “0”, “1011”, and “111” are 251, 253, 253, 253, 249, 253, 250, and 249 respectively.
[0090] In the description of this specification, "multiple" and "several" mean at least two, such as two, three or more, unless otherwise clearly defined.
[0091] While this specification has shown and described several embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Numerous modifications, variations, and alternatives will occur to those skilled in the art without departing from the concept and spirit of the present invention. It should be understood that in practicing the present invention, alternatives to the embodiments of the present invention described herein may be employed.
Claims
1. A real-time transmission method for a mobile satellite communication station, characterized in that: include: For the sequence of all pixels in the image data to be transmitted, a Huffman tree is constructed based on the frequency of each grayscale value in the sequence. Each grayscale value corresponds to a leaf node in the Huffman tree. The difference between the grayscale value of each pixel and its previous pixel is used as the forward grayscale difference of each pixel. For all candidate grayscale differences in the forward grayscale differences :Record the grayscale value corresponding to the leaf node as , and the grayscale value is equal to The minimum gray value of the previous pixel of all pixels and maximum value ;when and When the intersection of is empty, the leaf node is assigned to the candidate grayscale difference; Obtain the preferred node with the shortest encoding length among the leaf nodes assigned to the candidate grayscale difference; equalize the forward grayscale difference to And the encoding length of the gray value is greater than the encoding length of the preferred node The pixel points are recorded as optimizable pixels; according to the difference between the grayscale values of all optimizable pixels and the coding length of the preferred node, the compression contribution of the candidate grayscale difference is calculated; Select a target grayscale difference from all forward grayscale differences whose compression contribution is greater than 0; By encoding the preferred nodes of the target grayscale difference, the pixels that can be optimized of the target grayscale difference are compressed and encoded, and by encoding the grayscale values, the pixels other than the pixels that can be optimized are compressed and encoded to obtain the compressed encoding result of the image data and transmit it; When there is no pixel point that can be optimized in the candidate grayscale difference, the compression contribution of the candidate grayscale difference is equal to 0.
2. The real-time transmission method of a mobile satellite communication station according to claim 1, characterized in that: The method for obtaining the sequence composed of all pixels in the image data to be transmitted is: All pixels in the image data are organized into a sequence in order; the sequence includes row order, column order, and zigzag order.
3. The real-time transmission method of a mobile satellite communication station according to claim 1, characterized in that: The method for obtaining the frequency of each gray value is: Equal the gray value to The number of times a pixel appears in the sequence The total number of all pixels in the sequence Ratio , as the grayscale value frequency, The value range is .
4. The real-time transmission method of a mobile satellite communication station according to claim 1, characterized in that: Forward grayscale differences with the same value belong to the same type of forward grayscale difference.
5. The real-time transmission method of a mobile satellite communication station according to claim 1, characterized in that: The grayscale value encoding is obtained as follows: The labels of all paths from the root node to each leaf node in the Huffman tree are used to form the code of each leaf node; The encoding of the leaf node corresponding to each grayscale value in the Huffman tree is used as the encoding of each grayscale value.
6. The real-time transmission method of a mobile satellite communication station according to claim 1, characterized in that: The step of calculating the compression contribution of the candidate grayscale difference based on the difference between the grayscale values of all optimizable pixels and the coding length of the preferred node includes: ; Where, is the compression contribution of the candidate grayscale difference, is the candidate grayscale difference The encoding length of the gray value of the pixel can be optimized. is the encoding length of the preferred node of the candidate grayscale difference, is the number of all optimizable pixels of the candidate grayscale difference.
7. The real-time transmission method of a mobile satellite communication station according to claim 1, characterized in that: The step of selecting a target grayscale difference from all forward grayscale differences whose compression contributions are greater than 0 includes: From all forward grayscale differences whose compression contribution is greater than 0, a forward grayscale difference is randomly selected as the target grayscale difference.
8. The real-time transmission method of a mobile satellite communication station according to claim 1, characterized in that: The step of selecting a target grayscale difference from all forward grayscale differences whose compression contributions are greater than 0 includes: From all forward grayscale differences with compression contributions greater than 0, the forward grayscale difference with the largest compression contribution is selected as the target grayscale difference.
9. The real-time transmission method of a mobile satellite communication station according to claim 1, characterized in that: The transmission further includes: taking the frequency of each grayscale value, the target grayscale difference and the preferred node of the target grayscale difference as supplementary information and transmitting them.
Citation Information
Patent Citations
Special transport vehicle alarm system based on Beidou satellite navigation and positioning
CN111080983A
Video coding attention calibration system based on key characteristics of coal mine driving working face
CN116612436A
Image processing method and image processing apparatus
US20100290712A1