Astronomical image compression method and device
By extracting stars, blocking processing, angle transformation and background processing, and using Hcompress algorithm encoding, it solves the problem that existing technology cannot effectively compress astronomical images, and achieves efficient image compression and data transmission.
Patent Information
- Application Number
- CN202411920002.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art cannot effectively meet the storage and transmission needs of exponentially growing astronomical image data, and the classic astronomical image compression algorithm cannot achieve sufficient compression ratio.
By extracting the astrology from the input image, sub -blocking, angle transformation, and background processing, the image is finally encoded, and efficient compression is used to use the HCOMPRESS algorithm.
It effectively reduces the amount of image data, removes noise and interfering galaxies, improves the clarity and readability of images, achieves fast and efficient compression of astronomical observation images, saves data storage space and improves data transmission efficiency.
Smart Images

Figure CN119363893A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of space target observation image processing, and more specifically, 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] In order to meet the increasing storage demand, image compression technology has become the preferred means of optimizing data storage space. The technical background of astronomical image compression mainly involves some basic image compression algorithms and technologies, including lossless compression and lossy compression technology. The typical compression ratio of the currently used classic astronomical image compression algorithm is in the range of 1:1.1-1:1.5. Image compression using existing image compression algorithms cannot meet the exponentially growing image storage demand. 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] (II) 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 type of the first image is 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 divided into blocks 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 star image, 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 a target star image.
[0011] According to an embodiment of the present invention, an angle transformation is performed on the second image to convert the second image to a specified angle, including: 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, the background area in the second image after the angle transformation is removed to obtain a third image containing the target star image, including: calculating the circumscribed rectangle of the second image; taking 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; 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 star image, 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 the 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 to 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] The second aspect of the present invention provides an astronomical image compression device, comprising: an extraction module, used to extract stars from an input image to obtain a first image; a first processing module, used to, when the type of the first image is a first type, perform 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; a second processing module, used to perform angle transformation operations and background processing operations on the second image to obtain a third image containing target stars; and an encoding module, used to encode the third image to obtain a compressed target astronomical image.
[0017] (III) 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 can be effectively reduced, the noise and interfering galaxies in the image can be removed, the clarity and readability of the image can be improved, and based on the Hcompress algorithm, fast and efficient compression processing of astronomical observation images can be 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 Schematically shows a flow chart of an astronomical image compression method according to an embodiment of the present invention;
[0022] Figure 2 Schematically shows a flow chart of extracting stars from an input image to obtain a first image according to an embodiment of the present invention;
[0023] Figure 3 A flowchart schematically shows, when the type of the first image is the first type, a first image is processed into blocks 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 shows how to perform 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 An input image in an embodiment of the present invention is schematically shown;
[0026] Figure 6 The image obtained after performing block processing and angle transformation operations on the input image according to the embodiment of the present invention is schematically shown;
[0027] 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;
[0028] Figure 8 schematically shows an enlarged view of an image obtained after performing restoration processing on the third image;
[0029] Fig. 9 Schematically shows a detail diagram of an image obtained after performing restoration processing on the third image;
[0030] Fig.10The structure block diagram of the astronomical image compression device according to an embodiment of the present invention is schematically shown. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are 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 existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0033] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or can communicate with each other; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to 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 the orientation or positional relationship are based on the orientation or positional relationship 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 cannot be understood as a limitation on the present invention.
[0035] Throughout the drawings, the same elements are represented by the same or similar reference numerals. Conventional structures or configurations will be omitted when they may cause confusion in the understanding of the present invention. The shapes, sizes, and positional relationships of the components in the drawings do not reflect the actual size, proportion, and actual positional relationship.
[0036] Similarly, in order to simplify the present invention and help understand 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. The description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means 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 representation of the above terms does 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] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and 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 target extraction processing and image task level analysis. The type of the first image includes a first type and a second type, 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 based on the distribution density of the stars in each image block, and redundant stars are discarded, so as to further improve 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 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, each area is 256*256 pixels. When the number of stars in the first image is less than or equal to the number of image blocks, all stars are retained. When 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 distribution density of stars 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 serial number of the image block.
[0052] In operation S130, an angle transformation operation and a background processing operation are performed on the second image to obtain a third image containing a target star image.
[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 an embodiment of the present invention, the third image is encoded based on the Hcompress algorithm to obtain a target astronomical image. The image data is converted into a frequency domain representation and Boltzmann entropy coding is used to achieve efficient compression. The setting of the compression scale factor determines the degree of image compression. The value of the scale factor is positively correlated with the compression ratio and negatively correlated with the image quality. That is, the larger the value of the compression scale factor, the higher the compression ratio, and the lower the quality of the compressed image finally obtained.
[0057] Specifically, the Hcompress algorithm mainly includes three aspects: wavelet transform, optional quantization, and quadtree encoding of the quantization coefficient bit plane.
[0058] Wavelet transform starts with a smaller 2×2 block, and then increases to 4×4, 8×8, etc. blocks by multiples of 2. In each pixel block, the sum and difference of pixels are calculated to decompose the image into different frequency components for subsequent processing and compression. The image is decomposed using wavelet transform to extract low-frequency and high-frequency coefficients in the decomposition structure, where low-frequency coefficients usually include the main information of the image, and 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 inverse transformed to restore the original image. It should be noted that the h-transform can be performed in-place in memory and requires enough memory to hold the original image (or image blocks). To avoid overflow problems when summing pixel values, the memory array is expanded by a factor of 2, so that each pixel has twice the number of bits as in the original image. Hcompress bit-plane coding, first compressing the most significant bits of each coefficient (mostly 0) and then compressing to the least significant bits (usually noise), has the effect of sorting the image description so that as more bits are received, the data stream will provide a progressively 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 quantizes and lossily compresses 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 details and redundant information, further improving the compression ratio.
[0061] The compression scale factor can be selected according to the actual application scenario and requirements. If the image quality requirement is high, a lower compression scale factor can be selected to achieve a compression effect closer to lossless. If a high compression ratio is emphasized, the compression scale factor can be appropriately increased, but it will lead to loss of image details and a decrease in signal-to-noise ratio.
[0062] The Hcompress compression algorithm can set the compression scale factor according to the requirements of the compression options to achieve the corresponding compression effect. Depending on the application scenario, you can weigh the balance between image quality and compression ratio and select the most suitable compression scale factor for image compression processing. The cost of achieving a high compression ratio with this option is that the original pixel values in the image cannot be completely preserved.
[0063] After quantization is completed, the quantization 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 can be achieved to obtain the target astronomical image.
[0064] The astronomical image compression method provided by the embodiment of the present invention may, for example, further include: 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 the case that 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 is based on realizing fast and efficient compression processing of astronomical observation images, effectively saving data storage space, improving data transmission efficiency, and providing 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 region is constructed, and the pixels in the star region are marked as foreground regions, and other pixels except the star region are regarded as background pixels.
[0072] And, the star image region is further extracted based on the connected domain 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 the 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, add it to the current connected domain and mark it as visited. When the current connected domain can no longer be expanded (that is, all adjacent foreground pixels have been visited), complete the construction of the current connected domain and add it to the connected domain list. Each connected domain in the connected domain list represents a star region, and the first image is determined based on the extracted star region.
[0074] In a specific implementation process, operations S210 to S220 can be expressed by the following formula:
[0075]
[0076] Among them, Threashold 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 8 adjacent positions of the foreground pixel position, including top, bottom, 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 regarded as an ellipse, and its semi-major axis and semi-minor axis lengths are 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] Thus, the calculation formula of angle θ can be obtained:
[0086]
[0087] Among them, A and B can be directly calculated by the second-order moment:
[0088]
[0089]
[0090] Then the features of the detected objects (i.e. foreground pixels) are calculated, including the center point, angle, boundary range, etc.
[0091] Figure 3 The flowchart schematically shows, when the type of the first image is the first type, a first image is processed into blocks based on the distribution of stars in the first image to obtain a second image 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-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, 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 to be 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 according to the brightness or color of the pixel points to obtain a binary image of the star image in the image block. The number of stars in the binary image is counted. If the number of stars does not exceed 1, the star image in the image block is directly retained and the coordinates are recorded. If the number of stars in the image block exceeds 1, the number of stars retained in each image block is determined according to the star density distribution. For example, the number of stars retained in the image block can be calculated according to the ratio of the number of stars in the image block to the number of image blocks.
[0098] According to the distribution of star density, an appropriate number of stars are retained in the first image block where the number of other stars exceeds 1. The number of stars to be retained can be calculated based on the ratio of the number of stars in the block to the threshold. According to the recorded coordinates, the retained stars and other pixels in the original image are set to zero, that is, they are regarded 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 star images to be retained in each image block are determined based on the number of star images to be retained (the target star images to be retained can be determined based on the area of the star images, for example, the stars close to the central area can be determined as the target star images), the coordinates of the target star images are recorded, and based on the recorded coordinates, the other pixel points in each image block except the target star images are set to zero to remove redundant star images 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 star image, including operations S410 to S420.
[0103] In operation S410, an 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, the rotation matrix can be used to transform each pixel in the second image according to a specified rotation angle, thereby realizing the rotation of the second image, so that the rotated second image is at a specified angle (horizontal or vertical). This includes: assuming that the coordinates of a pixel in the original image are (x, y), and rotating the point counterclockwise by an angle of θ 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 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 star image.
[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, so as to extract the main stars in the second image and remove the turbid background.
[0115] In the specific implementation process, the second image can be segmented by threshold segmentation, edge detection and other methods, the first image can be segmented into multiple areas, the circumscribed rectangle of each area can be calculated, the largest area (i.e., the area containing the largest number of stars) is found as the rectangular area where the stars are located, all areas except the rectangular area where the stars are located are regarded as background areas, and the pixel values of the background areas are adjusted (such as adjusting the pixel values to 0 or a specified value) to obtain a third image containing the target stars.
[0116] In some embodiments, after performing the angle transformation operation and the background processing operation on the second image, a restoration process needs to be performed on the obtained third image, wherein the restoration process includes: performing an angle inverse transformation operation on the third image, restoring the angle of the third image to the same angle as the second image, and removing the jagged edges of the third image.
[0117] The astronomical image compression method provided by the present invention is introduced below in conjunction with 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 of a certain night. The stars in the input image are extracted to obtain the first image, and the image compression level (i.e. the type of the first image) is determined according to the number and distribution of stars and the observation task 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 stars in each image block are removed to obtain a second image. And, 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 image obtained after performing block processing and angle transformation operations on the input image according to the embodiment of the present invention is schematically shown.
[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 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 an image according to an 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 , Fig. 9 shown.
[0126] Figure 8 An enlarged view of an image obtained after the restoration process is performed on the third image is schematically shown.
[0127] Fig. 9 The detailed diagram of the image obtained after the restoration process is performed on the third image is schematically shown.
[0128] And, the third image is encoded based on the Hcompress algorithm to obtain a compressed target astronomical image. The 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-star 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 star information. The star transformation is used to achieve lossy compression of the images while protecting the complete star information.
[0131] Based on the above astronomical image compression method, the present invention also provides an astronomical image compression device. Fig.10 The device is described in detail.
[0132] Fig.10 The structure block diagram of the astronomical image compression device according to an embodiment of the present invention is schematically shown.
[0133] like Fig.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 star image 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 used to perform block processing on the first image based on the distribution of stars in the first image to obtain a second image when the type of the first image is the first type; wherein the block processing is used to remove redundant stars in the first image. In one embodiment, the first processing module 1020 can be used to perform the operation S120 described above, which will not be described in detail 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 image. In one embodiment, the second processing module 1030 can be used to perform the operation S130 described above, which will not be described in detail 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 described in detail here.
[0138] According to an embodiment of the present invention, any multiple modules of the extraction module 1010, the first processing module 1020, the second processing module 1030 and the encoding module 1040 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment 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 can 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 can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware and firmware or by a suitable combination of any of them. 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, and when the computer program module is executed, a corresponding function may be performed.
[0139] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination advantageously. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all be included in the protection scope of the present invention.
Claims
1. A method for compressing astronomical images, characterized in that: The method comprises: Extracting stars from an input image to obtain a first image; In the case where 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; Performing an angle transformation operation and a background processing operation on the second image to obtain a third image containing a target star image; The third image is encoded to obtain a compressed target astronomical image.
2. The astronomical image compression method according to claim 1, characterized in that: The step of extracting stars from an input image to obtain a first image comprises: Determine the star region in the input image based on a preset background threshold; The connected domain method is used to extract the star region to obtain the first image.
3. The astronomical image compression method according to claim 1, characterized in that: When the type of the first image is 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 includes: dividing the first image into a plurality of image blocks; Determine the number of stars to be retained in each image block based on the distribution density of stars in each image block; 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.
4. The astronomical image compression method according to claim 1, characterized in that: The performing of the angle transformation operation and the background processing operation on the second image to obtain a third image containing the target star image comprises: performing an angle transformation on the second image to convert the second image to a specified angle; The background area in the second image after the angle transformation is removed to obtain a third image containing the target star image.
5. The astronomical image compression method according to claim 4, characterized in that: The performing angle transformation on the second image to convert the second image into a specified angle includes: determining a rotation angle of the second image; The coordinates of each pixel in the second image are transformed based on the rotation angle, so that the second image is converted to a specified angle.
6. The astronomical image compression method according to claim 4, characterized in that: The method of removing the background area in the second image after the angle transformation to obtain a third image containing the target star image comprises: Calculating the bounding rectangle of the second image; The area in the second image containing the largest number of stars is determined as a rectangular area, and the remaining area is determined as a background area; The pixel values of the background area are adjusted to obtain a third image containing the target star image.
7. The astronomical image compression method according to claim 4, characterized in that: The method of removing the background area in the second image after the angle transformation to obtain a third image containing the target star image comprises: performing an angle inverse transformation operation on the third image to restore the angle of the third image to the same angle as that of the second image; The jagged edges of the third image are removed.
8. The astronomical image compression method according to claim 1, characterized in that: The step of encoding the third image to obtain a compressed target astronomical image comprises: Performing wavelet transform on the third image to convert the third image from image data into frequency domain representation; The third image is quantized and compressed based on the compression scale factor to obtain a target astronomical image.
9. The astronomical image compression method according to claim 1, characterized in that: Also includes: In a case where the type of the first image is the second type, the first image is encoded to obtain a compressed target astronomical image.
10. An astronomical image compression device, characterized in that: The device comprises: An extraction module, used for extracting stars from an input image to obtain a first image; a first processing module, configured to, when the type of the first image is the first type, perform 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; A second processing module, used for performing an angle transformation operation and a background processing operation on the second image to obtain a third image containing a target star image; The encoding module is used to encode the third image to obtain a compressed target astronomical image.
Citation Information
Patent Citations
Digital hologram coding transmission method employing compressed sensing
CN105451024A
Block RBF interpolation high-speed camera compression image reconstruction method
CN106600540A
Satellite-borne remote sensing image compression method based on self-adaptive block compressed sensing
CN110401839A
Multi-camera panoramic image construction method based on compressed sensing and super-resolution reconstruction
CN110827198A
Frequency domain astronomical image target detection method and system
CN113344765A