Skyline analysis method and device, equipment and storage medium

By taking screenshots of the 3D Earth Engine and modifying the sky background color and analyzing the image pixel color, the skyline analysis is realized, solving the problem of strict conditions for analyzing the skyline in the existing technology, and reducing the technical threshold.

CN119741275APending Publication Date: 2025-04-01PCI TECH GRP CO LTD +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411817425.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

In the prior art, the use conditions for analyzing skylines are relatively strict, and the map engine is required to provide relevant interfaces and analysts need to have experience in 3D scene processing, resulting in a high technical threshold.

Method used

By screenshotting the target scene currently displayed by the 3D Earth Engine, the initial image is obtained, and the corresponding image is captured by modifying the background color of the sky twice, and the skyline is determined in the initial image according to the pixel colors of these images.

Benefits of technology

It lowers the technical threshold for skyline analysis, has loose usage conditions, does not rely on the map engine to provide interfaces, and users do not need to have experience in 3D scene processing, which is suitable for most occasions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741275A_ABST
    Figure CN119741275A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a skyline analysis method and device, equipment and a storage medium, and the method comprises the steps: carrying out the screenshot of a target scene currently displayed by a 3D earth engine when determining a skyline, obtaining an initial image, modifying the background color of the sky in the 3D earth engine twice, and cutting out the corresponding image, and finally, determining the skyline in the initial image according to the pixel colors of the image pixels in the first image and the pixel colors of the image pixels in the second image. According to the embodiment of the invention, the skyline is determined by only analyzing and processing the image, in the skyline determination process, related necessary interfaces provided by a map engine are not depended on, meanwhile, a user does not need to have 3D scene processing experience, the technical threshold is low, the use condition is loose, the method is suitable for most occasions, and the user experience is improved. The technical problem that in the prior art, the service condition is harsh when the skyline is analyzed is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing, and in particular to a skyline analysis method, apparatus, device and storage medium. Background Art

[0002] The skyline refers to the boundary between the tops of buildings and space in a city. The skyline reflects the vertical features of a city. Analyzing the skyline helps identify high-rise buildings and building complexes in a city, thereby guiding city planners to more reasonably distribute building heights to avoid overcrowding and visual pollution. In addition, architects can also better understand the spatial layout of buildings and urban environments through the skyline, and design architectural works that meet functional requirements and are in harmony with the city skyline.

[0003] However, when analyzing the skyline, the existing technology usually uses 3D post-processing to determine the skyline. This method requires the map engine to provide the necessary interface and requires the analyst to have certain 3D scene processing experience, resulting in a high technical threshold and strict usage conditions when performing skyline analysis. Summary of the invention

[0004] The embodiments of the present invention provide a skyline analysis method, device, equipment and storage medium. The embodiments of the present invention can determine the skyline by processing and analyzing an image, and the use conditions are loose, which reduces the technical threshold for skyline analysis and solves the technical problem that the use conditions are relatively strict when analyzing the skyline in the prior art.

[0005] In a first aspect, an embodiment of the present invention provides a skyline analysis method, the method comprising:

[0006] Take a screenshot of the target scene currently displayed by the 3D Earth Engine to obtain an initial image;

[0007] The background color of the sky in the 3D earth engine is set to a first color, and a screenshot of the target scene is taken to obtain a first image;

[0008] Setting the background color of the sky in the 3D earth engine to a second color, taking a screenshot of the target scene to obtain a second image, wherein the first color and the second color are different;

[0009] A skyline is determined in the initial image based on pixel colors of image pixels in the first image and pixel colors of image pixels in the second image.

[0010] Wherein, determining the skyline in the initial image according to the pixel colors of the image pixels in the first image and the pixel colors of the image pixels in the second image comprises:

[0011] determining, in the initial image, skyline image pixels corresponding to the skyline based on pixel colors of image pixels in the first image and pixel colors of image pixels in the second image;

[0012] The skyline is generated in the initial image based on the skyline image pixels.

