Self-adaptive image data compression and encryption method, equipment and medium
By adaptively selecting image compression strategies and encryption processing, the problem of fixed compression strategies in existing technologies is solved, achieving image data compression and encryption with strong cross-scene applicability and high processing efficiency, thereby improving the security and transmission efficiency of image data.
Patent Information
- Application Number
- CN202511813492.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-02-13
AI Technical Summary
Existing image compression and encryption technologies suffer from fixed compression strategies, poor cross-scenario applicability, and limited processing efficiency, making it impossible to deeply mine image features for adaptive adjustments.
The luminance and chrominance component features are extracted by image color space conversion. The compression strategy is adaptively selected and combined with encryption processing, including predictive coding, dictionary coding, transform domain compression and AES encryption algorithm. The compression strategy is dynamically matched according to the image features.
It achieves image data compression and encryption with strong cross-scene adaptability and high processing efficiency, improving the security and transmission efficiency of image data and reducing the data processing load.
Smart Images

Figure CN121531078A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing and data security technology, specifically to an adaptive image data compression and encryption method, device, and medium. Background Technology
[0002] With the rapid development of digital technology, image data, with its high-dimensional semantic expression capabilities and cross-domain interpretability, has become an important carrier of information dissemination. Whether it's consumer-grade images captured by mobile phones and shared on social media platforms, or industrial-grade remote sensing and medical image diagnosis, all involve the generation, transmission, and storage of massive amounts of image data. Against this backdrop, image data processing faces two core challenges: firstly, the sheer volume of image data leads to significant storage resource consumption; secondly, image transmission efficiency is low in low-bandwidth environments. Furthermore, image data often contains identifiable information elements, such as facial features, environmental scene characteristics, or business-sensitive attributes. Without secure processing, this information may be illegally obtained. Simultaneously, images inherently possess characteristics such as large data capacity, high redundancy, and strong correlation between adjacent pixels, making traditional text encryption algorithms less applicable in image encryption scenarios.
[0003] In traditional technologies, image compression and encryption often employ a compression-then-encryption processing model. The lack of adaptive adjustment capabilities in compression technology is a key factor limiting overall performance. Existing mainstream compression algorithms generally use fixed compression parameters and processing flows, lacking a dynamic adjustment mechanism based on the image's own characteristics. However, the texture richness, contrast, and tonal consistency of an image directly determine its redundant structure. Current compression technologies lack a universal adaptation framework based on image features, requiring frequent adjustments to core parameters when deployed across different scenarios. This results in poor compatibility and scalability, increasing the cost of technology implementation.
[0004] Therefore, how to deeply mine image features, dynamically match the optimal compression strategy based on the features, and realize image data compression and encryption, overcoming the shortcomings of existing image compression and encryption technologies such as fixed compression strategies, poor cross-scene applicability, and limited processing efficiency, is a technical problem that urgently needs to be solved. Summary of the Invention
[0005] The technical objective of this invention is to provide an adaptive image data compression and encryption method, device, and medium to address the problems of fixed compression strategies, poor cross-scenario applicability, and limited processing efficiency in existing image compression and encryption technologies.
[0006] The technical objective of this invention is achieved as follows: an adaptive image data compression and encryption method, the specific method of which is as follows:
[0007] Image color space conversion: Obtain the plaintext image to be processed, perform color space conversion on the plaintext image, and obtain a YCrCb color space image;
[0008] Component extraction and data distribution feature calculation: Extract the luminance component and chrominance component of the image respectively, and calculate the luminance feature of the luminance component and the chrominance feature of the chrominance component.
[0009] Adaptive selection of image compression algorithm: The luminance and chrominance features are compared with the corresponding preset thresholds, and the compression strategy path is adaptively determined according to the comparison results; wherein, the luminance component selects predictive coding compression, dictionary coding compression or transform domain-based compression method according to different feature conditions; the chrominance component selects the corresponding chrominance compression method according to the chrominance concentration feature.
[0010] The compressed image component data is then encrypted.
[0011] As a preferred embodiment, the image color space conversion is as follows:
[0012] The formula for converting an RGB image to the YCrCb color space is as follows:
[0013]
[0014] Where R, G, and B are the red, green, and blue component values of the RGB image, respectively; Y represents the converted luminance component; and Cr and Cb represent the converted chrominance components, respectively.
[0015] Luminance component analysis: All values of the luminance component Y are statistically analyzed, and statistical indicators including mean and variance are calculated. The formula is as follows:
[0016]
[0017] Where, μ Y This represents the average value of the luminance component; Y(i,j) represents the variance of the luminance component; M and N represent the number of columns and rows of the image, respectively; Y(i,j) represents the luminance value at coordinate (i,j).
[0018] Joint analysis of chromaticity components: statistically analyze all values of chromaticity components Cr(i,j) and Cb(i,j), and calculate the mean μ. Cr and μ Cb The statistical index of covariance cov(Cr,Cb) is given by the following formula:
[0019]
[0020] The statistical characteristics of Cr(i,j) and Cb(i,j) are calculated using the covariance matrix method, as shown in the following formula:
[0021]
[0022] The determinant of the statistical characteristics is taken as the chromaticity dispersion, and the formula is as follows:
[0023]
[0024] The normalized concentration formula is: C CrCb =exp(-10) -3 D CrCb ); where C CrCb ∈(0,1), the closer the value is to 1, the more concentrated the color distribution is, and the closer it is to 0, the more dispersed it is.
[0025] More preferably, luminance features are used to characterize the range of image brightness variation and overall brightness level, while chrominance concentration is used to characterize the degree of aggregation of chrominance components in the two-dimensional pixel distribution space.
[0026] More preferably, the luminance component Y satisfies μ Y <T Y_mean and The image is then determined to be a low-brightness, low-complexity image, and the lossless compression algorithm DPCM (Differential Pulse Code Modulation) based on predictive coding is selected; where T Y_mean The preset average brightness threshold is 64, T Y_var The preset brightness variance threshold is 256;
[0027] Specifically, the lossless compression algorithm DPCM based on predictive coding is as follows: for each pixel of the luminance component Y, the linear combination of the previous few adjacent pixels is used as the predicted value, the difference between the current pixel and the predicted value is calculated, and the difference is encoded.
[0028] The same encoding method is used for the chromaticity components Cr and Cb, and compression encoding is performed by utilizing the correlation between the chromaticity components.
[0029] More preferably, the luminance component Y satisfies μ Y ≥T Y_mean and The image is determined to be a high-brightness, low-complexity image. A lossless compression algorithm is selected and an LZW (Lempel-Ziv-Welch) encoding process is used. Specifically, the brightness component Y is LZW encoded to compress the repeating pixel sequence.
[0030] For the chromaticity components Cr and Cb, the same encoding method is used, and compression encoding is performed by utilizing the correlation between the chromaticity components.
[0031] More preferably, the luminance component Y satisfies If the image is determined to be a high-complexity image, a lossy compression algorithm is selected and a quantization strategy is adapted. Specifically, the luminance component Y is divided into 8×8 pixel blocks and DCT transformation is performed, followed by standard quantization and zig-zag scanning and Huffman entropy coding of the quantized coefficients. The quality factor is 50.
[0032] For the chromaticity components Cr and Cb, if C CrCb If TC is a preset chromaticity component concentration threshold of 0.5, the image chromaticity distribution is determined to be concentrated, and DCT transformation, coarse quantization, and entropy coding are performed after (4:2:0) downsampling; otherwise, the image chromaticity distribution is determined to be dispersed, and DCT transformation, fine quantization, and entropy coding are performed after (4:2:2) downsampling; where the coarse quantization quality factor is 40 and the fine quantization quality factor is 85.
[0033] As a preferred method, the compressed image component data is encrypted using an AES-based data encryption method.
[0034] More preferably, the compressed image component data is encrypted using an AES-based encryption method, as follows:
[0035] The compressed luminance component Y and chrominance components Cr and Cb are sequentially integrated into a binary stream. The binary data stream is then encrypted using the AES-128 encryption algorithm. The key is configured by the user or the system, and the generated ciphertext data can be directly used for storage or transmission.
[0036] An electronic device includes: a memory and at least one processor;
[0037] The memory stores computer-executed instructions;
[0038] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the adaptive image data compression and encryption method as described above.
[0039] A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the adaptive image data compression and encryption method described above.
[0040] The adaptive image data compression and encryption method, device, and medium of the present invention have the following advantages:
[0041] (i) This invention analyzes the luminance component and chrominance component characteristics of the image color space, adaptively selects matching luminance component compression strategy and chrominance component compression strategy, and then encrypts the compressed data to generate encrypted image data. Different compression strategies can be adaptively selected according to different image content characteristics, which is beneficial to adapt to multiple types of image data scenarios. After compression, encryption processing can be combined for image data storage and transmission.
[0042] (II) This invention adaptively selects a compression strategy based on the data distribution characteristics of the image itself and directly performs further encryption. The input plaintext image data undergoes color space conversion to obtain luminance and chrominance components; luminance features of the luminance components and chrominance features of the chrominance components are extracted respectively; based on the comparison results of the luminance and chrominance features with corresponding preset thresholds, an adaptive compression strategy is selected to compress the luminance and chrominance components respectively; the compressed image data is then encrypted to generate ciphertext image data; wherein, the adaptive compression processing of the luminance component includes: when the luminance features indicate large fluctuations in the image luminance distribution, transform-domain based compression processing is performed; when the luminance features indicate high overall image luminance and low luminance fluctuations, word-domain based compression processing is performed. The compression process employs dictionary coding. When the luminance features indicate that the overall brightness of the image is low and the brightness fluctuation is low, compression based on predictive coding is performed. The adaptive compression process for the chrominance components includes: adaptively selecting a chrominance compression strategy based on joint determination of luminance and chrominance features; when the chrominance features indicate a significant distribution of concentrated chrominance regions, a coarse quantization method with higher compression intensity is used for compression; when the chrominance features indicate a uniform distribution of concentrated chrominance regions, a fine quantization method with lower compression intensity is used for compression. When performing chrominance compression, the downsampling mode, transform domain compression, and dictionary coding or predictive coding methods are selected based on the judgment conditions of luminance features. This solves the technical problems of fixed compression strategies, poor cross-scene applicability, and limited processing efficiency in existing image compression and encryption technologies.
[0043] (III) This invention uses the Advanced Encryption Standard (AES) encryption algorithm as an example for encryption, but the encryption algorithm can also be other data encryption algorithms suitable for image processing;
[0044] (iv) Unlike the traditional image data processing mode with a fixed compression method, the present invention can adaptively select the compression strategy according to the differences in image content, improve the cross-scene adaptability and compression efficiency of image compression processing, and achieve secure storage and transmission of image data through encryption after compression processing.
[0045] (v) The adaptive strategy matching of the present invention is not directly bound to image size, image type and usage scenario, does not rely on a single compression algorithm, can maintain the stability of the method under different application conditions, and has good cross-scenario adaptability.
[0046] (vi) The compression and encryption method of the present invention adaptively selects three features: mean brightness, variance brightness and chromaticity concentration, and selects the corresponding compression strategy according to different image content to avoid mismatch processing of fixed compression parameters under different image content, thereby improving the overall processing efficiency.
[0047] (vii) The compression encryption method of the present invention can effectively avoid the extra overhead caused by rewriting the image data by directly encrypting the compressed image data, and can reduce the data processing load in the encryption stage, thereby maintaining the security of the image data while improving the execution efficiency of the encryption process. Attached Figure Description
[0048] The invention will be further described below with reference to the accompanying drawings.
[0049] Appendix Figure 1 A flowchart of an adaptive image data compression and encryption method;
[0050] Appendix Figure 2 Flowchart for selecting image luminance component compression strategy;
[0051] Appendix Figure 3 Flowchart for selecting an image chroma component compression strategy. Detailed Implementation
[0052] The adaptive image data compression and encryption method, device, and medium of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0053] Example 1:
[0054] As attached Figure 1 As shown, this embodiment provides an adaptive image data compression and encryption method, which is as follows:
[0055] S1. Image color space conversion: Obtain the plaintext image to be processed, perform color space conversion on the plaintext image, and obtain a YCrCb color space image;
[0056] S2. Component extraction and data distribution feature calculation: Extract the luminance component and chrominance component of the image respectively, and calculate the luminance feature of the luminance component and the chrominance feature of the chrominance component.
[0057] S3. Adaptive selection of image compression algorithm: The luminance and chrominance features are compared with the corresponding preset thresholds, and the compression strategy path is adaptively determined according to the comparison results; wherein, the luminance component selects predictive coding compression, dictionary coding compression or transform domain-based compression method according to different feature conditions; the chrominance component selects the corresponding chrominance compression method according to the chrominance concentration feature.
[0058] S4. Encrypt the compressed image component data.
[0059] The image color space conversion in step S1 of this embodiment is as follows:
[0060] S101. Convert the RGB image to the YCrCb color space using the following formula:
[0061]
[0062] Where R, G, and B are the red, green, and blue component values of the RGB image, respectively; Y represents the converted luminance component; and Cr and Cb represent the converted chrominance components, respectively.
[0063] S102. Luminance Component Analysis: Statistically analyze all values of the luminance component Y and calculate statistical indicators including mean and variance, using the following formula:
[0064]
[0065] Where, μ Y This represents the average value of the luminance component; Y(i,j) represents the variance of the luminance component; M and N represent the number of columns and rows of the image, respectively; Y(i,j) represents the luminance value at coordinate (i,j).
[0066] S103. Joint analysis of chromaticity components: Statistically analyze all values of chromaticity components Cr(i,j) and Cb(i,j), and calculate the mean μ. Cr and μ Cb The statistical index of covariance cov(Cr,Cb) is given by the following formula:
[0067]
[0068] The statistical characteristics of Cr(i,j) and Cb(i,j) are calculated using the covariance matrix method, as shown in the following formula:
[0069]
[0070] The determinant of the statistical characteristics is taken as the chromaticity dispersion, and the formula is as follows:
[0071]
[0072] The normalized concentration formula is: C CrCb =exp(-10) -3 D CrCb ); where C CrCb ∈(0,1), the closer the value is to 1, the more concentrated the color distribution is, and the closer it is to 0, the more dispersed it is.
[0073] In this embodiment, the mean luminance threshold, luminance variance threshold, and chromaticity concentration threshold are all preset adjustable parameters that can be adaptively set according to different image application scenarios, target compression quality requirements, and system performance conditions. The thresholds are not limited to fixed values and can be configured according to user needs or empirical models. The mean luminance threshold, luminance variance threshold, and chromaticity concentration threshold shown in the following embodiments are merely exemplary values for this embodiment.
[0074] As attached Figure 2 and 3 As shown, in this embodiment, the brightness feature is used to characterize the amplitude of image brightness variation and the overall brightness level, while the chromaticity concentration is used to characterize the degree of aggregation of chromaticity components in the two-dimensional pixel distribution space; the situation is as follows:
[0075] ① The luminance component Y satisfies μ Y <T Y_mean and The image is then determined to be a low-brightness, low-complexity image, and the lossless compression algorithm DPCM (Differential Pulse Code Modulation) based on predictive coding is selected; where T Y_mean The preset average brightness threshold is 64, T Y_var The preset brightness variance threshold is 256;
[0076] Specifically, the lossless compression algorithm DPCM based on predictive coding is as follows: for each pixel of the luminance component Y, the linear combination of the previous few adjacent pixels is used as the predicted value, the difference between the current pixel and the predicted value is calculated, and the difference is encoded.
[0077] The same encoding method is used for the chromaticity components Cr and Cb, and compression encoding is performed by utilizing the correlation between the chromaticity components.
[0078] ② The luminance component Y satisfies μ Y ≥T Y_mean and The image is determined to be a high-brightness, low-complexity image. A lossless compression algorithm is selected and an LZW (Lempel-Ziv-Welch) encoding process is used. Specifically, the brightness component Y is LZW encoded to compress the repeating pixel sequence.
[0079] For the chromaticity components Cr and Cb, the same encoding method is used, and compression encoding is performed by utilizing the correlation between the chromaticity components.
[0080] ③ The luminance component Y satisfies If the image is determined to be a high-complexity image, a lossy compression algorithm is selected and a quantization strategy is adapted. Specifically, the luminance component Y is divided into 8×8 pixel blocks and DCT transformation is performed, followed by standard quantization and zig-zag scanning and Huffman entropy coding of the quantized coefficients. The quality factor is 50.
[0081] For the chromaticity components Cr and Cb, if C CrCb If TC is a preset chromaticity component concentration threshold of 0.5, the image chromaticity distribution is determined to be concentrated, and DCT transformation, coarse quantization, and entropy coding are performed after (4:2:0) downsampling; otherwise, the image chromaticity distribution is determined to be dispersed, and DCT transformation, fine quantization, and entropy coding are performed after (4:2:2) downsampling; where the coarse quantization quality factor is 40 and the fine quantization quality factor is 85.
[0082] In step S3 of this embodiment, the compressed image component data is encrypted using an AES-based data encryption method; specifically as follows:
[0083] The compressed luminance component Y and chrominance components Cr and Cb are sequentially integrated into a binary stream. The binary data stream is then encrypted using the AES-128 encryption algorithm. The key is configured by the user or the system, and the generated ciphertext data can be directly used for storage or transmission.
[0084] Example 2:
[0085] This embodiment also provides an electronic device, including: a memory and at least one processor;
[0086] The memory stores computer-executed instructions;
[0087] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to execute the adaptive image data compression and encryption method according to any one of the present invention.
[0088] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can be a microprocessor or any conventional processor.
[0089] Memory is used to store computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function, etc.; the data storage area can store data created based on the use of the terminal, etc. In addition, memory can also include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart memory cards (SMC), secure digital cards (SD cards), flash memory cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.
[0090] Example 3:
[0091] This embodiment also provides a computer-readable storage medium storing multiple instructions, which are loaded by a processor to cause the processor to execute the adaptive image data compression and encryption method of any embodiment of the present invention. Specifically, a system or apparatus equipped with a storage medium may be provided, on which software program code implementing the functions of any of the above embodiments is stored, and the computer (or CPU or MPU) of the system or apparatus may read and execute the program code stored in the storage medium.
[0092] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.
[0093] Examples of storage media used to provide program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.
[0094] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0095] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion unit connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion unit execute some and all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An adaptive image data compression and encryption method, characterized in that, The method is as follows: Image color space conversion: Obtain the plaintext image to be processed, perform color space conversion on the plaintext image, and obtain a YCrCb color space image; Component extraction and data distribution feature calculation: Extract the luminance component and chrominance component of the image respectively, and calculate the luminance feature of the luminance component and the chrominance feature of the chrominance component. Adaptive selection of image compression algorithm: The luminance and chrominance features are compared with the corresponding preset thresholds, and the compression strategy path is adaptively determined according to the comparison results; wherein, the luminance component selects predictive coding compression, dictionary coding compression or transform domain-based compression method according to different feature conditions; the chrominance component selects the corresponding chrominance compression method according to the chrominance concentration feature. The compressed image component data is then encrypted.
2. The adaptive image data compression and encryption method according to claim 1, characterized in that, The image color space conversion is as follows: The formula for converting an RGB image to the YCrCb color space is as follows: Where R, G, and B are the red, green, and blue component values of the RGB image, respectively; Y represents the converted luminance component; and Cr and Cb represent the converted chrominance components, respectively. Luminance component analysis: All values of the luminance component Y are statistically analyzed, and statistical indicators including mean and variance are calculated. The formula is as follows: Where, μ Y This represents the average value of the luminance component; Y(i,j) represents the variance of the luminance component; M and N represent the number of columns and rows of the image, respectively; Y(i,j) represents the luminance value at coordinate (i,j). Joint analysis of chromaticity components: statistically analyze all values of chromaticity components Cr(i,j) and Cb(i,j), and calculate the mean μ. Cr and μ Cb The statistical index of covariance cov(Cr,Cb) is given by the following formula: The statistical characteristics of Cr(i,j) and Cb(i,j) are calculated using the covariance matrix method, as shown in the following formula: The determinant of the statistical characteristics is taken as the chromaticity dispersion, and the formula is as follows: The normalized concentration formula is: C CrCb =exp(-10) -3 D CrCb ); where C CrCb ∈(0,1), the closer the value is to 1, the more concentrated the color distribution is, and the closer it is to 0, the more dispersed it is.
3. The adaptive image data compression and encryption method according to claim 1 or 2, characterized in that, Brightness features are used to characterize the range of brightness variation and the overall brightness level of an image, while chromaticity concentration is used to characterize the degree of aggregation of chromaticity components in the two-dimensional pixel distribution space.
4. The adaptive image data compression and encryption method according to claim 3, characterized in that, The luminance component Y satisfies μ Y <T Y_mean and The image is then determined to be a low-brightness, low-complexity image, and the lossless compression algorithm DPCM based on predictive coding is selected; where T Y_mean T is the preset average brightness threshold. Y_var The preset brightness variance threshold is used; Specifically, the lossless compression algorithm DPCM based on predictive coding is as follows: for each pixel of the luminance component Y, the linear combination of the previous few adjacent pixels is used as the predicted value, the difference between the current pixel and the predicted value is calculated, and the difference is encoded. The same encoding method is used for the chromaticity components Cr and Cb, and compression encoding is performed by utilizing the correlation between the chromaticity components.
5. The adaptive image data compression and encryption method according to claim 3, characterized in that, The luminance component Y satisfies μ Y ≥T Y_mean and The image is then determined to be a high-brightness, low-complexity image. A lossless compression algorithm is selected and an LZW encoding process is used. Specifically, the brightness component Y is LZW encoded to compress the repeating pixel sequence. For the chromaticity components Cr and Cb, the same encoding method is used, and compression encoding is performed by utilizing the correlation between the chromaticity components.
6. The adaptive image data compression and encryption method according to claim 3, characterized in that, The luminance component Y satisfies If the image is determined to be a high-complexity image, a lossy compression algorithm is selected and a quantization strategy is adapted. Specifically, the luminance component Y is divided into 8×8 pixel blocks and DCT transformation is performed, followed by standard quantization and zig-zag scanning and Huffman entropy coding of the quantized coefficients. The quality factor is 50. For the chromaticity components Cr and Cb, if C CrCb If TC is a preset chromaticity component concentration threshold, the image chromaticity distribution is determined to be concentrated, and DCT transformation, coarse quantization, and entropy coding are performed after (4:2:0) downsampling; otherwise, the image chromaticity distribution is determined to be dispersed, and DCT transformation, fine quantization, and entropy coding are performed after (4:2:2) downsampling; where the coarse quantization quality factor is 40 and the fine quantization quality factor is 85.
7. The adaptive image data compression and encryption method according to claim 1, characterized in that, The compressed image component data is encrypted using AES-based data encryption.
8. The adaptive image data compression and encryption method according to claim 7, characterized in that, The compressed image component data is encrypted using AES-based encryption as follows: The compressed luminance component Y and chrominance components Cr and Cb are sequentially integrated into a binary stream. The binary data stream is then encrypted using the AES-128 encryption algorithm. The key is configured by the user or the system, and the generated ciphertext data can be directly used for storage or transmission.
9. An electronic device, characterized in that, include: Memory and at least one processor; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the adaptive image data compression and encryption method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the adaptive image data compression and encryption method as described in any one of claims 1 to 8.
Citation Information
Cited By
DICOM file processing method and device, electronic equipment and storage medium
CN121839043A