Sky image processing control method, device and computer-readable storage medium

By extracting the sky and building areas in the image, performing binarization processing and morphological operations, the problem of inaccurate sky area extraction in the prior art is solved, and efficient and accurate sky area extraction and image fusion effects are achieved.

CN114037727BActive Publication Date: 2025-08-12NUBIA TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111333716.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-11
Publication Date
2025-08-12
Estimated Expiration
2041-11-11

AI Technical Summary

Technical Problem

When processing images containing sky areas, especially when the building is similar to the sky colors, the sky areas cannot be accurately extracted through binary images, resulting in poor subsequent image processing effects.

Method used

By extracting the sky and building areas in the image, binarization is performed, edge extraction, zeroing, white filling, black connection domain elimination and image morphology are performed, and the building area is finally corrected to accurately extract the sky area.

Benefits of technology

It realizes efficient and accurate sky area extraction, improves the accuracy of image processing, meets the needs of diverse and applicable scenarios, and enhances the user's image fusion processing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114037727B_ABST
    Figure CN114037727B_ABST
Patent Text Reader

Abstract

The present invention discloses a sky image processing control method, device, and computer-readable storage medium, wherein the method comprises: extracting a sky area from a captured first image and saving the processed first image as a binarized second image; extracting a building area from the first image and saving the processed first image as a binarized third image; sequentially performing edge extraction and zeroing of the building area, white filling and elimination of black connected domains in the building area, and image morphological processing on the third image to obtain a processed fourth image; and correcting the building area of the second image using the fourth image to obtain a fifth image containing the sky area. This method realizes an efficient and accurate sky image processing control solution, improves the accuracy of sky area extraction, satisfies a variety of applicable scenarios, and enhances the user's processing experience for subsequent image fusion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mobile communications, and in particular to a sky image processing control method, device, and computer-readable storage medium. Background Art

[0002] In the prior art, with the continuous development of smart terminal devices, users have higher and higher demands for the shooting of the devices. In particular, for specific shooting scenes that include the sky, it has become a major problem for image post-processing. For example, for shooting scenes that include the sky, starry sky shooting of stars and the moon, cloud shooting of morning glow and evening glow, etc. can be derived. It can be seen that in this type of shooting scene, the key step in image post-processing is to extract the sky area in the image. The existing processing solution is to binarize the image containing the sky area to obtain the segmented sky area. However, when encountering a situation where the color of the building and the sky is similar, the above solution cannot accurately obtain the sky area through the binary image. Therefore, in the existing image processing solution, there is an urgent need for an image processing solution that can accurately divide the sky area to solve the user's later needs for starry sky shooting of stars and the moon, or cloud shooting of morning glow and evening glow. Summary of the Invention

[0003] In order to solve the above technical defects in the prior art, the present invention proposes a sky image processing control method, which includes:

[0004] A sky area is extracted from a captured first image, and the processed first image is saved as a binarized second image, wherein the white area in the second image is the sky area, and the black area in the second image is the non-sky area.

[0005] A building area is extracted from the first image, and the processed first image is saved as a binarized third image, wherein the white area in the third image is the building area, and the black area in the third image is the non-building area.

[0006] Edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphological processing are sequentially performed on the third image to obtain a processed fourth image.

[0007] The second image is corrected for the building area using the fourth image to obtain a fifth image including the sky area.

[0008] Optionally, extracting a sky area from the captured first image and saving the processed first image as a binarized second image, wherein the white area in the second image is the sky area and the black area in the second image is the non-sky area, comprises:

[0009] When generating the sky area extraction instruction for the first image, it is detected whether there is a sky area in the first image.

[0010] If the sky area exists, it is detected whether there is a building area with a color matching that of the sky area in the first image; if so, the sky area is extracted from the first image.

[0011] Optionally, the step of sequentially performing edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphological processing on the third image to obtain a processed fourth image includes:

[0012] The edge of the third image is extracted and compared with the building area in the third image.

[0013] The edges of the third image away from the building area are set to zero.