[0013] Wherein, determining the skyline image pixels corresponding to the skyline in the initial image according to the pixel colors of the image pixels in the first image and the pixel colors of the image pixels in the second image comprises:

[0014] Determining, in the first image and the second image, respectively, a first mapped pixel and a second mapped pixel corresponding to each image pixel in the initial image;

[0015] determining, among the image pixels, a sky image pixel corresponding to the sky based on the pixel color of the first mapped pixel and the pixel color of the second mapped pixel;

[0016] According to each of the sky image pixels and neighboring image pixels around each of the sky image pixels, a target image pixel corresponding to the skyline is determined in the initial image.

[0017] Wherein, determining a sky image pixel corresponding to the sky in the image pixels according to the pixel color of the first mapping pixel and the pixel color of the second mapping pixel comprises:

[0018] Traversing each of the image pixels in turn;

[0019] For a currently traversed target image pixel, determining whether the target image pixel is an image pixel corresponding to the sky according to a pixel color of a corresponding first mapping pixel and a pixel color of a corresponding second mapping pixel;

[0020] In the case that the target image pixel is an image pixel corresponding to the sky, the target image pixel is marked as a sky image pixel, and the traversal continues to the next image pixel.

[0021] Wherein, determining whether the target image pixel is an image pixel corresponding to the sky according to the pixel color of the corresponding first mapping pixel and the pixel color of the corresponding second mapping pixel includes:

[0022] In a case where the pixel color corresponding to the first mapping pixel is the first color, and the pixel color corresponding to the second mapping pixel is the second color, the target image pixel is determined to be an image pixel corresponding to the sky.

[0023] The step of determining the target image pixel corresponding to the skyline in the initial image according to each of the sky image pixels and the neighboring image pixels around each of the sky image pixels comprises:

[0024] Traversing each of the sky image pixels in the initial image in sequence;

[0025] For a currently traversed target sky image pixel, determining whether each neighboring image pixel around the target sky image pixel is the sky image pixel;

[0026] In the case that any one of the neighboring image pixels is not the sky image pixel, the target sky image pixel is determined as the target image pixel corresponding to the skyline, and the traversal continues to the next sky image pixel.

[0027] Wherein, generating the skyline in the initial image according to the pixels of the skyline image comprises:

[0028] In the initial image, the pixel colors of the pixels of the skyline image are set to a third color, and a line segment formed by connecting the pixels of the skyline image is determined as the skyline.

[0029] In a second aspect, an embodiment of the present invention provides a skyline analysis device, the device comprising:

[0030] The initial image acquisition module is used to take a screenshot of the target scene currently displayed by the 3D earth engine to obtain an initial image;

[0031] A first image acquisition module, used to set the background color of the sky in the 3D earth engine to a first color, take a screenshot of the target scene, and obtain a first image;

[0032] A second image acquisition module, used to set the background color of the sky in the 3D earth engine to a second color, take a screenshot of the target scene, and obtain a second image, wherein the first color and the second color are different;

[0033] The skyline determination module is configured to determine a skyline in the initial image based on pixel colors of image pixels in the first image and pixel colors of image pixels in the second image.

[0034] In a third aspect, an embodiment of the present invention provides a skyline analysis device, the skyline analysis device comprising a processor and a memory;

[0035] The memory is used to store a computer program and transmit the computer program to the processor;

[0036] The processor is used to execute a skyline analysis method as described in the first aspect according to instructions in the computer program.

[0037] In a fourth aspect, an embodiment of the present invention provides a storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to perform a skyline analysis method as described in the first aspect.

[0038] As described above, the embodiments of the present invention provide a skyline analysis method, apparatus, device and storage medium. When determining the skyline, the embodiments of the present invention first take a screenshot of the target scene currently displayed by the 3D earth engine to obtain an initial image, then modify the background color of the sky in the 3D earth engine twice and capture the corresponding image to obtain a first image and a second image. Finally, the skyline can be determined in the initial image according to the pixel color of the image pixel in the first image and the pixel color of the image pixel in the second image. The embodiments of the present invention determine the skyline by only analyzing and processing the image. In the process of determining the skyline, it does not rely on the map engine to provide the necessary interface. At the same time, the user does not need to have 3D scene processing experience. The technical threshold is low and the use conditions are loose. It is suitable for most occasions and solves the technical problem of strict use conditions when analyzing the skyline in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A schematic diagram of a flow chart of a skyline analysis method provided by an embodiment of the present invention.

