Astronomical image compression method and device

By segmenting, transforming angles and processing backgrounds of astronomical images, combined with the Hcompress algorithm, the problems of insufficient storage requirements and image clarity in existing technologies are solved, and efficient astronomical image compression and transmission are achieved.

CN120672876APending Publication Date: 2025-09-19NAT ASTRONOMICAL OBSERVATORIES CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510842417.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Existing astronomical image compression algorithms cannot meet the exponentially growing storage needs, resulting in increased pressure on data storage and transmission, and insufficient image clarity and readability.

Method used

By extracting stars from the input image, performing block processing, angle transformation and background processing, and combining it with the Hcompress algorithm for encoding, redundant information is removed and efficient compression is achieved.

Benefits of technology

Effectively reduce the amount of image data, improve clarity and readability, save data storage space, improve transmission efficiency, and provide accurate data support for subsequent processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120672876A_ABST
    Figure CN120672876A_ABST
Patent Text Reader

Abstract

The invention provides an astronomical image compression method, and the method comprises the steps: extracting an astronomical image from an input image, and obtaining a first image; under the condition that the type of the first image is a first type, performing block processing on the first image based on star image distribution in the first image to obtain a second image; wherein the blocking processing is used for removing redundant astronomy in the first image; performing angle transformation operation and background processing operation on the second image to obtain a third image containing the target star image; and encoding the third image to obtain a compressed target astronomical image. According to the method, the astronomical observation image is quickly and efficiently compressed by performing block processing, angle conversion and background processing on the image and based on the Hcompact algorithm, noise and interference galases in the image can be effectively removed, the data storage space is saved, and the data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of space target observation image processing, and more particularly to an astronomical image compression method and device. Background Art

[0002] As the number of observation devices increases, the observed images grow exponentially, and the demand for data storage and transmission increases, which poses challenges. At the same time, processing and analyzing these large amounts of image data requires a lot of computing resources.

[0003] To meet the ever-increasing storage demands, image compression technology has become the preferred method for optimizing data storage space. The technical background of astronomical image compression primarily involves some basic image compression algorithms and techniques, including lossless and lossy compression techniques. Currently used classic astronomical image compression algorithms typically have a compression ratio range of 1:1.1-1:1.5. Existing image compression algorithms are unable to meet the exponentially growing image storage demands. Summary of the Invention

[0004] (1) Technical issues to be resolved

[0005] The present invention provides an astronomical image compression method and device, which are used to at least partially solve one of the above technical problems.

[0006] (2) Technical solution

[0007] A first aspect of the present invention provides an astronomical image compression method, comprising: extracting stars from an input image to obtain a first image; when the first image is of a first type, performing block processing on the first image based on the distribution of stars in the first image to obtain a second image; wherein the block processing is used to remove redundant stars in the first image; performing an angle transformation operation and a background processing operation on the second image to obtain a third image containing target stars; and encoding the third image to obtain a compressed target astronomical image.

[0008] According to an embodiment of the present invention, extracting stars from an input image to obtain a first image includes: determining a star region in the input image based on a preset background threshold; and extracting the star region using a connected domain method to obtain the first image.

[0009] According to an embodiment of the present invention, when the type of the first image is the first type, the first image is subjected to block processing based on the distribution of stars in the first image to obtain a second image, including: dividing the first image into multiple image blocks; determining the number of stars to be retained in each image block based on the distribution density of stars in each image block; retaining target stars based on the number of stars to be retained and removing other stars except the target stars in each image block.

[0010] According to an embodiment of the present invention, an angle transformation operation and a background processing operation are performed on a second image to obtain a third image containing a target constellation, including: performing an angle transformation on the second image to convert the second image to a specified angle; and removing the background area in the second image after the angle transformation to obtain a third image containing the target constellation.

[0011] According to an embodiment of the present invention, performing an angle transformation on the second image to convert the second image to a specified angle includes: determining the rotation angle of the second image; and transforming the coordinates of each pixel point in the second image based on the rotation angle to convert the second image to the specified angle.

[0012] According to an embodiment of the present invention, removing the background area in the second image after the angle transformation to obtain a third image containing the target star image includes: calculating the circumscribed rectangle of the second image; determining the area in the second image containing the largest number of star images as the rectangular area, and determining the remaining area as the background area; and adjusting the pixel value of the background area to obtain the third image containing the target star image.