[0014] Optionally, the step of sequentially performing edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphological processing on the third image to obtain a processed fourth image further includes:

[0015] In the third image after edge zeroing processing, the white edge of the building area is determined.

[0016] A morphological dilation process is performed on the white edge so that the white edge fills the interior of the building area.

[0017] Optionally, the step of sequentially performing edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphological processing on the third image to obtain a processed fourth image further includes:

[0018] Determine the black connected area within the building area after the white edge filling.

[0019] The pixel values of the black connected domains that meet the preset size conditions are set to 255, so that the corresponding black connected domains are eliminated.

[0020] Optionally, the step of sequentially performing edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphological processing on the third image to obtain a processed fourth image further includes:

[0021] The black area is determined in the building area after the black connected domain is eliminated.

[0022] A morphological processing of corrosion is performed on the black area to eliminate the black area.

[0023] Optionally, the correcting the second image for the building area by using the fourth image to obtain a fifth image including the sky area includes:

[0024] The second image and the fourth image are compared to obtain a corrected building area.

[0025] The corrected building area is replaced in the second image.

[0026] Optionally, the correcting the second image for the building area using the fourth image to obtain a fifth image including the sky area further includes:

[0027] An edge between the corrected sky area and the building area is determined, and a fifth image including the sky area is obtained by dividing the image according to the corrected edge.

[0028] The present invention also proposes a sky image processing control device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the sky image processing control method described in any one of the above items are implemented.

[0029] The present invention also provides a computer-readable storage medium storing a sky image processing control program. When the sky image processing control program is executed by a processor, the steps of any of the above-mentioned sky image processing control methods are implemented.

[0030] The sky image processing control method, device, and computer-readable storage medium of the present invention are implemented by extracting the sky area from a captured first image and saving the processed first image as a binary second image, wherein the white area in the second image is the sky area and the black area in the second image is the non-sky area; extracting the building area from the first image and saving the processed first image as a binary third image, wherein the white area in the third image is the building area and the black area in the third image is the non-building area; performing edge extraction and zeroing of the building area, white filling and black connected domain elimination of the building area, and image morphological processing on the third image in sequence to obtain a processed fourth image; and correcting the building area of the second image using the fourth image to obtain a fifth image containing the sky area. This implements an efficient and accurate sky image processing control scheme, improves the accuracy of sky area extraction, meets diverse application scenarios, and enhances the user's processing experience for subsequent image fusion. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:

[0032] Figure 1 This is a hardware structure diagram of a mobile terminal according to the present invention;

[0033] Figure 2 This is a diagram of a communication network system architecture provided by an embodiment of the present invention;

[0034] Figure 3 is a flow chart of a first embodiment of a sky image processing control method of the present invention;

[0035] Figure 4 is a flow chart of a second embodiment of a sky image processing control method according to the present invention;

[0036] Figure 5 is a flow chart of a third embodiment of a sky image processing control method according to the present invention;

[0037] Figure 6 is a flow chart of a fourth embodiment of a sky image processing control method according to the present invention;

[0038] Figure 7 is a flowchart of a fifth embodiment of a sky image processing control method according to the present invention;

[0039] Figure 8 is a flow chart of a sixth embodiment of a sky image processing control method according to the present invention;

[0040] Figure 9 is a flow chart of a seventh embodiment of the sky image processing control method of the present invention;

[0041] Figure 10 is a flow chart of an eighth embodiment of a sky image processing control method according to the present invention;

[0042] Figure 11 This is a real scene diagram of the first embodiment of the sky image processing control method of the present invention;

[0043] Figure 12 is the first binary image of the first embodiment of the sky image processing control method of the present invention;

[0044] Figure 13 is the second binary image of the first embodiment of the sky image processing control method of the present invention;

[0045] Figure 14 is the third binary image of the third embodiment of the sky image processing control method of the present invention;

[0046] Figure 152 is a schematic diagram of expansion processing according to a fourth embodiment of the sky image processing control method of the present invention;