[0040] Figure 2 A schematic diagram of an initial image provided by an embodiment of the present invention.

[0041] Figure 3 A schematic diagram of a first image provided by an embodiment of the present invention.

[0042] Figure 4 A schematic diagram of a second image provided by an embodiment of the present invention.

[0043] Figure 5 A schematic diagram of a process for determining sky image pixels provided by an embodiment of the present invention.

[0044] Figure 6 A schematic diagram of a process for determining target image pixels provided by an embodiment of the present invention.

[0045] Figure 7 A schematic diagram of a skyline determined from an initial image provided by an embodiment of the present invention.

[0046] Figure 8 A schematic diagram of the structure of a skyline analysis device provided by an embodiment of the present invention.

[0047] Fig. 9 A schematic diagram of the structure of a skyline analysis device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The following description and accompanying drawings fully illustrate the specific embodiments of the present application so that those skilled in the art can practice them. The examples represent possible variations only. Unless explicitly required, separate components and functions are optional, and the order of operation can vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. The scope of the embodiments of the present application includes the entire scope of the claims, and all available equivalents of the claims. In this article, each embodiment may be represented individually or generally by the term "invention", which is only for convenience, and if more than one invention is disclosed in fact, it is not intended to automatically limit the scope of the application to any single invention or inventive concept. In this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, without requiring or implying any actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed. The various embodiments are described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. As for the structures, products, etc. disclosed in the embodiments, since they correspond to the parts disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0049] In the prior art, when analyzing the skyline, the skyline is usually determined by a three-dimensional post-processing method. When determining the skyline by the three-dimensional post-processing method, it is first necessary to detect the edges of the buildings in the map engine. This is the basic step in skyline analysis. The boundary between the building and the sky can be identified through edge detection. Afterwards, based on the edge detection, the detected edges are shaded using a shader. This step can enhance the visual effect of the skyline, making it more eye-catching and easy to identify. Finally, the results of edge detection and shader processing are integrated to form the final skyline effect. This process requires the use of the powerful functions of three-dimensional post-processing technology to optimize and process the scene as a whole to ensure the accuracy and aesthetics of the skyline.

[0050] However, in the process of analyzing the skyline based on 3D post-processing, the map engine needs to provide an extensible post-processing interface and an interface for detecting building edges in the scene, and analysts need to have certain 3D scene processing experience, which leads to a high technical threshold and strict usage conditions when performing skyline analysis. If the map engine does not provide the necessary related interfaces, even experienced analysts will not be able to implement the skyline analysis function.

[0051] Based on this, in order to solve the above technical problems, an embodiment of the present invention provides a skyline analysis method, such as Figure 1 As shown, Figure 1 A schematic flow chart of a skyline analysis method provided in an embodiment of the present invention. The skyline analysis method provided in an embodiment of the present invention can be executed by a skyline analysis device, which can be implemented by software and / or hardware. The skyline analysis device can be composed of two or more physical entities, or can be composed of one physical entity. For example, the skyline analysis device can be a computer, a host computer, a server, and other devices. The skyline analysis method provided in an embodiment of the present invention includes the following steps:

[0052] Step 101: Take a screenshot of the target scene currently displayed by the 3D earth engine to obtain an initial image.

