A method for adaptive encryption and decryption of key regions of images of unmanned aerial vehicles
Patent Information
- Application Number
- CN202611054498.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-08-18
AI Technical Summary
其中,整体加密虽然安全性较高,但会破坏图像的可视性,且计算开销较大,不利于实时处理与快速预览;而部分区域加密方法通常依赖人工选取或简单规则划分关键区域,难以准确定位图像中的重要关键区域,导致加密效果不稳定
如上所述,本发明述及了一种无人机图像关键区域自适应加密和解密方法,本发明方法通过对无人机航拍图像进行显著性检测与语义分割,联合生成关键区域保护掩码,并基于关键区域保护掩码对需要保护的关键区域内的像素执行选择性加密处理,实现了对图像关键内容的自适应保护。此外,本发明方法还基于显著性掩码提取空间位置信息,并生成语义分割提示信息,将其用于引导语义分割模型对关键区域进行分割,获得语义掩码,进而通过将显著性掩码与语义掩码进行融合,以兼顾视觉关键区域与语义关键区域,从而提高关键区域定位的准确性与完整性。另外,本发明方法仅对关键区域实施加密,在保证关键内容安全性的同时,还能够保留非关键区域原始信息,兼顾图像保护效果与处理效率。本发明所提出的无人机图像关键区域自适应加密和解密方法适用于无人机航拍图像在传输、存储与共享过程中的隐私保护与安全控制场景。
Smart Images

