Image data compression method, system, device and storage medium
By performing scalar quantization, target contour extraction, and encoding processing on the radar images of the navigation data recorder, the problem of large bandwidth occupation by radar image data transmission is solved, and efficient image compression and data integrity assurance are achieved.
Patent Information
- Application Number
- CN202210979174.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-16
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-08-16
AI Technical Summary
The transmission of radar image data from voyage data recorders takes up a lot of bandwidth, affecting the operating costs of the vessel traffic management system.
The radar image to be processed is acquired, scalar quantization is performed, target contour is extracted and encoded to obtain compressed image data.
The bandwidth occupied by data transmission is reduced while ensuring the integrity of the compressed data.
Smart Images

Figure CN115546504B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image data compression method, system, device and storage medium. Background Art
[0002] Voyage data recorders, also known as maritime "black boxes," store extensive information about a vessel's position, movement, physical state, and command and control before and after an accident. These recorders can store information about the vessel's status and operations, voice data, and radar image data. However, transmitting radar image data from voyage data recorders consumes significant bandwidth, significantly impacting the operating costs of vessel traffic management systems.
[0003] In summary, the problems existing in the relevant technologies need to be solved urgently. Summary of the Invention
[0004] The purpose of the present invention is to solve one of the technical problems existing in the prior art to at least a certain extent.
[0005] To this end, an object of embodiments of the present invention is to provide an image data compression method, system, device and storage medium.
[0006] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present invention include:
[0007] In one aspect, an embodiment of the present invention provides an image data compression method, comprising the following steps:
[0008] Acquire radar images to be processed;
[0009] performing scalar quantization on the radar image to be processed;
[0010] Extract target contours from the quantized radar image to obtain a target image;
[0011] The target image is encoded to obtain compressed image data.
[0012] Furthermore, after the step of obtaining the radar image to be processed, the following steps are also included:
[0013] A navigation area is extracted from the radar image.
[0014] Furthermore, after the step of encoding the target image to obtain compressed image data, the method further includes the following steps:
[0015] The compressed image data is stored.
[0016] Furthermore, the step of performing scalar quantization on the radar image to be processed specifically includes:
[0017] Obtaining pixel coordinates of the radar image to be processed;
[0018] Obtaining the corresponding grayscale value according to the pixel coordinates;
[0019] The grayscale value is quantized.
[0020] Furthermore, the step of extracting target contours from the quantized radar image to obtain the target image includes:
[0021] Obtaining a starting point and an area corresponding to the starting point in the quantized radar image;
[0022] Traverse the field to obtain contour points;
[0023] In response to the contour point coinciding with the starting point, the contour extraction task is completed and the target image is extracted.
[0024] Furthermore, the step of obtaining the starting point and the area corresponding to the starting point in the quantized radar image further includes the following steps:
[0025] Obtaining pixel points whose grayscale values are greater than a preset grayscale threshold in the quantized radar image;
[0026] The pixel point is used as the starting point, and the area corresponding to the starting point is obtained.
[0027] Furthermore, after the step of completing the contour extraction task and extracting the target image in response to the contour point coinciding with the starting point, the method further includes the following steps:
[0028] Setting the grayscale value of the target image to a first grayscale value;
[0029] The grayscale value of the non-target image is set to the second grayscale value.
[0030] On the other hand, an embodiment of the present invention provides an image data compression system, comprising:
[0031] The first module is used to obtain radar images to be processed;
[0032] A second module is used to perform scalar quantization on the radar image to be processed;
[0033] The third module is used to extract the target contour from the quantized radar image to obtain the target image;
[0034] The fourth module is used to encode the target image to obtain compressed image data.
[0035] In another aspect, an embodiment of the present invention provides an image data compression device, comprising:
[0036] at least one processor;
[0037] at least one memory for storing at least one program;
[0038] When the at least one program is executed by the at least one processor, the at least one processor is enabled to implement the image data compression method.
[0039] On the other hand, an embodiment of the present invention provides a storage medium storing processor-executable instructions, wherein the processor-executable instructions are used to implement the image data compression method when executed by the processor.
[0040] The present invention discloses an image data compression method, which has the following beneficial effects:
[0041] This embodiment obtains a radar image to be processed; then performs scalar quantization on the radar image; then performs target contour extraction on the quantized radar image to obtain a target image; and finally, encodes the target image to obtain compressed image data. This method compresses the image obtained by quantizing and extracting the target contour of the radar image to obtain a compressed radar image. This method reduces the bandwidth occupied by data transmission while ensuring the integrity of the compressed data. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following introduction is made to the drawings of the embodiments of the present invention or the related technical solutions in the prior art. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative work.
[0043] Figure 1 A schematic diagram of an implementation environment of an image data compression method provided in an embodiment of the present application;
[0044] Figure 2 A schematic flow chart of an image data compression method provided by an embodiment of the present invention;
[0045] Figure 3 A schematic structural diagram of an image data compression system provided by an embodiment of the present invention;
[0046] Figure 4 A schematic structural diagram of an image data compression device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] This section will describe in detail the specific embodiments of the present invention. The preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the accompanying drawings is to supplement the description of the text part of the specification with graphics, so that people can intuitively and vividly understand each technical feature and the overall technical solution of the present invention, but it should not be understood as a limitation on the scope of protection of the present invention.
[0048] In the description of the embodiments of the present invention, "several" means one or more, "more" means more than two, "greater than," "less than," and "exceed" are understood to exclude the number itself, and "above," "below," and "within" are understood to include the number itself. "At least one" means one or more, "at least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. If the terms "first," "second," etc. are used in the description, they are only used to distinguish technical features and are not to be understood as indicating or implying relative importance, implicitly indicating the number of the indicated technical features, or implicitly indicating the order of the indicated technical features.
[0049] It should be noted that the terms "dispose," "install," and "connect" in the embodiments of the present invention should be interpreted broadly. Those skilled in the art can reasonably determine the specific meanings of these terms in the embodiments of the present invention based on the specific content of the technical solution. For example, the term "connect" can refer to mechanical connection, electrical connection, or communication; it can be direct connection or indirect connection through an intermediary.
[0050] In the description of the embodiments of the present invention, reference to the terms "one embodiment / implementation," "another embodiment / implementation," "certain embodiments / implementations," "in the above-mentioned embodiments / implementations," etc., means that the specific features, structures, materials, or characteristics described in conjunction with the embodiments or examples are included in at least two embodiments or implementations of the present disclosure. In the present disclosure, the schematic representation of the above terms does not necessarily refer to the same embodiment or implementation. Moreover, the specific features, structures, materials, or characteristics described may be combined in any appropriate manner in any one or more embodiments or implementations.
[0051] It should be noted that the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0052] The offshore wind farm intelligent monitoring and early warning system platform has multiple subsystems, each with numerous sensors. For example, the vessel traffic management system, which primarily includes AIS, radar systems, video surveillance systems, high-frequency radios, and tweeters, also has multiple sensors. Data from each sensor needs to be transmitted to the platform for processing.
[0053] With the advancement of radar technology, radars are now able to determine not only the spatial position of a target but also its speed and obtain more information through target echoes. The voyage data recorder (VDR), known as the maritime "black box," is a device that stores extensive information on a ship's position, movement, physical state, and command and control before and after an accident. A VDR can store at least the most recent 12 hours of ship status and operational information, voice data, and radar image data, meeting the requirements of maritime accident investigations and facilitating safe monitoring and management of ship navigation. Similarly, since most of a VDR's information is collected by radar, radar plays a crucial role in the VDR.
[0054] The transmission and recording of radar images is a critical issue for both vessel traffic management systems and voyage data recorders. Radar image signal transmission requires communication lines such as optical fiber, microwave relay, very high frequency (VHF), and satellite transmission. Direct transmission of uncompressed radar image signals is extremely difficult. Real-time transmission of radar images over voice channels such as public telephone lines requires significant image compression. Furthermore, compressed radar images facilitate storage.
[0055] Data transmission inevitably consumes a significant amount of bandwidth, a crucial system resource that significantly impacts operating costs. Given the limited bandwidth available, compression is essential for radar video data, CCTV video data, and VHF audio data, which occupy significant bandwidth.
[0056] To this end, this application proposes an image data compression method, system, device, and storage medium. The method involves acquiring a radar image to be processed; then, performing scalar quantization on the radar image to be processed; then, performing target contour extraction on the quantized radar image to obtain a target image; and finally, encoding the target image to obtain compressed image data. This method compresses the image obtained by quantizing and extracting the target contour of the radar image to obtain a compressed image of the radar image. This method reduces the bandwidth occupied by data transmission while ensuring the integrity of the compressed data.
[0057] Figure 1 This is a schematic diagram of an implementation environment of an image data compression method provided in an embodiment of the present application. Figure 1The hardware and software components of this implementation environment primarily include an operation terminal 101 and a server 102, with the operation terminal 101 and the server 102 being in communication. The image data compression method can be configured to be executed solely on the operation terminal 101 or the server 102, or can be executed based on interaction between the operation terminal 101 and the server 102. The specific method can be appropriately selected based on actual application circumstances, and this embodiment does not impose any specific limitations on this. Furthermore, the operation terminal 101 and the server 102 can be nodes in a blockchain, and this embodiment does not impose any specific limitations on this.
[0058] Specifically, the operation terminal 101 in the present application may include, but is not limited to, any one or more of a smart watch, a smart phone, a computer, a personal digital assistant (PDA), an intelligent voice interaction device, a smart home appliance, or a vehicle-mounted terminal. The server 102 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The operation terminal 101 and the server 102 may establish a communication connection via a wireless network or a wired network, which uses standard communication technologies and / or protocols. The network may be set to the Internet or any other network, such as, but not limited to, a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), any combination of mobile, wired or wireless networks, private networks, or virtual private networks.
[0059] Figure 2 This is a flowchart of an image data compression method provided by an embodiment of the present application. The execution subject of the method can be at least one of an operation terminal or a server. Figure 2 The image data compression method is configured to be executed in an operation terminal as an example. Figure 2 The image data compression method includes but is not limited to steps 110 to 140.
[0060] Step 110: Acquire a radar image to be processed;
[0061] Step 120: performing scalar quantization on the radar image to be processed;
[0062] Step 130: extracting target contours from the quantized radar image to obtain a target image;
[0063] Step 140: Encode the target image to obtain compressed image data.
[0064] In step 140, the encoding is primarily performed using entropy coding, also known as statistical coding. The idea behind entropy coding is to assign codewords of different lengths to elements with different probabilities of occurrence. High-probability elements are assigned short codewords, while low-probability elements are assigned long codewords, thereby minimizing the average codeword length. Entropy coding achieves an optimal match between the probability of occurrence of elements in the image and the length of the encoded codeword.
[0065] This algorithm primarily utilizes predictive coding, a technique within entropy coding. Based on principles of modern statistics and cybernetics, predictive coding is a high-quality, efficient coding method. Predictive coding uses pixels in its causal domain to predict the current pixel's value, calculating the prediction residual by subtracting the predicted value from the true value. Because image pixels are correlated, predictive coding can eliminate this correlation to a certain extent, thereby reducing data size and increasing compression ratios.
[0066] This embodiment obtains a radar image to be processed; then performs scalar quantization on the radar image; then performs target contour extraction on the quantized radar image to obtain a target image; and finally, encodes the target image to obtain compressed image data. This method compresses the image obtained by quantizing and extracting the target contour of the radar image to obtain a compressed radar image. This method reduces the bandwidth occupied by data transmission while ensuring the integrity of the compressed data.
[0067] As an optional implementation, after the step of obtaining the radar image to be processed, the following steps are further included:
[0068] A navigation area is extracted from the radar image.
[0069] As an optional implementation, after the step of encoding the target image to obtain compressed image data, the method further includes the following steps:
[0070] The compressed image data is stored.
[0071] In this embodiment, after compressing the radar image, the compressed image data can be stored. Specifically, the compressed image data can be stored locally on a local computer's memory, uploaded to a cloud server, or transferred to another terminal to be stored on another terminal.
[0072] As a further optional implementation manner, the step of performing scalar quantization on the radar image to be processed specifically includes:
[0073] Obtaining pixel coordinates of the radar image to be processed;
[0074] Obtaining the corresponding grayscale value according to the pixel coordinates;
[0075] The grayscale value is quantized.
[0076] In this embodiment, a scalar quantization method is used to quantize the radar image to be processed. Specifically, the radar image to be processed is converted into a grayscale image and then quantized according to the following formula.
[0077] g(x,y)=[f(x,y) / 2 8-n ]
[0078] Where (x, y) is the coordinate value of the pixel, f(x, y) is the grayscale value of point (x, y) in the original image, g(x, y) is the quantized value of point (x, y), and n is the number of bits after conversion. [] represents an integer operation close to zero.
[0079] As a further optional implementation, the step of extracting a target contour from the quantized radar image to obtain a target image includes:
[0080] Obtaining a starting point and an area corresponding to the starting point in the quantized radar image;
[0081] Traverse the field and obtain contour points;
[0082] In response to the contour point coinciding with the starting point, the contour extraction task is completed and the target image is extracted.
[0083] Due to various factors such as the ship's shape, size, structure, and material, the radar echo intensity and the target's shape on the host computer's display screen are easily affected by various factors. Therefore, this embodiment uses a method for extracting the target contour and employs a chain code extraction algorithm based on computer vision.
[0084] Chain codes are used to represent boundary lines as sequentially linked straight line segments of specified length and direction. Typically, this representation is based on a 4- or 8-segment domain, linking each segment's direction and encoding. However, if chain codes are transferred solely based on the condition that the domain contains identical or similar grayscale values, compression may not be achieved in some cases. Contour search methods are employed to address a range of these issues.
[0085] Specifically, the quantized radar image is traversed to find a point that meets the requirements. This point is used as the starting point and its coordinates are recorded. Then, a search is performed within the 8-dimensional space of the starting point to find a contour point and its coordinates are recorded. The search is then continued within the 8-dimensional space of the starting point to find the next contour point. It is understood that when the coordinates of a contour point match those of the starting point, it indicates that the contour point is the end point of the contour. In other words, when the coordinates of a contour point match those of the starting point, the target contour extraction is concluded. By extracting the coordinates of the starting point and each contour point, the target image of the radar image can be obtained.
[0086] As a further optional implementation manner, the step of obtaining the starting point and the area corresponding to the starting point in the quantized radar image further includes the following steps:
[0087] Obtaining pixel points whose grayscale values are greater than a preset grayscale threshold in the quantized radar image;
[0088] The pixel point is used as the starting point, and the area corresponding to the starting point is obtained.
[0089] In this embodiment, a pixel point that is greater than a preset grayscale threshold refers to a pixel point that can be identified. When the grayscale value is lower than the preset grayscale threshold, it is determined that the pixel point does not contain the target image; when the grayscale value is higher than the preset grayscale threshold, it is determined that the pixel point contains the target image. The point determined to contain the target image can be used as the starting point.
[0090] As a further optional implementation manner, after the step of completing the contour extraction task and extracting the target image in response to the contour point coinciding with the starting point, the method further includes the following steps:
[0091] Setting the grayscale value of the target image to a first grayscale value;
[0092] The grayscale value of the non-target image is set to the second grayscale value.
[0093] In this embodiment, in order to distinguish the target image from the non-target image, the grayscale value of the pixel points included in the target image may be set to the first grayscale value, and the grayscale value of the pixel points included in the non-target image may be set to the second grayscale value.
[0094] Reference Figure 3 , an image data compression system proposed in an embodiment of the present invention includes:
[0095] The first module 401 is used to obtain a radar image to be processed;
[0096] The second module 402 is configured to perform scalar quantization on the radar image to be processed;
[0097] The third module 403 is used to extract the target contour from the quantized radar image to obtain a target image;
[0098] The fourth module 404 is configured to encode the target image to obtain compressed image data.
[0099] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0100] Reference Figure 4 , an embodiment of the present invention provides an image data compression device, comprising:
[0101] at least one processor 501;
[0102] at least one memory 502, for storing at least one program;
[0103] When the at least one program is executed by the at least one processor 501, the at least one processor 501 implements Figure 2 The image data compression method shown.
[0104] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0105] The embodiment of the present invention further provides a storage medium in which processor-executable instructions are stored. When the processor executes the instructions, the processor-executable instructions are used to implement Figure 2 The image data compression method shown.
[0106] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A method for compressing image data, characterized in that: The following steps are involved: Acquire radar images to be processed; performing scalar quantization on the radar image to be processed; Extract target contours from the quantized radar image to obtain a target image; Encoding the target image to obtain compressed image data; The step of performing scalar quantization on the radar image to be processed comprises the following steps: Obtaining pixel coordinates of the radar image to be processed; Obtaining the corresponding grayscale value according to the pixel coordinates; quantizing the grayscale value; The encoding of the target image to obtain compressed image data comprises the following steps: Using predictive coding in entropy coding, predicting a causal domain pixel of a current pixel of the target image to obtain a predicted value of the current pixel; Subtracting the predicted value from the true value of the current pixel to obtain a prediction residual; The prediction residual is used to eliminate the correlation between pixels in the target image to obtain the compressed image data.
2. The image data compression method according to claim 1, wherein: After the step of obtaining the radar image to be processed, the following steps are also included: A navigation area is extracted from the radar image.
3. The image data compression method according to claim 1, wherein: After the step of encoding the target image to obtain compressed image data, the method further includes the following steps: The compressed image data is stored.
4. The image data compression method according to claim 1, wherein: The step of extracting the target contour from the quantized radar image to obtain the target image includes: Obtaining a starting point and an area corresponding to the starting point in the quantized radar image; Traverse the field to obtain contour points; In response to the contour point coinciding with the starting point, the contour extraction task is completed and the target image is extracted.
5. The image data compression method according to claim 4, wherein: The step of obtaining the starting point and the area corresponding to the starting point in the quantized radar image further includes the following steps: Obtaining pixel points whose grayscale values are greater than a preset grayscale threshold in the quantized radar image; The pixel point is used as the starting point, and the area corresponding to the starting point is obtained.
6. The image data compression method according to claim 4, wherein: After the step of completing the contour extraction task and extracting the target image in response to the contour point coinciding with the starting point, the method further includes the following steps: Setting the grayscale value of the target image to a first grayscale value; The grayscale value of the non-target image is set to the second grayscale value.
7. An image data compression system, characterized in that: include: The first module is used to obtain radar images to be processed; A second module is used to perform scalar quantization on the radar image to be processed; The third module is used to extract the target contour from the quantized radar image to obtain the target image; A fourth module is used to encode the target image to obtain compressed image data; The second module is specifically configured to perform the following steps: Obtaining pixel coordinates of the radar image to be processed; Obtaining the corresponding grayscale value according to the pixel coordinates; quantizing the grayscale value; The fourth module is specifically configured to perform the following steps: Using predictive coding in entropy coding, predicting a causal domain pixel of a current pixel of the target image to obtain a predicted value of the current pixel; Subtracting the predicted value from the true value of the current pixel to obtain a prediction residual; The prediction residual is used to eliminate the correlation between pixels in the target image to obtain the compressed image data.
8. An image data compression device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the image data compression method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing instructions executable by a processor, characterized in that: The processor-executable instructions are used to implement the image data compression method according to any one of claims 1 to 6 when executed by the processor.
Citation Information
Patent Citations
Sea surface target radar plot clotting method and device, electronic equipment and storage medium
CN112649793A