[0047] Figure 16 2 is a schematic diagram of eliminating the fifth embodiment of the sky image processing control method of the present invention;

[0048] Figure 17 2 is a schematic diagram of the corrosion process of the sixth embodiment of the sky image processing control method of the present invention;

[0049] Figure 18 is the fourth binary image of the sixth embodiment of the sky image processing control method of the present invention;

[0050] Figure 19 This is the fifth binary image of the eighth embodiment of the sky image processing control method of the present invention. DETAILED DESCRIPTION

[0051] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0052] In the subsequent description, suffixes such as "module," "component," or "unit" used to represent elements are only used to facilitate the description of the present invention and have no specific meaning. Therefore, "module," "component," or "unit" can be used interchangeably.

[0053] The terminal can be implemented in various forms. For example, the terminal described in the present invention may include mobile terminals such as mobile phones, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.

[0054] The following description will be made by taking a mobile terminal as an example. It will be understood by those skilled in the art that, in addition to components specifically used for mobile purposes, the configuration according to the embodiments of the present invention can also be applied to fixed type terminals.

[0055] See also Figure 1 , which is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention. The mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (audio / video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will understand that Figure 1 The structure of the mobile terminal shown in the figure does not constitute a limitation to the mobile terminal. The mobile terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0056] The following combination Figure 1 A detailed introduction to the various components of the mobile terminal:

[0057] The RF unit 101 can be used to send and receive information or receive signals during calls. Specifically, it receives downlink information from the base station and transmits it to the processor 110 for processing. It also transmits uplink data to the base station. Typically, the RF unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and more. Furthermore, the RF unit 101 can communicate with the network and other devices via wireless communication. The above-mentioned wireless communications may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution), etc.

[0058] WiFi is a short-range wireless transmission technology. Mobile terminals can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 102. It provides users with wireless broadband Internet access. Figure 1 The WiFi module 102 is shown, but it is understandable that it is not an essential component of the mobile terminal and can be omitted as needed without changing the essence of the invention.

[0059] The audio output unit 103 can convert audio data received by the RF unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Furthermore, the audio output unit 103 can also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, or the like.

[0060] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos captured by an image capture device (e.g., a camera) in video capture mode or image capture mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the GPU 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the RF unit 101 or the WiFi module 102. The microphone 1042 may receive sound (audio data) in operating modes such as a phone call mode, a recording mode, and a voice recognition mode, and may process such sound into audio data. In the phone call mode, the processed audio (voice) data may be converted into a format that can be transmitted to a mobile communication base station via the RF unit 101. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.

[0061] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be described here.

[0062] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0063] The user input unit 107 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using a finger, stylus, or any other suitable object or accessory on or near the touch panel 1071) and drive the corresponding connection device according to a pre-set program. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction and detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 110. It can also receive commands sent by the processor 110 and execute them. In addition, the touch panel 1071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may further include other input devices 1072. Specifically, the other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power keys, etc.), a trackball, a mouse, a joystick, etc., and are not specifically limited here.

[0064] Furthermore, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Figure 1 In the embodiment, the touch panel 1071 and the display panel 1061 are two independent components to realize the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal, which is not limited here.

[0065] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.

[0066] Memory 109 can be used to store software programs and various data. Memory 109 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 (such as a sound playback function or an image playback function); the data storage area may store data generated based on the use of the mobile phone (such as audio data, a phone book, etc.). Furthermore, memory 109 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0067] Processor 110 is the control center of the mobile terminal, connecting all components of the mobile terminal using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 109 and accessing data stored in memory 109, it executes various functions of the mobile terminal and processes data, thereby providing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, processor 110 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 110.

[0068] The mobile terminal 100 may also include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 through a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.

[0069] although Figure 1 Not shown, the mobile terminal 100 may further include a Bluetooth module, etc., which will not be described in detail here.

[0070] To facilitate understanding of the embodiments of the present invention, the communication network system on which the mobile terminal of the present invention is based is described below.

