A method, system, device and medium for generating ground image of airport ground model
By extracting ground scratches and dirty trace features from satellite images, and superimposing them onto the map of the airport ground model, the problem of insufficient generation of ground scratches and dirty trace images in the prior art is solved, and efficient and real simulation effects are achieved.
Patent Information
- Application Number
- CN202510165703.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-02-14
AI Technical Summary
The prior art is difficult to achieve highly realistic effects when generating ground scratches and dirty images in flight simulators, resulting in insufficient expressiveness of these defects in the simulated picture and relying on manual modeling, which is time-consuming and labor-intensive.
By selecting the area with ground scratches and dirty traces from the satellite image as the representative image area, the color range is determined, and each pixel is traversed for feature matching, a mask image is generated, and the matching scratches and dirty trace images are extracted, and the transparency adjustment is performed and superimposed on the map of the airport ground model.
It realizes efficient, authentic, diverse and non-repeat simulation of ground scratches and dirty traces, significantly improving the visual effect and training quality of the visual system in the flight simulator, and improving the accuracy of flight environment assessment.
Smart Images

Figure CN119672159B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing of flight simulators, and in particular relates to a method, system, device and medium for generating a ground image of an airport ground model. Background Art
[0002] In the simulation process of the flight simulator visual system, the simulation of ground scratches and dirt is of vital importance in areas such as pilot training and flight environment assessment. Accurately restoring subtle visual defects in the ground environment, such as road cracks, ground stains, and scratches on vehicle or aircraft ground equipment, not only significantly improves the realism and immersion of the visual system, but also enhances the overall realism of the flight simulator. The accurate presentation of these details can help pilots more effectively identify and respond to various complex ground conditions that may be encountered in actual flight during training, thereby improving their operating skills and emergency response capabilities.
[0003] However, existing technical solutions usually use artificially drawn texture layer templates of dirty and scratch details, and then splice these textures by means of scaling, repeating, randomization, etc., and then overlay them on the ground layer of the airport model, with the effect as follows: Figure 6 As shown in the figure, this method has the following disadvantages: the artificially drawn scratches and dirt marks are difficult to completely restore the complex effects of natural scratches and dirt marks, making them visually unrealistic and difficult to achieve realistic simulation effects; the scratches and dirt marks generated by this method appear too uniform and lack sufficient diversity, thus appearing to be single in form; in addition, this method relies on manual modeling to draw the texture of dirt marks and scratches, which is labor-intensive and very time-consuming. Image processing algorithms often find it difficult to achieve highly realistic effects when simulating subtle scratches and dirt marks, resulting in insufficient expression of these defects in the simulation screen. This not only affects the authenticity of training, but also limits the accuracy of flight environment assessment. In addition, with the continuous increase in demand for flight simulators, the requirements for the restoration of ground environment details are also increasing, and a new processing method is urgently needed. Summary of the invention
[0004] In order to overcome the problems existing in the prior art, the present invention provides a method, system, device and medium for generating a ground image of an airport ground model, which are used to overcome the current defects.
[0005] A method for generating a ground image of an airport ground model, used in a visual system of a flight simulator, the method comprising the steps of:
[0006] S1. Selecting an area with ground scratches and dirt from a given satellite image as a representative image area, selecting a color as a set feature for the representative image area, and determining a color range based on the set feature and the corresponding sensitivity;
[0007] S2. traverse each pixel of the representative image area, and perform feature matching on whether the pixel value of each pixel is within the color range, thereby generating a mask image;
[0008] S3. Extracting and matching the given satellite image according to the mask image to generate an image including scratches and dirt on the ground;
[0009] S4. Processing the image including the scratches and dirt on the ground and superimposing it on the map of the airport ground model to obtain a ground image of the airport ground model.
[0010] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein S1 includes:
[0011] S11. Select N areas including ground scratches and dirt from a given or input satellite image as representative color areas, where N is a positive integer;
[0012] S12. Using color as a setting feature for the representative color region and determining the sensitivity corresponding to the color;
[0013] S13. Calculating the weighted average color value of the representative color area according to the color feature;
[0014] S14. Determine a color range according to the color weighted average value and sensitivity.
[0015] According to the above aspects and any possible implementation, an implementation is further provided, wherein S2 specifically includes: S21. traversing each pixel of the image of the representative area;
[0016] S22. Determine whether the RGB channel value of each pixel is within the color range;
[0017] S23. If the RGB channel value is within the color range, the recognition result of the pixel is recorded as 1, otherwise, the recognition result of the pixel is recorded as 0;
[0018] S24. Generate a binary mask image based on the recognition result of S23.
[0019] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein S3 specifically includes: fitting the mask image with the given satellite image, and judging whether to retain the pixel value of the given satellite image according to the value of the mask image, specifically: if the pixel value of the mask image is 1, retaining the pixel value of the given satellite image at the corresponding position; if the pixel value of the mask image is 0, setting the pixel value of the given satellite image at the corresponding position to black, and finally generating an image including scratches and dirt on the ground.
[0020] According to the aspects described above and any possible implementation method, an implementation method is further provided, wherein S4 specifically includes: adjusting the transparency of the image including ground scratches and dirt and superimposing it on the map of the airport ground model to obtain a ground image of the airport ground model.
[0021] According to the above aspects and any possible implementations, an implementation is further provided, wherein the color is represented by the change of RGB channel values of each pixel in the representative color area and the mutual superposition.
[0022] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the color range is represented by an upper limit value and a lower limit value of the color.
[0023] The present invention also provides a method and device for generating a ground image of an airport ground model, wherein the device is used to implement the method, and comprises the following modules:
[0024] A selection module, for selecting an area with ground scratches and dirt from a given satellite image as a representative image area, selecting a color as a set feature for the representative image area, and determining a color range according to the set feature and a corresponding sensitivity;
[0025] A feature matching module is used to traverse each pixel of the representative image area and perform feature matching on whether the pixel value of each pixel is within the color range, thereby generating a mask image;
[0026] An extraction and matching region module is used to extract and match the given satellite image according to the mask image to generate an image including scratches and dirt on the ground;
[0027] A generation module is used to process the image including ground scratches and dirt marks and then superimpose it on the map of the airport ground model to obtain a ground image of the airport ground model.
[0028] The present invention further provides an electronic device, comprising:
[0029] A memory storing executable instructions;
[0030] A processor is used to execute the executable instructions in the memory to implement the method.
[0031] The present invention also provides a computer storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method described.
[0032] Beneficial effects of the present invention
[0033] The method for generating a ground image of an airport ground model of the present invention is used in a visual system of a flight simulator, and the method comprises the following steps: selecting an area with ground scratches and dirt from a given satellite image as a representative image area, selecting a color as a set feature for the representative image area, and determining a color range according to the set feature and the corresponding sensitivity; traversing each pixel of the representative image area, and performing feature matching on whether the pixel value of each pixel is within the color range, thereby generating a mask image; extracting and matching the given satellite image according to the mask image to generate an image including ground scratches and dirt; processing the image including ground scratches and dirt and superimposing it on a map of an airport ground model to obtain a ground image of the airport ground model. The method has the following beneficial effects: 1) The method extracts complex and diverse scratch and stain features in a natural environment from a satellite image with complex characteristics of real scratches and dirt, and these features are highly random and diverse in form and distribution, and accurately reflect the natural state of the scratches and dirt. Compared with the simple and repetitive patterns generated by manual modeling, this method effectively avoids the monotony problem caused by texture repetition and improves the realistic simulation of scratches and stains.
[0034] 2) This method automatically identifies ground scratches and dirt features from satellite images, does not rely on manual modeling, avoids the time-consuming process of manual modeling, significantly reduces the workload of manual modeling, improves work efficiency, and reduces dependence on human resources, thereby greatly reducing the workload and time of modeling. The present invention uses satellite image extraction technology combined with transparency adjustment to cover the airport ground model map, achieving efficient, realistic, diverse and non-repetitive simulation of ground scratches and dirt, greatly improving the visual effect and training quality of the visual system in the flight simulator, and improving the accuracy of flight environment assessment, with significant beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is a flow chart of the method of the present invention;
[0036] Figure 2 Example diagram of a given satellite image selected for the present invention;
[0037] Figure 3 A schematic diagram of a representative color region obtained by the present invention;
[0038] Figure 4 A schematic diagram of an image including scratches and dirt;
[0039] Figure 5 To adjust the transparency effect map;
[0040] Figure 6 A ground layer diagram of an airport model obtained by manual drawing in the prior art;
[0041] Figure 7 A ground image diagram of an airport ground model generated by the present invention. DETAILED DESCRIPTION
[0042] In order to better understand the technical solution of the present invention, the content of the present invention includes but is not limited to the specific implementation methods described below, and similar technologies and methods should be considered to be within the scope of protection of the present invention. In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments.
[0043] It should be clear that the embodiments described in the present invention are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] The present invention provides a method for generating a ground image of an airport ground model, which is used in a visual system of a flight simulator. The method comprises the following steps:
[0045] S1. Selecting an area with ground scratches and dirt from a given satellite image as a representative image area, selecting a color as a set feature for the representative image area, and determining a color range based on the set feature and the corresponding sensitivity;
[0046] S2. traverse each pixel of the representative image area, and perform feature matching on whether the pixel value of each pixel is within the color range, thereby generating a mask image;
[0047] S3. Extracting and matching the given satellite image according to the mask image to generate an image including scratches and dirt on the ground;
[0048] S4. Processing the image including ground scratches and dirt marks and superimposing it on the map of the airport ground model to obtain a ground image of the airport ground model.
[0049] Preferably, the S1 includes:
[0050] S11. Select N areas including ground scratches and dirt from a given or input satellite image as representative color areas, where N is a positive integer;
[0051] S12. Using color as a setting feature for the representative color region and determining the sensitivity corresponding to the color;
[0052] S13. Calculating the weighted average color value of the representative color area according to the color feature;
[0053] S14. Determine a color range according to the color weighted average value and sensitivity.
[0054] Preferably, the S2 specifically includes: S21. traversing each pixel of the image of the representative area;
[0055] S22. Determine whether the RGB channel value of each pixel is within the color range;
[0056] S23. If the RGB channel value is within the color range, the recognition result of the pixel is recorded as 1, otherwise, the recognition result of the pixel is recorded as 0;
[0057] S24. Generate a binary mask image based on the recognition result of S23.
[0058] Preferably, S3 specifically includes: fitting the mask image with the given satellite image, and judging whether to retain the pixel value of the given satellite image according to the value of the mask image, specifically: if the pixel value of the mask image is 1, retaining the pixel value of the given satellite image at the corresponding position; if the pixel value of the mask image is 0, setting the pixel value of the given satellite image at the corresponding position to black, and finally generating an image including scratches and dirt on the ground.
[0059] Preferably, S4 specifically includes: adjusting the transparency of the image including ground scratches and dirt marks and superimposing it on the map of the airport ground model to obtain a ground image of the airport ground model.
[0060] Preferably, the color is represented by the change of RGB channel values of each pixel in the representative color area and the mutual superposition.
[0061] Preferably, the color range is represented by an upper limit value and a lower limit value of the color.
[0062] Specifically, if Figure 1 As shown, the specific steps of the present invention are as follows:
[0063] Set the features and sensitivity, that is, detect and extract ground scratches and dirt features from a given satellite image (i.e., original image). The given satellite image can be of conventional 18-level or higher high precision, as long as it is a common material in the 3D scene modeling process. Ground scratches and dirt features are long and continuous lines caused by aircraft tires when emergency braking on the runway or taxiway. They appear at the turn of the taxiway or near the parking position. They are formed by the tires rubbing against the ground when the aircraft turns at low speed. They are formed on runways, taxiways, parking positions and their surrounding areas, especially on frequently used paths.
[0064] The user selects N different types of ground scratches and dirt feature areas on a given satellite image as representative color areas, and finally generates a representative color, which can be a collection of multiple representative colors. That is, for scratches and dirt on a satellite image, there can be multiple representative colors at the same time, and N representative ground colors are selected as features. The processing methods of these representative colors are exactly the same, and each color corresponds to a subsequent mask image. (These mask images can be directly superimposed on the airport ground model). The diversity of ground scratch features can be controlled by controlling the number of feature colors. If only one feature color is selected, there will only be one type of scratch and dirt; if N are selected, there will be multiple types of scratches and dirt. The more feature colors are selected, the more realistic the scratches and dirt generated will be. Therefore, the present invention uses color as a feature for illustration, and regional histograms, stamps, etc. can also be set as features. Color is one of the main features of human perception of images, and color information is intuitive and easy to understand. Color features can be extracted directly from pixel values without the need for complex feature modeling, with high computational efficiency, and are suitable for processing large-scale satellite images. Scratches and dirt form a sharp contrast with the surrounding areas in color. Therefore, the use of color features can quickly reflect the abnormal areas where these scratches and dirt are located. By adjusting the color space and color range, it can adapt to different types of scratch and dirt detection needs. In addition, color-based algorithms are simple to implement, easy to debug and optimize, and suitable for rapid development and deployment. Given a satellite image such as Figure 2 As shown, it is a satellite image of a local airport area, which mainly includes runways, taxiways, aprons, terminals and jet bridges, surrounding roads, vehicles, aircraft, as well as ground markings, signs, ground scratches and dirt marks, etc.
[0065] Select representative ground colors as features: The purpose of selecting representative colors is to distinguish ground areas from non-ground areas. Through these color features, features such as ground scratches and dirt can be more accurately identified.
[0066] For example, in a partial airport satellite image, based on the visual characteristics of the ground material, scratches and dirt, the user can select i representative colors out of N representative colors as matching colors for the scratches and dirt on the ground. The i representative colors refer to the colors of the area with the largest area occupying the entire airport ground, and i is a positive integer.
[0067] For the convenience of illustration or explanation, the present invention chooses i to be 1, that is, the processing method is described by one color, and the subsequent formulas are all calculation formulas for one color feature. When for multiple colors, the calculation method is the same as i=1, only the i value is different.
[0068] Any representative color can be written in the following general form:
[0069] (1)
[0070] in, a vector of RGB values representing the selected color, is the horizontal and vertical coordinates of the selected color; Represents the red, green, and blue channel values of the selected color. In digital image processing, color is usually represented by a combination of RGB (red, green, and blue) channels. The color of each pixel can be represented by an RGB three-dimensional vector, where:
[0071] R (Red): represents the intensity of the red channel, with a value range of 0-255;
[0072] G (Green): represents the intensity of the green channel, with a value range of 0-255;
[0073] B (Blue): Indicates the intensity of the blue channel, with a value range of 0-255.
[0074] The combination of RGB determines the color of the pixel. For example:
[0075] Pure red: R=255, G=0, B=0;
[0076] Color is the result of the change and superposition of RGB channel values. By adjusting the values of R, G, and B, various color combinations can be generated.
[0077] Will As the RGB value vector of the selected representative color, assume that the pixel coordinates of the selected color are ( ), calculate the 10*10 area centered on the point (the effect of selecting the area is as follows Figure 3 The RGB values of all pixels in the area are shown in Figure 2. The coordinates of each pixel point in the area are , and take a weighted average. These weighted average colors will serve as the basis for subsequent color matching.
[0078] For the jth pixel in the 10*10 area and The distance between , the calculation formula is as follows
[0079] (2)
[0080] To prevent distance When the weight is zero, The constant 1 is added to the calculation formula, and the specific calculation is:
[0081] (3)
[0082] In this way, in the subsequent weighted average calculation, the pixels closer to the center point have a greater impact on the result.
[0083] Calculate the RGB weighted average:
[0084]
[0085]
[0086] (4)
[0087] That is, the pixel value after weighted average in the area is The weighted average value is calculated for all pixels in the 10*10 area, rather than the weighted average RGB value calculated for a single pixel. It is used as the representative color of the entire 10*10 area and as the benchmark for subsequent color matching.
[0088] In the above formula (4), Represent the values of the red, green, and blue channels of the j-th pixel in the region respectively.
[0089] , , Represents the weighted average color value of the red, green, and blue channels respectively.
[0090] is the weight of the j-th pixel.
[0091] The above weighted average value is calculated by the weighted average of the RGB values of all pixels in the entire 10*10 area. The weighted value of each pixel is determined by its distance from the center point. The closer the pixel is to the center point, the greater the weight, and the farther the pixel is from the center point, the smaller the weight.
[0092] In formula (4), n represents the total number of pixels in a 10*10 area. The present invention takes a 10*10 area as an example, so n is a maximum of 100. However, the size of the area is adjustable. The effect of generating scratches can be improved by adjusting the area. For example, if the area is changed to 5*5 or 20*20, n = 25 or 400. The role of n is to ensure that all pixels participate in the calculation of the weighted average.
[0093] The aforementioned 10*10 refers to the pixel unit, not the area. That is to say, the selected area is a rectangular area containing 10 rows and 10 columns of pixels, which contains a total of 100 pixels. The present invention takes the 10*10 area as an example because the scratches and dirt in the image usually have local characteristics, that is, their characteristics (such as color, texture, etc.) are relatively consistent in a small range. By selecting a 10*10 standard area, it is possible to focus on the local area of the scratches or dirt, avoid introducing too much background information, and thus more accurately extract the target features. Secondly, in satellite images, noise may exist in the form of a single pixel. By calculating the weighted average in the 10*10 area, the influence of random noise can be effectively smoothed out and the overall color characteristics can be highlighted. Therefore, the present invention selects the 10*10 area as a standard local range, which is convenient for calculating and analyzing local features, and at the same time will not be too large to increase the calculation complexity, nor too small to effectively capture the color characteristics in the area. Figure 3 This is an example image showing a 10*10 region selected with pixel i (the selected representative color) as the center and its features. These three regions mainly contain features that tend to be brown, yellow, and gray, and these three colors are the main colors of ground scratch features.
[0094] Through the above method and steps, the ground color features can be accurately extracted, calculated and matched to effectively identify scratches and dirt on the ground. Color features refer to the RGB value of the color. For example, scratches are usually gray or yellow, and their RGB is the RGB value of gray and yellow.
[0095] The color range is defined by the maximum and minimum values of each channel range and the sensitivity setting:
[0096] The specific calculation formula for the maximum value or upper limit of each channel range is as follows:
[0097]
[0098]
[0099] (5)
[0100] The specific calculation formula for the minimum value or lower limit of each channel range is as follows:
[0101]
[0102]
[0103] (6)
[0104] in: The meaning of the function is: take the maximum value of A and B; The meaning of the function is: take the minimum value of A and B;
[0105] : Represents the red channel sensitivity parameter, which is used to determine the tolerance of color matching;
[0106] : Represents the green channel sensitivity parameter, which is used to determine the tolerance of color matching;
[0107] : Represents the blue channel sensitivity parameter, which is used to determine the tolerance of color matching.
[0108] and The lower and upper limits of the red channel value range for the selected color;
[0109] and The lower and upper limits of the green channel value range for the selected color;
[0110] and The lower and upper values of the blue channel value range of the selected color.
[0111] The above three channel boundary values are combined to represent:
[0112]
[0113]
[0114] in: The lower bound vector for selecting the color, representing the minimum value of the red, green, and blue channels.
[0115] The upper bound vector for selecting colors, representing the maximum values of the red, green, and blue channels.
[0116] Depend on , This binary value defines the color range that is used to determine the tolerance for color matching.
[0117] , and The sensitivity calculation formula is as follows:
[0118]
[0119]
[0120] (7)
[0121] In formula (7), k is a coefficient set according to actual needs, with a value range of [0,1], which is used to adjust , and The larger the k value, the , and The larger the k value is, the higher the tolerance for color matching is; when the k value is smaller, , and The smaller the value, the smaller the tolerance for color matching.
[0122] In the feature extraction process, the latitude and longitude information of the satellite image needs to be retained at all times. The given satellite image used in the present invention is stored in GeoTIFF format, which embeds geographic coordinate information, including the latitude and longitude of each pixel, so that the latitude and longitude information of the satellite image can be effectively retained and utilized.
[0123] The above is the case where i=1 when i representative colors are selected. Based on the same calculation, when i takes other values other than 1, the calculation and processing methods are also the same. The color range of all representative colors can be obtained by using the above processing procedure. Therefore, the cases of all N representative colors can be calculated.
[0124] The present invention takes the threshold method as an example to illustrate the feature matching algorithm, and feature matching can also be performed using algorithms such as histogram matching, stamp matching, and machine learning.
[0125] Using each selected color range of all N colors calculated in step 1, each pixel in a given satellite image is judged to see whether its color is within the set color range. Here, i=1 is still used as an example.
[0126] Iterate over each pixel of a given satellite image , according to the pixel value Determine whether its color is within any selected color range and generate a binary mask image ,This image is used to determine the scratch and dirt areas that need to be extracted. Each pixel (x m ,y m), the pixel value is calculated as: (8)
[0127] Each pixel in a given satellite image will be binarized to 0 or 1 depending on whether its color falls within the specified range. The value of 1 indicates the area to be extracted, and the value of 0 indicates the area to be ignored.
[0128] 3. Extract matching area
[0129] Using a binary mask image From a complete given satellite image including information such as ground scratches and dirt Extract the matching area and generate the original scratch and dirt image. In this step, first read the original image and the binary mask image , according to the binary mask image The value 1 and 0 of determines whether to retain the pixel value of the original image. The specific operation is: the binary mask image is exactly the same size as the given satellite image (i.e., the original image), and the two have the same resolution (i.e., the same number of pixels in width and height), and each pixel (x m ,y m ) in the binary mask image, which corresponds to the position in the original image. The purpose of the binary mask image is to mark which pixels belong to the area that needs to be extracted (such as scratches and dirt). The binary mask image itself is a black and white image. The pixels with a value of 1 (white) in the binary mask image represent the area that needs to be retained, corresponding to the scratches or dirt in the original image. The pixels with a value of 0 (black) in the mask image represent the background or irrelevant area, corresponding to the part that needs to be ignored in the original image. Therefore, the binary mask image is "covered" or fitted on the original image and processed pixel by pixel: If a pixel point (x m ,y m ) is 1, then the pixel (x m ,y m ) corresponds to the pixel value of the position; if a pixel point (x m ,y m ) is 0, the pixel value of the position in the given satellite image is set to black. Therefore, after the given satellite image is processed as above, the output image only retains the scratched and dirty areas, and the rest is set to black, that is, the image containing scratches and dirty marks after the original image is processed. ,like Figure 4 The processed image shown in the figure shows only the extracted scratch and dirty areas, while other areas are made transparent using transparency processing, indicating that the background or irrelevant parts have been removed.
[0130] for Each coordinate point (x I ,y I ), which is calculated as follows:
[0131] (9)
[0132] Adjusting the original scratched and dirty image The transparency of the map is set to 0 and it is overlaid on the airport ground model map without scratches and dirt effects. You can modify the original scratch and dirty image first. The transparency of the image is then superimposed on the airport ground model map, so that the airport ground model can be displayed while also vaguely showing dirt and scratches on the ground, thereby improving the precision and realism of the ground model. In the process of adjusting the value of its Alpha channel, the transparency can be changed. The Alpha value range is [0, 1], 0 means completely transparent, and 1 means completely opaque. The adjustment of transparency depends on the needs of the application scenario: the higher the transparency, the more obvious the scratches and dirty areas are, and their details can be more highlighted; the lower the transparency, the more hidden the scratches and dirty areas are, and the overall texture effect of the ground model can be more highlighted. The present invention preferably sets the transparency to 0.5 to maintain the clarity of the ground model while displaying the details of scratches and dirty marks.
[0133] Since the latitude and longitude information of the given satellite image is retained during the feature extraction process, in this step, it is only necessary to correctly superimpose the scratch and dirty images with adjusted transparency onto the airport ground model map at the corresponding latitude and longitude coordinates. That is, the superimposed image is an enhanced airport ground model map containing detailed information of scratches and dirt. Since the scratched and dirty areas are seamlessly integrated with the background of the original airport ground model map, the obtained image is visually closer to the appearance of the real airport ground.
[0134] Compared with the existing method which usually relies on manually drawing texture layer templates of dirt and scratch details, and then splicing these textures by means of scaling, repeating, randomizing, etc., and then overlaying them on the ground layer of the airport model, the processing method of the present invention ensures the accuracy of the generated image in terms of geographical location, so that it can correctly reflect the distribution of scratches and dirt in the real world.
[0135] To make the original scratched and dirty image To better integrate with the airport ground model map, the original scratch and dirty images need to be adjusted The transparency alpha, such as Figure 5 The figure shows the adjustment of transparency of the extracted original scratch and dirt image to generate an image with adjusted transparency. ,image For every point (x b ,y b ) is calculated as follows:
[0136]
[0137] in:
[0138] The extracted scratch and dirt images are at point (x b ,y b ) is the pixel value at .
[0139] is the airport ground model image at point (x b ,y b ) is the background pixel value at .
[0140] Alpha is the transparency parameter, ranging from .
[0141] Through the above steps and calculation methods, the generated image not only retains the characteristics of scratches and dirt, but also can be naturally integrated into the airport ground model, realizing the accurate reproduction of the distribution of scratches and dirt in the real world. Figure 7 The following is the effect of scratches and dirt after applying this method. Figure 6 is generated based on existing technology, compared to Figure 6 , Figure 7 The ground has obvious random dirt and scratches, which makes it look more natural and real.
[0142] For multiple feature colors (such as ) cases, The generation method is as follows:
[0143] ,That middle The maximum value is N. This formula represents that for N color feature calculation methods, the matching areas extracted by N feature colors are set to have transparency respectively and then superimposed on the airport ground model map without scratches and dirt effects. superior.
[0144] As an embodiment disclosed by the present invention, the present invention also discloses a method and device for generating a ground image of an airport ground model. The device is used to implement the method, and includes the following modules:
[0145] A selection module, for selecting an area with ground scratches and dirt from a given satellite image as a representative image area, selecting a color as a set feature for the representative image area, and determining a color range according to the set feature and a corresponding sensitivity;
[0146] A feature matching module is used to traverse each pixel of the representative image area and perform feature matching on whether the pixel value of each pixel is within the color range, thereby generating a mask image;
[0147] An extraction and matching region module is used to extract and match the given satellite image according to the mask image to generate an image including scratches and dirt on the ground;
[0148] A generation module is used to process the image including ground scratches and dirt marks and then superimpose it on the map of the airport ground model to obtain a ground image of the airport ground model.
[0149] As an embodiment disclosed in the present invention, the present invention further discloses an electronic device, the electronic device comprising:
[0150] A memory storing executable instructions;
[0151] A processor is used to execute the executable instructions in the memory to implement the method described in the present invention.
[0152] As an embodiment disclosed in the present invention, the present invention further discloses a computer storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method described in the present invention.
[0153] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0154] The above description shows and describes several preferred embodiments of the present invention, but as mentioned above, it should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the application concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not depart from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. A method for generating a ground image of an airport ground model, used in a visual system of a flight simulator, characterized in that: The method comprises the steps of: S1. Selecting an area with ground scratches and dirt from a given satellite image as a representative image area, selecting a color as a set feature for the representative image area, and determining a color range according to the set feature and the corresponding sensitivity, including: S11. Select N areas including ground scratches and dirt from a given or input satellite image as representative image areas, where N is a positive integer; S12. Using color as a setting feature for the representative image area and determining the sensitivity corresponding to the color; S13. Calculating the weighted average color value of the representative image area according to the color feature; S14. Determine a color range according to the color weighted average and sensitivity, wherein the color is represented by a change in the RGB channel value of each pixel in the representative image area and by superposition thereof; S2. Traverse each pixel in the representative image area and perform feature matching on whether the pixel value of each pixel is within the color range, thereby generating a mask image, specifically including: S21. Traversing each pixel of the image of the representative image area; S22. Determine whether the RGB channel value of each pixel is within the color range; S23. If the RGB channel value is within the color range, the recognition result of the pixel is recorded as 1, otherwise, the recognition result of the pixel is recorded as 0; S24. Generate a binary mask image from the recognition result of S23; S3. Extracting and matching the given satellite image according to the mask image to generate an image including scratches and dirt on the ground; S4. Processing the image including ground scratches and dirt marks and superimposing it on the map of the airport ground model to obtain a ground image of the airport ground model.
2. The method according to claim 1, characterized in that The S3 specifically includes: fitting the mask image with the given satellite image, and judging whether to retain the pixel value of the given satellite image according to the value of the mask image, specifically: if the value of a certain pixel point in the mask image is 1, retaining the pixel value of the given satellite image at the position corresponding to the pixel point; if the value of a certain pixel point in the mask image is 0, setting the pixel value of the given satellite image at the position corresponding to the pixel point to black, and finally generating an image including scratches and dirt on the ground.
3. The method according to claim 1, characterized in that The S4 specifically includes: adjusting the transparency of the image including the scratches and dirt on the ground and superimposing it on the map of the airport ground model to obtain the ground image of the airport ground model.
4. The method according to claim 1, characterized in that: The color range is represented by an upper limit value and a lower limit value of the color.
5. A method and device for generating a ground image of an airport ground model, characterized in that: The device is used to implement the method described in any one of claims 1 to 4, and includes the following modules: A selection module, for selecting an area with ground scratches and dirt from a given satellite image as a representative image area, selecting a color as a set feature for the representative image area, and determining a color range according to the set feature and a corresponding sensitivity; A feature matching module is used to traverse each pixel of the representative image area and perform feature matching on whether the pixel value of each pixel is within the color range, thereby generating a mask image; An extraction and matching region module is used to extract and match the given satellite image according to the mask image to generate an image including scratches and dirt on the ground; A generation module is used to process the image including ground scratches and dirt marks and then superimpose it on the map of the airport ground model to obtain a ground image of the airport ground model.
6. An electronic device, characterized in that: The electronic device comprises: a memory storing executable instructions; and a processor executing the executable instructions in the memory to implement the method according to any one of claims 1 to 4.
7. A computer storage medium, characterized in that: The medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Pottery model texture repairing method, system, equipment and medium
CN117853375A
Image processing method and device, electronic equipment and storage medium
CN119360362A