[0053] In this embodiment, when the user needs to analyze the skyline, the user needs to run a 3D earth engine on the skyline analysis device, wherein the 3D earth engine is based on computer graphics and geographic information system (GIS) technology, and by constructing a three-dimensional model of the earth or similar celestial bodies, a technical platform for simulating and displaying its surface, internal and external environment is realized. After the skyline analysis device runs the 3D earth engine, the scene displayed by the 3D earth engine is displayed on the front-end page, and the user can determine the observation angle and range of the scene by setting the observation point on the front-end page. For example, the user can select the first-person camera mode to adjust the view by mouse operation, or select the custom three-dimensional point mode to pick up a point as the observation point. In addition, the observation point can be accurately set by directly inputting parameters such as the position of the observation point, the horizontal angle (azimuth), the pitch angle, and the line of sight range (radius). After the user sets the observation point, the scene corresponding to the observation point can be displayed on the front-end page on the 3D earth engine.

[0054] After the user sets the observation point in the front-end page, if the user needs to analyze the skyline of the target scene currently displayed by the 3D earth engine, the user can trigger the skyline analysis function of the skyline analysis device by interacting with the front-end page. For example, the skyline analysis device can also display a "Skyline Analysis" button on the front-end page. When the user triggers the button in the front-end page, the skyline analysis function can be triggered. After the skyline analysis function is triggered, the skyline analysis device will take a screenshot of the target scene currently displayed by the 3D earth engine to obtain an initial image. In one embodiment, Figure 2 As shown, Figure 2 A schematic diagram of an initial image provided by an embodiment of the present invention.

[0055] Step 102: Set the background color of the sky in the 3D earth engine to the first color, take a screenshot of the target scene, and obtain a first image.

[0056] After obtaining the initial image through screenshot, the skyline analysis device needs to set the background color of the sky to the first color in the 3D earth engine. The first color can be set according to actual needs, for example, the first color can be set to green. After adjusting the background color of the sky, the skyline analysis device needs to re-screenshot the target scene currently displayed in the front end of the 3D earth engine to obtain the first image. It is understandable that the scene content displayed in the first image is the same as the scene content displayed in the initial image. In one embodiment, Figure 3 As shown, Figure 3 A schematic diagram of a first image provided by an embodiment of the present invention.

[0057] Step 103: Set the background color of the sky in the 3D Earth Engine to a second color, take a screenshot of the target scene, and obtain a second image, wherein the first color and the second color are different.

[0058] After obtaining the first image through screenshot, the skyline image analysis device needs to modify the background color of the sky in the 3D earth engine again. This time, the background color of the sky needs to be set to a second color different from the first color, for example, the second color can be set to red. After that, the target scene currently displayed in the front-end page of the 3D earth engine is screenshoted again to obtain a second image. It is understandable that the scene content displayed in the second image is the same as the scene content displayed in the initial image. In one embodiment, Figure 4 As shown, Figure 4 A schematic diagram of a second image provided by an embodiment of the present invention.

[0059] Step 104: Determine a skyline in the initial image based on pixel colors of image pixels in the first image and pixel colors of image pixels in the second image.

[0060] Finally, the skyline analysis device can determine the skyline in the initial image based on the pixel colors of the image pixels in the first image and the pixel colors of the image pixels in the second image. In one embodiment, since the image contents of the first image, the second image, and the initial image are the same, the image pixels corresponding to the sky in the initial image can be determined based on the pixel colors corresponding to each image pixel in the initial image in the first image and the corresponding pixel colors in the second image, and the skyline can be determined in the initial image based on the boundaries between the image pixels corresponding to the sky and the image pixels not corresponding to the sky.

[0061] On the basis of the above embodiment, determining the skyline in the initial image according to the pixel colors of the image pixels in the first image and the pixel colors of the image pixels in the second image in step 104 includes:

[0062] Step 1041 : Determine skyline image pixels corresponding to the skyline in the initial image according to pixel colors of image pixels in the first image and pixel colors of image pixels in the second image.

[0063] The skyline analysis device needs to determine the pixel color of each image pixel in the first image and the pixel color of each image pixel in the second image. After that, the coordinates of each image pixel in the initial image are determined, and the pixel colors of the image pixels with the same coordinates are extracted in the first image and the second image, respectively. Based on the pixel colors extracted from the first image and the second image, the image pixels corresponding to the sky are determined in the image pixels of the initial image, and finally the image pixels located at the edge of the sky are determined as the skyline image pixels corresponding to the skyline. In one embodiment, in step 1041, the skyline image pixels corresponding to the skyline are determined in the initial image based on the pixel colors of the image pixels in the first image and the pixel colors of the image pixels in the second image, including:

[0064] Step 10411: Determine, in the first image and the second image respectively, a first mapped pixel and a second mapped pixel corresponding to each image pixel in the initial image.

[0065] In one embodiment, the skyline analysis device first needs to determine the first mapping pixel and the second mapping pixel corresponding to each image pixel in the initial image in the first image and the second image, respectively. Specifically, according to the coordinates of each image pixel in the initial image, the image pixels with the same coordinates in the first image and the second image can be determined as the first mapping pixel and the second mapping pixel, respectively.

[0066] Step 10412: Determine a sky image pixel corresponding to the sky in the image pixels according to the pixel color of the first mapped pixel and the pixel color of the second mapped pixel.

[0067] After determining the first mapping pixel and the second mapping pixel in the first image and the second image, respectively, further determine the sky image pixel corresponding to the sky in the image pixel according to the pixel color of the first mapping pixel and the pixel color of the second mapping pixel. Exemplarily, for the initial image, the skyline analysis device may traverse each image pixel in sequence. For example, the skyline analysis device may obtain the width width and height height of the initial image, and traverse from the image pixel with the coordinate point (0,0) in the initial image to the image pixel with the coordinate point (width-1,height-1). For the target image pixel currently traversed, determine whether the target image pixel is an image pixel corresponding to the sky according to the pixel color of the first mapping pixel corresponding to the target image pixel and the pixel color of the corresponding second mapping pixel. Wherein, when the pixel color of the corresponding first mapping pixel is the first color, and the pixel color of the corresponding second mapping pixel is the second color, the target image pixel is determined to be an image pixel corresponding to the sky. It can be understood that in this embodiment, by modifying the background color of the sky twice and intercepting the corresponding image, interference can be eliminated when determining the image pixel corresponding to the sky, thereby improving the accuracy. If the target image pixel is an image pixel corresponding to the sky, the target image pixel is marked as a sky image pixel, and then the next image pixel is traversed. It can be understood that if the target image pixel is not an image pixel corresponding to the sky, the next image pixel is traversed. In one embodiment, Figure 5 As shown, Figure 5 A schematic diagram of a process for determining sky image pixels provided by an embodiment of the present invention.

[0068] Step 10413: Determine the target image pixel corresponding to the skyline in the initial image according to each sky image pixel and the neighboring image pixels around each sky image pixel.

[0069] After determining the sky image pixels in the initial image, the skyline analysis device needs to further determine whether each sky image pixel is a target image pixel corresponding to the skyline based on the sky image pixels and the neighboring image pixels located around each sky image pixel. Specifically, the skyline analysis device sequentially traverses each sky image pixel in the initial image, and for the currently traversed target sky image pixel, determines whether each neighboring image pixel around the target sky image pixel is a sky image pixel. Exemplarily, assuming that the coordinates of the currently traversed target sky image pixel are (x, y), the eight image pixels (x-1, y-1), (x, y-1), (x+1, y-1), (x-1, y), (x+1, y), (x-1, y+1), (x, y+1), (x+1, y+1) around the target sky image pixel (x, y) are determined as neighboring image pixels of the target sky image pixel (x, y), and it is determined whether each of the eight neighboring image pixels is a sky image pixel. In the case where any neighboring image pixel is not a sky image pixel, the target sky image pixel is determined to be a sky edge, and the target sky image pixel is determined to be a target image pixel corresponding to the skyline, and then the next sky image pixel is traversed. In addition, it can be understood that if the currently traversed target sky image pixel is not a target image pixel corresponding to the skyline, the next sky image pixel is traversed. In one embodiment, Figure 6 As shown, Figure 6 A schematic diagram of a process for determining target image pixels provided by an embodiment of the present invention.

[0070] Step 1042: Generate a skyline in the initial image according to the skyline image pixels.