[0013] According to an embodiment of the present invention, the background area in the second image after the angle transformation is removed to obtain a third image containing the target constellation, including: performing an angle inverse transformation operation on the third image to restore the angle of the third image to the same angle as the second image; and removing jagged edges of the third image.

[0014] According to an embodiment of the present invention, encoding the third image to obtain a compressed target astronomical image includes: performing a wavelet transform on the third image to convert the third image from image data into a frequency domain representation; and quantizing and compressing the third image based on a compression scale factor to obtain the target astronomical image.

[0015] According to an embodiment of the present invention, the method further includes: when the type of the first image is the second type, encoding the first image to obtain a compressed target astronomical image.

[0016] A second aspect of the present invention provides an astronomical image compression device, comprising: an extraction module for extracting stars from an input image to obtain a first image; a first processing module for performing block processing on the first image based on the distribution of stars in the first image when the first image is of the first type to obtain a second image; wherein the block processing is used to remove redundant stars in the first image; a second processing module for performing angle transformation operations and background processing operations on the second image to obtain a third image containing target stars; and an encoding module for encoding the third image to obtain a compressed target astronomical image.

[0017] (3) Beneficial effects

[0018] The astronomical image compression method provided by the present invention has at least the following beneficial effects:

[0019] By performing block processing, angle transformation and background processing on the image, the amount of data in the image is effectively reduced, noise and interfering galaxies in the image are removed, the clarity and readability of the image are improved, and based on the Hcompress algorithm, fast and efficient compression processing of astronomical observation images is achieved, effectively saving data storage space, improving data transmission efficiency, and providing more accurate data support for subsequent processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0021] Figure 1 A flowchart of an astronomical image compression method according to an embodiment of the present invention is schematically shown;

[0022] Figure 2 Schematically illustrates a flow chart for extracting constellations from an input image to obtain a first image according to an embodiment of the present invention;

[0023] Figure 3 A flowchart schematically illustrates, when the first image is of the first type, performing block processing on the first image based on the distribution of stars in the first image to obtain a second image according to an embodiment of the present invention;

[0024] Figure 4 A flowchart schematically illustrates performing an angle transformation operation and a background processing operation on a second image to obtain a third image containing a target star image according to an embodiment of the present invention;

[0025] Figure 5 Schematically shows an input image in an embodiment of the present invention;

[0026] Figure 6 The image obtained after performing block processing and angle transformation operations on the input image according to an embodiment of the present invention is schematically shown;

[0027] Figure 7 Schematically illustrates a third image obtained after background processing is performed on an image according to an embodiment of the present invention;

[0028] Figure 8 schematically shows an enlarged view of an image obtained after performing restoration processing on the third image;

[0029] Figure 9 Schematically shows a detail diagram of an image obtained after performing restoration processing on the third image;

[0030] Figure 10The structure block diagram of the astronomical image compression device according to an embodiment of the present invention is schematically shown. DETAILED DESCRIPTION

[0031] To make the objectives, technical solutions, and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to specific embodiments and the accompanying drawings. It is apparent that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are intended to fall within the scope of protection of the present invention.

[0032] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the presence of the features, steps, operations and / or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.

[0033] In the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," "connect," "fixed," etc. should be understood in a broad sense. For example, they may refer to fixed connection, detachable connection, or integration; mechanical connection, electrical connection, or mutual communication; direct connection or indirect connection through an intermediate medium; internal communication between two components or interaction between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.

[0034] In the description of the present invention, it should be understood that the terms "longitudinal", "length", "circumferential", "front", "rear", "left", "right", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the subsystem or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0035] Throughout the drawings, identical elements are represented by identical or similar reference numerals. Conventional structures or configurations may be omitted when they may obscure the understanding of the present invention. Furthermore, the shapes, sizes, and positional relationships of components in the drawings do not reflect actual size, proportion, or actual positional relationships.

[0036] Similarly, in order to streamline the present invention and aid in understanding one or more of the various disclosed aspects, in the above description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Descriptions with reference to the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples" and the like mean that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0037] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the technical features being referred to. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "plurality" means at least two, such as two or three, unless otherwise specifically defined.

[0038] Figure 1 The flowchart of the astronomical image compression method according to an embodiment of the present invention is schematically shown.

[0039] like Figure 1 As shown, the astronomical image compression method of this embodiment includes operations S110 to S140.

