A method and system for completing the sky area of a drone panoramic image
By detecting the missing sky areas of the drone panoramic image, cropping and pasting sky sub-blocks and using AI to generate content models for repair, the complex and time-consuming problem of sky area completion in panoramic image is solved, and efficient and natural sky completion effect is achieved.
Patent Information
- Application Number
- CN202510834160.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-06-20
AI Technical Summary
In the prior art, the sky area completion operation of the panoramic image of the drone is complex and time-consuming and has a large amount of calculation, making it difficult to adapt to large-scale applications.
By obtaining the panoramic image taken by the drone, detecting the missing area of the sky, cropping the target sky area into multiple sub-blocks and pasting it to the missing area at a fixed interval, using artificial intelligence to generate a content model for edge repair, and generating a sky completion image.
It improves the efficiency and universality of sky area completion, avoids manual and complex algorithm operations, and ensures that the image display effect is natural and seamless.
Smart Images

Figure CN120355630B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method and system for completing the sky area of a drone panoramic image. Background Art
[0002] With the rapid development of drone technology, drones are increasingly being used for aerial photography. Panoramic images have become a crucial form of drone footage, particularly for large-scale capture. Drones often miss parts of the sky in panoramic images due to limitations such as flight angle and lens coverage. To address this, after generating a panoramic image, manual restoration or rule-based algorithms are typically used to complete the sky area. This prevents missing information and ensures optimal viewing quality.
[0003] However, manual restoration is complex and time-consuming. Rule-based sky area completion is computationally expensive and inefficient, and requires a large amount of training data, making it unsuitable for large-scale applications. Summary of the Invention
[0004] The embodiments of the present application provide a method and system for completing the sky area of a drone panorama, which can improve the efficiency of completing the sky area of a panorama, improve the universality of the sky area completion operation, and solve the technical problem that the sky area completion process of a panorama is cumbersome and time-consuming.
[0005] In a first aspect, an embodiment of the present application provides a method for completing the sky area of a drone panoramic image, comprising:
[0006] Obtain panoramic images taken by drones and detect the sky missing areas in the panoramic images;
[0007] Extract the target sky area from the panoramic image, cut the target sky area into multiple sky sub-blocks, and paste each sky sub-block into the sky missing area at a fixed interval;
[0008] Perform edge repair on each sky sub-block in the sky missing area, and output a sky completion image corresponding to the panoramic image based on the edge-repaired sky missing area.
[0009] Furthermore, edge repair is performed on each sky sub-block in the sky missing area, including:
[0010] determining an edge mask region based on a fixed interval of each sky sub-block in the sky missing region;
[0011] The edge mask area and the panoramic image with the pasted sky sub-block are input into an artificial intelligence content generation model based on deep learning, and the edge mask area is filled with sky content based on the artificial intelligence content generation model.
[0012] Furthermore, determining an edge mask area based on a fixed interval of each sky sub-block in the sky missing area includes:
[0013] Determining a sub-block spacing region based on a fixed spacing of each sky sub-block in the sky missing region;
[0014] The designated edge region of each sky sub-block is determined, and the edge mask region is determined based on the sub-block spacing region and the designated edge region.
[0015] Furthermore, outputting a sky-completed image corresponding to the panoramic image based on the edge-repaired sky-missing area includes:
[0016] The sky missing area after edge repair is covered to the corresponding position of the panoramic image to generate a sky completion image corresponding to the panoramic image.
[0017] Furthermore, before detecting the sky missing area of the panoramic image, the method further includes:
[0018] Normalize the original-size panoramic image according to the set size;
[0019] Accordingly, after outputting a sky-completed image corresponding to the panoramic image based on the edge-repaired sky-missing area, the method further includes:
[0020] Resize the sky completion image to the original size of the panoramic image.
[0021] Furthermore, detecting the sky missing area of the panoramic image includes:
[0022] Pixel information is scanned line by line along a set direction starting from a designated position of the panoramic image, and a sky missing area of the panoramic image is determined based on the scanned blank pixel information.
[0023] Furthermore, determining the sky missing area of the panoramic image based on the scanned blank pixel information includes:
[0024] Based on the scanned blank pixel information, the first row of pixels where all pixel information is blank is determined as the bottom boundary, and the sky missing area of the panoramic image is determined based on the bottom boundary and the blank pixel information scanned row by row in a set direction.
[0025] In a second aspect, an embodiment of the present application provides a sky area completion system for a drone panoramic image, comprising:
[0026] A detection module is used to obtain panoramic images taken by drones and detect sky missing areas in the panoramic images;
[0027] A pasting module is used to extract the target sky area from the panoramic image, cut the target sky area into multiple sky sub-blocks, and paste each sky sub-block into the sky missing area at a fixed interval;
[0028] The restoration module is used to perform edge restoration on each sky sub-block in the sky missing area, and output a sky completion image corresponding to the panoramic image based on the edge-repaired sky missing area.
[0029] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0030] memory and one or more processors;
[0031] The memory is used to store one or more programs;
[0032] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for completing the sky area of the drone panoramic image as described in the first aspect.
[0033] In a fourth aspect, an embodiment of the present application provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute the method for completing the sky area of a drone panoramic image as described in the first aspect.
[0034] The embodiment of the present application obtains a panoramic image taken by a drone and detects the sky missing area of the panoramic image; extracts the target sky area from the panoramic image, cuts the target sky area into multiple sky sub-blocks, and pastes each sky sub-block into the sky missing area at a fixed interval; performs edge repair on each sky sub-block in the sky missing area, and outputs a sky completion image corresponding to the panoramic image based on the edge-repaired sky missing area. By adopting the above technical means, by cutting the target sky area into multiple sky sub-blocks and pasting them into the sky missing area, and then performing edge repair on the sky sub-blocks, the efficiency of completing the sky area of the panoramic image is improved while ensuring the display effect of the panoramic image, and complex operations such as manual or algorithmic calculations are avoided. In addition, it can adapt to the sky area completion of different panoramic images, and improve the universality of the sky area completion operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a flow chart of a method for completing the sky area of a drone panoramic image provided in Example 1 of the present application;
[0036] Figure 2 This is a schematic diagram of the missing sky in the panoramic image in Example 1 of the present application;
[0037] Figure 3 This is a schematic diagram of pasting sky sub-blocks in the sky missing area in Example 1 of the present application;
[0038] Figure 4 This is a flow chart of edge repair of the sky sub-block in the first embodiment of the present application;
[0039] Figure 5 is a schematic diagram of the edge mask area in Example 1 of the present application;
[0040] Figure 6 Schematic diagram of the sky completion image in Example 1 of the present application;
[0041] Figure 7 This is a structural diagram of a system for completing the sky area of a drone panoramic image provided in Example 2 of the present application;
[0042] Figure 8 This is a structural diagram of an electronic device provided in Example 3 of the present application. DETAILED DESCRIPTION
[0043] To further clarify the objectives, technical solutions, and advantages of this application, specific embodiments of the present application are described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are intended only to illustrate this application and are not intended to limit it. It should also be noted that, for ease of description, the drawings only illustrate portions relevant to this application, not all of them. Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts depict the various operations (or steps) as sequential processes, many of the operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process may terminate upon completion of its operations, but may also include additional steps not shown in the accompanying drawings. The process may correspond to a method, function, procedure, subroutine, subprogram, or the like.
[0044] Example 1:
[0045] Figure 1A flowchart of a method for completing the sky area of a drone panoramic image provided in Example 1 of the present application is provided. The method for completing the sky area of a drone panoramic image provided in this embodiment can be performed by a drone panoramic image sky area completion device. The drone panoramic image sky area completion device can be implemented through software and / or hardware. The drone panoramic image sky area completion device can be composed of two or more physical entities or a single physical entity. Generally speaking, the drone panoramic image sky area completion device can be a processing device such as a drone image processing system, a computer, or an image processing server.
[0046] The following description is based on an image processing server as an example of the method for completing the sky area of a drone panorama. Figure 1 ,The sky area completion method of the UAV panorama specifically includes:
[0047] S110: Acquire a panoramic image taken by a drone, and detect a sky missing area in the panoramic image.
[0048] This application automatically identifies and repairs missing sky areas in drone panoramic imagery through intelligent analysis and model generation. By automatically processing drone-captured images, the sky can be efficiently completed, and the resulting sky image seamlessly blends in with the original image, significantly improving the effectiveness and speed of image restoration and reducing the need for manual intervention.
[0049] A panoramic image is an image that covers a wide angle of view (such as horizontal, vertical, or 360 degrees) through special shooting or image stitching techniques. This type of image is usually stitched together from multiple adjacent photos to present a complete, seamless field of view. The image contains missing parts of the sky due to factors such as the aerial shooting angle, lens coverage, or overlapping areas during the stitching process. Therefore, panoramic images obtained by stitching based on drone photography first need to automatically identify areas in the image that do not cover the entire sky due to shooting angle limitations or insufficient stitching algorithms. These areas are usually located at the top edge of the image and appear as invalid areas filled with a specific color (such as pure black or pure white) or missing content. By accurately scanning this missing area, the missing sky area used for sky completion is obtained.
[0050] Optionally, before detecting the sky missing area of the panoramic image, the method further includes:
[0051] Normalize the original-size panoramic image according to the set size;
[0052] For panoramic images taken by drones, the images first need to be standardized so that they can be repaired efficiently and consistently during subsequent processing. In this step, the image size is first standardized and adjusted to a set size (such as 1920x1080 pixels) to ensure that the image has a uniform resolution before processing. It is important to note that the set size is smaller than the original size of the panorama. By reducing the size, the algorithm complexity of subsequent processing is simplified and processing inconsistencies caused by different image sizes can be avoided. After standardization, the height and width of the image are extracted to determine the specific repair area in the subsequent steps. Through this process, the image can be ensured to be consistent during subsequent processing, facilitating the rapid location of missing areas and laying the foundation for the subsequent automatic detection and repair of the sky area.
[0053] Furthermore, detecting the sky missing area of the panoramic image includes:
[0054] Pixel information is scanned line by line along a set direction starting from a designated position of the panoramic image, and a sky missing area of the panoramic image is determined based on the scanned blank pixel information.
[0055] Based on the above-mentioned standardized panoramic image, the sky missing area can be detected. When detecting the sky missing area, first, starting from the specified position of the processed image, the pixel information of the panoramic image is scanned line by line along the set direction. It can be understood that since the sky area of the panoramic image is generally at the top, in order to reduce the amount of scanning calculation, this application starts from the middle of the panoramic image and scans upward line by line to check the pixel information of each line. According to actual detection needs, it is also possible to start from the position of one-third of the vertical direction of the panoramic image and scan along the direction of the sky area. This application does not impose fixed restrictions on the specific pixel information scanning method, and will not be elaborated here.
[0056] By scanning line by line, it is possible to accurately identify whether there is valid pixel data in the image, especially the missing sky area. It can be understood that since the pixel values of the missing sky area are zero or close to zero, the blank pixel information scanned can be used to determine the missing sky area of the panoramic image.
[0057] Specifically, determining the sky missing area of the panoramic image based on the scanned blank pixel information includes:
[0058] Based on the scanned blank pixel information, the first row of pixels where all pixel information is blank is determined as the bottom boundary, and the sky missing area of the panoramic image is determined based on the bottom boundary and the blank pixel information scanned row by row in a set direction.
[0059] During the scanning process of this application, if all pixels in a row are blank (that is, the pixel value is zero or close to zero, indicating that there is no valid image information in the area), then the row is judged to be at the bottom boundary of the sky missing area. Then, through continuous scanning, the upper boundary of the sky missing area is further determined. Once the sky area is detected to be blank, the specific position and boundary of the area can be calibrated. It is understandable that since the panoramic images taken by drones usually have a consistent shooting height, the height of the missing area is roughly equal, so the range of the sky missing area can be accurately located based on this feature, which facilitates the execution of subsequent repair steps. This line-by-line scanning method can ensure high-precision detection of the sky missing area and provide accurate area information for the next step of sky repair. Reference Figure 2 By scanning line by line, it is possible to determine that the top black area in the panoramic image is the sky missing area, so that subsequent sky completion operations can be performed accurately and efficiently.
[0060] Optionally, areas with missing sky can be precisely located by analyzing pixel values at the image's edges (identifying preset fill color markers), performing color threshold segmentation based on the sky's top location and relatively uniform color (e.g., setting blue and brightness ranges in HSV space), or utilizing the image's inherent transparency channel (alpha channel) or stitching mask information. This automated approach to locating missing sky areas significantly improves efficiency by completely replacing the tedious manual search and annotation process. Furthermore, this method, based on simple image analysis and preset rules, is computationally inefficient and requires no training data, laying a precise foundation for subsequent, rapid processing.
[0061] S120 , extracting a target sky area from the panoramic image, cutting the target sky area into a plurality of sky sub-blocks, and pasting the respective sky sub-blocks into the sky missing area at a fixed interval.
[0062] Furthermore, based on the panoramic image in which the sky missing area has been determined as described above, the present application selects an area with clear texture and natural color from the existing and effective sky part in the same panoramic image as the target sky area. Optionally, the target sky area can be an adjacent area below or on both sides of the sky missing area to ensure that the subsequent completion effect is natural enough. In addition, the size of the target sky area can also be set according to actual needs. According to actual needs, the target sky area can also be the real sky area image information of the corresponding position captured by other cameras. The present application does not impose fixed restrictions on the selection of the target sky area, and will not be elaborated here.
[0063] Furthermore, the target sky area is cut into multiple sky sub-blocks, each of which has a fixed size, and then each sky sub-block is fixedly pasted to each position of the sky missing area. Optionally, if the target sky area originates from an adjacent area such as below or on both sides of the sky missing area, the sky sub-block can be pasted to the nearest position on the sky missing area based on its distance from the sky missing area on the panoramic image. A certain gap is left between the sub-blocks until the sky missing area can no longer accommodate any sub-blocks. It is understandable that because the left and right sides of the panoramic image are connected, the left edge of the leftmost sub-block and the right edge of the rightmost sub-block are connected and there is no gap, ensuring that the panoramic image after sky completion is viewed in the panoramic viewer without any cuts, avoiding splicing marks. In addition, according to actual needs, the gap between sub-blocks can be a vertical gap, or a vertical and horizontal gap. This application does not impose fixed restrictions on the specific pasting method, and will not be elaborated here.
[0064] Reference Figure 3 , by dividing the target sky area into multiple smaller rectangular or square image blocks (sky sub-blocks). These sub-blocks are copied and pasted into the previously detected sky missing area at a predetermined fixed interval (vertically), thereby obtaining Figure 3 The image shows the initial completion of the missing sky area. As you can see, using the image's existing sky information for copying and pasting is computationally extremely low and far faster than manual rendering or complex generative models. Furthermore, by cutting large blocks of sky into sub-blocks and pasting them at intervals, this effectively avoids the obvious repetitive textures (such as the same clouds appearing repeatedly) that would result from copying the entire block. The gaps between the sub-blocks naturally break up the pattern repetitiveness, leaving room for subsequent fusion steps. This also introduces subtle visual randomness, making the generated sky texture more realistic. This strategy fully utilizes the image's internal resources, eliminating the need for external data or model training. This ensures the method's universality and efficiency, making it particularly suitable for large-scale applications.
[0065] S130 , performing edge repair on each sky sub-block in the sky missing area, and outputting a sky completion image corresponding to the panoramic image based on the edge-repaired sky missing area.
[0066] Based on the above completion of the pasting of the sky sub-blocks, the sky missing area needs to eliminate the harsh traces left by the previous pasting step to achieve seamless fusion. The artificial intelligence generated content model (AIGC) of this application performs edge repair on each sky sub-block to obtain the final sky completion image. AIGC refers to the use of technologies such as deep learning and generative adversarial networks (GAN) to generate image content that is consistent with the original image or other samples through AI models. AIGC can create new content such as images, music, text, etc. by analyzing existing data. There are many ways for artificial intelligence content generation models to generate content, and this application does not impose fixed restrictions on this.
[0067] By automatically identifying missing sky areas, cropping the original target sky area, and filling in the missing sky areas, this method transforms surface inpainting into line inpainting. This reduces the performance dependency on the image generation model, improves the time overhead of image inpainting, and ensures a natural and seamless inpainting effect, making the sky completion method promising for broad application. This method can be widely applied in fields such as drone aerial photography, panoramic image processing, and video production, providing a new solution for the development of image processing technology. It can process panoramic images captured by drones, automatically identify missing sky areas, and inpaint these areas using AIGC technology, ensuring a natural and visually consistent inpainting effect. This technology is particularly suitable for inpainting large-scale aerial footage, especially in stitching complex panoramic images captured by drones, and has broad application prospects.
[0068] Optionally, edge repair is performed on each sky sub-block in the sky missing area, including:
[0069] S1301, determining an edge mask area based on a fixed interval of each sky sub-block in the sky missing area;
[0070] S1302. Input the edge mask area and the panoramic image with the sky sub-block pasted into an artificial intelligence content generation model based on deep learning, and fill the edge mask area with sky content based on the artificial intelligence content generation model.
[0071] This application performs sub-block edge repair based on the sky missing area of the pasted sky sub-block. An image mask is created based on the interval between the sub-blocks to obtain the edge mask area. Image masking refers to marking or masking specific areas in an image through binarization. The mask area is usually white or black, and the marked area is defined by an algorithm or manually. Masking can help image processing algorithms perform operations on specified areas, such as repair, replacement, or deformation.
[0072] The edge mask area is the area between each sky sub-block that needs to be repaired. The edge mask area is determined based on the fixed interval of each sky sub-block in the sky missing area, including:
[0073] Determining a sub-block spacing region based on a fixed spacing of each sky sub-block in the sky missing region;
[0074] The designated edge region of each sky sub-block is determined, and the edge mask region is determined based on the sub-block spacing region and the designated edge region.
[0075] Edge mask area such as Figure 5 As shown, the edge mask area of the present application includes not only the sub-block spacing area of each sky sub-block, but also the designated edge area of each sky sub-block, so that the connection between edges is more natural when performing edge repair later.
[0076] Based on this edge mask area, the AI Generated Content model (AIGC) can use the deep learning-based SimpleLama model. By analyzing the edge mask area and combining it with the panoramic image of the pasted sky sub-block, the model can automatically fill the edge mask area with the sky content, thereby outputting a sky-completed image corresponding to the panoramic image. This process fully utilizes AI technology's understanding of image content. By cropping the sky area of the panorama, it ensures that the generated sky area is consistent with the original image in style and tone. By filling the sub-image, the free play of AIGC technology is limited, and the repair work of the entire sky area (surface) is transformed into the repair of the areas between the sky sub-blocks (line), making the sky completion work faster and better.
[0077] Optionally, when inpainting the missing sky area, edge inpainting can also be performed on the edge contours of each pasted sky sub-block, as well as the fixed gaps between sub-blocks (i.e., the blank areas not covered by the pasted blocks). Sub-block edges can be softened with a slight feathering or blurring process. For gaps, a content-based inpainting algorithm (particularly one based on diffusion, such as the Fast Marching Method (FMM)) is primarily applied. This inpainting algorithm leverages the color and texture information of known pixels surrounding the gap (i.e., the edge pixels of the pasted sub-blocks) to gradually fill the gap with appropriate color gradient information through a diffusion mechanism. This ensures that the texture and color changes in the inpainted area transition smoothly and naturally with the surrounding environment, thereby improving the visual quality of the final image. It also effectively eliminates fragmentation artifacts caused by sub-block boundaries and gaps, making the inpainted sky area appear visually continuous and natural. The inpainting algorithm ensures smooth and seamless transitions within the inpainted area and between the inpainted area and valid areas of the original image (e.g., the edges of ground scenery). Furthermore, because the restoration operation only affects the relatively narrow sub-block edges and gaps, rather than the entire large missing area, the computational complexity is significantly lower than direct global restoration. Ultimately, the restored missing sky areas are seamlessly integrated with the valid portions of the original panorama, resulting in a panoramic image with a complete and natural sky.
[0078] Based on the edge-repaired sky missing area, the sky completion image corresponding to the panoramic image is output, including:
[0079] The sky missing area after edge repair is covered to the corresponding position of the panoramic image to generate a sky completion image corresponding to the panoramic image.
[0080] Finally, using image processing techniques, the restored sky-missing areas are synthesized with the original panoramic image, seamlessly embedding the restored sky-missing areas into the panoramic image without changing the pixel values of the non-sky areas, thus preventing loss of image detail during image scaling. This completes the entire restoration process, and outputs a sky-completed image corresponding to the panoramic image.
[0081] In addition, after outputting a sky-completed image corresponding to the panoramic image based on the edge-repaired sky-missing area, the method further includes:
[0082] Resize the sky completion image to the original size of the panoramic image.
[0083] Finally, the resulting sky-completion image is resized to ensure that it matches the original size of the panoramic image. In particular, it is important to ensure that there are no abrupt boundaries between the restored sky area and the panorama. The resulting sky-completion image is then output, showing the sky area perfectly completed using AIGC technology and blending naturally with the rest of the image.
[0084] In the above, a panoramic image taken by a drone is acquired to detect the sky missing area of the panoramic image; the target sky area is extracted from the panoramic image, the target sky area is cut into multiple sky sub-blocks, and each sky sub-block is pasted into the sky missing area at a fixed interval; the edges of each sky sub-block in the sky missing area are repaired, and a sky completion image corresponding to the panoramic image is output based on the edge-repaired sky missing area. The above technical means are used to cut the target sky area into multiple sky sub-blocks and paste them into the sky missing area, and then the edges of the sky sub-blocks are repaired. This ensures the display effect of the panoramic image while avoiding complex operations such as manual or algorithmic calculations, thereby improving the efficiency of the sky area completion of the panoramic image. Furthermore, the sky area completion operation can be adapted to different panoramic images, improving the universality of the sky area completion operation.
[0085] Example 2:
[0086] Based on the above embodiments, Figure 7 This is a schematic diagram of the structure of a system for completing the sky area of a drone panoramic image provided in Example 2 of this application. Figure 7 The sky area completion system for a drone panorama provided in this embodiment specifically includes: a detection module 21, a pasting module 22 and a repair module 23.
[0087] The detection module 21 is used to obtain the panoramic image taken by the drone and detect the sky missing area in the panoramic image;
[0088] a pasting module 22 for extracting a target sky area from the panoramic image, cutting the target sky area into a plurality of sky sub-blocks, and pasting each sky sub-block into the sky missing area at a fixed interval;
[0089] The restoration module 23 is configured to perform edge restoration on each sky sub-block in the sky missing region, and output a sky completion image corresponding to the panoramic image based on the edge-repaired sky missing region.
[0090] Specifically, edge repair is performed on each sky sub-block in the sky missing area, including:
[0091] determining an edge mask region based on a fixed interval of each sky sub-block in the sky missing region;
[0092] The edge mask area and the panoramic image with the pasted sky sub-block are input into an artificial intelligence content generation model based on deep learning, and the edge mask area is filled with sky content based on the artificial intelligence content generation model.
[0093] Specifically, determining the edge mask area based on the fixed interval of each sky sub-block in the sky missing area includes:
[0094] Determining a sub-block spacing region based on a fixed spacing of each sky sub-block in the sky missing region;
[0095] The designated edge region of each sky sub-block is determined, and the edge mask region is determined based on the sub-block spacing region and the designated edge region.
[0096] Specifically, outputting a sky-completed image corresponding to the panoramic image based on the edge-repaired sky-missing area includes:
[0097] The sky missing area after edge repair is covered to the corresponding position of the panoramic image to generate a sky completion image corresponding to the panoramic image.
[0098] Specifically, before detecting the sky missing area of the panoramic image, the method further includes:
[0099] Normalize the original-size panoramic image according to the set size;
[0100] Accordingly, after outputting a sky-completed image corresponding to the panoramic image based on the edge-repaired sky-missing area, the method further includes:
[0101] Resize the sky completion image to the original size of the panoramic image.
[0102] Specifically, detecting the sky missing area of the panoramic image includes:
[0103] Pixel information is scanned line by line along a set direction starting from a designated position of the panoramic image, and a sky missing area of the panoramic image is determined based on the scanned blank pixel information.
[0104] Specifically, determining the sky missing area of the panoramic image based on the scanned blank pixel information includes:
[0105] Based on the scanned blank pixel information, the first row of pixels where all pixel information is blank is determined as the bottom boundary, and the sky missing area of the panoramic image is determined based on the bottom boundary and the blank pixel information scanned row by row in a set direction.
[0106] In the above, a panoramic image taken by a drone is acquired to detect the sky missing area of the panoramic image; the target sky area is extracted from the panoramic image, the target sky area is cut into multiple sky sub-blocks, and each sky sub-block is pasted into the sky missing area at a fixed interval; the edges of each sky sub-block in the sky missing area are repaired, and a sky completion image corresponding to the panoramic image is output based on the edge-repaired sky missing area. The above technical means are used to cut the target sky area into multiple sky sub-blocks and paste them into the sky missing area, and then the edges of the sky sub-blocks are repaired. This ensures the display effect of the panoramic image while avoiding complex operations such as manual or algorithmic calculations, thereby improving the efficiency of the sky area completion of the panoramic image. Furthermore, the sky area completion operation can be adapted to different panoramic images, improving the universality of the sky area completion operation.
[0107] The sky area completion system for drone panoramic images provided in Example 2 of the present application can be used to execute the sky area completion method for drone panoramic images provided in Example 1 above, and has corresponding functions and beneficial effects.
[0108] Example 3:
[0109] The third embodiment of the present application provides an electronic device, referring to Figure 8 The electronic device includes: a processor 31, a memory 32, a communication module 33, an input device 34, and an output device 35. The number of processors in the electronic device may be one or more, and the number of memories in the electronic device may be one or more. The processor, memory, communication module, input device, and output device of the electronic device may be connected via a bus or other means.
[0110] Memory, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the method for completing the sky area of a drone panoramic image described in any embodiment of the present application (for example, the detection module, pasting module, and repair module in the drone panoramic image sky area completion system). The memory may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on device usage. Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some instances, the memory may further include memory located remotely from the processor, which can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0111] The communication module is used for data transmission.
[0112] The processor executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory, thereby realizing the above-mentioned method for completing the sky area of the drone panoramic image.
[0113] The input device can be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device can include a display device such as a display screen.
[0114] The electronic device provided above can be used to execute the method for completing the sky area of the drone panoramic image provided in the above embodiment 1, and has corresponding functions and beneficial effects.
[0115] Example 4:
[0116] An embodiment of the present application also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute a method for completing the sky area of a drone panoramic image. The method for completing the sky area of a drone panoramic image includes: obtaining a panoramic image taken by a drone, and detecting a sky-missing area in the panoramic image; extracting a target sky area from the panoramic image, cutting the target sky area into multiple sky sub-blocks, and pasting each sky sub-block into the sky-missing area at a fixed interval; performing edge repair on each sky sub-block in the sky-missing area, and outputting a sky-completed image corresponding to the panoramic image based on the sky-missing area after edge repair.
[0117] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROMs, floppy disks, or tape drives; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disks or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or it may be located in a different second computer system that is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). The storage medium may store program instructions (e.g., embodied as a computer program) that can be executed by one or more processors.
[0118] Of course, the storage medium containing computer-executable instructions provided in an embodiment of the present application is not limited to the method for completing the sky area of a drone panoramic image as described above, and can also execute related operations in the method for completing the sky area of a drone panoramic image provided in any embodiment of the present application.
[0119] The sky area completion system, storage medium and electronic device for the drone panoramic image provided in the above embodiments can execute the sky area completion method for the drone panoramic image provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the sky area completion method for the drone panoramic image provided in any embodiment of the present application.
[0120] The above are only preferred embodiments of the present application and the technical principles employed. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that are possible for those skilled in the art will not depart from the scope of protection of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments and may include more other equivalent embodiments without departing from the concept of the present application. The scope of the present application is determined by the scope of the claims.
Claims
1. A method for completing the sky area of a drone panorama, characterized in that: include: Acquire a panoramic image taken by a drone, and detect a sky missing area in the panoramic image; Extracting a target sky area from the panoramic image, cutting the target sky area into a plurality of sky sub-blocks, and pasting the sky sub-blocks into the sky-missing area at regular intervals, wherein an area with clear texture and natural color is selected from an existing and valid sky area in the panoramic image as the target sky area; Performing edge repair on each of the sky sub-blocks in the sky missing area, covering the edge-repaired sky missing area to a corresponding position of the panoramic image, and generating a sky completion image corresponding to the panoramic image; Among them, the edge repair of each sky sub-block in the sky missing area includes: determining the sub-block spacing area based on the fixed interval of each sky sub-block in the sky missing area; determining the designated edge area of each sky sub-block, and determining the edge mask area based on the sub-block spacing area and the designated edge area; inputting the edge mask area and the panoramic image with the sky sub-block pasted into an artificial intelligence-generated content model based on deep learning, and filling the edge mask area with sky content based on the artificial intelligence-generated content model.
2. The method for completing the sky area of a drone panorama according to claim 1, characterized in that: Before detecting the sky missing area of the panoramic image, the method further includes: normalizing the panoramic image of the original size according to a set size; Accordingly, after generating the sky completion image corresponding to the panoramic image, the method further includes: The size of the sky completion image is adjusted to the original size of the panoramic image.
3. The method for completing the sky area of a drone panorama according to any one of claims 1-2, characterized in that: The detecting of the sky missing area of the panoramic image includes: Pixel information is scanned line by line along a set direction starting from a designated position of the panoramic image, and a sky missing area of the panoramic image is determined based on the scanned blank pixel information.
4. The method for completing the sky area of a drone panorama according to claim 3, characterized in that: The determining of the sky missing area of the panoramic image based on the scanned blank pixel information includes: Based on the scanned blank pixel information, the first row of pixels in which all pixel information is blank is determined as the bottom boundary, and the sky missing area of the panoramic image is determined based on the bottom boundary and the blank pixel information scanned row by row in the set direction.
5. A sky area completion system for drone panoramas, characterized in that: include: A detection module is used to acquire a panoramic image taken by a drone and detect a sky missing area in the panoramic image; a pasting module, configured to extract a target sky area from the panoramic image, cut the target sky area into a plurality of sky sub-blocks, and paste the sky sub-blocks into the sky-missing area at regular intervals, wherein an area with clear texture and natural color is selected from existing and valid sky areas in the panoramic image as the target sky area; A repair module is used to perform edge repair on each of the sky sub-blocks in the sky missing area, cover the edge-repaired sky missing area to the corresponding position of the panoramic image, and generate a sky completion image corresponding to the panoramic image, wherein the edge repair on each of the sky sub-blocks in the sky missing area includes: determining a sub-block spacing area based on a fixed interval of each of the sky sub-blocks in the sky missing area; determining a designated edge area for each of the sky sub-blocks, and determining an edge mask area based on the sub-block spacing area and the designated edge area; inputting the edge mask area and the panoramic image with the sky sub-block pasted into an artificial intelligence content generation model based on deep learning, and filling the edge mask area with sky content based on the artificial intelligence content generation model.
6. An electronic device, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for completing the sky area of a drone panoramic image as described in any one of claims 1-4.
7. A storage medium containing computer-executable instructions, characterized in that: When executed by a computer processor, the computer executable instructions are used to perform the method for completing the sky area of a drone panoramic image as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Image completion method and device
CN109816613A
Complementing method for image missing part
JP1995191661A