[0071] See also Figure 2 , Figure 2 A communication network system architecture diagram is provided for an embodiment of the present invention. The communication network system is an LTE system of universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an Evolved UMTS Terrestrial Radio Access Network (E-UTRAN) 202, an Evolved Packet Core (EPC) 203, and an operator's IP service 204, which are sequentially connected in communication.

[0072] Specifically, UE201 may be the above-mentioned terminal 100, which will not be described in detail here.

[0073] E-UTRAN 202 includes eNodeB 2021 and other eNodeBs 2022 , etc. Among them, eNodeB 2021 can be connected to other eNodeBs 2022 via a backhaul (eg, an X2 interface), and eNodeB 2021 is connected to EPC 203 , and eNodeB 2021 can provide UE 201 with access to EPC 203 .

[0074] EPC 203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, PGW (PDN Gate Way) 2035, and PCRF (Policy and Charging Rules Function) 2036. MME 2031 is the control node that handles signaling between UE 201 and EPC 203, providing bearer and connection management. HSS 2032 provides registers for managing functions such as the Home Location Register (not shown) and stores user-specific information such as service features and data rates. All user data can be sent through SGW2034, PGW2035 can provide IP address allocation and other functions for UE 201, PCRF2036 is the policy and charging control policy decision point for service data flow and IP bearer resources, and it selects and provides available policy and charging control decisions for the policy and charging execution function unit (not shown in the figure).

[0075] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem), or other IP services.

[0076] Although the above description is based on the LTE system as an example, those skilled in the art should know that the present invention is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems, and is not limited here.

[0077] Based on the above-mentioned mobile terminal hardware structure and communication network system, various embodiments of the method of the present invention are proposed.

[0078] Example 1

[0079] Figure 3 Flowchart of the first embodiment of the sky image processing control method of the present invention. A sky image processing control method, the method comprising:

[0080] S1. Extract a sky area from a captured first image, and save the processed first image as a binarized second image, wherein the white area in the second image is the sky area, and the black area in the second image is the non-sky area.

[0081] S2. Extracting building areas from the first image, and saving the processed first image as a binarized third image, wherein the white areas in the third image are building areas, and the black areas in the third image are non-building areas.

[0082] S3. Perform edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphology processing on the third image in sequence to obtain a processed fourth image.

[0083] S4. Correct the second image for the building area using the fourth image to obtain a fifth image including the sky area.

[0084] In this embodiment, please refer to Figure 11The real-life image shown contains both the sky and building areas, and both appear off-white. Consequently, using a conventional binarization scheme to extract the sky area may result in incorrect extraction of the object and unclear and inaccurate edge delineation. Therefore, in this embodiment, the initial binarized image of the sky area is not directly used for final sky area extraction. Instead, a series of image processing operations are performed on the initial binarized image of the building area, and the processed image is compared with the initial binarized image of the sky area to obtain accurate edges of the building and sky areas, thereby accurately performing the sky area delineation operation.

[0085] In this embodiment, please refer to Figure 12 The first binary image shown is Figure 12 Shown is Figure 11 Performing an initial binarization on the image, that is, saving the processed first image as a binarized second image, wherein the white area in the second image is the sky area, and the black area in the second image is the non-sky area.

[0086] In this embodiment, Figures 11 to 12 It can be seen from the transformation that buildings are mistakenly identified as non-sky areas, and the wrong sky area extraction directly leads to errors in subsequent image fusion.

[0087] Optionally, in this embodiment, in order to solve the above problem, first, the sky area is extracted to obtain Figure 12 ; Then, refer to Figure 13 The second binary image shown, that is, Figure 11 Extract the building area in the first image and get Figure 13 .

[0088] Optionally, in this embodiment, Figure 13 The third image shown is processed by sequentially performing edge extraction and zeroing of building areas, white filling and black connected component elimination of building areas, and image morphology processing to obtain a processed fourth image.

[0089] Optionally, in this embodiment, the second image is corrected for the building area using the fourth image to obtain a fifth image including the sky area.

