Image data conversion method and system suitable for wireless transmission module
By dividing image data into regions and performing differential encoding, combined with UDP protocol and FEC encoding, the image compression problem of wireless transmission modules in high dynamic scenarios is solved, and efficient and reliable image data transmission is achieved.
Patent Information
- Application Number
- CN202511731725.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-02-17
AI Technical Summary
Existing image data conversion technologies are not fully adapted to the dynamic characteristics of wireless transmission modules, resulting in block artifacts or blurring after image compression in high dynamic scenes, and delays and packet loss are prone to occur during transmission.
By analyzing the ROI and non-ROI regions in the original image, different encoding methods (H.265 and JPEG) are used to compress the data in each region. The data is then encapsulated and transmitted using UDP protocol and FEC encoding. The receiving end performs data packet verification and recovery.
It improves the flexibility and efficiency of image data transmission, avoids image compression blockiness and blurring, and enhances the reliability and integrity of transmission.
Smart Images

Figure CN121547587A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image data conversion technology, and in particular to an image data conversion method and system suitable for wireless transmission modules. Background Technology
[0002] Efficient transmission of image data is one of the core requirements of modern information interaction. Wireless transmission modules, with their advantages of flexible deployment and no physical cable constraints, have become the mainstream carrier for image data transmission and are widely used in key areas such as security monitoring, telemedicine, industrial vision, and smart terminal interaction.
[0003] With the development of IoT and 5G communication technologies, the bandwidth and transmission rate of wireless transmission modules have gradually improved. However, existing image data conversion technologies mostly use generalized conversion logic, such as traditional algorithms like lossy compression based on JPEG and lossless compression based on PNG, or simply reduce data volume through pixel sampling. The core logic of these solutions is to process image data through a fixed compression ratio or sampling rules, which does not fully adapt to the dynamic characteristics of wireless transmission modules—such as fluctuations in the actual available bandwidth of the module in different scenarios, differences in noise interference during transmission, and the differentiated requirements for image accuracy in different application scenarios.
[0004] Regarding the aforementioned technologies, since the traditional JPEG / H.265 encoding algorithm uses fixed quantization parameters, in high dynamic scenes (such as rapid movement in drone inspections), the background texture is complex and the motion amplitude is large, resulting in blockiness or blurring after image compression. Summary of the Invention
[0005] To avoid image compression resulting in blockiness or blurring, this invention provides an image data conversion method and system suitable for wireless transmission modules.
[0006] In a first aspect, the present invention provides an image data conversion method suitable for wireless transmission modules, employing the following technical solution: An image data conversion method suitable for wireless transmission modules includes: Step 1: Obtain the original image and network status; Step 2: Perform a preset motion region analysis based on the original image to obtain the ROI region and non-ROI region; Step 3: Obtain ROI data through the ROI region; Step 4: Obtain non-ROI data through non-ROI regions; Step 5: Obtain the corresponding first and second bitrates based on the network status; Step 6: Control the ROI data to be compressed using preset H.265 encoding and a first bit rate to form compressed ROI data; Step 7: Control the non-ROI data to be compressed using preset JPEG encoding and a second bitrate to form compressed non-ROI data; Step 8: Encapsulate the compressed ROI data and compressed non-ROI data into a package; Step 9: Decode the package and reassemble it to form the output image and output it.
[0007] By adopting the above technical solution, the ROI and non-ROI regions in the original image are analyzed, and the data in the two regions are compressed according to different codes. The compressed data packets are then encapsulated and transmitted to obtain the output image. This avoids the delay and packet loss caused by using a fixed code to compress all data, and improves the flexibility and efficiency of data compression and transmission.
[0008] Optionally, methods for performing pre-defined motion region analysis on the original image to obtain ROI and non-ROI regions include: Step 20: Parse the original image to obtain image frames; Step 21: Select image frames according to preset continuity rules to obtain a continuous image frame group; Step 22: Analyze consecutive image frames to obtain motion information; Step 23: Obtain the velocity field based on motion information; Step 24: Obtain a continuous velocity set according to the continuity rule; Step 25: Obtain the acceleration value and direction based on the velocity set; Step 26: If the acceleration value exceeds the preset acceleration standard value, define the corresponding region as the ROI region according to the acceleration direction; Step 27: If the acceleration value does not exceed the acceleration standard value, define the corresponding region as a non-ROI region according to the acceleration direction.
[0009] By employing the above technical solution, image frames are obtained through parsing the original image. Motion information is then extracted by analyzing groups of consecutive image frames, leading to the velocity field, continuous velocity groups, and acceleration values and directions. This information is used to divide the Region of Interest (ROI) and non-ROI regions. This avoids the problem of fixed region division failing to dynamically adapt to changes in motion states within the image, thus improving the accuracy and dynamic adaptability of ROI and non-ROI region division.
[0010] Optionally, methods for obtaining motion information include: Step 220: Select image frames according to the continuity rule to obtain two consecutive image frames; Step 221: Obtain the pixel points corresponding to two consecutive image frames; Step 222: Obtain the grayscale value and color value based on the pixel; Step 223: Obtain the grayscale difference and color difference based on the grayscale value and color value; Step 224: When the grayscale difference reaches the preset grayscale standard deviation value and the color difference reaches the preset standard color difference value, the corresponding pixel is taken as the moving point; Step 225: Merge all moving points to define the motion region; Step 226: Combine the grayscale difference and color difference within the motion area into motion information.
[0011] By employing the above technical solution, two consecutive image frames are selected, the grayscale and color values of corresponding pixels are obtained, and the difference is calculated. Pixels with both grayscale and color differences meeting the criteria are merged into a motion region, thereby obtaining motion information. This avoids the misjudgment problem caused by judging motion regions solely based on a single grayscale or color feature, improving the accuracy and reliability of motion information extraction.
[0012] Optionally, methods for encapsulating compressed ROI data and compressed non-ROI data into a package include: Step 80: Obtain the non-ROI bitrate corresponding to the non-ROI region and the ROI bitrate corresponding to the ROI region; Step 81: Find the corresponding bitrate adjustment based on the network status; Step 82: Control the non-ROI bitrate and ROI bitrate to adjust the bitrate according to the adjusted bitrate to obtain the first bitrate and the second bitrate; Step 83: Compress the ROI data and non-ROI data according to the first bitrate, the second bitrate, and the corresponding encoding to obtain compressed ROI data and compressed non-ROI data; Step 84: Obtain raw data from the original image; Step 85: Obtain redundant data using the original data and the preset FEC encoding; Step 86: Based on the preset UDP protocol and redundant data, encapsulate the compressed ROI data and compressed non-ROI data to obtain ROI encapsulation package and non-ROI encapsulation package.
[0013] By adopting the above technical solution, the first and second bitrates are obtained by acquiring the non-ROI bitrate and ROI bitrate, and then compressed after adjusting the bitrate according to the network condition. The original data is then used to generate FEC redundant data, and finally, the compressed data is encapsulated with the redundant data based on the UDP protocol to form a packet. This avoids the problems of packet loss and poor adaptability caused by not adjusting the bitrate according to the network condition and lacking redundancy protection during data encapsulation, thus improving the flexibility of data encapsulation and the reliability of transmission.
[0014] Optionally, methods for decoding and reassembling the encapsulated packets to form an output image and then outputting it include: Step 860: Output the ROI package and the non-ROI package to obtain the output package; Step 861: Disassemble the output encapsulation packet to obtain the output data packet and the output redundant packet; Step 862: If the output data packet matches the output redundant packet, the output data packet is reassembled to obtain the output image and then output. Step 863: If the output data packet and the output redundant packet are inconsistent, obtain the recovery data packet based on the output redundant packet and the output data packet; Step 864: Reassemble the output data packet and the recovery data packet to obtain the output image and output it.
[0015] By adopting the above technical solution, the output data packet and the output redundant packet are obtained by disassembling the output encapsulation packet. When the two are consistent, the output data packet is directly reassembled to reconstruct the image; when they are inconsistent, the output redundant packet is combined to obtain the recovered data packet and then reassembled. This avoids the problem of incomplete image due to data loss when relying solely on data packets to reconstruct the image, and improves the fault tolerance of image data decoding and reconstruction and the integrity of the output image.
[0016] Optionally, methods for reconstructing the output data packet and the recovery data packet to obtain the output image and then outputting it include: Step 8640: Obtain segmented images from the original image using a preset processing method; Step 8641: Number the segmented images to obtain image numbers and their corresponding numbering order; Step 8642: Output the images corresponding to the image numbers to obtain the corresponding image packets and define them as output data packets; Step 8643: Combine the output data packets according to their corresponding image numbers in numerical order to obtain the output image; Step 8644: If the output image is consistent with the original image, then output the output image directly; Step 8645: If the output image is inconsistent with the original image, then obtain the restored image and the corresponding restored image number based on the output data packet and the restored data packet; Step 8646: Combine the output data packet and the recovered image according to the corresponding image number and the recovered image number in numerical order to obtain the output image and output it.
[0017] By employing the above technical solution, the original image is divided into blocks and numbered. Data packets are then combined according to these numbers to obtain the output image. When images are inconsistent, they are recombined with the recovered data packets and their corresponding numbers for re-output. This avoids image distortion caused by missing or incorrectly ordered data during image reconstruction, improving the accuracy and completeness of image reconstruction and enhancing the reliability of image transmission.
[0018] Optionally, it also includes a method for processing the original image according to a preset processing method, the method including: Step 86400: Divide the original image into blocks according to a preset block division scheme to obtain block images; Step 86401: Obtain the corresponding high-frequency coefficients of the segmented images according to the preset DCT transformation scheme; Step 86402: If the high-frequency coefficient of the image is less than the preset coefficient standard value, then the high-frequency coefficient of the image is regarded as 0 and output. Step 86403: If the high-frequency coefficients of the image are greater than or equal to the standard value of the coefficients, then the high-frequency coefficients of the image are retained and output.
[0019] By employing the above technical solution, high-frequency coefficients of the image are obtained by dividing the original image into blocks and performing DCT transformation. High-frequency coefficients smaller than the standard value are treated as 0, while those greater than or equal to the standard value are retained. This avoids the problems of excessive data redundancy and low transmission efficiency caused by retaining all high-frequency coefficients, thus improving the simplification of image data processing and transmission efficiency.
[0020] Optionally, methods for obtaining network status include: Step 10: Obtain the test data packet; Step 11: Obtain the test parameters based on the test data packet; Step 12: Obtain the bandwidth parameters based on the test parameters and the preset test calculation formula; Step 13: Obtain the network status by comparing the bandwidth parameters with the preset bandwidth standard parameters.
[0021] By adopting the above technical solution, test parameters are obtained by acquiring test data packets, bandwidth parameters are calculated using a preset formula, and then compared with standard bandwidth parameters to determine the network status. This avoids the inaccuracy problem caused by judging network status based on a single indicator and improves the reliability of obtaining network status.
[0022] Optionally, it also includes a method for adjusting bandwidth parameters, the method comprising: Step 14: Obtain historical bandwidth data; Step 15: Obtain historical bandwidth patterns based on historical bandwidth data; Step 16: Obtain the future bandwidth status based on historical bandwidth patterns and a pre-set future model; Step 17: Find the corresponding future bandwidth parameters based on the future bandwidth status; Step 18: Adjust the bandwidth parameters according to the future bandwidth parameters.
[0023] By adopting the above technical solution, historical bandwidth data is acquired and patterns are extracted. Combined with future models, the future bandwidth status is determined, and corresponding future bandwidth parameters are then identified to adjust the current bandwidth parameters. This avoids the lag problem caused by adjusting only based on real-time bandwidth parameters, improving the foresight and adaptability of bandwidth parameter adjustments.
[0024] Secondly, the present invention provides an image data conversion system suitable for wireless transmission modules, employing the following technical solution: An image data conversion system suitable for wireless transmission modules, comprising: The acquisition module is used to acquire raw images, network status, pixels, non-ROI bitrate, ROI bitrate, test data packets, and historical bandwidth data. The memory is used to store the program of the control method for the image data conversion method applicable to the wireless transmission module as described above; The processor loads and executes programs from memory.
[0025] By adopting the above technical solution, the acquisition module uniformly acquires various key data such as original images and network status. Combined with the control program stored in the memory, the processor loads and executes the program to realize the image data conversion method. This avoids the inefficiency caused by scattered data acquisition and inconsistent processing logic, ensuring the orderly execution of the entire process from image data acquisition, processing to transmission, and improving the system's integration and operational stability.
[0026] In summary, the present invention has at least one of the following beneficial technical effects: 1. By dividing the original image into different regions, compressing the data corresponding to different regions according to different codes, and then encapsulating the compressed data and transmitting it to the receiving end, the receiving end can analyze and recover the lost data, thus avoiding the problem of incomplete data transmission and stuttering caused by a single code, improving the compression efficiency of high dynamic scenes. An adaptive quantization algorithm is designed to dynamically adjust the compression parameters according to the motion amplitude and texture complexity, maximizing image quality under bandwidth constraints. 2. After obtaining redundant data via UDP protocol and FEC encoding, it is transmitted to the receiving end along with the processed and compressed original data. The receiving end compares the received encapsulated packets and analyzes whether there is any missing data. Then, it recovers the missing data using the redundant data, thus avoiding the problem of incomplete output image caused by packet loss during transmission and improving the integrity of the output image. Attached Figure Description
[0027] Figure 1 This is a flowchart of an image data conversion method applicable to a wireless transmission module in an embodiment of this application; Figure 2 This is a modular architecture diagram of an image data conversion method applicable to a wireless transmission module in an embodiment of this application; Figure 3 This is a flowchart of the hierarchical coding process in the embodiments of this application. Detailed Implementation
[0028] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0029] This invention discloses an image data conversion method suitable for wireless transmission modules.
[0030] Reference Figure 1 , Figure 2 and Figure 3 An image data conversion method suitable for wireless transmission modules, comprising: Step 1: Obtain the original image and network status.
[0031] Raw images refer to unprocessed images or video frames. This is acquired by the system using existing devices. For example, a camera continuously captures video frames of a monitored area. Network status refers to current network parameters. These include parameters such as bandwidth, RTT latency, and packet loss rate. This is acquired by the system periodically sending and receiving probe packets to the receiving end. The network latency is determined based on the sending and receiving time, and the packet loss rate is determined based on the difference in the number of data packets sent and received.
[0032] Step 2: Perform a preset motion region analysis based on the original image to obtain the ROI region and non-ROI region.
[0033] Motion region analysis (MRA) is an analytical method that divides an image into regions based on its motion information. Regions of Interest (ROIs) are key areas in the image that, after MRA, exhibit significant motion characteristics and have core value for transmission or analysis. Non-ROIs are secondary areas in the image that, after MRA, exhibit weak motion characteristics (such as slowly moving leaves or a slightly swaying background) or no motion at all (such as stationary walls, ground, or fixed equipment) and have lower value for transmission or analysis. The approach here is to define regions with significant motion characteristics and core value for transmission or analysis as ROIs after MRA, and to define regions with weak or no motion characteristics and lower value for transmission or analysis as non-ROIs.
[0034] Step 3: Obtain ROI data through the ROI region.
[0035] ROI data refers to the core image information extracted from the ROI region for subsequent encoding and transmission. Here, it is obtained by the system using image data extraction algorithms to specifically process the ROI region.
[0036] Step 4: Obtain non-ROI data through non-ROI regions.
[0037] Non-ROI data refers to secondary data extracted from non-ROI regions for subsequent encoding and transmission. The method for obtaining this data is the same as described in step 3, and will not be repeated here.
[0038] Step 5: Obtain the corresponding first bitrate and second bitrate based on the network status.
[0039] The first bitrate refers to the bitrate used when encoding ROI data. The second bitrate refers to the bitrate used when encoding non-ROI data. It is obtained by using parameters such as bandwidth rate, RTT latency, and packet loss rate acquired by the system, and determined through a preset bitrate adjustment strategy. This strategy includes adjusting the bitrate; the system adjusts the original bitrate according to the adjusted bitrate to obtain the first and second bitrates.
[0040] Step 6: Control the ROI data to be compressed using preset H.265 encoding and a first bit rate to form compressed ROI data.
[0041] H.265 encoding refers to High Efficiency Video Coding, used for processing ROI data. Compressed ROI data refers to ROI data compressed using H.265 encoding. This is achieved by the system activating the H.265 encoding module to perform targeted compression on the ROI data.
[0042] Step 7: Control the non-ROI data to be compressed using preset JPEG encoding and a second bitrate to form compressed non-ROI data.
[0043] JPEG encoding is a still image compression standard developed by the Joint Photographic Experts Group (JAPG) for processing non-ROI (Responsibility for Interest) data. Compressed non-ROI data refers to non-ROI data compressed using JPEG encoding. In this case, the system activates the JPEG encoding module to perform targeted compression on the non-ROI data.
[0044] Step 8: Encapsulate the compressed ROI data and compressed non-ROI data into a package.
[0045] A packet is a single data unit used for network transmission. Here, it is formed by integrating compressed ROI data and compressed non-ROI data according to the format requirements of the transmission protocol and adding key information.
[0046] Step 9: Decode the package and reassemble it to form the output image and output it.
[0047] The output image refers to an image or video frame that reconstructs the complete scene information from the encapsulated data. Here, the system divides the original image into blocks and marks them. After various processing steps, the image data is transmitted to obtain encapsulated packets. The data within these packets is then stitched together according to the original markings to obtain the output image.
[0048] The data in the encapsulated packet is processed according to decoding rules and reassembly logic to form the final image. The output method here is either displaying the image on a monitor or storing it in memory.
[0049] The methods for obtaining ROI and non-ROI regions by performing pre-defined motion region analysis on the original image include: Step 20: Analyze the original image to obtain image frames.
[0050] An image frame refers to a single static image with independent and complete picture information. Here, it is obtained by the system splitting the original video image into a frame sequence and directly outputting the resulting single independent static images as image frames.
[0051] Step 21: Select image frames according to preset continuity rules to obtain a continuous image frame group.
[0052] A continuity rule refers to a rule that filters image frames within adjacent or consecutive time periods based on the natural playback sequence of image frames in the original video. A consecutive image frame group refers to a set of multiple image frames that conform to the continuity rule and are selected from the image frame sequence. This is achieved by the system first reading the timing identifier of the image frames, then filtering out adjacent or consecutive time periods according to the continuity rule and the natural playback sequence of the original video, and integrating them into groups.
[0053] Step 22: Analyze the continuous image frame groups to obtain motion information.
[0054] Motion information refers to information about whether corresponding pixels in an image are moving. Here, it is obtained by the system acquiring the grayscale and color values of the same pixel in consecutive images, calculating the difference, and when the difference exceeds a standard value, the pixel is considered a moving point. The motion information is obtained by outputting the differences corresponding to all moving points.
[0055] Step 23: Obtain the velocity field based on the motion information.
[0056] The velocity field is a vector field used to describe the magnitude and direction of motion velocity at various locations in an image. It is obtained here by calculating the ratio of the displacement of corresponding pixels or regions between adjacent frames to the time interval.
[0057] Step 24: Obtain a continuous velocity group according to the continuous rule.
[0058] A velocity group refers to a collection of multiple velocity fields that have continuous time intervals or are adjacent to each other. This is obtained by the system reading the temporal identifiers of the velocity field sequence (such as the timestamp and frame number of the corresponding image frame), and then filtering and integrating the velocity fields according to the continuity rule.
[0059] Step 25: Obtain the acceleration value and direction based on the velocity set.
[0060] Acceleration value refers to the ratio of the change in velocity of the same pixel across consecutive velocity fields to time. Acceleration direction refers to the direction of the change in velocity of the same pixel when its motion velocity changes. This is obtained by the system performing difference calculations and direction analysis on the consecutive velocity fields within the velocity group.
[0061] Step 26: If the acceleration value exceeds the preset acceleration standard value, define the corresponding region as the ROI region according to the acceleration direction.
[0062] The acceleration standard value is a critical value used to determine whether an acceleration value can define a region as a Region of Interest (ROI). It is obtained by professionals in the field through experiments based on various scenarios and then input into the system. For example, the acceleration corresponding to normal pedestrian movement is approximately 15-30 pixels / second², and the acceleration corresponding to swaying leaves is 5-15 pixels / second², so the acceleration standard value can be set to 15 pixels / second².
[0063] If the acceleration value exceeds the preset acceleration standard value, it means that the area corresponding to the acceleration value is the area of key information. Therefore, the corresponding area is defined as the ROI area according to the acceleration direction.
[0064] Step 27: If the acceleration value does not exceed the acceleration standard value, define the corresponding region as a non-ROI region according to the acceleration direction.
[0065] If the acceleration value does not exceed the acceleration standard value, it means that the area corresponding to the acceleration value is not the area of key information. Therefore, the corresponding area is defined as a non-ROI area according to the acceleration direction.
[0066] The methods for obtaining motion information include: Step 220: Select image frames according to the continuity rule to obtain two consecutive image frames.
[0067] The method here is to filter image frames according to the continuity rule to obtain two adjacent image frames as two consecutive image frames.
[0068] Step 221: Obtain the pixel points corresponding to two consecutive image frames.
[0069] A pixel is the smallest independent imaging unit that makes up an image frame. Here, the method for obtaining pixels involves the system first locating two consecutive image frames, and then using image coordinate matching technology to extract pixels at the same coordinate positions in the two frames.
[0070] Step 222: Obtain the grayscale value and color value based on the pixel.
[0071] Grayscale values represent the brightness or darkness of a pixel. Color values represent the color information of a pixel. These are obtained by the system extracting attributes from the target pixels using image data parsing techniques.
[0072] Step 223: Obtain the grayscale difference and color difference based on the grayscale value and color value.
[0073] Grayscale difference refers to the numerical difference in brightness of the same pixel. Color difference refers to the numerical difference in color information of the same pixel. It is obtained by subtracting the two grayscale values and the two color values of the same pixel.
[0074] Step 224: When the grayscale difference reaches the preset grayscale standard deviation value and the color difference reaches the preset standard color difference value, the corresponding pixel is taken as the moving point.
[0075] Grayscale standard deviation refers to the critical value used to determine whether there is motion based on the degree of change in the brightness of a pixel. Standard color difference refers to the critical value used to determine whether there is motion based on the degree of change in the color of a pixel.
[0076] A moving point is a pixel that is defined as a region of motion.
[0077] When the grayscale difference reaches the preset grayscale standard deviation and the color difference reaches the preset standard color difference, it indicates that the point has a large change and belongs to the moving area. Therefore, the corresponding pixel is regarded as the moving point.
[0078] Step 225: Merge all moving points to define the motion region.
[0079] Connect the moving points to form a region that includes all the moving points; this region is considered the motion region.
[0080] Step 226: Combine the grayscale difference and color difference within the motion area into motion information.
[0081] The grayscale difference and color difference of all pixels identified as moving points within the moving area, along with the coordinate positions of these pixels within the moving area and the overall statistical characteristics of the area (such as the average grayscale difference and the maximum color difference within the area), are integrated into motion information.
[0082] The methods for encapsulating compressed ROI data and compressed non-ROI data into a package include: Step 80: Obtain the non-ROI bitrate corresponding to the non-ROI region and the ROI bitrate corresponding to the ROI region.
[0083] Non-ROI bitrate refers to the raw bitrate used when encoding non-ROI data. ROI bitrate refers to the raw bitrate used when encoding ROI data. It is obtained by experts in the field who analyze the data corresponding to ROI and non-ROI regions and then allocate the bitrate accordingly. For example, 70% bitrate is allocated to the ROI region data, and only 30% bitrate is allocated to the non-ROI region data.
[0084] Step 81: Find the corresponding bitrate adjustment based on the network status.
[0085] Adjusting the bitrate refers to the numerical adjustment needed based on the original bitrate. The lookup method here is that different network conditions correspond to different bitrates. The system subtracts the original bitrate from the corresponding bitrate and uses the resulting value as the adjusted bitrate. For example: when network bandwidth drops to 10Mbps, the bitrate in non-ROI areas is reduced first, such as decreasing the JPEG encoding quality factor Q from 50 to 30; when network bandwidth recovers to 15Mbps, the H.265 encoding quality in ROI areas is improved, such as increasing the CRF value from 23 to 18.
[0086] Step 82: Control the non-ROI bitrate and ROI bitrate to adjust according to the adjusted bitrate to obtain the first bitrate and the second bitrate.
[0087] The method used here is to add or subtract the non-ROI bitrate and ROI bitrate from the adjusted bitrate.
[0088] Step 83: Compress the ROI data and non-ROI data according to the first bitrate, the second bitrate, and the corresponding encoding to obtain compressed ROI data and compressed non-ROI data.
[0089] Compressed ROI data refers to structured data containing encoded information and compressed image or video content obtained after compressing data from the ROI region. Compressed non-ROI data refers to structured data containing encoded information and compressed image or video content obtained after compressing data from non-ROI regions. This is achieved by the system encoding and compressing the data according to the corresponding encoding. For example, ROI regions are compressed using H.265 encoding, while non-ROI regions are compressed using JPEG encoding.
[0090] Step 84: Obtain the raw data based on the original image.
[0091] Raw data refers to the uncompressed, unencoded, or unprocessed low-level image data directly extracted from the original image. This is achieved by the system directly reading the low-level storage information of the raw image using image data parsing technology. For example, the system acquires a raw image file through an image acquisition device, skips any compression, encoding, or optimization, directly parses the image's pixel array structure, and extracts the original coordinates (x, y), original grayscale values, or original color values of all pixels. Simultaneously, it records the image's original basic attributes (such as resolution, color model, bit depth, frame rate, etc.). This pixel information is then integrated with the basic attributes to ultimately form the unprocessed raw data.
[0092] Step 85: Obtain redundant data using the original data and the preset FEC encoding.
[0093] FEC coding, or Forward Error Correction Coding, is a coding technique that proactively adds redundant information before data transmission to achieve error detection and correction. Redundant data refers to the extra information used for error detection and correction. Here, it is obtained by the system generating additional check information based on the original data according to preset FEC coding rules (such as Hamming codes, Reed-Solomon codes, or other specific algorithms).
[0094] Step 86: Based on the preset UDP protocol and redundant data, encapsulate the compressed ROI data and compressed non-ROI data to obtain ROI encapsulation package and non-ROI encapsulation package.
[0095] UDP stands for User Datagram Protocol, a connectionless, datagram-oriented transport layer communication protocol. ROI encapsulated packets are independent data packets formed by encapsulating compressed data and error correction information from ROI regions according to a specific format. Non-ROI encapsulated packets are independent data packets formed by encapsulating compressed data and error correction information from non-ROI regions according to a specific format. Here, the data is obtained by the system encapsulating it in two paths according to the UDP protocol specification.
[0096] The methods for decoding and reassembling the encapsulated packet to form an output image and then outputting it include: Step 860: Output the ROI package and the non-ROI package to obtain the output package.
[0097] An output packet refers to a collection or ordered data packet that combines ROI (Relationship of Interest) and non-ROI packets, forming a single packet that can be directly output to the receiving end and contains all packets to be transmitted. In this case, the method involves outputting both ROI and non-ROI packets to the receiving end, which treats all received packets as output packets.
[0098] Step 861: Disassemble the output encapsulation packet to obtain the output data packet and the output redundancy packet.
[0099] The output data packet refers to the core data portion containing the actual image or video content. The output redundancy packet refers to the auxiliary information portion generated through FEC encoding, used for error detection and correction. Here, it is obtained by disassembling the output encapsulation packet to obtain the core content and auxiliary verification information; the core content is considered the output data packet, and the auxiliary verification information is considered the output redundancy packet.
[0100] Step 862: If the output data packet is consistent with the output redundant packet, the output data packet is reassembled to obtain the output image and then output.
[0101] The method for obtaining this information has already been described in step 9 and will not be repeated here.
[0102] When the output data packet is consistent with the output redundant packet, it means that the data in the output data packet is complete and there is no packet loss. At this time, the output data packet is reassembled to obtain the output image and output it.
[0103] Step 863: If the output data packet and the output redundant packet are inconsistent, obtain the recovery data packet based on the output redundant packet and the output data packet.
[0104] A recovered data packet refers to a combination of data segments containing only the missing or erroneous parts of the output data packet, calculated using FEC encoding rules based on the output redundancy packet and the intact parts of the output data packet when inconsistencies such as loss or corruption exist in the output data packet. Here, the receiving end performs consistency checks between the output data packet and the output data packet using the verification rules in the output redundancy packet to locate the missing or corrupted data segments. Then, based on these verification rules, it uses the information from the output redundancy packet and the intact parts of the output data packet to reverse-engineer the data to obtain the data segments containing only the missing or erroneous parts.
[0105] When the output data packet and the output redundancy packet are inconsistent, it indicates that some data was lost during transmission. In order to output complete data, a recovery data packet is obtained based on the output redundancy packet and the output data packet.
[0106] Step 864: Reassemble the output data packet and the recovery data packet to obtain the output image and output it.
[0107] The method used here is the same as described in step 9, so it will not be repeated here.
[0108] The methods for recombining the output data packet and the recovery data packet to obtain the output image and then outputting it include: Step 8640: Obtain segmented images from the original image using a preset processing method.
[0109] The processing method refers to a preprocessing scheme that divides the original image into blocks. A block image refers to multiple independent image blocks of uniform size formed after the original image is decomposed. Here, the method is to convert the original image to the frequency domain using fixed-point DCT, analyze the image content features (such as detail complexity) using a preset frequency domain threshold, determine the uniform block size, and then divide the original image according to the size to obtain multiple independent image blocks as block images.
[0110] Step 8641: Number the segmented images to obtain the image numbers and their corresponding order.
[0111] Image ID refers to a unique number corresponding to each individual image patch. Numbering order refers to the ordered sequence of image IDs formed according to arrangement rules when assigning image IDs to image patches. This is achieved by the system assigning a unique identifier to each individual image patch in the image patch, and then arranging all the assigned image IDs according to the spatial relationship of their corresponding patches in the original image, forming an ordered numbering sequence.
[0112] Step 8642: Output the images corresponding to the image numbers to obtain the corresponding image packets and define them as output data packets.
[0113] After all the images are processed, they are output to the receiving end to obtain the total image packet, which is then used as the output data packet.
[0114] Step 8643: Combine the output data packets according to the corresponding image numbers in numerical order to obtain the output image.
[0115] The images are combined and stitched together in numerical order according to their corresponding image numbers to form the output image.
[0116] Step 8644: If the output image is consistent with the original image, then output the output image directly.
[0117] If the output image is identical to the original image, it means that the image composed of the data transmitted to the receiving end is complete, so the output image can be output directly.
[0118] Step 8645: If the output image is inconsistent with the original image, then obtain the restored image and the corresponding restored image number based on the output data packet and the restored data packet.
[0119] The recovered image refers to the missing image block in the output image that needs to be recovered. This is obtained in step 863 by acquiring the recovery data packet through the output data packet and output redundancy packet. Decoding this recovery data packet according to the corresponding encoding format (such as H.265, JPEG) generates the missing image block in the output image that needs to be recovered. The recovered image number is a unique number corresponding to the recovered image. This is obtained by comparing the output image with the original image, locating the corresponding number of the missing image block in the original segmented image, and binding this number to the corresponding recovered image.
[0120] If the output image is inconsistent with the original image, it means that there is a missing image. The missing image needs to be obtained first before the complete image can be output. Therefore, the recovered image and its corresponding recovery image number are obtained based on the output data packet and the recovery data packet.
[0121] Step 8646: Combine the output data packet and the recovered image according to the corresponding image number and the recovered image number in numerical order to obtain the output image and output it.
[0122] The combination method here is to sequentially splice the image blocks corresponding to the output data packet and the restored image according to the image number and the corresponding number order to form the output image.
[0123] This also includes a method for processing the original image according to a preset processing method, which includes: Step 86400: Divide the original image into blocks according to the preset block division scheme to obtain block images.
[0124] A segmentation scheme refers to a method of dividing the original image into image blocks of uniform size. Here, the segmentation scheme is fixed at 16×16 macroblocks. The specific method obtained here is to divide the original image into 16×16 macroblocks according to the segmentation scheme to obtain segmented images.
[0125] Step 86401: Obtain the corresponding high-frequency coefficients of the segmented images according to the preset DCT transformation scheme.
[0126] The Discrete Cosine Transform (DCT) scheme refers to the specific operational rules and parameter settings followed when performing a Discrete Cosine Transform (DCT) on a segmented image. High-frequency coefficients in an image are frequency domain coefficients representing rapidly changing information such as details, edges, and textures. Here, they are obtained by converting the segmented image from the spatial domain (pixel values) to the frequency domain (frequency coefficients) using the DCT transform, and then selecting the portions representing rapidly changing information such as details and edges from the frequency domain coefficients.
[0127] Step 86402: If the high-frequency coefficient of the image is less than the preset coefficient standard value, then the high-frequency coefficient of the image is regarded as 0 and output.
[0128] The standard value of the coefficient refers to the critical value for selecting high-frequency coefficients of images. This standard value is usually between 5 and 20, and is set in advance by professionals in this field according to their needs. For example, the monitoring images corresponding to indoor fixed positions have less noise, and the standard value of the coefficient can be set to 5 to 8.
[0129] If the high-frequency coefficient of the image is less than the preset standard value, it means that the image details in that area do not change significantly, and it may be a smooth area or a background part with little noise. In this case, the high-frequency coefficient of the image is regarded as 0 and output.
[0130] Step 86403: If the high-frequency coefficients of the image are greater than or equal to the standard value of the coefficients, then the high-frequency coefficients of the image are retained and output.
[0131] If the high-frequency coefficients of an image are greater than or equal to the standard value, it indicates that the image details in that area have changed significantly and may contain important edge, texture and other information. In this case, the high-frequency coefficients of the image should be retained and output.
[0132] The methods for obtaining network status include: Step 10: Obtain the test data packet.
[0133] A test data packet is a small data unit packet containing specific test information, generated and sent to probe the current network status (such as connectivity, latency, bandwidth, etc.). Here, the system automatically generates a small data unit containing specific test information (such as sender identifier, timestamp, packet sequence number, and pre-defined padding data) based on preset network test requirements, and encapsulates it in a fixed format to form a test data packet. For example, to test network latency, the system will generate a 128-byte data unit containing "current timestamp + sequence number 001" and encapsulate it as a test data packet.
[0134] Step 11: Obtain the test parameters based on the test data packet.
[0135] Test parameters refer to relevant parameters that can be used to analyze network status. These parameters are obtained by sending test data packets and receiving feedback information, then extracting and calculating quantitative indicators related to network status from the feedback results.
[0136] Step 12: Obtain the bandwidth parameters based on the test parameters and the preset test calculation formula.
[0137] The test calculation formula refers to the formula for calculating the current network status. Specifically, the formula is: Bandwidth (Mbps) ≈ Test packet length × 8 / Round-Trip Time (RTT) × Coefficient. For example, sending a 1000-byte (8000-bit) ICMP packet with an RTT of 10ms (0.01s), and using a coefficient of 0.5 (simplified assumption), the bandwidth would be ≈ 8000 / (0.01 × 0.5) = 1.6Mbps. This coefficient can be adjusted according to actual needs, and can be between 0.4 and 0.6. For example, if the network environment is relatively stable (e.g., indoor fixed scenarios with high signal strength), the coefficient can be set to 0.5 to 0.6. The bandwidth parameter refers to the amount of data that the current network can transmit per unit time. It is obtained by extracting the relevant parameters needed for the test calculation formula from the test parameters and then calculating them.
[0138] Step 13: Obtain the network status by comparing the bandwidth parameters with the preset bandwidth standard parameters.
[0139] Bandwidth standard parameters refer to reference values used to measure whether network bandwidth meets transmission requirements. Here, the bandwidth standard parameters are determined based on the actual transmission needs of the 4G video transmission system. For example, if the system requirement is "to transmit 1080P high-definition video in security monitoring," then the bandwidth standard parameter must be set to no less than 2Mbps.
[0140] This also includes a method for adjusting bandwidth parameters, which includes: Step 14: Obtain historical bandwidth data.
[0141] Historical bandwidth data refers to the amount of data that a network could transmit per unit of time in the past. Here, the system obtains this data by storing bandwidth parameters in memory, and outputting these stored parameters as historical bandwidth data when needed.
[0142] Step 15: Obtain historical bandwidth patterns based on historical bandwidth data.
[0143] Historical bandwidth patterns refer to the trend characteristics of bandwidth parameters changing with time, scenarios, and other factors, summarized by analyzing historical bandwidth data stored in the memory. The method used here is to perform multi-dimensional analysis and feature extraction on the historical bandwidth data stored in the memory and summarize the findings to obtain historical bandwidth patterns.
[0144] Step 16: Obtain the future bandwidth status based on historical bandwidth patterns and the preset future model.
[0145] A future model refers to a mathematical model constructed using machine learning algorithms (such as the LSTM model, which excels at handling time-series data) to predict future network bandwidth fluctuations. Future bandwidth status refers to the amount of data that the network can transmit per unit time within a future period, predicted by the future model (such as the LSTM model) in conjunction with historical bandwidth patterns. This is achieved by inputting historical bandwidth patterns (such as time periodicity and scene-related characteristics) and the current network's real-time bandwidth parameters into the future model (such as the LSTM model). The model learns from the "bandwidth variation patterns over time / scene" in the historical bandwidth patterns, performs time-series analysis and calculations on the input data, and outputs the specific range and trend of the amount of data that the network can transmit per unit time within the future period to obtain the future bandwidth status.
[0146] Step 17: Find the corresponding future bandwidth parameters based on the future bandwidth status.
[0147] The future bandwidth parameter refers to the specific bandwidth value extracted from the future bandwidth status and used to adjust the image transmission bitrate. The lookup method here is the same as that described in step 12, and will not be repeated here.
[0148] Step 18: Adjust the bandwidth parameters according to the future bandwidth parameters.
[0149] Adjust bandwidth parameters according to future bandwidth parameters.
[0150] Based on the same inventive concept, embodiments of the present invention provide an image data conversion system suitable for wireless transmission modules.
[0151] One example is an image data conversion system suitable for wireless transmission modules, comprising: The acquisition module is used to acquire raw images, network status, pixels, non-ROI bitrate, ROI bitrate, test data packets, and historical bandwidth data.
[0152] The memory is used to store a program for a control method suitable for an image data conversion method of a wireless transmission module.
[0153] The processor loads and executes programs from memory.
[0154] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0155] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. An image data conversion method suitable for wireless transmission modules, characterized in that, include: Step 1: Obtain the original image and network status; Step 2: Perform a preset motion region analysis based on the original image to obtain the ROI region and non-ROI region; Step 3: Obtain ROI data through the ROI region; Step 4: Obtain non-ROI data through non-ROI regions; Step 5: Obtain the corresponding first and second bitrates based on the network status; Step 6: Control the ROI data to be compressed using preset H.265 encoding and a first bit rate to form compressed ROI data; Step 7: Control the non-ROI data to be compressed using preset JPEG encoding and a second bitrate to form compressed non-ROI data; Step 8: Encapsulate the compressed ROI data and compressed non-ROI data into a package; Step 9: Decode the package and reassemble it to form the output image and output it.
2. The image data conversion method for a wireless transmission module according to claim 1, characterized in that, Methods for performing pre-defined motion region analysis on the original image to obtain ROI and non-ROI regions include: Step 20: Parse the original image to obtain image frames; Step 21: Select image frames according to preset continuity rules to obtain a continuous image frame group; Step 22: Analyze consecutive image frames to obtain motion information; Step 23: Obtain the velocity field based on motion information; Step 24: Obtain a continuous velocity set according to the continuity rule; Step 25: Obtain the acceleration value and direction based on the velocity set; Step 26: If the acceleration value exceeds the preset acceleration standard value, define the corresponding region as the ROI region according to the acceleration direction; Step 27: If the acceleration value does not exceed the acceleration standard value, define the corresponding region as a non-ROI region according to the acceleration direction.
3. The image data conversion method for a wireless transmission module according to claim 2, characterized in that, Methods for obtaining motion information include: Step 220: Select image frames according to the continuity rule to obtain two consecutive image frames; Step 221: Obtain the pixel points corresponding to two consecutive image frames; Step 222: Obtain the grayscale value and color value based on the pixel; Step 223: Obtain the grayscale difference and color difference based on the grayscale value and color value; Step 224: When the grayscale difference reaches the preset grayscale standard deviation value and the color difference reaches the preset standard color difference value, the corresponding pixel is taken as the moving point; Step 225: Merge all moving points to define the motion region; Step 226: Combine the grayscale difference and color difference within the motion area into motion information.
4. The image data conversion method suitable for a wireless transmission module according to claim 1, characterized in that, Methods for encapsulating compressed ROI data and compressed non-ROI data into a package include: Step 80: Obtain the non-ROI bitrate corresponding to the non-ROI region and the ROI bitrate corresponding to the ROI region; Step 81: Find the corresponding bitrate adjustment based on the network status; Step 82: Control the non-ROI bitrate and ROI bitrate to adjust the bitrate according to the adjusted bitrate to obtain the first bitrate and the second bitrate; Step 83: Compress the ROI data and non-ROI data according to the first bitrate, the second bitrate, and the corresponding encoding to obtain compressed ROI data and compressed non-ROI data; Step 84: Obtain raw data from the original image; Step 85: Obtain redundant data using the original data and the preset FEC encoding; Step 86: Based on the preset UDP protocol and redundant data, encapsulate the compressed ROI data and compressed non-ROI data to obtain ROI encapsulation package and non-ROI encapsulation package.
5. The image data conversion method suitable for a wireless transmission module according to claim 4, characterized in that, Methods for decoding and reassembling the encapsulated packets to form an output image and then outputting it include: Step 860: Output the ROI package and the non-ROI package to obtain the output package; Step 861: Disassemble the output encapsulation packet to obtain the output data packet and the output redundant packet; Step 862: If the output data packet matches the output redundant packet, the output data packet is reassembled to obtain the output image and then output. Step 863: If the output data packet and the output redundant packet are inconsistent, obtain the recovery data packet based on the output redundant packet and the output data packet; Step 864: Reassemble the output data packet and the recovery data packet to obtain the output image and output it.
6. The image data conversion method for a wireless transmission module according to claim 5, characterized in that, Methods for reconstructing the output data packet and the recovered data packet to obtain the output image and then outputting it include: Step 8640: Obtain segmented images from the original image using a preset processing method; Step 8641: Number the segmented images to obtain image numbers and their corresponding numbering order; Step 8642: Output the images corresponding to the image numbers to obtain the corresponding image packets and define them as output data packets; Step 8643: Combine the output data packets according to their corresponding image numbers in numerical order to obtain the output image; Step 8644: If the output image is consistent with the original image, then output the output image directly; Step 8645: If the output image is inconsistent with the original image, then obtain the restored image and the corresponding restored image number based on the output data packet and the restored data packet; Step 8646: Combine the output data packet and the recovered image according to the corresponding image number and the recovered image number in numerical order to obtain the output image and output it.
7. The image data conversion method for a wireless transmission module according to claim 6, characterized in that, It also includes a method for processing the original image according to a preset processing method, which includes: Step 86400: Divide the original image into blocks according to a preset block division scheme to obtain block images; Step 86401: Obtain the corresponding high-frequency coefficients of the segmented images according to the preset DCT transformation scheme; Step 86402: If the high-frequency coefficient of the image is less than the preset coefficient standard value, then the high-frequency coefficient of the image is regarded as 0 and output. Step 86403: If the high-frequency coefficients of the image are greater than or equal to the standard value of the coefficients, then the high-frequency coefficients of the image are retained and output.
8. The image data conversion method for a wireless transmission module according to claim 1, characterized in that, Methods for obtaining network status include: Step 10: Obtain the test data packet; Step 11: Obtain the test parameters based on the test data packet; Step 12: Obtain the bandwidth parameters based on the test parameters and the preset test calculation formula; Step 13: Obtain the network status by comparing the bandwidth parameters with the preset bandwidth standard parameters.
9. The image data conversion method for a wireless transmission module according to claim 8, characterized in that, It also includes a method for adjusting bandwidth parameters, which includes: Step 14: Obtain historical bandwidth data; Step 15: Obtain historical bandwidth patterns based on historical bandwidth data; Step 16: Obtain the future bandwidth status based on historical bandwidth patterns and a pre-set future model; Step 17: Find the corresponding future bandwidth parameters based on the future bandwidth status; Step 18: Adjust the bandwidth parameters according to the future bandwidth parameters.
10. An image data conversion system suitable for wireless transmission modules, characterized in that, include: The acquisition module is used to acquire raw images, network status, pixels, non-ROI bitrate, ROI bitrate, test data packets, and historical bandwidth data. A memory for storing a program of a control method for an image data conversion method applicable to a wireless transmission module as described in any one of claims 1 to 9; The processor loads and executes programs from memory.