Figure CN122601802A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing and information security technology, specifically relating to an adaptive encryption and decryption method for key areas of UAV images. Background Technology
[0002] With the rapid development of drone technology, drone aerial imagery, or drone imagery for short, has been widely used in various fields such as smart cities, disaster assessment, and environmental monitoring. Images acquired by drones typically have the characteristics of wide field of view, high resolution, and rich information, often containing a large amount of sensitive information, such as people, vehicles, key facilities, and geographical locations.
[0003] In practical applications, drone imagery often needs to be transmitted in real-time via wireless networks or stored on cloud platforms for subsequent analysis and sharing. In open network environments, this type of image data is highly susceptible to unauthorized access, theft, or tampering, leading to privacy breaches and security risks. Therefore, effective security protection for drone imagery is of paramount importance.
[0004] Existing image protection methods mainly include overall encryption, regional encryption, and digital watermarking. While overall encryption offers high security, it compromises image visibility and incurs significant computational costs, hindering real-time processing and rapid previewing. Regional encryption methods often rely on manual selection or simple rule-based division of key areas, making it difficult to accurately locate critical regions within the image, resulting in unstable encryption effectiveness. Furthermore, traditional image protection methods generally lack the utilization of semantic information, making it difficult to achieve refined protection of critical targets. Summary of the Invention
[0005] The purpose of this invention is to propose an adaptive encryption and decryption method for key regions of UAV images. This method can automatically identify key regions of images, take into account both semantic information and visual saliency, and perform adaptive encryption and decryption on key regions, thereby improving processing efficiency and application flexibility while ensuring security.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: An adaptive encryption method for key regions of UAV images includes the following steps: Step 1. Normalize and standardize the original drone aerial images to obtain standardized images; Step 2. Input the standardized image into the salient key region detection model, obtain the salient response results, generate a salient mask through binarization, and perform morphological dilation on the salient mask; Step 3. Extract the spatial location information of key regions based on the saliency mask, and generate semantic segmentation prompts to guide the semantic segmentation model to segment the key regions and obtain the semantic mask; Step 4. Merge the saliency mask and the semantic mask to generate the final critical region protection mask; Step 5. Generate a pseudo-random sequence based on the key area protection mask and encryption key, and perform selective encryption processing on the pixels in the key area to generate an encrypted image of the key area.
[0007] Furthermore, based on the adaptive encryption method for key regions of UAV images, this invention also proposes a corresponding adaptive decryption method for key regions of UAV images, the technical solution of which is as follows: An adaptive decryption method for key regions of UAV images includes the following steps: Step 1. After obtaining the encrypted image of the key area, decrypt the encrypted key area based on the key area protection mask and encryption key to recover the pixel content of the key area; Step 2. Merge and reconstruct the decrypted critical area with the unencrypted non-critical area to obtain a complete drone aerial image.
[0008] The present invention has the following advantages: As described above, this invention discloses an adaptive encryption and decryption method for key regions of UAV images. This method performs saliency detection and semantic segmentation on UAV aerial images, jointly generates a key region protection mask, and selectively encrypts pixels within the key regions requiring protection based on the key region protection mask, achieving adaptive protection of key image content. Furthermore, this method extracts spatial location information based on the saliency mask and generates semantic segmentation prompts, which are used to guide the semantic segmentation model to segment the key regions, obtaining a semantic mask. Then, by fusing the saliency mask and the semantic mask, both visual and semantic key regions are considered, thereby improving the accuracy and completeness of key region localization. In addition, this method encrypts only the key regions, ensuring the security of key content while retaining the original information of non-key regions, balancing image protection effectiveness and processing efficiency. The adaptive encryption and decryption method for key regions of UAV images proposed in this invention is applicable to privacy protection and security control scenarios during the transmission, storage, and sharing of UAV aerial images. Attached Figure Description
[0009] Figure 1 This is a flowchart of the adaptive encryption method for key regions of UAV images in an embodiment of the present invention.
[0010] Figure 2This is a flowchart of the adaptive decryption method for key regions of UAV images in an embodiment of the present invention.
[0011] Figure 3 This is an aerial image taken by a drone in an embodiment of the present invention.
[0012] Figure 4 This invention provides encrypted images of key areas obtained from drone aerial photographs using the encryption method described in this invention.
[0013] Figure 5 The decryption method of this invention is used to obtain a decrypted image of the key area of the drone aerial image.
[0014] Figure 6 This is the second aerial image taken by a drone in an embodiment of the present invention.
[0015] Figure 7 This invention provides an encrypted image of the key area obtained by using the encryption method of the present invention on the second drone aerial image.
[0016] Figure 8 The decryption method of this invention is used to obtain a decrypted image of the key area of the drone aerial image 2.
[0017] Figure 9 This is the third aerial image taken by a drone in an embodiment of the present invention.
[0018] Figure 10 This invention provides encrypted images of key areas obtained from drone aerial images using the encryption method described in this invention.
[0019] Figure 11 The decryption method of this invention is used to obtain a decrypted image of the key area of the drone aerial image 3.
[0020] Figure 12 This is the fourth aerial image taken by a drone in an embodiment of the present invention.
[0021] Figure 13 This invention provides encrypted images of key areas obtained from drone aerial images using the encryption method described in this invention.
[0022] Figure 14 The decryption method of this invention is used to obtain the decrypted image of the key area of the drone aerial image 4. Detailed Implementation
[0023] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments: Example 1 This embodiment describes an adaptive encryption method for key regions of UAV images. This method achieves accurate identification and selective encryption of key regions in UAV aerial images through a multi-stage processing flow, and is suitable for secure transmission and privacy protection management of UAV images.
[0024] The method of this invention can effectively reduce the overall encryption computation overhead while ensuring the secure transmission of sensitive areas, i.e. key areas, of drone images, and improve the adaptability and flexibility of the encryption process. It is applicable to the privacy protection needs of drone images in various scenarios, including the privacy protection and security control needs of drone images during transmission, storage and sharing.
[0025] In this embodiment, the adaptive encryption method for key regions of UAV images is performed at the image acquisition site. The general process of this method includes image preprocessing, saliency detection and saliency mask generation, semantic segmentation based on centroid cues, fusion of saliency mask and semantic mask, and selective encryption processing based on key region protection mask. Finally, the key region encrypted image is output so that it can be uploaded to the storage platform later.
[0026] The adaptive encryption method for key regions of UAV images proposed in this invention will be described in detail below.
[0027] like Figure 1 As shown, an adaptive encryption method for key regions of UAV images specifically includes the following steps: Step 1. Image preprocessing: Normalize and standardize the original UAV aerial images to obtain standardized images.
[0028] In this embodiment, step 1 specifically includes: Step 1.1. Read the input raw drone aerial image and extract the image pixel matrix data.
[0029] Specifically, in this embodiment, the input raw drone aerial image is preferably an RGB color image with a pixel value range of 0 to 255. The raw drone aerial image can be derived from real-time data acquired by the imaging device on the drone, or it can be an aerial image file pre-stored locally or in the cloud.
[0030] Step 1.2. Scale the original UAV aerial image according to the preset size to normalize the image size so that the UAV aerial image meets the input size specifications of the salient key region detection model, and obtain the scaled image.
[0031] In this embodiment, the normalization process includes size normalization in step 1.2 and pixel normalization in step 1.3.
[0032] Specifically, in this embodiment, to meet the input requirements of the salient key region detection model and the semantic segmentation model, the image acquisition party first performs size normalization processing on the input image. According to the input specifications of the adopted model, the image is scaled to a preset size, such as 320×320 or 256×256, to ensure the consistency of the input data in spatial scale.
[0033] Step 1.3. Further normalize the pixel values of the scaled image obtained in Step 1.2, mapping the original pixel values to a preset range to obtain pixel-normalized image data.
[0034] Specifically, in this embodiment, after size normalization is completed, the image pixel values are normalized, that is, the original pixel values are linearly mapped from 0 to 255 to the range of 0 to 1, so as to reduce the numerical scale difference between different images.
[0035] Step 1.4. Standardize the pixel-normalized image data obtained in Step 1.3 by performing a transformation operation of subtracting the mean and dividing by the standard deviation for the R, G, and B channels respectively, so that the distribution of the input data is consistent with the distribution of the data during the model training stage, and construct a standardized image representation suitable for saliency detection and semantic segmentation, thus obtaining a standardized image.
[0036] Preferably, the mean and standard deviation parameters are set according to the model training data. For example, the statistical parameters of the ImageNet dataset are used, with a mean of [0.485, 0.456, 0.406] and a standard deviation of [0.229, 0.224, 0.225].
[0037] The image preprocessing in step 1 can improve the consistency of the input data, thereby enhancing the processing performance and stability of the salient key region detection model and the semantic segmentation model.
[0038] Step 2. Saliency Detection: Input the standardized image into the saliency key region detection model to obtain the saliency response results, generate a saliency mask through binarization, and perform morphological dilation on the saliency mask to expand the range of the key region.
[0039] In step 2 of this embodiment, the image acquisition party inputs a standardized image into a salient key region detection model to obtain salient response results, and generates a salient mask through threshold segmentation and morphological processing. The preferred salient key region detection model is the U²-Net model based on an encoder-decoder structure. This model can fuse global information and local details in a multi-scale feature space, thereby enabling high-precision response prediction of salient target regions in the image.
[0040] In this embodiment, step 2 specifically includes: Step 2.1. Input the standardized image into the salient key region detection model and obtain the salient response result, which is the salient response map corresponding to the input standardized image.
[0041] Among them, the salient key region detection model is used to extract information of regions with visually salient features in the image, and obtains a salient response map through multi-scale feature fusion, which provides spatial prior constraints for subsequent segmentation; the salient response map is a single-channel grayscale image, and its pixel value is used to represent the response intensity of the corresponding position belonging to the key region.
[0042] Step 2.2. Perform threshold segmentation on the saliency response map, identify regions with pixel values greater than a preset threshold as key regions, and identify regions with pixel values less than or equal to the preset threshold as non-key regions, thereby generating a binarized saliency mask.
[0043] Preferably, the preset threshold is set to 127, using the median grayscale value as the segmentation standard. Regions with pixel values greater than 127 are identified as critical regions, while regions with pixel values no greater than 127 are identified as non-critical regions. This method can suppress background noise interference while ensuring the integrity of the salient target region. It should be noted that the preset threshold can also be adaptively adjusted according to the statistical distribution of the saliency response map in different application scenarios.
[0044] Step 2.3. Perform morphological dilation on the binarized saliency mask to expand the boundaries of the original key regions, thereby reducing discontinuities at the edges of the key regions, expanding the spatial coverage of the key regions, improving the connectivity and integrity of the key regions, and using it for subsequent fine segmentation and selective encryption of the key regions.
[0045] Specifically, in this embodiment, after obtaining the initial saliency mask, a morphological dilation operation is performed on the saliency mask to improve the connectivity and integrity of the target region. Preferably, a 5×5 structuring element is used, and one dilation iteration is performed to expand the boundaries based on the original key region. Through the above morphological processing, the discontinuity problem of the key region edges can be reduced, and more stable region constraints can be provided for subsequent semantic segmentation.
[0046] Step 3. Prompt Generation and Semantic Segmentation: Based on the saliency mask, extract the spatial location information of key regions and generate semantic segmentation prompts to guide the semantic segmentation model to perform fine segmentation of key regions and obtain semantic masks.
[0047] Step 3 is used to extract the spatial location information of the target region based on the saliency mask, and convert the spatial location information into prompt information that can be recognized by the semantic segmentation model, thereby realizing the transition from coarse-grained key region localization to fine semantic boundary segmentation.
[0048] In this embodiment, step 3 specifically includes: Step 3.1. Perform image moment calculation on the saliency mask to obtain a multi-order moment dictionary, where the zeroth moment is used to characterize the total number of pixels in the key region, and the first moment is used to characterize the spatial distribution of the key region in the horizontal and vertical directions.
[0049] Specifically, in this embodiment, the saliency mask is preferably a binarized saliency mask, let the binarized saliency mask be... ,in Represents the column coordinates of a pixel in the horizontal direction. This represents the row coordinate of a pixel in the vertical direction, with a value of 1 for foreground pixels and 0 for background pixels, and a zero-order moment. Represents the total number of pixels in the key region, first moment and They respectively characterize the spatial distribution of key regions in the horizontal and vertical directions.
[0050] Step 3.2. When the zeroth moment of the saliency mask is not zero, the centroid coordinates of the key region are further calculated based on the image moments, and the centroid coordinates of the key region and the cue labels are used as cue points input into the semantic segmentation model.
[0051] Among them, the centroid coordinates of the key region are the spatial location information of the key region extracted based on the saliency mask, and the cue points are the generated semantic segmentation cue information.
[0052] Specifically, in this embodiment, when the zeroth moment At that time, it can be based on and Calculate the centroid coordinates of the critical region ,in The horizontal coordinates of the centroid of the critical region. This represents the vertical coordinates of the centroid of the critical region.
[0053] The centroid coordinates represent the center position of the key region and can be used as a cue point input into the semantic segmentation model.
[0054] For images containing multiple mutually separated key regions, a connected component analysis can be performed on the saliency mask first, and then the centroid coordinates of each connected component can be calculated to form a set of multiple cue points, thereby improving the completeness of semantic segmentation in multi-object scenarios.
[0055] Step 3.3. After converting the original UAV aerial image into RGB format, input it into the semantic segmentation model based on the cue-driven mechanism, and input the cue points as positive sample cue information into the semantic segmentation model to guide the semantic segmentation model to segment and predict the key regions of the image, and obtain the segmentation result.
[0056] In this embodiment, the semantic segmentation model preferably adopts the SAM model.
[0057] Specifically, in this embodiment, the image acquisition party converts the original UAV aerial image into RGB format and inputs it, along with the cue points obtained in step 3.2, into a semantic segmentation model based on a cue-driven mechanism. The cue points serve as positive sample cue information, instructing the model to focus on target regions near the corresponding spatial locations, thereby narrowing the model's search range and improving the segmentation results' ability to focus on target boundaries.
[0058] Step 3.4. Based on the segmentation results output by the semantic segmentation model, generate a semantic mask with the same spatial size as the original UAV aerial image through binarization processing.
[0059] By performing saliency detection and saliency mask generation in step 3, this invention enables the saliency detection results to provide prior guidance for the semantic segmentation process, thereby improving the accuracy and stability of key region extraction.
[0060] Step 4. Mask fusion: The saliency mask and semantic mask are fused to generate the final critical region protection mask.
[0061] In this embodiment, step 4 specifically includes: Step 4.1. Use the saliency mask obtained in Step 2 after morphological dilation as the first protection mask. The first protection mask is used to provide the overall coverage of the critical area.
[0062] Step 4.2. Use the semantic mask obtained in step 3 as the second protection mask. The second protection mask is used to delineate the fine boundaries of the key regions.
[0063] Step 4.3. Perform a pixel-by-pixel logical OR operation on the first protection mask and the second protection mask to generate the final critical area protection mask.
[0064] Specifically, in this embodiment, the fusion operation preferably employs a pixel-by-pixel logical OR operation to generate the final critical region protection mask. Furthermore, the fusion operation can also be extended to weighted fusion, adaptive fusion, or confidence-based fusion strategies to improve the method's adaptability.
[0065] Through the fusion mechanism in step 4, two types of regional information can be complemented in space: on the one hand, the saliency detection results are retained to fully cover the key regions, and on the other hand, the semantic segmentation results are introduced to impose fine constraints on boundary details, thereby obtaining key regions that have both regional integrity and boundary accuracy.
[0066] Furthermore, when the saliency detection results have discontinuous boundaries or local omissions, the semantic mask can supplement them; when the semantic segmentation results show region shrinkage or local omissions, the saliency mask provides the necessary region expansion, thereby improving the stability and robustness of key region extraction.
[0067] Step 5. Encryption Processing: Generate a pseudo-random sequence based on the key area protection mask and encryption key, and perform selective encryption processing on the pixels in the key area to generate an encrypted image of the key area.
[0068] In this embodiment, step 5 specifically includes: Step 5.1. Perform a hash operation on the preset encryption key, extract the first 8 hexadecimal characters of the hash value and convert them into integer form, and use them as the seed value of the pseudo-random number generator.
[0069] Specifically, in this embodiment, the preset encryption key is preferably in the form of a user-defined binary or string.
[0070] The image acquisition party first maps the encryption key using a hash function, converts it into a high-entropy value, and uses it as the initialization seed for the pseudo-random number generator to construct a random sequence generation mechanism that uniquely corresponds to the key.
[0071] Preferably, the hash operation uses a standard cryptographic hash algorithm to improve key space complexity and system security.
[0072] Step 5.2. Construct a pseudo-random number generator based on the seed value and generate a random noise matrix that is consistent with the original UAV aerial image in terms of spatial size and channel dimension.
[0073] Step 5.3. Perform a pixel-by-pixel XOR operation between the random noise matrix and the original UAV aerial image to obtain an intermediate encrypted image; the intermediate encrypted image is used to generate an encrypted pixel set corresponding to the original UAV aerial image, so that selective encryption processing can be performed subsequently based on the key area protection mask.
[0074] Specifically, in this embodiment, a pixel-by-pixel XOR operation is performed between the random noise matrix and the original UAV aerial image to achieve encrypted perturbation of the image pixels. Since the XOR operation is reversible, lossless recovery of the original UAV aerial image can be achieved using the same key during the decryption phase.
[0075] Step 5.4. Perform selective encryption based on the key area protection mask, that is, perform pixel-by-pixel selection processing on the intermediate encrypted image and the original UAV aerial image.
[0076] The system determines whether the current location belongs to a critical region based on the critical region protection mask. If the current location is marked as a critical region by the critical region protection mask, the pixel value of the corresponding location in the intermediate encrypted image is selected for filling. If the current location is marked as a non-critical region by the critical region protection mask, the pixel value of the corresponding location in the original UAV aerial image is retained. This process generates a critical region encrypted image.
[0077] Specifically, in this embodiment, a key area protection mask is introduced to spatially constrain the encryption process. Based on the mask, image pixels are selected position-by-position for encryption, performing encryption only on the key areas covered by the mask, while leaving the original pixel values unchanged in non-key areas. This achieves a selective encryption mechanism based on key areas. This mechanism can ensure the security of sensitive areas of the image while preserving the original visual information of non-key areas, improving the usability of the image.
[0078] Without deviating from the basic principles of this invention, the encryption process can be extended by combining pixel position rearrangement or multi-round perturbation mechanisms to further enhance encryption strength.
[0079] This embodiment provides an adaptive encryption method for key regions of UAV images, aiming to solve the problems of difficulty in accurately locating key regions, large overall encryption computational overhead, and lack of targeted image content protection in the transmission, storage, and sharing of existing UAV aerial images. This method automatically generates a key region protection mask by performing saliency detection, semantic segmentation based on prompt information, and key region fusion modeling on UAV aerial images, and selectively encrypts the pixels of key regions in combination with encryption keys, thereby achieving secure protection and efficient reconstruction of key image content.
[0080] Example 2 This embodiment 2 describes an adaptive decryption method for key regions of UAV images, which is based on the same inventive concept as the adaptive encryption method for key regions of UAV images in embodiment 1.
[0081] In this embodiment, the adaptive decryption method for key regions of UAV images is performed by the authorized receiver. The general process of this method includes receiving encrypted images, obtaining key region protection masks, key-based decryption processing, and fusing and reconstructing key and non-key regions to recover complete UAV aerial images.
[0082] The adaptive decryption method for key regions of UAV images proposed in this invention will be described in detail below.
[0083] An adaptive decryption method for key regions of UAV images, specifically including the following steps: Step 1. Decryption Processing: After obtaining the encrypted image of the key area, decryption processing is performed on the encrypted key area based on the key area protection mask and encryption key to recover the pixel content of the key area.
[0084] In this embodiment, step 1 specifically includes: Step 1.1. Perform a hash operation using the same encryption key as in the encryption phase, and generate a seed value for the pseudo-random number generator in the same manner as in the encryption phase.
[0085] Specifically, in this embodiment, the decryption process and the encryption process are consistent in key generation method and pseudo-random sequence construction mechanism, thereby ensuring that the decryption stage can reconstruct the same random noise matrix as the encryption stage.
[0086] Step 1.2. Construct a pseudo-random number generator based on the seed value and generate a random noise matrix consistent with the encryption stage.
[0087] Step 1.3. Perform a pixel-by-pixel XOR operation between the random noise matrix and the encrypted key region image to obtain the intermediate decrypted image.
[0088] Specifically, in this embodiment, based on the reversible property of XOR operation, when the same random sequence is used to perform a pixel-by-pixel XOR operation on the encrypted area again, the original pixel value can be recovered, thereby achieving lossless decryption.
[0089] Specifically, in this embodiment, a key area protection mask is used to spatially constrain the decryption process. Decryption is performed only on pixels within the mask coverage area, while non-key areas remain unchanged, thereby avoiding redundant calculations and improving processing efficiency.
[0090] Furthermore, since the decryption process relies on the same key and pseudo-random sequence generation mechanism as the encryption phase, if the key does not match or the random sequence cannot be correctly reconstructed, the original drone aerial image content cannot be recovered, thus ensuring the security of data in critical areas.
[0091] Step 2. Fusion and Reconstruction: The decrypted key areas are fused and reconstructed with the unencrypted non-key areas to obtain a complete drone aerial image.
[0092] In this embodiment, step 2 specifically includes: Selective decryption is performed based on the key area protection mask, that is, pixel-by-pixel selection is performed between the intermediate decrypted image and the original UAV aerial image.
[0093] The system determines whether the current location belongs to a critical region based on the critical region protection mask. If the current location is marked as a critical region by the critical region protection mask, the pixel value of the corresponding position in the intermediate decrypted image is selected for filling. If the current location is marked as a non-critical region by the critical region protection mask, the pixel value of the corresponding position in the original UAV aerial image is retained. This process yields a complete UAV aerial image, i.e., a decrypted image.
[0094] Specifically, in this embodiment, the fusion reconstruction process is controlled pixel-by-pixel based on a key region protection mask. For locations marked as key regions by the mask, the decrypted pixel values are used for filling; for non-key regions not covered by the mask, the original pixel values in the encrypted image are retained, thereby completing the fusion reconstruction within the same image space.
[0095] Preferably, the fusion process is implemented using a pixel-by-pixel replacement method, without involving interpolation, filtering or other image enhancement operations, thereby ensuring that the reconstructed image is consistent with the original UAV aerial image at the pixel value level, achieving strict lossless reconstruction.
[0096] Since the encryption and decryption processes for critical regions are performed under the same mask constraints, and non-critical regions remain unchanged throughout the entire processing, the fused and reconstructed image is consistent with the original input image in terms of structure and pixel values, ensuring the integrity and reversibility of the method. The reconstructed UAV aerial images can be directly used for subsequent image analysis, target detection, data sharing, or storage applications.
[0097] In addition, to verify the effectiveness of the encryption and decryption methods proposed in this invention, the following specific experiments are also provided: Figures 3 to 14 The invention demonstrates the selective encryption and decryption effects of the method on key areas of drone aerial images.
[0098] Figure 3 , Figure 6 , Figure 9 , Figure 12 These are the original test images selected from the VisDrone dataset. Figure 4 , Figure 7 , Figure 10 , Figure 13 This is an encrypted image of the key region generated based on the encryption method proposed in this invention. Figure 5 , Figure 8 , Figure 11 , Figure 14 The decrypted image is the image obtained by decrypting the key region encrypted image using the decryption method proposed in this invention with the corresponding key.
[0099] It can be observed that the encrypted image of the key area significantly perturbs the key area visually, making target information (such as vehicles, road areas, etc.) difficult to directly identify, while non-key areas retain their original visual content. This preserves the overall visibility and structural information of the image while ensuring privacy protection. This demonstrates that the selective encryption mechanism proposed in this invention can effectively achieve precise protection of sensitive areas.
[0100] Meanwhile, the decryption results show that after recovery using the same key and protection mask, the key areas can be accurately restored. The reconstructed image is visually consistent with the original test image, with no obvious distortion or information loss, verifying the reversibility and lossless reconstruction capability of the method proposed in this invention.
[0101] Furthermore, the method of this invention can stably achieve effective encryption and accurate recovery of key areas in different scenarios (such as dense traffic, complex backgrounds and low-contrast environments), demonstrating good robustness and adaptability.
[0102] In summary, the adaptive encryption and decryption method for key areas of UAV images proposed in this invention can ensure image security while also taking into account data availability, making it suitable for secure transmission and sharing of UAV aerial images.
[0103] Of course, the above description is only a preferred embodiment of the present invention. The present invention is not limited to the above-described embodiments. It should be noted that any equivalent substitutions or obvious modifications made by those skilled in the art under the guidance of this specification fall within the scope of this specification and should be protected by the present invention.
Claims
1. An adaptive encryption method for key regions of UAV images, characterized in that, Includes the following steps: Step 1. Normalize and standardize the original drone aerial images to obtain standardized images; Step 2. Input the standardized image into the salient key region detection model, obtain the salient response results, generate a salient mask through binarization, and perform morphological dilation on the salient mask; Step 3. Extract the spatial location information of key regions based on the saliency mask, and generate semantic segmentation prompts to guide the semantic segmentation model to segment the key regions and obtain the semantic mask; Step 4. Merge the saliency mask and the semantic mask to generate the final critical region protection mask; Step 5. Generate a pseudo-random sequence based on the key area protection mask and encryption key, and perform selective encryption processing on the pixels in the key area to generate an encrypted image of the key area.
2. The adaptive encryption method for key regions of UAV images according to claim 1, characterized in that, Step 1 specifically involves: Step 1.
1. Read the input raw drone aerial image and extract the image pixel matrix data; Step 1.
2. Scale the original UAV aerial image according to the preset size so that the UAV aerial image meets the input size specifications of the salient key region detection model, and obtain the scaled image; Step 1.
3. Further normalize the pixel values of the scaled image obtained in Step 1.2, mapping the original pixel values to a preset range to obtain pixel-normalized image data; Step 1.
4. Standardize the pixel-normalized image data obtained in Step 1.3 by performing a transformation operation of subtracting the mean and dividing by the standard deviation for the R, G, and B channels respectively, to construct a standardized image representation suitable for saliency detection and semantic segmentation, thus obtaining a standardized image.
3. The adaptive encryption method for key regions of UAV images according to claim 1, characterized in that, In step 2, the salient key region detection model adopts the U²-Net model based on the encoder-decoder structure.
4. The adaptive encryption method for key regions of UAV images according to claim 2, characterized in that, Step 2 specifically involves: Step 2.
1. Input the standardized image into the salient key region detection model and obtain the salient response result. The salient response result is the salient response map corresponding to the input standardized image. Among them, the salient key region detection model is used to extract information of regions with visually salient features in the image, and obtains a salient response map through multi-scale feature fusion. Its pixel value is used to represent the response intensity of the corresponding location belonging to the key region. Step 2.
2. Perform threshold segmentation on the saliency response map, identify regions with pixel values greater than a preset threshold as key regions, and identify regions with pixel values less than or equal to the preset threshold as non-key regions, thereby generating a binarized saliency mask; Step 2.
3. Perform morphological dilation on the binarized saliency mask to expand the boundaries of the original key regions, thereby reducing the discontinuity at the edges of the key regions.
5. The adaptive encryption method for key regions of UAV images according to claim 4, characterized in that, Step 3 specifically involves: Step 3.
1. Perform image moment calculation on the saliency mask to obtain a multi-order moment dictionary, where the zeroth moment is used to characterize the total number of pixels in the key region, and the first moment is used to characterize the spatial distribution of the key region in the horizontal and vertical directions; Step 3.
2. When the zeroth moment of the saliency mask is not zero, the centroid coordinates of the key region are further calculated based on the image moments, and the centroid coordinates of the key region and the cue labels are used as cue points input into the semantic segmentation model; Among them, the centroid coordinates of the key region are the spatial location information of the key region extracted based on the saliency mask, and the cue points are the generated semantic segmentation cue information; Step 3.
3. After converting the original UAV aerial image into RGB format, input it into the semantic segmentation model based on the cue-driven mechanism, and input the cue points as positive sample cue information into the semantic segmentation model to guide the semantic segmentation model to segment and predict the key regions of the image, and obtain the segmentation result; Step 3.
4. Based on the segmentation results output by the semantic segmentation model, generate a semantic mask with the same spatial size as the original UAV aerial image through binarization processing.
6. The adaptive encryption method for key regions of UAV images according to claim 5, characterized in that, Step 4 specifically involves: Step 4.
1. Use the saliency mask obtained in Step 2 after morphological dilation as the first protection mask. The first protection mask is used to provide the overall coverage of the critical area. Step 4.
2. Use the semantic mask obtained in step 3 as the second protection mask. The second protection mask is used to delineate the boundaries of the key regions. Step 4.
3. Perform a pixel-by-pixel logical OR operation on the first protection mask and the second protection mask to generate the final critical area protection mask.
7. The adaptive encryption method for key regions of UAV images according to claim 6, characterized in that, Step 5 specifically involves: Step 5.
1. Perform a hash operation on the preset encryption key, extract the first 8 hexadecimal characters of the hash value and convert them into integer form, and use them as the seed value of the pseudo-random number generator; Step 5.
2. Construct a pseudo-random number generator based on the seed value and generate a random noise matrix that is consistent with the original UAV aerial image in terms of spatial size and channel dimension; Step 5.
3. Perform a pixel-by-pixel XOR operation between the random noise matrix and the original UAV aerial image to obtain the intermediate encrypted image; Step 5.
4. Perform selective encryption based on the key area protection mask, that is, perform pixel-by-pixel selection processing on the intermediate encrypted image and the original UAV aerial image; Determine whether the current location belongs to a critical area based on the critical area protection mask; If the current location is marked as a critical region by a critical region protection mask, then the pixel value of the corresponding location in the intermediate encrypted image is selected for filling. If the current location is marked as a non-critical area by a critical area protection mask, the pixel value of the corresponding location in the original UAV aerial image is retained; thus generating a critical area encrypted image.
8. An adaptive decryption method for key regions of UAV images based on the adaptive encryption method for key regions of UAV images according to any one of claims 1 to 7, characterized in that, The adaptive decryption method for key regions of UAV images includes the following steps: Step 1. After obtaining the encrypted image of the key area, decrypt the encrypted key area based on the key area protection mask and encryption key to recover the pixel content of the key area; Step 2. Merge and reconstruct the decrypted critical area with the unencrypted non-critical area to obtain a complete drone aerial image.
9. The adaptive decryption method for key regions of UAV images according to claim 8, characterized in that, Step 1 specifically involves: Step 1.
1. Perform a hash operation using the same encryption key as in the encryption phase, and generate a seed value for the pseudo-random number generator in the same manner as in the encryption phase; Step 1.
2. Construct a pseudo-random number generator based on the seed value and generate a random noise matrix consistent with the encryption stage; Step 1.
3. Perform a pixel-by-pixel XOR operation between the random noise matrix and the encrypted key region image to obtain the intermediate decrypted image.
10. The adaptive decryption method for key regions of UAV images according to claim 9, characterized in that, Step 2 specifically involves: Selective decryption is performed based on the key area protection mask, that is, pixel-by-pixel selection is performed between the intermediate decrypted image and the original UAV aerial image; Determine whether the current location belongs to a critical area based on the critical area protection mask; If the current location is marked as a critical region by a critical region protection mask, then the pixel value of the corresponding location in the middle decrypted image is selected for filling; If the current location is marked as a non-critical area by a critical area protection mask, the pixel value of the corresponding location in the original drone aerial image is retained. This allows us to obtain complete drone aerial images, i.e., decrypted images.