[0040] In operation S110 , a star image is extracted from an input image to obtain a first image.

[0041] In some embodiments, the number of stars in the image and the type of the first image are determined through object extraction processing and image task level analysis. The type of the first image includes a first type and a second type, where the first type indicates that the compression method corresponding to the first image is lossy compression, and the second type indicates that the compression method corresponding to the first image is lossless compression.

[0042] In operation S120, when the type of the first image is the first type, the first image is subjected to block processing based on the distribution of stars in the first image to obtain a second image; wherein the block processing is used to remove redundant stars in the first image.

[0043] In some embodiments, the first image is divided into a plurality of image blocks, and the stars in each image block are processed separately based on the distribution density of the stars in each image block, and redundant stars are discarded, thereby further improving the compression ratio of the space target observation image and the effective information preservation rate of the image. The number of stars retained in each image block may be different, and the sum of the number of stars retained in each image block is the same as the number of image blocks.

[0044] Taking a 16-bit integer image as an example, the first image is divided into 256 image blocks, i.e., 16*16 regions, each with 256*256 pixels. If the number of stars in the first image is less than or equal to the number of image blocks, all stars are retained. If the number of stars in the first image is greater than the number of image blocks, the number of stars to be retained in each image block is determined based on the star distribution density in each image block.

[0045] The above process can be expressed by the following formula:

[0046]

[0047] Among them, any pixel point (x or ,y or ) will belong to a certain block. When the first image is divided into blocks, the initial address (starting point coordinates) of each block can be determined.

[0048] The sequence number of the first image block can be expressed as:

[0049] block_num x =ceil(x or +1) / 256

[0050] block_num y =ceil(y or +1) / 256

[0051] The initial address of each block is: 256*(n-1), where n is the sequence number of the image block.

[0052] In operation S130, an angle conversion operation and a background processing operation are performed on the second image to obtain a third image containing a target constellation.

[0053] In some embodiments, the second image is transformed at a certain angle and subjected to background processing to obtain a third image containing the target constellation, so as to preserve the largest constellation (including space targets and stars) image and eliminate redundant information to the greatest extent.

[0054] In operation S140 , the third image is encoded to obtain a compressed target astronomical image.

[0055] In some embodiments, a wavelet transform is performed on the third image to convert the third image from image data into a frequency domain representation, and the third image is quantized and compressed based on a compression scale factor to obtain a target astronomical image.

[0056] In this embodiment of the present invention, the third image is encoded using the Hcompress algorithm to obtain the target astronomical image. This algorithm converts image data into a frequency-domain representation and utilizes Boltzmann entropy coding to achieve efficient compression. The setting of the compression scale factor determines the degree of image compression. The scale factor value is positively correlated with the compression ratio and negatively correlated with image quality. Specifically, a larger compression scale factor value results in a higher compression ratio and lower quality compressed images.

[0057] Specifically, the Hcompress algorithm mainly includes three aspects: wavelet transform, optional quantization, and quadtree encoding of the quantized coefficient bit plane.

[0058] The wavelet transform starts with a small 2×2 block and then increases in multiples of 2 to 4×4, 8×8, and so on. Within each pixel block, the sum and difference of the pixels are calculated, breaking the image into different frequency components for subsequent processing and compression. The wavelet transform decomposes the image and extracts the low-frequency and high-frequency coefficients in the decomposition structure. The low-frequency coefficients generally contain the main information of the image, while the high-frequency coefficients contain image details and noise.

[0059] As a fully reversible integer operation, a set of losslessly coded h-transform coefficients can be decompressed and inversely transformed to restore the original image. It should be noted that the h-transform can be performed in-place in memory and requires sufficient memory to hold the original image (or image block). To avoid overflow problems when summing pixel values, the memory array is expanded by a factor of 2, so that the number of bits per pixel is twice that of the original image. Hcompress bit-plane coding first compresses the most significant bit of each coefficient (mostly 0) and then compresses it all the way to the least significant bit (usually noise). Its function is to sort the image description so that as more bits are received, the data stream will gradually provide a better approximation to the original image. This can be used to create an efficient adaptive scheme for image transmission.

[0060] After performing a wavelet transform on the third image to obtain a frequency domain representation, the frequency domain representation is further quantized using the compression scale factor. When using the compression scale factor for Hcompress, the algorithm performs both quantization and lossy compression on the image. Quantization is the process of mapping the image data represented in the frequency domain to discrete levels or values, which results in the loss of some image information. At the same time, lossy compression discards some detail and redundant information, further improving the compression ratio.

