A Geographic Scene Recognition Method Based on Image Processing
Through edge detection, the method of dividing areas, evaluating reflective characteristics and dynamically setting the scale parameters of the Retinex algorithm, the limitations of the traditional multi-scale Retinex algorithm when removing the uneven light of remote sensing images in aquaculture areas are solved, and higher recognition accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202510481793.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-04-17
AI Technical Summary
The traditional multi-scale Retinex algorithm has limitations when removing uneven light in remote sensing images in aquaculture areas, and cannot be flexibly adjusted according to the lighting characteristics of different regions, affecting the accuracy and reliability of geographical scene recognition.
A geographic scene recognition method based on image processing is proposed. The image area is divided through edge detection, converted to the HSV color space, the reflection possibility and consistency are evaluated, the reflection comprehensive judgment coefficient is determined, and the adaptive scale parameters of the multi-scale Retinex algorithm are dynamically set to remove uneven light.
It realizes accurate light removal of remote sensing images in aquaculture areas, improves the accuracy and reliability of geographical scene recognition, and can better adapt to the lighting characteristics of different regions.
Smart Images

Figure CN119992351B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a geographical scene recognition method based on image processing. Background Art
[0002] In the work of geographic scene recognition in aquaculture areas, optical remote sensing has become a key means of obtaining images due to its unique advantages, providing important data support for large-scale aquaculture planning, resource assessment, etc. At present, the common geographic scene recognition process is to divide the regional contours with the help of edge detection algorithms after acquiring remote sensing images, and then perform feature matching for each area to achieve geographic scene recognition.
[0003] There are large areas of water in aquaculture areas. The reflection produced by the water surface will cause uneven lighting. Uneven lighting will cause the color, texture and other features of different areas of the remote sensing image to be distorted, resulting in deviations in geographic scene recognition based on these features, and it is impossible to accurately judge the type, layout and other information of the aquaculture area.
[0004] In the prior art, the multi-scale Retinex algorithm uses Gaussian functions with different standard deviations to perform convolution operations on images to obtain multi-scale images, separate the illumination component and the reflection component in each scale image, and then adjust the illumination component through the gain coefficient, thereby achieving the effect of removing uneven illumination and enhancing image contrast.
[0005] However, in practical applications, there are obvious limitations when using the traditional multi-scale Retinex algorithm to remove uneven illumination in remote sensing images of aquaculture areas. When performing convolution processing on an image, the entire image is operated each time according to a Gaussian function with a preset fixed standard deviation to obtain the corresponding scale image, which cannot be flexibly adjusted according to the illumination characteristics of different areas of the entire image. Due to the complexity of aquaculture scenes, the illumination conditions in different areas of the image vary greatly. This method of preset fixed standard deviations makes it difficult to accurately handle the problem of uneven illumination, which in turn affects the accuracy and reliability of subsequent geographic scene recognition. Summary of the invention
[0006] In order to solve the problem that the traditional multi-scale Retinex algorithm is difficult to accurately remove the uneven illumination in remote sensing images when performing geographic scene recognition in aquaculture areas, thereby affecting the accuracy of geographic scene recognition, the present invention proposes a geographic scene recognition method based on image processing, the method comprising:
[0007] Collect remote sensing images of aquaculture areas, divide them into multiple areas according to the edge detection results of the remote sensing images, and convert the remote sensing images from RGB color space to HSV color space;
[0008] Within each region, determine the specular reflection possibility of each pixel based on the brightness and saturation of each pixel, and evaluate the specular reflection consistency of the local range of each pixel; combine the specular reflection possibility of each pixel, the specular reflection consistency of the local range of each pixel, and the contrast of the region where each pixel is located to determine the comprehensive specular reflection determination coefficient of each pixel; compare the comprehensive specular reflection determination coefficient of each pixel with a preset comprehensive specular reflection determination coefficient threshold to determine the specular reflection pixels.
[0009] Based on the mean and dispersion degree of the comprehensive specular reflection determination coefficients of all pixels within each region, combine the number of specular reflection pixels within each region, and the brightness difference between each region and its surrounding regions to determine the specular reflection possibility of each region; compare the specular reflection possibility of each region with a preset specular reflection possibility threshold to determine the specular reflection regions.
[0010] Determine the density of each specular reflection region, and dynamically set the adaptive scale parameter of the multi-scale Retinex algorithm when processing each specular reflection region based on the density to remove the uneven illumination of the remote sensing image, and perform geographical scene recognition based on the remote sensing image after removing the uneven illumination.
[0011] This technical solution first performs preliminary preprocessing on the originally collected remote sensing image, divides the regions so that subsequent different processing can be carried out for different regions. The color space conversion provides a more suitable color representation for subsequent operations such as specular reflection possibility judgment, which is conducive to more accurately analyzing the illumination and color-related information in the image. Furthermore, based on the principle that specular reflection usually causes changes in pixel brightness and saturation, the specular reflection possibility is determined. Evaluating the specular reflection consistency of the local range can determine whether the specular reflection situation of this pixel is consistent with that of surrounding pixels, avoiding misjudgment caused by individual noise points. Combining these two factors and the regional contrast to determine the comprehensive specular reflection determination coefficient makes the judgment of specular reflection pixels more accurate and comprehensive. Furthermore, comprehensively considering the overall specular reflection degree trend of each region, the difference degree of the specular reflection situation of each region, and the illumination difference situation between each region and its surrounding environment, the specular reflection characteristics of each region are evaluated more comprehensively from multiple perspectives, so as to accurately determine the specular reflection regions. Furthermore, by dynamically setting the adaptive scale parameter, the algorithm can better adapt to the illumination characteristics of different regions, more precisely remove the uneven illumination, provide more reliable image data for subsequent geographical scene recognition, and thus improve the accuracy and reliability of geographical scene recognition.
[0012] Further, the method of dividing the remote sensing image into multiple regions according to the edge detection result of the remote sensing image is as follows: for any edge of the remote sensing image, using the contour tracking algorithm, starting from any edge pixel point of the edge, tracking along the edge in the clockwise or counterclockwise direction until returning to the starting point, obtaining a closed contour, and determining the range defined by the closed contour as a region.
[0013] This technical solution can accurately find and define regions with clear boundaries by tracking along the edges of the remote sensing image through the contour tracking algorithm. This method can separate different geographical features or target objects in the image, providing a basis for subsequent detailed analysis and processing of different regions.
[0014] Further, the light reflection possibility of each pixel point is determined based on the following formula:
[0015] ;
[0016] In the formula, is the light reflection possibility of the th pixel point, is the brightness of the th pixel point, is the saturation of the th pixel point, is the average brightness of all pixel points within the local range of the th pixel point, is the average brightness of all pixel points of the remote sensing image.
[0017] This technical solution takes into account the local and global brightness information of the entire image for each pixel point, can adapt to the differences in lighting conditions in different regions of the image, and can accurately judge the light reflection possibility of pixel points through relative brightness comparison and saturation information regardless of whether the region has strong or weak lighting, without being affected by changes in the overall lighting intensity.
[0018] Further, the light reflection consistency of the local range of each pixel point satisfies the following relational expression:
[0019] ;
[0020] In the formula, is the light reflection consistency of the local range of the th pixel point, is the total number of pixel points within the local range of the th pixel point, and are both the serial numbers of pixel points within the local range, is the The local range of the pixel The reflection possibility of each pixel, For the The local range of the pixel The reflection possibility of each pixel, For the The average of the reflection possibilities of all pixels within the local range of a pixel.
[0021] This technical solution calculates the reflection possibility of all pixels in the local range of each pixel by constructing an autocorrelation function, which can fully consider the relationship between each pixel and other pixels. It not only pays attention to the reflection possibility of a single pixel, but also captures the synergy and correlation between pixels in the local area in the form of an autocorrelation function.
[0022] Furthermore, the reflection comprehensive determination coefficient of each pixel point is determined based on the following formula:
[0023] ;
[0024] In the formula, For the The comprehensive reflection determination coefficient of each pixel point is: For the The contrast of the area where the pixel is located, For the The local reflective consistency of the pixels, For the The reflection possibility of each pixel.
[0025] This technical solution combines the reflection possibility of pixels, the reflection consistency of the local range and the contrast of the area where the pixels are located, comprehensively considering multiple factors that affect the reflection of pixels. It can accurately evaluate the degree of reflection of each pixel in the image, reducing the possibility of misjudgment and omission of reflective pixels.
[0026] Furthermore, before determining the comprehensive reflection determination coefficient of each pixel point, it also includes:
[0027] The reflection possibility of each pixel, the reflection consistency of the local range of each pixel, and the contrast of the area where each pixel is located are normalized so that the value is within Within the range.
[0028] Furthermore, the contrast of the area where each pixel is located is determined by:
[0029] The standard deviation of the brightness of all pixels in the area where each pixel is located is used as the contrast of the area where each pixel is located; alternatively, based on the brightness of all pixels in the area where each pixel is located, a brightness co-occurrence matrix of the area is obtained, and the method for obtaining the brightness co-occurrence matrix is the same as the method for obtaining the gray-level co-occurrence matrix; based on the brightness co-occurrence matrix, the contrast of the area is calculated, and the calculation process is the same as the calculation process for calculating the contrast of the area based on the gray-level co-occurrence matrix.
[0030] Further, the likelihood of specular reflection in each area is determined based on the following formula:
[0031] ;
[0032] In the formula, is the comprehensive specular reflection determination coefficient of the th area, is the mean value of the comprehensive specular reflection determination coefficients of all pixels in the th area, is the number of specular reflection pixels in the th area, is the degree of dispersion of the comprehensive specular reflection determination coefficients of all pixels in the th area, is the average brightness of the th area, is the mean value of the average brightness of all adjacent areas of the th area, is the natural exponential function; among them, the degree of dispersion of the comprehensive specular reflection determination coefficients of all pixels is determined based on the standard deviation of the comprehensive specular reflection determination coefficients of all pixels.
[0033] This technical solution comprehensively considers factors such as the mean value of the comprehensive specular reflection determination coefficients of pixels in the area, the number of specular reflection pixels, the degree of dispersion, and the difference in average brightness between the area and adjacent areas, comprehensively and meticulously measures the likelihood of specular reflection in the area, can accurately describe the specular reflection characteristics of the area from multiple dimensions, and avoids the limitations of single-factor judgment.
[0034] Further, the adaptive scale parameter of the multi-scale Retinex algorithm when processing each specular reflection area is dynamically set based on the following formula:
[0035] ; In the formula, is the adaptive scale parameter of the th specular reflection area, is the maximum value of the preset scale parameter, is the minimum value of the preset scale parameter, is the maximum value of the density of all specular reflection areas, is the minimum value of the density of all reflective regions, is the density of the th reflective region; the density of each reflective region is determined by the ratio of the number of reflective pixels in each reflective region to the number of all pixels in each reflective region.
[0036] This technical solution fully considers the differences in the density of different reflective regions. The obtained adaptive scale parameter enables the multi-scale Retinex algorithm to perform comprehensive illumination correction based on the reflective characteristics of different reflective regions in the image, avoiding the deficiencies of traditional methods and improving the processing effect of the reflective regions in remote sensing images.
[0037] Furthermore, the method for geographical scene recognition based on the remote sensing image after removing uneven illumination is as follows:
[0038] Feature extraction is performed on the remote sensing image after removing uneven illumination through an image feature extraction algorithm, and the extracted features are matched with a pre-constructed feature library of aquaculture geographical scenes to achieve the recognition of the geographical scene of the aquaculture area.
[0039] The present invention has the following effects:
[0040] Through the multi-dimensional fine analysis of each pixel and each region of the remote sensing image of the aquaculture area, the present invention can accurately identify reflective pixels and reflective regions, and then more precisely remove uneven illumination by dynamically setting the algorithm scale parameter, providing more reliable image data for subsequent geographical scene recognition, thereby improving the accuracy and reliability of geographical scene recognition. Description of the Drawings
[0041] Figure 1 is a schematic flowchart of the method of the present invention;
[0042] Figure 2 is a schematic flowchart of the method of step S3 of the present invention. Detailed Embodiments
[0043] Referring to Figure 1 , a geographical scene recognition method based on image processing provided by the present invention includes steps S1 - S5:
[0044] S1: Collect remote sensing images of the aquaculture area.
[0045] Preferably, a drone equipped with a high-resolution optical sensor is selected as the collection device, which can collect multiple remote sensing images of the aquaculture area with its flexible mobility to ensure coverage of the entire aquaculture area.
[0046] S2: Divide the remote sensing image into multiple regions according to the edge detection results of the remote sensing image.
[0047] For any remote sensing image, first make a backup to obtain a backup image. After grayscale processing the backup image, use the Canny algorithm for edge detection to obtain all the edges in the backup image, and determine all the edges of the original remote sensing image based on all the edges in the backup image.
[0048] Subsequently, apply the contour tracking algorithm. For example, the classic Suzuki contour tracking method. This method takes any edge pixel point of each edge of the remote sensing image as the starting point and continuously tracks along the edge in a clockwise or counterclockwise direction until it returns to the starting point to obtain a closed contour. By processing each edge of the entire remote sensing image, all the closed contours in the remote sensing image can be found, and each closed contour corresponds to a region in the remote sensing image.
[0049] S3: Determine the reflective region.
[0050] In the remote sensing image of the aquaculture area, in order to remove the influence of light on the image quality, it is necessary to determine which regions are reflective regions to improve the pertinence and accuracy of subsequent analysis. At the same time, to determine the reflective region, first, it is necessary to determine which pixel points are reflective pixel points (pixel points that may be in the reflective region). If a region contains more reflective pixel points, then the region is more likely to be a reflective region.
[0051] Based on this, perform the steps as Figure 2 shown below:
[0052] S31: Determine the reflectivity possibility of each pixel point using the brightness and color saturation of the remote sensing image.
[0053] In the aquaculture scenario, the reflective region usually has the characteristics of high brightness and low saturation. When light irradiates the object surface, it causes the region to appear bright. The light is mainly directly reflected by the light source and contains various wavelengths of light, similar to white light. And the color of the object itself is determined by the absorption and reflection of specific wavelengths of light. When the light is mixed with the color of the object itself, it will dilute the purity of the original color of the object, making the color look lighter and the saturation decrease.
[0054] Specifically, first convert the image from the RGB color space to the HSV color space, which can more directly obtain the brightness and saturation information of pixel points. This is very effective for identifying reflective regions with high brightness and low saturation characteristics. Then calculate the reflection possibility of each pixel point based on the brightness and saturation of each pixel point. Subsequently, analyze the reflection consistency in the local range of each pixel point. If a pixel point has a greater reflection possibility itself and the reflection consistency in its local range is also higher, it indicates that the pixel point is more likely to be in a reflective region.
[0055] In one embodiment, for each pixel point in any region, with this pixel point as the center, set the range of the surrounding pixel points as the local range of this pixel point. The size of this range is an empirical value and can be set by oneself.
[0056] Calculate the reflection possibility of each pixel point:
[0057]
[0058] In the formula, is the reflection possibility of the th pixel point. is the brightness of the th pixel point. The greater the brightness, the more likely it is to be in a reflective region. is the saturation of the th pixel point. The lower the saturation, the more likely it is to be in a reflective region. is the average brightness of all pixel points in the local range of the th pixel point. is the average brightness of all pixel points in the remote sensing image.
[0059] In this formula, acts as 's weight coefficient to adjust it. When the average brightness of the local range (including all pixel points) of the th pixel point is relatively large compared to the average brightness of the entire remote sensing image (including all pixel points), that is, is greater than , it indicates that the local range of the th pixel point is relatively bright, and the th pixel point is more likely to be affected by light. At this time, will be larger to highlight the potential reflective characteristics of the th pixel point. Conversely, when the average brightness of the local range (including all pixel points) of the th pixel point is relatively small compared to the average brightness of the entire remote sensing image (including all pixel points), that is, is less than , at this time, will be smaller to weaken the potential specular reflection characteristics of the
[0060] In summary, while considering the influence of light on pixel points, comparing the local range of pixel points with the overall image highlights the influence of light non-uniformity on pixel points in different regions. When the local range is brighter relative to the overall image, it indicates that the local area is greatly affected by light. Since the brightness information of both local and global areas is considered, it can adapt to the complex and changeable light conditions in the image. Whether in areas with strong or weak overall light, the specular reflection possibility of pixel points can be accurately judged through relative brightness comparison and saturation information.
[0061] S32: Determine the specular reflection consistency of the local range of each pixel point by constructing an autocorrelation function.
[0062] Since the specular reflection area is a region composed of continuous pixel points, the pixel points in this region will exhibit similar specular reflection characteristics, which means that the brightness change patterns of the pixel points in this region are consistent. Therefore, the stronger the consistency of the specular reflection possibility of the pixel points within the local range of a certain pixel point, the more consistent the brightness change patterns of the pixel points within the local range of this pixel point, indicating that this pixel point is more likely to be in the specular reflection area.
[0063] In one embodiment, the autocorrelation function of all pixel points within the local range of each pixel point is constructed based on the specular reflection possibility of all pixel points within the local range as:
[0064]
[0065] In the formula, is the specular reflection consistency of the local range of the th pixel point, that is, the function value of the autocorrelation function. The larger it is, the more consistent the specular reflection possibility of all pixel points within the local range of the th pixel point. All pixel points within the local range have bright characteristics, and the th pixel point is more likely to be in the specular reflection area. is the total number of pixel points within the local range of the th pixel point. and are both the serial numbers of pixel points within this local range. is the specular reflection possibility of the th pixel point within the local range of the th pixel point. is the th pixel point within the local range of the The specular reflection possibility of each pixel is the mean value of the specular reflection possibilities of all pixels within the local range of the th pixel.
[0066] This formula calculates by pairwise combination of the specular reflection possibilities of all pixels within the local range, comprehensively considering the relationship between each pixel and other pixels. It not only focuses on the specular reflection possibility of a single pixel but also captures the synergy and correlation between pixels within the local area in the form of an autocorrelation function, and can well reflect the characteristics of the specular reflection area.
[0067] S33: Quantify the contrast of the area where each pixel is located.
[0068] Visually, the specular reflection area often presents a relatively uniform bright spot, lacking obvious bright-dark contrast and showing the characteristic of low contrast. Therefore, the contrast of the area can be determined by the brightness values of the pixels in each area.
[0069] In one embodiment, one method for obtaining the contrast of each area is:
[0070] Obtain the brightness (V-channel value) of each pixel in each area, and take the standard deviation of the brightness of all pixels as the contrast of the area. The standard deviation is an index in statistics used to measure the degree of dispersion of a set of data. The essence of the contrast reflects the brightness difference between different areas in the image. When the standard deviation of the brightness values of all pixels in a certain area is large, it means that the distribution of the brightness values of all pixels in this area is relatively dispersed, that is, the greater the possibility of having pixels with different brightness, and the higher the contrast.
[0071] In one embodiment, another method for obtaining the contrast of each area is:
[0072] Obtain the brightness of each pixel in each area, and calculate the brightness co-occurrence matrix of each area in the way of calculating the gray-level co-occurrence matrix. The difference between the brightness co-occurrence matrix and the gray-level co-occurrence matrix is only that one is based on the gray value of the pixel and the other is based on the brightness of the pixel.
[0073] Calculate the contrast of the area based on the brightness co-occurrence matrix of each area (the method is the same as the method for calculating the contrast based on the gray-level co-occurrence matrix):
[0074]
[0075] In this formula, is the contrast of the area where the th pixel is located, represents at a distance of and an angle of Under the condition of In the area where the and The frequency of the combination of pixel points with and Both are lightness (V-channel value).
[0076] For areas with texture features, methods similar to the gray-level co-occurrence matrix can better capture the contrast changes brought by the texture. In the aquaculture scenario, the texture on the surface of aquaculture facilities, the ripples on the water surface, etc. will make the lightness of pixel points show a specific distribution pattern. The co-occurrence matrix can capture this change pattern and accurately calculate the contrast of each area.
[0077] S34: Calculate the comprehensive reflection determination coefficient of each pixel point, and determine the reflective pixel points according to the size of the comprehensive reflection determination coefficient.
[0078] First, perform normalization operations on the contrast of the area where each pixel point is located, the reflection possibility of each pixel point, and the reflection consistency of the local range of each pixel point, so that the values are all within The interval is convenient for subsequent comparison and calculation.
[0079] In one embodiment, the comprehensive reflection determination coefficient of each pixel point is calculated based on the following formula:
[0080]
[0081] In this formula, Is the comprehensive reflection determination coefficient of the th pixel point, Is the contrast of the area where the th pixel point is located, Is the reflection consistency of the local range of the th pixel point, Is the reflection possibility of the th pixel point.
[0082] If a pixel point has a greater reflection possibility, and the reflection consistency between this pixel point and each pixel point within its local range is stronger, it indicates that this pixel point is more likely to be in the reflective area. At the same time, if the contrast of the area where this pixel point is located is smaller, it further increases the possibility that this pixel point is in the reflective area. Combining these indicators, the comprehensive reflection determination coefficient of each pixel point is obtained.
[0083] In one embodiment, the method for determining reflective pixel points according to the size of the comprehensive reflection determination coefficient of each pixel point is: directly set the threshold of the comprehensive reflection determination coefficient to 0.8 (empirical value), and use the pixel points greater than 0.8 as reflective pixel points.
[0084] In one embodiment, another method for determining the specular pixel points according to the magnitude of the comprehensive specular determination coefficient of each pixel point is as follows:
[0085] Based on the Otsu method, automatically find a threshold to divide the data in the image into two categories. In one category, all the data is less than this threshold, and in the other category, all the data is greater than this threshold.
[0086] Specifically: construct a histogram based on the comprehensive specular determination coefficients of all pixel points in each region. The abscissa of the histogram is the value range of the comprehensive specular determination coefficients of all pixel points, and the ordinate is the number of pixel points corresponding to each comprehensive specular determination coefficient. Use the Otsu method to segment the histogram to obtain the optimal segmentation threshold of the comprehensive specular determination coefficient, and take the pixel points with the comprehensive specular determination coefficient greater than the optimal segmentation threshold as specular pixel points.
[0087] In summary, by first preliminarily calculating the specular possibility of each pixel point, and then using the autocorrelation function to further verify the specular consistency of other pixel points within the local range of each pixel point, and taking into account the contrast of the region where each pixel point is located, the specular pixel points can be determined more accurately, excluding some misjudgments caused by isolated outliers or noise, so that the finally determined specular pixel points are more reasonable and rigorous.
[0088] S35: Determine the specular region according to the characteristics of the specular pixel points included in each region.
[0089] First, based on the mean value and dispersion degree of the comprehensive specular determination coefficients of all pixel points in each region, combined with the number of specular pixel points in each region, and the brightness difference between each region and the surrounding regions, determine the specular possibility of each region. Compare the specular possibility of each region with a preset specular possibility threshold to determine the specular region.
[0090] In one embodiment, the specular possibility of each region is determined based on the following formula:
[0091]
[0092] In the formula, is the comprehensive specular determination coefficient of the th region. The larger the value, the more likely this region is a specular region. is the mean value of the comprehensive specular determination coefficients of all pixel points in the th region, reflecting the average level of the comprehensive specular determination coefficients of all pixel points in this region. The larger it is, the more likely this region is a specular region. is the The number of reflective pixel points in an area. The more reflective pixel points in an area, the more likely that area is an actual reflective area rather than a small area formed by scattered noise points. is the degree of dispersion of the comprehensive reflection determination coefficients of all pixel points in the th area, that is, the standard deviation of the comprehensive reflection determination coefficients of all pixel points. The smaller it is, the more consistent the reflection characteristics of all pixel points in the th area are, and the more likely it is a real reflective area. When is 0, it means that the comprehensive reflection coefficients of all pixel points in the th area are exactly the same, which is an ideal situation for a reflective area. To avoid a zero denominator, add 1 to is the average brightness of the th area, that is, the mean value of the brightness of all pixel points in the is the mean value of the average brightness of all adjacent areas of the is the natural exponential function.
[0093] In this formula, when is greater than , the th area is brighter than the surrounding areas. is a value greater than 1, which will greatly increase the possibility that the th area is a reflective area. For example, if the current area is a reflective area, its average brightness is usually higher than the average brightness of the surrounding non-reflective areas. Through this exponential term, the positive impact of this brightness difference on reflection determination can be effectively highlighted. When is less than , the th area is less bright than the surrounding areas. is a value less than 1, which will reduce the possibility that the th area is a reflective area.
[0094] If the average level of the comprehensive reflection determination coefficients of all pixel points in a certain area is higher, and the standard deviation of the comprehensive reflection determination coefficients is very small. At the same time, if there are more reflective pixel points in this area and this area is brighter than the surrounding areas, then this area is more likely to be a reflective area.
[0095] In one embodiment, the method of comparing the reflection possibility of each area with a preset reflection possibility threshold to determine the reflective area is as follows: Set the threshold of the comprehensive reflection determination coefficient of all areas to 0.9, regard the areas greater than 0.9 as reflective areas, and regard those less than or equal to 0.9 as non-reflective areas.
[0096] S4: Dynamically set the scale parameter of each reflective region when performing the Retinex algorithm according to the density of different reflective regions to remove the uneven illumination of the remote sensing image.
[0097] The traditional Retinex algorithm convolves the image with a Gaussian function with a preset fixed standard deviation to simulate the visual perception of the human eye, analyze the image, and separate the illumination and reflection components. When the preset standard deviation is small (such as ), the result obtained by the convolution of the Gaussian function retains the rich high-frequency detail information in the image, can reflect the fine features such as object texture and edges, corresponding to the detail scale of the image; when the preset standard deviation is large (such as ), the convolution result of the Gaussian function can retain the low-frequency information and pay more attention to the overall brightness distribution of the image, which is used to capture the large-scale illumination changes. Then, for each scale image obtained after convolution, specific arithmetic processing is performed to separate the illumination component and the reflection component of the image. Subsequently, operations such as gain and offset are performed on the illumination component to improve the uneven illumination of the image and enhance the contrast.
[0098] Therefore, first obtain the value range of the scale parameter of the Retinex algorithm, and use the ratio of the number of reflective pixel points in each region to the number of all pixel points in the reflective region as the density of the region.
[0099] Then, dynamically set the adaptive scale parameter of the multi-scale Retinex algorithm when processing each reflective region based on the density:
[0100]
[0101] In the formula, is the adaptive scale parameter of the th reflective region, is the maximum value of the preset scale parameter, is the minimum value of the preset scale parameter, is the maximum value of the density of all reflective regions, is the minimum value of the density of all reflective regions, is the density of the th reflective region.
[0102] In this formula, This part means normalizing the density of the th reflective region.
[0103] When , that is, when the density of the th reflective region reaches the maximum value, at this time , which means that for the most intensive reflective area, a smaller scale parameter is selected because the lighting anomalies in the more intensive reflective area may be more complex and require fine capture of local lighting changes. A smaller scale parameter can better retain the high-frequency details of the image and can accurately process complex lighting.
[0104] When is the minimum value of the intensity of the th reflective area, at this time , which means that for the least intensive reflective area, a larger scale parameter is selected. The lighting changes in the less intensive reflective area are relatively simple. A larger scale parameter can, while ensuring the effect of removing uneven lighting, pay attention to the overall brightness distribution of the image and improve the algorithm execution efficiency because there is no need for overly fine processing of details.
[0105] As gradually increases from to , that is, the larger is, the smaller the value of (gradually approaching 0 from 1), and the value of will also be smaller (decreasing from ), which realizes the inverse correlation between the scale parameter and the intensity of the reflective area, meets the requirement of dynamically selecting different scale parameters for different reflective areas, and realizes the adaptive scale parameter of the Retinex algorithm when processing different reflective areas. That is, for the highly intensive reflective area, a smaller scale parameter is selected because its lighting anomalies may be more complex, and a smaller scale parameter is selected to more finely capture local lighting changes; for the less intensive reflective area, the principle of selecting a relatively larger scale parameter is adopted to improve the algorithm execution efficiency while ensuring the effect of removing uneven lighting.
[0106] Through this operation, it is possible to dynamically, scientifically and reasonably select appropriate scale parameters according to the specific situation of each reflective area to better execute the multi-scale Retinex algorithm. This dynamic and adaptive method enables the algorithm to automatically select appropriate processing methods according to the characteristics of different regions in the image, rather than operating on the entire image with fixed parameters, improving the adaptability and robustness of the algorithm to various different lighting conditions and image contents, and being able to more accurately remove uneven lighting and enhance the contrast and quality of the image.
[0107] S5: Conduct geographical scene recognition based on the remotely sensed image after removing uneven lighting.
[0108] Pre-construct a feature library of the aquaculture geographical scene:
[0109] Multi-source data acquisition: Remotely sensed images of the current aquaculture area under different seasons and weather conditions are collected in advance, and the geometric features of each type of ground object are recorded, such as the size, perimeter, shape, type, etc. of aquaculture facilities, and the spatial features of each type of ground object are recorded, such as the distribution location of aquaculture facilities.
[0110] Feature extraction: The reflectance values of each type of ground object in multiple bands are extracted and normalized as the spectral features of each type of ground object. The gray-level co-occurrence matrix (GLCM) is used to calculate the texture parameters of the corresponding area of each type of ground object, such as the entropy value of the gray-level co-occurrence matrix, as the surface texture feature of each type of ground object.
[0111] Feature vector construction and storage: The geometric features, spatial features, spectral features, and surface texture features of each type of ground object are integrated into a feature vector, and each feature vector corresponds to a type of ground object.
[0112] Extract the features of each area in the remotely sensed image to be recognized currently and compare with the feature library:
[0113] In the remotely sensed image to be recognized currently, each area corresponds to a possible type of ground object. For each area, according to the method when constructing the feature library, the spectral features, spatial features, spectral features, and surface texture features of this area are extracted and integrated into the feature vector of this area.
[0114] Feature matching to complete geographical scene recognition:
[0115] Calculate the Euclidean distance between the feature vector of each area and the feature vectors of each type of ground object in the feature library. The smaller the Euclidean distance, the higher the feature similarity. If the feature vector of the th area has the smallest Euclidean distance from the feature vector of the rd type of ground object in the feature library, then it is determined that the type of ground object corresponding to the th area is the rd type of ground object. This operation is performed on each area of the remotely sensed image to be recognized, realizing geographical scene recognition based on remotely sensed images.
Claims
1. A geographic scene recognition method based on image processing, characterized in that: include: Collect remote sensing images of aquaculture areas, divide them into multiple areas according to the edge detection results of the remote sensing images, and convert the remote sensing images from RGB color space to HSV color space; In each area, the reflection possibility of each pixel is determined according to the brightness and saturation of each pixel, and the reflection consistency of the local range of each pixel is evaluated; the reflection comprehensive determination coefficient of each pixel is determined in combination with the reflection possibility of each pixel, the reflection consistency of the local range of each pixel, and the contrast of the area where each pixel is located; the reflection comprehensive determination coefficient of each pixel is compared with a preset reflection comprehensive determination coefficient threshold to determine the reflective pixel; Based on the mean and discreteness of the reflection comprehensive determination coefficient of all pixels in each area, combined with the number of reflective pixels in each area, and the brightness difference between each area and the surrounding areas, the reflection possibility of each area is determined. The formula is: , For the Reflective potential in each area, For the The mean value of the comprehensive reflection determination coefficient of all pixels in the area, For the The number of reflective pixels in an area, For the The discrete degree of the reflection comprehensive determination coefficient of all pixels in the area, For the The average brightness of the area, For the The average brightness of all adjacent areas of an area, is a natural exponential function; comparing the reflective possibility of each area with a preset reflective possibility threshold to determine the reflective area; Determine the density of each reflective area, where the density of each reflective area is determined by the ratio of the number of reflective pixels in each reflective area to the number of all pixels in each reflective area; The adaptive scale parameters of the multi-scale Retinex algorithm when processing each reflective area are dynamically set based on the density to remove the uneven illumination of the remote sensing image, and geographic scene recognition is performed based on the remote sensing image after the uneven illumination is removed.
2. The geographic scene recognition method based on image processing according to claim 1, characterized in that: The method of dividing the remote sensing image into multiple regions based on the edge detection results is: For any edge of the remote sensing image, the contour tracking algorithm is used, with any edge pixel point of the edge as the starting point, and the edge is tracked in a clockwise or counterclockwise direction until it returns to the starting point to obtain a closed contour, and the range determined by the closed contour is taken as a region.
3. The geographic scene recognition method based on image processing according to claim 1, characterized in that: The reflectivity of each pixel is determined based on the following formula: ; In the formula, For the The reflection possibility of each pixel, For the The brightness of a pixel, For the The saturation of each pixel, For the The average brightness of all pixels in the local range of pixels, is the mean brightness of all pixels in the remote sensing image.
4. The method for geographic scene recognition based on image processing according to claim 1, characterized in that: The reflective consistency of the local range of each pixel satisfies the following relationship: ; In the formula, For the The local reflective consistency of the pixels, For the The total number of pixels within the local range of pixels, and are the serial numbers of the pixels within the local range. For the The local range of the pixel The reflection possibility of each pixel, For the The local range of the pixel The reflection possibility of each pixel, For the The average of the reflection possibilities of all pixels within the local range of pixels.
5. The method for geographic scene recognition based on image processing according to claim 1, characterized in that: The comprehensive reflection determination coefficient of each pixel is determined based on the following formula: ; In the formula, For the The comprehensive reflection determination coefficient of each pixel point is: For the The contrast of the area where the pixel is located, For the The local reflective consistency of the pixels, For the The reflection possibility of each pixel.
6. The method for geographic scene recognition based on image processing according to claim 1, characterized in that: Before determining the comprehensive reflection determination coefficient of each pixel point, it also includes: The reflection possibility of each pixel, the reflection consistency of the local range of each pixel, and the contrast of the area where each pixel is located are normalized so that the value is within Within the range.
7. The method for geographic scene recognition based on image processing according to claim 5, characterized in that: The contrast of each pixel area is determined as follows: The standard deviation of the brightness of all pixels in the area where each pixel is located is used as the contrast of the area where each pixel is located; alternatively, the brightness co-occurrence matrix of the area is obtained based on the brightness of all pixels in the area where each pixel is located, and the method for obtaining the brightness co-occurrence matrix is consistent with the method for obtaining the grayscale co-occurrence matrix; the contrast of the area is calculated based on the brightness co-occurrence matrix, and the calculation process is consistent with the calculation process of calculating the contrast of the area based on the grayscale co-occurrence matrix.
8. The method for geographic scene recognition based on image processing according to claim 5, characterized in that: The degree of dispersion of the reflection comprehensive determination coefficient of all pixel points is determined based on the standard deviation of the reflection comprehensive determination coefficient of all pixel points.
9. The method for geographic scene recognition based on image processing according to claim 1, characterized in that: The dynamic setting of the adaptive scale parameters of the multi-scale Retinex algorithm when processing each reflective area is based on the following formula: ; In the formula, For the Adaptive scale parameters of reflective areas, is the maximum value of the preset scale parameter, is the minimum value of the preset scale parameter, is the maximum value of the density of all reflective areas, is the minimum density of all reflective areas, For the The density of the reflective area.
10. The method for geographic scene recognition based on image processing according to claim 1, characterized in that: The method for geographic scene recognition based on remote sensing images after removing uneven illumination is: The image feature extraction algorithm is used to extract features from the remote sensing image after removing the uneven illumination, and the extracted features are matched with the pre-constructed feature library of aquaculture geographical scenes to realize the recognition of the geographical scenes of the aquaculture area.
Citation Information
Patent Citations
Highly reflective metal surface character recognition method based on deep learning
CN117275010A
Bridge detection image recognition method and system based on artificial intelligence
CN118823481A