[0090] The beneficial effect of this embodiment is that, by extracting the sky area from the captured first image and saving the processed first image as a binary second image, wherein the white area in the second image is the sky area and the black area in the second image is the non-sky area; extracting the building area from the first image and saving the processed first image as a binary third image, wherein the white area in the third image is the building area and the black area in the third image is the non-building area; performing edge extraction and zeroing of the building area, white filling and black connected domain elimination of the building area, and image morphological processing on the third image in sequence to obtain a processed fourth image; and correcting the building area of the second image using the fourth image to obtain a fifth image containing the sky area. An efficient and accurate sky image processing control scheme is implemented, which improves the accuracy of sky area extraction, meets diverse application scenarios, and enhances the user's processing experience for subsequent image fusion.

[0091] Example 2

[0092] Figure 4 2 is a flow chart of a second embodiment of the sky image processing control method of the present invention. Based on the above embodiment, in this embodiment, the sky area is extracted from the captured first image, and the processed first image is saved as a binarized second image, wherein the white area in the second image is the sky area, and the black area in the second image is the non-sky area. The above includes:

[0093] S01. When generating a sky area extraction instruction for the first image, detect whether there is a sky area in the first image.

[0094] S02: If the sky area exists, detecting whether there is a building area with a color matching that of the sky area in the first image; if so, extracting the sky area from the first image.

[0095] Optionally, in this embodiment, if the sky area exists, the color of the sky area in the first image is detected.

[0096] Optionally, in this embodiment, it is detected whether there is a building area with a color similar to that of the sky area in the first image. If so, the sky area is extracted from the first image.

[0097] The beneficial effect of this embodiment lies in that, when generating a sky region extraction instruction for the first image, the system detects whether a sky region exists in the first image; if so, it then detects whether a building region in the first image matches the color of the sky region; and if so, extracts the sky region from the first image. This provides an efficient and accurate sky image processing control scheme, improves the accuracy of sky region extraction, meets diverse application scenarios, and enhances the user experience in subsequent image fusion processing.

[0098] Example 3

[0099] Figure 5 4 is a flow chart of a third embodiment of the sky image processing control method of the present invention. Based on the above embodiment, in this embodiment, the third image is sequentially subjected to edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphological processing to obtain a processed fourth image, including:

[0100] S31 . Extracting edges of the third image and comparing them with building areas in the third image.

[0101] S32: Perform zeroing processing on the edges of the third image that are away from the building area.

[0102] Alternatively, in this embodiment, please refer to Figure 14 The third binary image is shown. In this process, the edge of the image is extracted and the Figure 13 The edges away from the building area are all set to zero.

[0103] This embodiment has the beneficial effect of extracting the edges of the third image and comparing them with the building areas in the third image; and zeroing out the edges of the third image away from the building areas. This achieves an efficient and accurate sky image processing control solution, improves the accuracy of sky area extraction, meets diverse application scenarios, and enhances the user experience in subsequent image fusion processing.

[0104] Example 4

[0105] Figure 6 4 is a flow chart of a fourth embodiment of the sky image processing control method of the present invention. Based on the above embodiment, in this embodiment, the third image is sequentially subjected to edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphological processing to obtain a processed fourth image, further comprising:

[0106] S33: Determine the white edge of the building area in the third image after edge zeroing processing.

[0107] S34: Performing morphological expansion processing on the white edge so that the white edge fills the interior of the building area.

[0108] Alternatively, in this embodiment, please refer to Figure 15 The morphological processing in this embodiment includes dilation and erosion of the image. Dilation enlarges the white area, and the larger the dilation radius, the larger the white area becomes. In this embodiment, the morphological processing of dilation is performed on the white edge, causing the edge in the image to expand and eventually fill the entire building area.

[0109] This embodiment advantageously determines the white edges of the building area in the third image after edge zeroing and performs morphological dilation on the white edges to fill the interior of the building area. This provides an efficient and accurate sky image processing control solution, improves the accuracy of sky area extraction, meets diverse application scenarios, and enhances the user experience in subsequent image fusion processing.

[0110] Example 5