[0061] The compression factor can be selected based on the actual application scenario and requirements. If higher image quality is required, a lower compression factor can be selected to achieve a compression effect closer to lossless. If a high compression ratio is emphasized, the compression factor can be increased appropriately, but this will result in a loss of image detail and a decrease in the signal-to-noise ratio.

[0062] The Hcompress compression algorithm allows you to set the compression scale factor based on the compression options to achieve the desired compression effect. Depending on the application scenario, you can balance image quality and compression ratio to select the most appropriate compression scale factor for image compression. This option achieves a high compression ratio at the expense of fully preserving the original pixel values ​​in the image.

[0063] After quantization is completed, the quantized coefficient bit plane is further quadtree encoded. By recursively dividing the image area into smaller sub-regions and encoding them according to the characteristics of the sub-regions (such as the similarity of pixel values), a higher compression ratio is achieved to obtain the target astronomical image.

[0064] The astronomical image compression method provided by the embodiment of the present invention may further include, for example: Operation S150 , when the type of the first image is the second type, encoding the first image to obtain a compressed target astronomical image.

[0065] In a case where the type of the first image is the second type, lossless compression is performed on the first image, that is, the third image is directly encoded based on the Hcompress algorithm to obtain the target astronomical image.

[0066] The astronomical image compression method provided by the embodiment of the present invention effectively reduces the amount of data in the image, removes noise and interfering galaxies in the image, and improves the clarity and readability of the image by performing block processing, angle transformation and background processing on the image. It also realizes fast and efficient compression processing of astronomical observation images, effectively saves data storage space, improves data transmission efficiency, and provides more accurate data support for subsequent processing.

[0067] Figure 2 The flowchart of extracting stars from an input image to obtain a first image according to an embodiment of the present invention is schematically shown.

[0068] like Figure 2 As shown, this embodiment extracts stars from an input image to obtain a first image, including operations S210 to S220.

[0069] In operation S210 , a star region in an input image is determined based on a preset background threshold.

[0070] In operation S220, the star region is extracted using a connected component method to obtain a first image.

[0071] In some embodiments, the background threshold can be set according to the brightness and contrast of the input image. The preset background threshold is used to distinguish between stars and background in the input image. Each pixel in the input image is traversed, and pixels with pixel values ​​greater than the background threshold are regarded as part of the star, that is, a star area is constructed, and the pixels in the star area are marked as foreground areas, and other pixels except the star area are regarded as background pixels.

[0072] Furthermore, the star image region is further extracted based on the connected component method to more accurately identify, separate and extract the first image.