[0071] After traversing all the sky image pixels, the skyline image pixels in the initial image can be determined, and then the skyline can be generated in the initial image according to the skyline image pixels. Specifically, the skyline analysis device can set the pixel color of the skyline image pixels in the initial image to a third color, and determine the line segment formed by connecting the skyline image pixels as the skyline, wherein the third color can be set according to actual needs, for example, the third color can be red, etc. In one embodiment, Figure 7 As shown, Figure 7 A schematic diagram of a skyline determined from an initial image provided by an embodiment of the present invention.

[0072] As described above, an embodiment of the present invention provides a skyline analysis method. When determining the skyline, the embodiment of the present invention first takes a screenshot of the target scene currently displayed by the 3D earth engine to obtain an initial image, then modifies the background color of the sky in the 3D earth engine twice and captures the corresponding image to obtain a first image and a second image, and finally determines the skyline in the initial image according to the pixel color of the image pixel in the first image and the pixel color of the image pixel in the second image. The embodiment of the present invention determines the skyline by only analyzing and processing the image. In the process of determining the skyline, it does not rely on the map engine to provide the necessary interface. At the same time, the user does not need to have 3D scene processing experience. The technical threshold is low and the use conditions are loose. It is suitable for most occasions and solves the technical problem of strict use conditions when analyzing the skyline in the prior art.

[0073] The embodiment of the present invention also provides a skyline analysis device, such as Figure 8 As shown, Figure 8 A schematic diagram of the structure of a skyline analysis device provided in an embodiment of the present invention is provided. The skyline analysis device provided in an embodiment of the present invention includes:

[0074] The initial image acquisition module 201 is used to take a screenshot of the target scene currently displayed by the 3D earth engine to obtain an initial image.

[0075] The first image acquisition module 202 is used to set the background color of the sky in the 3D earth engine to a first color, take a screenshot of the target scene, and obtain a first image.

[0076] The second image acquisition module 203 is used to set the background color of the sky in the 3D earth engine to a second color, take a screenshot of the target scene, and obtain a second image, wherein the first color and the second color are different.

[0077] The skyline determination module 204 is configured to determine a skyline in the initial image based on pixel colors of image pixels in the first image and pixel colors of image pixels in the second image.

[0078] The skyline determination module 204 includes:

[0079] a skyline pixel determination submodule, for determining, in the initial image, skyline image pixels corresponding to the skyline based on pixel colors of image pixels in the first image and pixel colors of image pixels in the second image;

[0080] The skyline determination submodule is used to generate a skyline in the initial image based on the skyline image pixels.

[0081] Among them, the skyline pixel determination submodule includes:

[0082] a mapping pixel determination unit, for determining, in the first image and the second image, first mapping pixels and second mapping pixels corresponding to each image pixel in the initial image, respectively;

[0083] A sky pixel determination unit, configured to determine a sky image pixel corresponding to the sky among the image pixels according to the pixel color of the first mapping pixel and the pixel color of the second mapping pixel;

[0084] The target pixel determination unit is used to determine the target image pixel corresponding to the skyline in the initial image according to each sky image pixel and the neighboring image pixels around each sky image pixel.

[0085] Wherein, the sky pixel determination unit comprises:

[0086] A pixel traversal subunit, used to traverse each image pixel in turn;

[0087] A sky pixel determination subunit is used to determine, for a currently traversed target image pixel, whether the target image pixel is an image pixel corresponding to the sky according to a pixel color of a corresponding first mapping pixel and a pixel color of a corresponding second mapping pixel;

[0088] The sky pixel marking subunit is used to mark the target image pixel as a sky image pixel when the target image pixel is an image pixel corresponding to the sky, and continue to traverse the next image pixel.

[0089] The sky pixel determination subunit is specifically used to determine that the target image pixel is an image pixel corresponding to the sky when the pixel color of the corresponding first mapping pixel is the first color and the pixel color of the corresponding second mapping pixel is the second color.

[0090] Wherein, the target pixel determination unit includes:

[0091] A sky pixel traversal subunit, used for traversing each sky image pixel in the initial image in turn;

[0092] The neighboring pixel determination subunit is used to determine, for the currently traversed target sky image pixel, whether each neighboring image pixel around the target sky image pixel is a sky image pixel;

[0093] The skyline pixel determination subunit is used to determine the target sky image pixel as the target image pixel corresponding to the skyline when any neighboring image pixel is not a sky image pixel, and continue to traverse the next sky image pixel.

[0094] The skyline determination submodule is specifically used to set the pixel color of the skyline image pixels to the third color in the initial image, and determine the line segment formed by connecting the skyline image pixels as the skyline.

[0095] The skyline analysis method and apparatus provided in the embodiment of the present invention is included in a skyline analysis device and can be used to execute the skyline analysis method provided in the above embodiment, and has corresponding functions and beneficial effects.

[0096] It is worth noting that in the embodiment of the above-mentioned skyline analysis method device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0097] This embodiment also provides a skyline analysis device, such as Fig. 9 As shown, Fig. 9 A schematic diagram of the structure of a skyline analysis device provided in an embodiment of the present invention, the skyline analysis device 30 includes a processor 300 and a memory 301;

[0098] The memory 301 is used to store the computer program 302 and transmit the computer program 302 to the processor 300;

[0099] The processor 300 is configured to execute the steps in the above-mentioned skyline analysis method embodiment according to the instructions in the computer program 302 .

[0100] Exemplarily, the computer program 302 may be divided into one or more modules / units, one or more modules / units are stored in the memory 301, and are executed by the processor 300 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 302 in the skyline analysis device 30.

[0101] The skyline analysis device 30 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The skyline analysis device 30 may include, but is not limited to, a processor 300 and a memory 301. Those skilled in the art will appreciate that Fig. 9 The skyline analysis device 30 is merely an example and does not constitute a limitation on the skyline analysis device 30 . The skyline analysis device 30 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the skyline analysis device 30 may also include input and output devices, network access devices, buses, etc.

[0102] The processor 300 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0103] The memory 301 may be an internal storage unit of the skyline analysis device 30, such as a hard disk or memory of the skyline analysis device 30. The memory 301 may also be an external storage device of the skyline analysis device 30, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the skyline analysis device 30. Further, the memory 301 may also include both an internal storage unit of the skyline analysis device 30 and an external storage device. The memory 301 is used to store computer programs and other programs and data required by the skyline analysis device 30. The memory 301 may also be used to temporarily store data that has been output or is to be output.

[0104] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0105] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0106] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0107] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0108] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store computer programs.

[0109] An embodiment of the present invention further provides a storage medium containing computer executable instructions, which are used to perform a skyline analysis method when executed by a computer processor. The method includes the following steps:

[0110] Take a screenshot of the target scene currently displayed by the 3D Earth Engine to obtain an initial image;

[0111] The background color of the sky in the 3D Earth Engine is set to the first color, and a screenshot of the target scene is taken to obtain a first image;

[0112] The background color of the sky in the 3D Earth Engine is set to a second color, and a screenshot of the target scene is taken to obtain a second image, in which the first color and the second color are different;

[0113] A skyline is determined in the initial image based on pixel colors of image pixels in the first image and pixel colors of image pixels in the second image.

[0114] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the embodiments of the present invention are not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the embodiments of the present invention. Therefore, although the embodiments of the present invention are described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the embodiments of the present invention, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.

Claims

1. A skyline analysis method, characterized in that: The method comprises: Take a screenshot of the target scene currently displayed by the 3D Earth Engine to obtain an initial image; The background color of the sky in the 3D earth engine is set to a first color, and a screenshot of the target scene is taken to obtain a first image; Setting the background color of the sky in the 3D earth engine to a second color, taking a screenshot of the target scene to obtain a second image, wherein the first color and the second color are different; A skyline is determined in the initial image based on pixel colors of image pixels in the first image and pixel colors of image pixels in the second image.