[0111] Figure 7 4 is a flow chart of a fifth embodiment of the sky image processing control method of the present invention. Based on the above embodiment, in this embodiment, the third image is sequentially subjected to edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphological processing to obtain a processed fourth image, further comprising:

[0112] S35. Determine a black connected region in the building area after the white edge filling process.

[0113] S36 , setting the pixel value of the black connected domain that meets the preset size condition to 255, so that the corresponding black connected domain is eliminated.

[0114] Alternatively, in this embodiment, please refer to Figure 16 As shown in the elimination diagram, the binary image generated by dilation of the edge image contains many small black areas, which actually belong to the building area. Therefore, in this embodiment, by calculating the size of the connected component, if certain preset conditions, such as size conditions, are met, each pixel in the small black area can be reset to 255, thereby improving the extraction accuracy of the building area.

[0115] This embodiment achieves the beneficial effect of identifying black connected domains within building areas that have been edge-filled with white edges and setting the pixel values of black connected domains that meet a preset size requirement to 255, thereby eliminating the corresponding black connected domains. This provides an efficient and accurate sky image processing control solution, improving the accuracy of sky area extraction, addressing diverse application scenarios, and enhancing the user experience with subsequent image fusion processing.

[0116] Example 6

[0117] Figure 8 4 is a flowchart of a sixth embodiment of the sky image processing control method according to the present invention. Based on the above embodiment, the method sequentially performs edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphological processing on the third image to obtain a processed fourth image, further comprising:

[0118] S37. Determine a black area in the building area after the black connected domain is eliminated.

[0119] S38: Performing morphological processing of corrosion on the black area to eliminate the black area.

[0120] Alternatively, in this embodiment, please refer to Figure 17 As shown in the schematic diagram of the erosion process, the white area becomes smaller and disappears due to erosion. Therefore, in this embodiment, the black area is determined within the building area after the black connected domain elimination process; the morphological erosion process is performed on the black area to eliminate the black area.

[0121] Alternatively, in this embodiment, please refer to Figure 18 The fourth binary image shown shows the image after corrosion processing.

[0122] The beneficial effect of this embodiment is that by identifying black areas within the building area after the black connected domain elimination process and performing morphological processing of erosion on the black areas to eliminate them, an efficient and accurate sky image processing control scheme is implemented, which improves the accuracy of sky area extraction, meets diverse application scenarios, and enhances the user's processing experience for subsequent image fusion.

[0123] Example 7

[0124] Figure 9 4 is a flow chart of a seventh embodiment of the sky image processing control method of the present invention. Based on the above embodiment, the method of correcting the second image for the building area using the fourth image to obtain a fifth image containing the sky area includes:

[0125] S41 : Compare the second image and the fourth image to obtain a corrected building area.

[0126] S42: Replace the corrected building area in the second image.

[0127] Optionally, in this embodiment, the new corrected building area can be determined by comparing the first binary image and the fourth binary image.

[0128] Optionally, in this embodiment, the corrected building area is replaced in the second image.

[0129] This embodiment advantageously compares the second image with the fourth image to obtain a corrected building area, which is then replaced in the second image. This provides an efficient and accurate sky image processing control solution, improving the accuracy of sky area extraction, addressing diverse application scenarios, and enhancing the user experience with subsequent image fusion processing.

[0130] Example 8

[0131] Figure 10 This is a flow chart of an eighth embodiment of the sky image processing control method of the present invention. Based on the above embodiment, the method further includes: performing building area correction on the second image using the fourth image to obtain a fifth image including a sky area.

[0132] S43: Determine the edge between the corrected sky area and the building area.

[0133] S44. Obtain a fifth image including a sky area according to the corrected edge division.

[0134] Optionally, in this embodiment, the edge between the corrected new sky area and the building area is determined.

[0135] Alternatively, in this embodiment, please refer to Figure 19 The fifth binary image shown, that is, the fifth image including the sky area can be accurately divided according to the new edge.