[0073] The embodiment of the present invention adopts the eight-connected domain method to extract the target: for each pixel marked as foreground, the following steps are performed: check whether the foreground pixel has been visited (that is, whether the pixel already belongs to a connected domain; if the pixel is the starting point of a new connected domain, create a new connected domain and add the pixel to the connected domain. Use eight connectivity to check the eight adjacent pixels of the pixel (upper, lower, left, right, upper left, upper right, lower left, lower right). If the adjacent area is a foreground pixel and has not been visited, it is added to the current connected domain and marked as visited. When the current connected domain can no longer be expanded (that is, all adjacent foreground pixels have been visited), the construction of the current connected domain is completed and added to the connected domain list. Each connected domain in the connected domain list represents a constellation area, and the first image is determined based on the extracted constellation area.

[0074] In a specific implementation process, operations S210 to S220 can be expressed using the following formula:

[0075]

[0076] Where Threshold is the background threshold. If the value of the pixel is 1, it means that the pixel is a foreground pixel. If the value of the pixel is 0, it means that the pixel is a background pixel. Visit the eight adjacent positions of the foreground pixel position: above, below, left, right, upper left, upper right, lower left, and lower right. If there is a point with a value of 1 in the neighborhood of a point with a value of 1, then the two points belong to the same connected domain.

[0077] The detected object is considered an ellipse with the semi-major and semi-minor axis lengths A and B, respectively. A represents the maximum spatial rms of the detected object along any direction, and B represents the minimum spatial rms of the detected object along any direction. THETA is the position angle between the A axis and the NAXIS1 image axis, counting counterclockwise. The calculation method is as follows:

[0078]

[0079]

[0080]

[0081] Where (x,y) is the image pixel location. We can find the variance at x θ The minimum (or maximum) target angle θ in the direction 0。 Right now:

[0082]

[0083] You can get:

[0084]

[0085] So we can get the angle The calculation formula is:

[0086]

[0087] Among them, A and B can be directly calculated by the second-order moment:

[0088]

[0089]

[0090] The features of the detected objects (i.e., foreground pixels) are then calculated, including center point, angle, boundary range, etc.

[0091] Figure 3 The flowchart schematically shows a process of performing block processing on the first image based on the distribution of stars in the first image to obtain a second image when the first image is of the first type according to an embodiment of the present invention.

[0092] like Figure 3 As shown, in this embodiment, when the type of the first image is the first type, the first image is divided into blocks based on the distribution of stars in the first image to obtain the second image, including operations S310 to S330.

[0093] In operation S310, a first image is divided into a plurality of image blocks.

[0094] In some embodiments, taking the first image as a 16-bit integer image as an example, the first image is divided into 256 image blocks, that is, 16*16 areas, and each area is 256*256 pixels.

[0095] In operation S320 , the number of stars to be retained in each image block is determined based on the distribution density of stars in each image block.

[0096] In some embodiments, if the number of stars in the first image is greater than the number of image blocks, the number of stars retained in each image block is determined based on the distribution density of stars in each image block, wherein the sum of the number of stars retained in each image block is the same as the number of image blocks.

[0097] In the specific implementation process, for each divided image block, threshold segmentation is performed based on the brightness or color of the pixels to obtain a binary image of the star image in that image block. The number of stars in the binary image is counted. If the number of stars does not exceed one, the star in the image block is retained and its coordinates are recorded. If the number of stars in the image block exceeds one, the number of stars retained in each image block is determined based on the star density distribution. For example, the number of stars retained in the image block can be calculated based on the ratio of the number of stars in the image block to the total number of image blocks.

[0098] Based on the star density distribution, an appropriate number of stars are retained in the first image block where the number of other stars exceeds one. The number of stars to be retained can be calculated based on the ratio of the number of stars in the block to a threshold. Based on the recorded coordinates, the retained stars and other pixels in the original image are reset to zero, thus treating them as background.

[0099] In operation S330 , the target constellation is retained based on the number of retained constellations and other constellations except the target constellation in each image block are removed.

[0100] In some embodiments, the target constellations to be retained in each image block are determined based on the number of constellations to be retained (the target constellations to be retained can be determined based on the area of ​​the constellations, for example, the stars close to the central area can be determined as target constellations), the coordinates of the target constellations are recorded, and based on the recorded coordinates, the other pixels in each image block except the target constellations are set to zero to remove redundant constellations in the first image.

[0101] Figure 4 The flowchart schematically shows a method of performing an angle transformation operation and a background processing operation on a second image to obtain a third image containing a target star image according to an embodiment of the present invention.

[0102] like Figure 4 As shown, this embodiment performs an angle transformation operation and a background processing operation on the second image to obtain a third image containing a target constellation, including operations S410 to S420.

[0103] In operation S410, angle transformation is performed on the second image to convert the second image to a designated angle.

[0104] In some embodiments, the second image is converted to a horizontal or vertical direction according to the directional distribution of the stars, so as to remove redundant information in the background to the greatest extent.

[0105] In a specific embodiment, the second image may be converted to a specified angle by determining a rotation angle of the second image and transforming the coordinates of each pixel in the second image based on the rotation angle.

[0106] For example, a rotation matrix can be used to transform each pixel in the second image according to a specified rotation angle, thereby rotating the second image so that the rotated second image is at a specified angle (horizontal or vertical). This includes: assuming the coordinates of a pixel in the original image are (x, y), rotating the pixel counterclockwise by an angle θ to obtain the rotated coordinates (x', y').

[0107] The rotation matrix can be expressed as:

[0108]

[0109] Multiply the original coordinates (x, y) by the rotation matrix to get the rotated coordinates (x', y').

[0110] x' = x * cos(θ) - y * sin(θ)

[0111] y' = x * sin(θ) + y * cos(θ)

[0112] It should be noted that the angle value of the rotation matrix is ​​in radians.

[0113] In operation S420, the background area in the second image after the angle transformation is removed to obtain a third image containing the target constellation.

[0114] In some embodiments, other background areas in the second image except the rectangular area where the stars are located are eliminated, and the pixel values ​​of the background areas are set to zero or a specified value, thereby extracting the main stars in the second image and removing the turbid background.

[0115] In a specific implementation process, the second image can be segmented using methods such as threshold segmentation and edge detection, and the first image can be divided into multiple regions. The circumscribed rectangle of each region is calculated, and the largest region (i.e., the region containing the largest number of stars) is taken as the rectangular region where the stars are located. All regions except the rectangular region where the stars are located are regarded as background regions, and the pixel values ​​of the background regions are adjusted (e.g., the pixel values ​​are adjusted to 0 or a specified value) to obtain a third image containing the target stars.

[0116] In some embodiments, after performing the angle transformation and background processing operations on the second image, a restoration process is further performed on the resulting third image. The restoration process includes performing an inverse angle transformation operation on the third image to restore the angle of the third image to the same angle as the second image, and removing jagged edges from the third image.

[0117] The astronomical image compression method provided by the present invention is introduced below with reference to specific embodiments.

[0118] like Figure 5 As shown, Figure 5 An input image in an embodiment of the present invention is schematically shown.

[0119] The input image is an observation image from a certain night. The constellations in the input image are extracted to obtain the first image. The image compression level (i.e., the type of the first image) is determined based on the number and distribution of the constellations and the observation mission level of the image. The extraction results are as follows:

[0120]

[0121] The first image is divided into a plurality of image blocks, and redundant constellations in each image block are removed to obtain a second image. Furthermore, an angle transformation operation is performed on the second image to transform the second image to a specified angle, such as Figure 6 shown.

[0122] Figure 6 The diagram schematically shows an image obtained after performing block processing and angle transformation operations on an input image according to an embodiment of the present invention.

[0123] Perform background processing on the transformed image to remove redundant information in the image. Take the rectangular area with the largest area (x min ,y min , x max ,y max ), retain the rectangular area formed by it, that is, retain the rectangular area where all the stars in the image are located, and the other areas are regarded as background areas, and their pixel values ​​are directly set to zero or a specified value, such as Figure 7 shown.

[0124] Figure 7 The third image obtained after background processing is performed on the image according to the embodiment of the present invention is schematically shown.

[0125] The embodiment of the present invention further includes, after obtaining the third image, performing restoration processing on the third image, such as Figure 8 、 Figure 9 shown.

[0126] Figure 8 An enlarged view of an image obtained by performing restoration processing on the third image is schematically shown.

[0127] Figure 9 The diagram schematically shows a detail of an image obtained after restoration processing is performed on the third image.

[0128] And, encoding the third image based on the Hcompress algorithm to obtain a compressed target astronomical image. Parameters of the target astronomical image are shown in the following table.

[0129]

[0130] In view of the fact that there is a large amount of redundant information in the flat areas (non-astronomical areas) of space target and asteroid observation images, the images are divided into a relatively flat background and a relatively complex target object. For the lossy compression of the observation images, the images are lossily compressed while protecting the astronomical information. The lossy compression of the images is achieved while protecting the complete astronomical information through astronomical transformation.

[0131] Based on the above astronomical image compression method, the present invention also provides an astronomical image compression device. Figure 10 The device is described in detail.

[0132] Figure 10 The structure block diagram of the astronomical image compression device according to an embodiment of the present invention is schematically shown.

[0133] like Figure 10 As shown, the astronomical image compression device 1000 of this embodiment includes an extraction module 1010 , a first processing module 1020 , a second processing module 1030 and an encoding module 1040 .

[0134] The extraction module 1010 is used to extract the constellations from the input image to obtain the first image. In one embodiment, the extraction module 1010 can be used to perform the operation S110 described above, which will not be described in detail here.

[0135] The first processing module 1020 is configured to, when the first image is of the first type, perform block processing on the first image based on the distribution of constellations in the first image to obtain a second image; wherein the block processing is configured to remove redundant constellations in the first image. In one embodiment, the first processing module 1020 may be configured to perform operation S120 described above, which will not be further described here.

[0136] The second processing module 1030 is used to perform angle transformation and background processing on the second image to obtain a third image containing the target star. In one embodiment, the second processing module 1030 can be used to perform the operation S130 described above, which will not be repeated here.

[0137] The encoding module 1040 is used to encode the third image to obtain a compressed target astronomical image. In one embodiment, the encoding module 1040 can be used to perform the operation S140 described above, which will not be repeated here.

[0138] According to embodiments of the present invention, any multiple modules among the extraction module 1010, the first processing module 1020, the second processing module 1030, and the encoding module 1040 may be combined into a single module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present invention, at least one of the extraction module 1010, the first processing module 1020, the second processing module 1030, and the encoding module 1040 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or implemented in any one of software, hardware, and firmware, or any suitable combination of any of these. Alternatively, at least one of the extraction module 1010 , the first processing module 1020 , the second processing module 1030 and the encoding module 1040 may be at least partially implemented as a computer program module, which may perform corresponding functions when executed.

[0139] The above describes embodiments of the present invention. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention. Although each embodiment has been described separately, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Those skilled in the art may make various substitutions and modifications without departing from the scope of the present invention, and such substitutions and modifications are intended to be included within the scope of protection of the present invention.

Claims

1. A method for compressing astronomical images, characterized in that: include: Performing an observation task for obtaining an astronomical observation image of a star image in a stretched line; Extracting the star region from the astronomical observation image showing the star image as a line using an eight-connected domain method to obtain a first image; Classifying the first image into a first type of image and a second type of image according to the number of star distribution and the level of the observation task; Under the condition that the first image is a first type of image, the first type of image is divided into a plurality of image blocks, and each of the image blocks is threshold-segmented according to pixel color to obtain a binary image of the star image in each image block; Determining the number of target stars to be retained in each image block based on a relationship between the number of stars in the binary image and a preset threshold, and removing other non-target stars in each image block of the first image to obtain a second image; Performing coordinate transformation on each pixel in the second image at a preset angle using a rotation matrix, and segmenting the second image after the coordinate transformation to obtain a plurality of segmented regions; A third image is obtained by adjusting pixel values ​​of the plurality of segmented regions that do not include a rectangular region, wherein the rectangular region is a region including the target constellation; performing an inverse angle transformation operation on the third image to restore the angle of the third image to the same angle as the second image and remove jagged edges of the third image; The third image obtained after performing the inverse angle transformation operation and removing the jagged edges is encoded based on the Hcompress algorithm to obtain a compressed target astronomical image.

2. The astronomical image compression method according to claim 1, characterized in that: include: When the number of stars in the binary image exceeds a preset threshold, the number of target stars to be retained in each image block is determined according to the ratio of the number of stars in the image block to the number of image blocks.

3. The astronomical image compression method according to claim 1, characterized in that: The step of obtaining a third image by adjusting the pixel values ​​of each segmented area that does not include the rectangular area includes: Calculating the bounding rectangle of the second image; The area in the second image containing the largest number of stars is defined as a rectangular area, and the remaining area is defined as a background area; The pixel values ​​of the background area are adjusted to obtain a third image containing the target star image.

4. The astronomical image compression method according to claim 1, characterized in that: The method comprises: Setting background thresholds based on the brightness and contrast of astronomical observation images with star-line patterns; The star region is determined according to the background threshold, and the pixels in the star region are marked as foreground pixels, and the pixels outside the star region are marked as background pixels.

5. The astronomical image compression method according to claim 4, characterized in that: The extracting of the star region from the astronomical observation image showing the star image as a line using the eight connected domain method to obtain the first image includes: Perform the following steps on each of the foreground pixels, the steps comprising: Checking whether the foreground pixel has been visited; If the foreground pixel is the starting point of a new connected domain, a new connected domain is created and the foreground pixel is added to the connected domain; the adjacent areas of the foreground pixel are checked, and if the adjacent areas are foreground pixels and have not been visited, the foreground pixel is added to the current connected domain and marked as visited; When all adjacent foreground pixels have been visited, the current connected domain is constructed and the foreground pixel is added to a connected domain list; wherein each connected domain in the connected domain list represents a constellation region; A first image is determined based on the extracted star region.

6. The astronomical image compression method according to claim 1, characterized in that: The method further comprises encoding the third image obtained by performing the angle inverse transformation operation and removing the jagged edges based on the Hcompress algorithm to obtain a compressed target astronomical image. Performing a wavelet transform on the third image to convert the third image from image data into a frequency domain representation; quantizing the third image based on the compression scale factor to obtain a quantization coefficient; The quantized coefficient bit plane is quadtree-encoded to obtain the target astronomical image.