2. The skyline analysis method according to claim 1, characterized in that: Determining the skyline in the initial image according to the pixel colors of the image pixels in the first image and the pixel colors of the image pixels in the second image comprises: determining, in the initial image, skyline image pixels corresponding to the skyline based on pixel colors of image pixels in the first image and pixel colors of image pixels in the second image; The skyline is generated in the initial image based on the skyline image pixels.

3. The skyline analysis method according to claim 2, characterized in that: Determining the skyline image pixels corresponding to the skyline in the initial image according to the pixel colors of the image pixels in the first image and the pixel colors of the image pixels in the second image includes: Determining, in the first image and the second image, respectively, a first mapped pixel and a second mapped pixel corresponding to each image pixel in the initial image; determining, among the image pixels, a sky image pixel corresponding to the sky based on the pixel color of the first mapped pixel and the pixel color of the second mapped pixel; According to each of the sky image pixels and neighboring image pixels around each of the sky image pixels, a target image pixel corresponding to the skyline is determined in the initial image.

4. The skyline analysis method according to claim 3, characterized in that: The step of determining a sky image pixel corresponding to the sky from among the image pixels according to the pixel color of the first mapping pixel and the pixel color of the second mapping pixel comprises: Traversing each of the image pixels in turn; For a currently traversed target image pixel, determining whether the target image pixel is an image pixel corresponding to the sky according to a pixel color of a corresponding first mapping pixel and a pixel color of a corresponding second mapping pixel; In the case that the target image pixel is an image pixel corresponding to the sky, the target image pixel is marked as a sky image pixel, and the traversal continues to the next image pixel.

5. The skyline analysis method according to claim 4, characterized in that: The step of determining whether the target image pixel is an image pixel corresponding to the sky according to the pixel color of the corresponding first mapping pixel and the pixel color of the corresponding second mapping pixel comprises: In a case where the pixel color corresponding to the first mapping pixel is the first color, and the pixel color corresponding to the second mapping pixel is the second color, the target image pixel is determined to be an image pixel corresponding to the sky.

6. The skyline analysis method according to claim 3, characterized in that: The step of determining, in the initial image, a target image pixel corresponding to the skyline according to each of the sky image pixels and adjacent image pixels around each of the sky image pixels comprises: Traversing each of the sky image pixels in the initial image in sequence; For the currently traversed target sky image pixel, determining whether each neighboring image pixel around the target sky image pixel is the sky image pixel; In the case that any one of the neighboring image pixels is not the sky image pixel, the target sky image pixel is determined as the target image pixel corresponding to the skyline, and the traversal continues to the next sky image pixel.

7. The skyline analysis method according to claim 2, characterized in that: Generating the skyline in the initial image according to the skyline image pixels comprises: In the initial image, the pixel colors of the pixels of the skyline image are set to a third color, and a line segment formed by connecting the pixels of the skyline image is determined as the skyline.

8. A skyline analysis device, characterized in that: The device comprises The initial image acquisition module is used to take a screenshot of the target scene currently displayed by the 3D earth engine to obtain an initial image; A first image acquisition module, used to set the background color of the sky in the 3D earth engine to a first color, take a screenshot of the target scene, and obtain a first image; A second image acquisition module, used to set the background color of the sky in the 3D earth engine to a second color, take a screenshot of the target scene, and obtain a second image, wherein the first color and the second color are different; The skyline determination module is configured to determine a skyline in the initial image based on pixel colors of image pixels in the first image and pixel colors of image pixels in the second image.

9. A skyline analysis device, characterized in that: The skyline analysis device includes a processor and a memory; The memory is used to store a computer program and transmit the computer program to the processor; The processor is configured to execute the skyline analysis method according to any one of claims 1 to 7 according to instructions in the computer program.

10. A storage medium storing computer executable instructions, characterized in that: The computer executable instructions are used to perform the skyline analysis method according to any one of claims 1 to 7 when executed by a computer processor.

Citation Information

Cited By

  • Skyline analysis method based on three-dimensional graphics simulation and storage medium

    CN121353575B