[0136] This embodiment advantageously determines the edge between the corrected sky region and the building region, and then divides the image into a fifth image containing the sky region based on the corrected edge. This provides an efficient and accurate sky image processing control scheme, improves the accuracy of sky region extraction, meets diverse application scenarios, and enhances the user experience in subsequent image fusion processing.

[0137] Embodiment 9

[0138] Based on the above embodiments, the present invention further proposes a sky image processing control device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the sky image processing control method described in any one of the above items are implemented.

[0139] It should be noted that the above-mentioned device embodiment and method embodiment belong to the same concept, and their specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are applicable to the device embodiment, which will not be repeated here.

[0140] Example 10

[0141] Based on the above embodiments, the present invention further proposes a computer-readable storage medium, which stores a sky image processing control program. When the sky image processing control program is executed by a processor, the steps of the sky image processing control method as described in any one of the above items are implemented.

[0142] It should be noted that the above-mentioned medium embodiment and method embodiment belong to the same concept, and their specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are applicable to the medium embodiment, which will not be repeated here.

[0143] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0144] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0145] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0146] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.

Claims

1. A sky image processing control method, characterized in that: The method comprises: Extracting a sky area from the captured first image, and saving the processed first image as a binarized second image, wherein the white area in the second image is the sky area, and the black area in the second image is the non-sky area; Extracting building areas from the first image, and saving the processed first image as a binarized third image, wherein white areas in the third image are building areas, and black areas in the third image are non-building areas; performing edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphological processing on the third image in sequence to obtain a processed fourth image; The second image is corrected for the building area using the fourth image to obtain a fifth image including the sky area.

2. The sky image processing control method according to claim 1, characterized in that: The step of extracting a sky area from the captured first image and saving the processed first image as a binarized second image, wherein the white area in the second image is the sky area and the black area in the second image is the non-sky area, includes: When generating a sky area extraction instruction for the first image, detecting whether a sky area exists in the first image; If the sky area exists, it is detected whether there is a building area with a color matching that of the sky area in the first image; if so, the sky area is extracted from the first image.

3. The sky image processing control method according to claim 2, characterized in that: The step of sequentially performing edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphological processing on the third image to obtain a processed fourth image comprises: extracting edges of the third image and comparing them with building areas in the third image; The edges of the third image away from the building area are set to zero.

4. The sky image processing control method according to claim 3, characterized in that: The step of sequentially performing edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphological processing on the third image to obtain a processed fourth image further includes: determining a white edge of the building area in the third image after edge zeroing processing; A morphological dilation process is performed on the white edge so that the white edge fills the interior of the building area.

5. The sky image processing control method according to claim 4, characterized in that: The step of sequentially performing edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphological processing on the third image to obtain a processed fourth image further includes: Determine the black connected area in the building area after the white edge filling; The pixel values of the black connected domains that meet the preset size conditions are set to 255, so that the corresponding black connected domains are eliminated.

6. The sky image processing control method according to claim 5, characterized in that: The step of sequentially performing edge extraction and zeroing of building areas, white filling and black connected domain elimination of building areas, and image morphological processing on the third image to obtain a processed fourth image further includes: Determine the black area in the building area after the black connected domain is eliminated; A morphological processing of corrosion is performed on the black area to eliminate the black area.

7. The sky image processing control method according to claim 6, characterized in that: Correcting the second image for the building area by using the fourth image to obtain a fifth image including the sky area includes: comparing the second image and the fourth image to obtain a corrected building area; The corrected building area is replaced in the second image.

8. The sky image processing control method according to claim 7, characterized in that: Correcting the second image for the building area using the fourth image to obtain a fifth image including the sky area further includes: Determine the edge between the corrected sky area and the building area; A fifth image including the sky area is obtained according to the corrected edge segmentation.

9. A sky image processing control device, characterized in that: The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the sky image processing control method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a sky image processing control program, which, when executed by a processor, implements the steps of the sky image processing control method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Single image defogging method and device based on depth information separation sky region

    CN104794688A

  • Tissue segmentation method in ultrasonic image, ultrasonic equipment and storage medium

    CN112819836A