Water body image detection method and device based on SAR image data
By obtaining histogram features from SAR image data to correct segmentation parameters, the accuracy problem of water body image detection in different regions and environments was solved, and more accurate water body image segmentation was achieved.
Patent Information
- Application Number
- CN202410392596.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-02
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-04-02
AI Technical Summary
Existing water body image detection methods based on SAR image data have poor accuracy when dealing with different regions and environments.
By obtaining the histogram features of the initial image, the initial segmentation parameters are corrected to obtain the second segmentation parameters. The second segmentation parameters are then used to segment the initial image to ensure the accuracy of the segmentation results.
It improves the accuracy of water body image detection, adapts to image features in different regions and environments, and reduces errors caused by inherently set segmentation thresholds.
Smart Images

Figure CN118365667B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and particularly relates to a water body image detection method and device based on SAR image data. BACKGROUND
[0002] Water resources are the material basis for the survival of organisms and the material guarantee for the production of human society. How to quickly and accurately obtain water distribution information is of great significance to any country.
[0003] At present, in the process of water resource monitoring, a radar is generally used to collect images of a target area, and a water body part in the collected images is obtained, so as to realize detection of the water body image. The radar used to collect images is generally a synthetic aperture radar (SAR), that is, the detection of the water body image is generally based on SAR image data collected by the synthetic aperture radar. However, in actual application, the current water body image detection method based on SAR image data only directly segments the image by using a preset segmentation threshold after the SAR image data is collected, so as to obtain the water body image. This makes the detection method have a large error when facing SAR image data of different regions and different environments, and thus the accuracy of the detection result is poor. SUMMARY
[0004] Embodiments of the present application provide a water body image detection method and device based on SAR image data, and the main purpose is to realize a water body image detection method based on SAR image data, so as to solve the problem of poor accuracy of the detection result in the current water body image detection process based on SAR image data.
[0005] To solve the above technical problems, embodiments of the present application provide the following technical solutions:
[0006] In a first aspect, the present application provides a water body image detection method based on SAR image data, which comprises:
[0007] An initial image is obtained, and a first segmentation parameter is determined based on the initial image, wherein the initial image is obtained after normalization of SAR image data;
[0008] A histogram feature of the initial image is obtained, and the first segmentation parameter is corrected based on the histogram feature to obtain a second segmentation parameter, wherein the histogram feature is used to represent characteristics of a pixel value distribution of each pixel point in the initial image;
[0009] segment the initial image based on the second segmentation parameter to obtain a segmented image, and determine the segmented image as the water body image.
[0010] In a second aspect, the present application provides a water body image detection device based on SAR image data, the device comprising:
[0011] an acquisition unit configured to acquire an initial image and determine a first segmentation parameter based on the initial image, wherein the initial image is obtained by performing a normalization operation on SAR image data;
[0012] a correction unit configured to acquire a histogram feature of the initial image and correct the first segmentation parameter based on the histogram feature to obtain a second segmentation parameter, wherein the histogram feature is used to represent characteristics of pixel value distribution of each pixel point in the initial image;
[0013] a segmentation unit configured to segment the initial image based on the second segmentation parameter to obtain a segmented image, and determine the segmented image as the water body image.
[0014] In a third aspect, the present application provides a storage medium comprising a stored program, wherein the program, when executed, controls a device in which the storage medium is located to perform the water body image detection method based on SAR image data according to the first aspect.
[0015] In a fourth aspect, the present application provides a water body image detection device based on SAR image data, the device comprising a storage medium and one or more processors, the storage medium being coupled to the processor, the processor being configured to execute program instructions stored in the storage medium; the program instructions, when executed, perform the water body image detection method based on SAR image data according to any one of the first aspect.
[0016] By means of the above technical solutions, the technical solutions provided by the present application have at least the following advantages:
[0017] The application provides a water body image detection method and device based on SAR image data. The application can first acquire an initial image, and determine a first segmentation parameter based on the initial image, wherein the initial image is obtained by normalizing SAR image data; then, histogram features of the initial image are acquired, and the first segmentation parameter is corrected based on the histogram features to obtain a second segmentation parameter, wherein the histogram features are used to represent characteristics of pixel value distribution of each pixel point in the initial image; finally, the initial image is segmented based on the second segmentation parameter to obtain a segmented image, and the segmented image is determined as the water body image, thereby realizing the water body image detection function based on SAR image data. Compared with the prior art, in the water body image detection process based on SAR image data in the application, the differences in histogram features of different images can be considered, and the first segmentation parameter is corrected to obtain the second segmentation parameter. This can ensure that the segmentation parameter can be corrected based on the histogram features of the image when facing different initial images in different regions and different environments, so that the accuracy of the segmentation result will not be affected by the inherent set segmentation threshold. Therefore, the segmentation parameter can be corrected based on the characteristics of the image in the water body image detection process, that is, the second segmentation parameter is used for correction, so that the segmented water body image is more accurate than the water body image segmented by the uncorrected segmentation threshold, thereby solving the problem of poor accuracy of the segmentation result in the prior art.
[0018] The above description is only a summary of the technical solutions of the application. In order to more clearly understand the technical means of the application, the application can be implemented according to the content of the specification, and in order to make the above and other purposes, characteristics and advantages of the application more obvious and easy to understand, the following specific embodiments of the application are described. BRIEF DESCRIPTION OF DRAWINGS
[0019] The above and other objects, features and advantages of the exemplary embodiments of the application will be more apparent from the following detailed description taken in conjunction with the accompanying drawings, in which several embodiments of the application are shown by way of example, and in which the same or corresponding elements are referred to by the same or corresponding reference numerals, in which:
[0020] Figure 1 A flow chart of a water body image detection method based on SAR image data provided by an embodiment of the application is shown;
[0021] Figure 2 A flow chart of another water body image detection method based on SAR image data provided by an embodiment of the application is shown;
[0022] Figure 3This illustration shows a schematic diagram of the fitting function during the execution process of a water body image detection method based on SAR image data provided in an embodiment of this application;
[0023] Figure 4 This paper shows a block diagram of a water body image detection device based on SAR image data provided in an embodiment of this application;
[0024] Figure 5 This paper illustrates a block diagram of another water body image detection device based on SAR image data provided in an embodiment of this application. Detailed Implementation
[0025] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.
[0026] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.
[0027] This application provides a flowchart of a water body image detection method based on SAR image data, as shown in the embodiments below. Figure 1 As shown, the method includes:
[0028] 101. Obtain an initial image and determine the first segmentation parameters based on the initial image.
[0029] The initial image is obtained by normalizing SAR image data.
[0030] In this embodiment, when water body image detection is required, SAR image data is first collected from a certain area using radar equipment based on the method in this step. This data is then processed into a corresponding initial image. In this process, the collected SAR image data is normalized to obtain the initial image. In this image, the pixel value of each pixel is projected to a pixel value range. For example, when the pixel value range is (0-255), the maximum value of all pixel values in the initial image cannot exceed 255. This ensures that the subsequent image segmentation process avoids the problem of excessively complex segmentation and inconvenient calculation caused by excessive differences in pixel values.
[0031] After the initial image is determined, the first segmentation parameter of the image needs to be determined next, which can be understood as a preliminary determined segmentation value. Generally, the first segmentation parameter can be determined based on the maximum difference between clusters of pixel points of pixels, for example, the first segmentation parameter can be the pixel value corresponding to the maximum inter-class variance of image pixel values calculated based on the Otsu method. The Otsu algorithm, also known as the maximum inter-class variance method, is an algorithm for determining the threshold value of image binarization segmentation. This method divides the image into foreground (target) and background two parts by calculating the gray scale distribution characteristics of the image. The goal of the Otsu algorithm is to find a threshold value that maximizes the inter-class variance between the two parts, and the greater the inter-class variance, the greater the difference between the foreground and the background, thereby minimizing the probability of misclassification. The principle of the Otsu algorithm involves calculating the inter-class variance, where it is assumed that there is a threshold value that divides the image pixels into two classes, and the mean value of each class, the global mean value, and the probability of pixels being divided into the two classes are known. By traversing all possible threshold values, the threshold value that maximizes the inter-class variance is found, which is the best segmentation threshold value.
[0032] 102. Obtain a histogram feature of the initial image, and correct the first segmentation parameter based on the histogram feature to obtain a second segmentation parameter.
[0033] The histogram feature is used to represent the characteristics of the pixel value distribution of each pixel point in the initial image.
[0034] As can be seen from the foregoing steps, the first segmentation parameter is determined based on the difference between the clusters of pixel values of the pixel points. Although it can reflect the difference between the water body and the non-water body to some extent, in actual application, if there are multiple water body regions, that is, multiple clusters exist, the first segmentation parameter determined in the above manner cannot distinguish the multiple water bodies well, thereby affecting the accuracy of the final water body image detection. In this embodiment, the first segmentation parameter is corrected by using the histogram feature, and the histogram feature can represent the distribution of pixel values of the pixel points, that is, it can consider the distribution characteristics of pixel values of different water body regions when multiple water body regions exist. Therefore, based on this condition, the second segmentation parameter can be better adapted to the current image condition.
[0035] 103. Segment the initial image based on the second segmentation parameter to obtain a segmented image, and determine the segmented image as the water body image.
[0036] When the second segmentation parameter is determined, since the second segmentation parameter can better adapt to the current initial image, that is, the distribution of the pixel values in the current initial image is considered, so that the initial image is segmented based on the second segmentation parameter, part of the segmented image is the water body region, and the other part is the non-water body region, so that the water body image detection based on SAR image data is realized. It should be noted that since the water body is imaged, the pixel value of the water body may be low, so the region formed by the pixel points lower than the second segmentation parameter in this step can be determined as the water body image.
[0037] Based on this, the embodiment provides a water body image detection method based on SAR image data. Compared with the prior art, in the water body image detection process in the present application, the difference between the histogram features of different images can be considered, and the first segmentation parameter is corrected to obtain the second segmentation parameter, which can ensure that the initial image in different regions and different environments can be corrected based on the histogram features of the image when the segmentation parameter is segmented, so that the accuracy of the segmentation result will not be affected by the inherent set segmentation threshold. Therefore, it can be ensured that the segmentation parameter can be corrected based on the characteristics of the image during the water body image detection process, that is, the second segmentation parameter is used for correction, which makes the segmented water body image more accurate than the water body image segmented by the uncorrected segmentation threshold, and solves the problem of poor accuracy of the segmentation result in the prior art.
[0038] Further, as a further description and refinement of the foregoing embodiment, the present application also provides a water body image detection based on SAR image data, as shown in Figure 2
[0039] 201. An initial image is obtained, and a first segmentation parameter is determined based on the initial image.
[0040] The initial image is obtained by normalizing SAR image data.
[0041] Specifically, in this step, the process of obtaining the initial image can be specifically as follows:
[0042] SAR image data of a target region is collected, and a preset processing is performed on the SAR image data to obtain corresponding SAR intensity image data, wherein the preset processing at least includes radiation scaling operation, multi-view operation and geographic coding operation;
[0043] The SAR intensity image data is processed according to a normalization algorithm to obtain the initial image.
[0044] In the embodiment, the SAR image data can be understood as raw data collected based on synthetic aperture radar. The SAR image data is acquired based on radar technology and can measure phase information of a target. The phase information can be used to measure height, shape, motion and other parameters of the target, and is often used in ground surface deformation monitoring, ground surface elevation modeling, river water level monitoring and the like. The SAR sensor can receive echo signals in multiple polarization modes, such as horizontal polarization, vertical polarization, horizontal-vertical polarization and the like. Polarization information is often used in ground object classification, land cover classification, ice and snow cover monitoring and the like. Since the SAR image data has various parameters as described above, it needs to be processed by the method of the step after being collected. The preset processing generally includes radiation scaling operation, multi-view operation and geographic coding operation. Thus, the processed data is SAR intensity image data with display effect intensity. In order to facilitate subsequent image recognition and segmentation, the SAR intensity image data obtained is also processed according to a normalization algorithm. The normalization algorithm can be understood as an algorithm for projecting multiple intensity parameters into a certain range. Specifically, the processing process of the algorithm can be as follows: assuming that the SAR intensity image data pixel value needs to be normalized to an initial image with a value range of [0, N], the following formula can be used:
[0045]
[0046] wherein F(x) is the original pixel value x of a pixel point in the SAR intensity image data after normalization, N is the maximum value of the normalized pixel value, which is used to determine the range of the normalized pixel value (0 to N), max(x) is the maximum pixel value before normalization of the pixel point, and min(x) is the minimum pixel value before normalization of the pixel point.
[0047] In this way, after the original pixel value is normalized, the larger pixel value range can be limited within a user-controllable range, thereby ensuring that the subsequent processing process is more convenient.
[0048] After the initial image is determined, an “initial” segmentation parameter, i.e., a first segmentation parameter, can be confirmed based on the initial image. As described in the foregoing embodiment, the first segmentation parameter can be determined by the Otsu algorithm, i.e., based on inter-class variance. Thus, the parameter required for segmentation, i.e., the first segmentation parameter, is determined based on the difference between the pixel values of the water body part and the non-water body part.
[0049] 202. Obtain a histogram feature of the initial image, and correct the first segmentation parameter based on the histogram feature to obtain a second segmentation parameter.
[0050] The histogram feature is used to represent the distribution characteristics of the pixel values of the pixel points in the initial image.
[0051] Specifically, the step can be performed as follows:
[0052] The pixel value feature of each pixel point in the initial image is determined based on the pixel value distribution information of the pixel point, and a histogram feature corresponding to the pixel value feature is determined based on a preset mapping relationship. The first segmentation parameter is corrected based on the histogram feature, and a second segmentation parameter is obtained. The pixel value feature is used to represent the change trend of the pixel value of the pixel point in the initial image. The preset mapping relationship includes a histogram feature corresponding to each pixel value feature.
[0053] Since different initial images contain different contents, the distribution of the pixel values of the pixel points in the initial images is also different. For example, when there are multiple water areas and a single water area in two images, the distribution of the pixel values of the two images is different. If the first segmentation parameter is used as the basis for confirming the water body image, some water bodies may be classified as non-water bodies due to small inter-class variance, thereby affecting the accuracy of the detection result.
[0054] Therefore, in order to ensure the accuracy of subsequent water body image detection, in the embodiment, the corresponding histogram feature is determined from the preset mapping relationship by using the pixel value feature of the pixel point, and the first segmentation parameter is corrected based on the histogram feature to obtain the second segmentation parameter. The pixel value feature can be understood as reflecting the distribution of the pixel values of the pixel points, specifically, the distribution characteristics of the pixel values in the entire image, represented by the change trend and amplitude of the pixel values. The preset mapping relationship can be understood as the relationship between the histogram features and the pixel value features of images containing different water body distribution situations summarized by analyzing a large number of initial images containing water body parts, and the relationship is used as the preset mapping relationship. Therefore, when the pixel value feature of the pixel points of the initial image is determined in the step, the histogram feature corresponding to the initial image can be determined based on the preset mapping relationship.
[0055] Further, in some cases, the pixel value feature can specifically include a peak-valley feature; the peak-valley feature is used to represent the distribution characteristics of the pixel value waveform diagram formed by the pixel values of the pixel points; the peak-valley feature includes at least one of a single-peak feature, a double-peak feature, and a multi-peak feature; the histogram feature specifically includes a segmentation correction factor; the segmentation correction factor is obtained by deriving the pixel values of each pixel point of a preset image based on a preset fitting function.
[0056] The preset mapping relationship includes a single-peak feature corresponding segmentation correction factor, a double-peak feature corresponding segmentation correction factor and a multi-peak feature corresponding segmentation correction factor.
[0057] Based on this, the pixel value feature of each pixel point in the initial image is determined based on the pixel value distribution information, the histogram feature corresponding to the pixel value feature is determined based on the preset mapping relationship, the first segmentation parameter is corrected based on the histogram feature, and the second segmentation parameter is obtained, including:
[0058] The peak-valley feature of the initial image is determined, and the segmentation correction factor corresponding to the peak-valley feature of the initial image is obtained in the preset mapping relationship, which is recorded as a target segmentation correction factor.
[0059] The first segmentation parameter is corrected based on the target segmentation factor to obtain the second segmentation parameter.
[0060] Based on the description of this step, in this embodiment, the preset mapping relationship can include the relationship between the peak-valley feature and the corresponding segmentation correction factor. Therefore, in the process of determining the histogram feature and correcting the first segmentation parameter, the peak-valley feature of the current initial image is determined, the corresponding segmentation correction factor is determined based on the peak-valley feature, and the first segmentation parameter is corrected according to the segmentation correction factor.
[0061] Specifically, the process of determining the peak-valley feature and determining the segmentation correction factor can be performed in the following manner:
[0062] First, the image histogram of the initial image is calculated, and the peak-valley feature is analyzed. Assuming that the pixel value of the normalized pixel point is in the range of [0, N], the pixel value of the initial image is set as the independent variable x, and the corresponding frequency is the dependent variable y, a fitting function y=f(x) is constructed, as shown in Figure 3 The first-order difference Diff(x) of the fitting function y=f(x) is calculated to smooth the frequency curve in the original histogram, and the difference vector Diff is obtained:
[0063] Diff(x)=f(x+1)-f(x)
[0064] The sign operation Sign(x) is performed on the difference vector Diff from back to front to obtain the vector Sign, and the Diff(x) value is first symbolized as -1, 0, and 1.
[0065]
[0066] The trend operation Tend(x) is performed again on the vector Sign to obtain a vector Tend, and the values of 0 in the vector Sign are further symbolized as -1 and 1, and they are set to be the same as the gradient direction of the slope surface. The formula of the trend operation Tend(x) is as follows:
[0067]
[0068] A first-order difference R(x) is calculated for Tend(x) to obtain a vector R:
[0069] R(x) = Tend(x + 1) - Tend(x)
[0070] The value range of R(x) is [-2, 0, 2], when R(x) is -2, x + 1 is a wave peak position of the image histogram, and when R(x) is 2, x + 1 is a wave valley position of the image histogram. The number of values of -2 and 2 in the vector R is counted respectively, so that the number of wave peaks and wave valleys in the image histogram and the pixel value of each wave peak and wave valley can be determined, the peak-valley feature of the image histogram can be judged, and it can be judged whether the image histogram is single-peak, double-peak or multi-peak.
[0071] Then, according to the peak-valley feature of the image histogram and the first segmentation parameter T0 obtained in the foregoing step, a preset mapping relationship between the segmentation correction factor ΔT and the peak-valley feature can be constructed as follows:
[0072]
[0073] Wherein, T 单峰 is the pixel value corresponding to 1 / 2 between the wave valley before the single peak and the wave peak of the single peak when the peak-valley feature is single-peak feature, T 双峰 is the pixel value corresponding to the wave valley between the double peaks when the peak-valley feature is double-peak feature, T 多峰 is the pixel value corresponding to the wave valley before the maximum peak when the peak-valley feature is multi-peak feature, and N is the maximum value of the pixel value in the normalized initial image.
[0074] In this way, by determining the mapping relationship between the peak-valley feature and the segmentation correction factor, it can be ensured that when the water body image of the initial image needs to be detected, only the peak-valley feature of the initial image needs to be confirmed, and the corresponding segmentation correction factor can be determined by using the preset mapping relationship, so that the suitable segmentation correction factor can be selected based on the peak-valley feature in the initial image, and then the subsequent detection result is ensured to be more suitable for the current image, so that the detection result is more accurate.
[0075] When the segmentation correction factor is determined, the first segmentation parameter can be corrected based on the segmentation correction factor to obtain a second segmentation parameter. Specifically, the correction process is as follows:
[0076]
[0077] wherein, T is a second segmentation parameter, T 单峰 is a pixel value corresponding to a wave trough between a wave peak before a single peak when the peak-valley feature is a single peak feature, T 双峰 is a pixel value corresponding to a wave trough between double peaks when the peak-valley feature is a double peak feature, T 多峰 is a pixel value corresponding to a wave trough before a maximum peak when the peak-valley feature is a multi-peak feature, and ΔT is a segmentation correction factor.
[0078] 203. segmenting the initial image based on the second segmentation parameter to obtain a segmented image, and determining the segmented image as the water body image.
[0079] Specifically, when the step is executed, it can be specifically performed in the following manner: determining the second segmentation parameter as a segmentation threshold, dividing the pixel points in the initial image according to the pixel value segmentation threshold, and determining an image region formed by the pixel points with a pixel value lower than the segmentation threshold as the water body image.
[0080] In this way, by taking the second segmentation parameter as the segmentation threshold, it can be ensured that the pixel points in the entire initial image are divided according to whether the pixel value is less than the second segmentation parameter, wherein the region formed by the pixel points less than the second segmentation parameter can be understood as the water body part in the initial image, and the region formed by the pixel points higher than the second segmentation parameter can be understood as the non-water body part, so as to realize the division of the water body and the non-water body in the initial image. After segmenting the water body part, the obtained is the water body image that can be recognized in the initial image, so as to realize the water body image detection based on the SAR image data.
[0081] 204. When it is determined that the initial image contains mountain shadow, obtaining the radar incidence angle and mountain slope orientation information of each pixel point in the water body image, and determining the target pixel point that meets the mountain shadow based on a preset mountain shadow formula.
[0082] Based on the special imaging mechanism of the SAR image, the mountain shadow of the SAR image presents similar low backscattering coefficient characteristics with the water body part, so that in some cases the mountain shadow is easily confused with the water body part in imaging. Therefore, in the embodiment, if it is confirmed that the area where the SAR image is collected involves mountains, the mountain shadow part needs to be detected in this step. The detection process is mainly based on the radar incidence angle and the mountain slope orientation of each pixel point. The specific confirmation process is as follows:
[0083]
[0084] wherein, incident 本地 (x) is the local incidence angle of pixel point x, incident 雷达 (x) is the radar incidence angle of pixel point x, and slope(x) is the slope of pixel point x.
[0085] The principle of calculating the shadow area of the image mountain based on the radar incidence angle and the local incidence angle of the pixel is that when the radar incidence angle incident 雷达 (x) is greater than twice the local incidence angle incident 本地 (x), the area corresponding to the pixel point is regarded as the mountain shadow area, that is, the area corresponding to the target pixel point, and other areas are regarded as non-mountain shadow areas.
[0086] 205. The area formed by the target pixel point is removed from the water body image to obtain a target water body image.
[0087] When the target pixel point is determined, the mountain shadow part in the water body image is also determined, and this part needs to be removed. The remaining image after removal is the image of the real water body part excluding the mountain shadow interference, that is, the target water body image.
[0088] 206. When it is determined that there is an image area with an area less than a preset area in the water body image, the image area is determined as a noise interference area, and the noise interference area is removed from the water body image.
[0089] Further, in this embodiment, since the process of determining the water body image may be disturbed by noise collected in the image, these interference points are not the real water body corresponding areas. Therefore, in this embodiment, some smaller areas formed by scattered noise need to be removed. Specifically, assuming that a patch with an area less than a preset area S is regarded as a speckle noise, then the pixel points of the speckle noise area can be determined as non-water body parts to obtain a final water body information distribution map. Of course, the preset area S value can be set according to actual needs, so that the user can set the size of the noise speckle to control the noise interference removal process.
[0090] It should be noted that the order of execution of this step can be as shown in the example, that is, after the mountain shadow removal, the de-noising is performed. Of course, it can also be executed after step 203, that is, before the mountain shadow removal is performed. The specific execution order is not limited here and can be selected based on actual needs.
[0091] Further, as an improvement of the above Figure 1 and Figure 2According to the implementation of the method, another embodiment of the present application further provides a water body image detection device based on SAR image data. The device embodiment corresponds to the foregoing method embodiment, and for the convenience of reading, the details of the foregoing method embodiment will not be described one by one, but it should be clear that the device in this embodiment can correspondingly implement all the contents in the foregoing method embodiment. In order to implement a water body image detection method based on SAR image data, specifically as shown in the device, Figure 4 The device comprises:
[0092] The acquisition unit 41 can be used to acquire an initial image and determine a first segmentation parameter based on the initial image, wherein the initial image is obtained after a normalization operation on the SAR image data;
[0093] The correction unit 42 can be used to acquire a histogram feature of the initial image acquired by the acquisition unit 41 and correct the first segmentation parameter based on the histogram feature to obtain a second segmentation parameter, wherein the histogram feature can be used to represent the characteristics of the distribution of the pixel values of each pixel point in the initial image;
[0094] The segmentation unit 43 can be used to perform segmentation processing on the initial image based on the second segmentation parameter obtained by the correction unit 42 to obtain a segmented image, and determine the segmented image as the water body image.
[0095] Further, as shown in the device, Figure 5 The correction unit 42 is specifically used to determine a pixel value feature based on the distribution information of the pixel values of each pixel point in the initial image, determine a histogram feature corresponding to the pixel value feature based on a preset mapping relationship, and correct the first segmentation parameter based on the histogram feature to obtain a second segmentation parameter, wherein the pixel value feature can be used to represent the change trend of the pixel values of the pixel points in the initial image; the preset mapping relationship contains a histogram feature corresponding to each pixel value feature.
[0096] Further, as shown in the device, Figure 5 The pixel value feature includes a peak-valley feature; the peak-valley feature can be used to represent the distribution characteristics of the pixel values of the pixel points in the pixel value waveform graph; the peak-valley feature includes at least one of a unimodal feature, a bimodal feature, and a multimodal feature; the histogram feature specifically includes a segmentation correction factor; the segmentation correction factor is obtained based on the derivative calculation of the pixel values of each pixel point of the preset image by a preset fitting function;
[0097] The preset mapping relationship contains a segmentation correction factor corresponding to the unimodal feature, a segmentation correction factor corresponding to the bimodal feature, and a segmentation correction factor corresponding to the multimodal feature, respectively.
[0098] The correction unit 42 comprises:
[0099] The acquisition module 421 can be configured to determine the peak-valley feature of the initial image, and acquire a segmentation correction factor corresponding to the peak-valley feature of the initial image in the preset mapping relationship, denoted as a target segmentation correction factor.
[0100] The correction module 422 can be configured to correct the first segmentation parameter based on the target segmentation factor obtained by the acquisition module 421 to obtain the second segmentation parameter.
[0101] Further, as shown in Figure 5 The device further comprises:
[0102] The determination unit 44 can be configured to, when it is determined that the initial image contains mountain shadow, acquire the radar incident angle and the mountain slope surface orientation information of each pixel point in the water body image obtained by the segmentation unit 43, and determine the target pixel point that meets the mountain shadow based on a preset mountain shadow formula.
[0103] The removal unit 45 can be configured to remove the region formed by the target pixel point determined by the first determination unit 44 from the water body image to obtain a target water body image.
[0104] Further, as shown in Figure 5 The device further comprises:
[0105] The denoising unit 46 can be configured to, when it is determined that the water body image obtained by the segmentation unit 43 contains an image region with an area less than a preset area, determine the image region as a noise interference region, and remove the noise interference region from the water body image.
[0106] Further, as shown in Figure 5 The segmentation unit 43 is specifically configured to determine the second segmentation parameter as a segmentation threshold, divide the pixel points in the initial image according to the pixel value segmentation threshold, and determine the image region formed by the pixel points with pixel values lower than the segmentation threshold as the water body image.
[0107] Further, as shown in Figure 5 The acquisition unit 41 is specifically configured to acquire SAR image data of a target region, perform a preset processing on the SAR image data to obtain corresponding SAR intensity image data, wherein the preset processing at least includes radiation scaling operation, multi-view operation and geocoding operation; and perform processing operation on the SAR intensity image data according to a normalization algorithm to obtain the initial image.
[0108] To achieve the above object, according to another aspect of the present application, the embodiment of the present application further provides a storage medium, which comprises a stored program, wherein the program controls a device where the storage medium is located to execute the water body image detection method based on SAR image data when the program is run.
[0109] To achieve the above object, according to another aspect of the present application, the embodiment of the present application further provides a water body image detection device based on SAR image data, which comprises a storage medium and one or more processors, the storage medium is coupled with the processor, and the processor is configured to execute program instructions stored in the storage medium; the program instructions execute the water body image detection method based on SAR image data when the program instructions are run.
[0110] The embodiment of the present application provides a water body image detection method and device based on SAR image data. The present application can first acquire an initial image, and determine a first segmentation parameter based on the initial image, wherein the initial image is obtained after normalization operation of SAR image data. Then, histogram features of the initial image are acquired, and the first segmentation parameter is corrected based on the histogram features to obtain a second segmentation parameter, wherein the histogram features are used to represent characteristics of pixel value distribution of each pixel point in the initial image. Finally, the initial image is segmented based on the second segmentation parameter to obtain a segmented image, and the segmented image is determined as the water body image, thereby realizing the water body image detection function based on SAR image data. Compared with the prior art, in the present application, the difference of histogram features of different images can be considered in the water body image detection process, and the first segmentation parameter is corrected to obtain the second segmentation parameter. This can ensure that the segmentation parameter can be corrected based on the histogram features of the image when facing different initial images in different regions and different environments, so that the accuracy of the segmentation result will not be affected by the inherent set segmentation threshold. Therefore, it can be ensured that the segmentation parameter can be corrected based on the characteristics of the image in the process of water body image detection, that is, the second segmentation parameter is corrected. This makes the segmented water body image more accurate than the water body image segmented by the uncorrected segmentation threshold, and solves the problem of poor accuracy of the segmentation result in the prior art.
[0111] The water body image detection device based on SAR image data comprises a processor and a memory, and the above-mentioned acquisition unit, correction unit and segmentation unit are all stored in the memory as program units, and the above-mentioned program units stored in the memory are executed by the processor to realize the corresponding functions.
[0112] The processor comprises a core, and the core retrieves corresponding program units in the memory. The core can be provided with one or more than one, and a water body image detection method based on SAR image data is realized by adjusting core parameters to solve the problem of poor detection result accuracy in the existing water body image detection process based on SAR image data.
[0113] Embodiments of the present application provide a water body image detection device based on SAR image data. The device comprises a storage medium and one or more processors. The storage medium is coupled to the processor, and the processor is configured to execute program instructions stored in the storage medium. The program instructions perform the water body image detection method based on SAR image data when executed.
[0114] Embodiments of the present application provide a storage medium comprising stored programs, wherein the programs control the device in which the storage medium is located to perform the water body image detection method based on SAR image data when executed.
[0115] The storage medium can include non-permanent memory in a computer readable medium, random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
[0116] Embodiments of the present application provide a device comprising a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: obtaining an initial image, and determining a first segmentation parameter based on the initial image, wherein the initial image is obtained after normalization operation on SAR image data; obtaining a histogram feature of the initial image, and correcting the first segmentation parameter based on the histogram feature to obtain a second segmentation parameter, wherein the histogram feature is used to represent the characteristics of the distribution of pixel values of each pixel point in the initial image; segmenting the initial image based on the second segmentation parameter to obtain a segmented image, and determining the segmented image as the water body image.
[0117] Further, the obtaining the histogram feature of the initial image and correcting the first segmentation parameter based on the histogram feature to obtain the second segmentation parameter comprises:
[0118] Determine a pixel value feature based on the pixel value distribution information of each pixel point in the initial image, determine a histogram feature corresponding to the pixel value feature based on a preset mapping relationship, and correct the first segmentation parameter based on the histogram feature to obtain a second segmentation parameter, wherein the pixel value feature is used to represent the pixel value trend in the initial image; and the preset mapping relationship contains a histogram feature corresponding to each pixel value feature.
[0119] Further, the pixel value feature includes a peak-valley feature; the peak-valley feature is used to represent the distribution characteristics of the pixel value in the pixel value waveform graph; the peak-valley feature includes at least one of a single-peak feature, a double-peak feature, and a multi-peak feature; and the histogram feature specifically includes a segmentation correction factor; the segmentation correction factor is obtained based on the pixel value of each pixel point in the preset image and the derivative calculation of the preset fitting function;
[0120] The preset mapping relationship contains a segmentation correction factor corresponding to the single-peak feature, a segmentation correction factor corresponding to the double-peak feature, and a segmentation correction factor corresponding to the multi-peak feature, respectively;
[0121] The method for determining the pixel value feature based on the pixel value distribution information of each pixel point in the initial image, determining the histogram feature corresponding to the pixel value feature based on the preset mapping relationship, and correcting the first segmentation parameter based on the histogram feature to obtain the second segmentation parameter includes:
[0122] Determine the peak-valley feature of the initial image, and obtain the segmentation correction factor corresponding to the peak-valley feature of the initial image in the preset mapping relationship, denoted as a target segmentation correction factor;
[0123] Correct the first segmentation parameter based on the target segmentation factor to obtain the second segmentation parameter.
[0124] Further, after the initial image is segmented based on the second segmentation parameter to obtain a segmented image, and the segmented image is determined as the water body image, the method further includes:
[0125] When it is determined that the initial image contains mountain shadow, obtain the radar incident angle and the mountain slope orientation information of each pixel point in the water body image, and determine a target pixel point that meets the mountain shadow based on a preset mountain shadow formula;
[0126] Remove the region formed by the target pixel point from the water body image to obtain a target water body image.
[0127] Further, after the initial image is segmented based on the second segmentation parameter to obtain a segmented image, and the segmented image is determined as the water body image, the method further comprises:
[0128] When it is determined that there is an image region with an area less than a preset area in the water body image, the image region is determined as a noise interference region, and the noise interference region is removed from the water body image.
[0129] Further, the initial image is segmented based on the second segmentation parameter to obtain a segmented image, and the segmented image is determined as the water body image, comprising:
[0130] The second segmentation parameter is determined as a segmentation threshold, and the pixel points in the initial image are divided according to the pixel value segmentation threshold, and an image region formed by the pixel points with a pixel value lower than the segmentation threshold is determined as the water body image.
[0131] Further, the initial image comprises:
[0132] SAR image data of a target region is collected, and a preset processing is performed on the SAR image data to obtain corresponding SAR intensity image data, wherein the preset processing at least includes radiation scaling operation, multi-view operation and geographic coding operation;
[0133] The SAR intensity image data is processed according to a normalization algorithm to obtain the initial image.
[0134] The application also provides a computer program product which can perform corresponding functions, comprising: obtaining an initial image, and determining a first segmentation parameter based on the initial image, wherein the initial image is obtained after SAR image data is normalized; obtaining a histogram feature of the initial image, and correcting the first segmentation parameter based on the histogram feature to obtain a second segmentation parameter, wherein the histogram feature is used to represent the characteristics of the pixel value distribution of each pixel point in the initial image; segmenting the initial image based on the second segmentation parameter to obtain a segmented image, and determining the segmented image as the water body image.
[0135] Those skilled in the art will appreciate that embodiments of the application can be readily used as software, hardware, or a combination of software and hardware. In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0136] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks. Figure 1 means for performing each of the functions specified in the flowchart block or blocks.
[0137] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks. Figure 1 means for performing each of the functions specified in the flowchart block or blocks.
[0138] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks. Figure 1 Figure 1 means for performing each of the functions specified in the flowchart block or blocks.
[0139] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0140] The memory can include non-persistent memory and / or volatile memory, such as a random access memory (RAM) including a cache area for the temporary storage of data. The memory can also include non-volatile memory, such as a read only memory (ROM) device, a floppy disk, a flexible disk, hard disk, or a tape, cloud storage, flash memory card, or another suitable data storage device. The memory stores a data processing application, in accordance with an embodiment of the application.
[0141] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.
[0142] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusions, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but also other elements not explicitly listed or inherent to such a process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0143] Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0144] The above merely provides embodiments of the present application and is not intended to limit the present application. Various modifications and changes can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the scope of the claims of the present application.
Claims
1. A method for water body image detection based on SAR image data, characterized in that, The method comprises: acquiring an initial image and determining a first segmentation parameter based on the initial image, wherein the initial image is obtained after normalization operation on SAR image data; acquiring histogram features of the initial image and correcting the first segmentation parameter based on the histogram features to obtain a second segmentation parameter; segmenting the initial image based on the second segmentation parameter to obtain a segmented image, and determining the segmented image as the water body image; The acquiring of the histogram features of the initial image and the correcting of the first segmentation parameter based on the histogram features to obtain a second segmentation parameter comprises: determining pixel value features of each pixel point in the initial image based on pixel value distribution information of the pixel point, determining histogram features corresponding to the pixel value features based on a preset mapping relationship, and correcting the first segmentation parameter based on the histogram features to obtain a second segmentation parameter, wherein the pixel value features are used to represent the pixel value variation trend of the pixel point in the initial image; and the preset mapping relationship contains histogram features corresponding to each pixel value feature. The pixel value features comprise peak-valley features; the peak-valley features are used to represent the distribution characteristics of the pixel value of the pixel point in the pixel value waveform graph; the peak-valley features comprise at least one of unimodal features, bimodal features and multimodal features; and the histogram features specifically comprise segmentation correction factors; the segmentation correction factors are obtained based on the pixel value of each pixel point in the initial image after derivation calculation by a preset fitting function. The preset mapping relationship contains unimodal feature corresponding segmentation correction factor, bimodal feature corresponding segmentation correction factor and multimodal feature corresponding segmentation correction factor. The determining of the pixel value features of each pixel point in the initial image based on the pixel value distribution information of the pixel point, the determining of the histogram features corresponding to the pixel value features based on the preset mapping relationship, and the correcting of the first segmentation parameter based on the histogram features to obtain a second segmentation parameter comprise: determining the peak-valley features of the initial image, and obtaining the segmentation correction factor corresponding to the peak-valley features of the initial image in the preset mapping relationship, which is recorded as a target segmentation correction factor. Wherein, the pixel value of the pixel point of the initial image is set as the independent variable x, and the corresponding occurrence frequency is the dependent variable y, and a fitting function y=f(x) is constructed; The first-order difference Diff(x) of the fitting function y=f(x) is calculated to obtain a difference vector Diff: Diff(x)=f(x+1)-f(x); The sign operation Sign(x) is performed on the difference vector Diff to obtain a vector Sign; The trend operation Tend(x) is performed on the vector Sign to obtain a vector Tend; The first-order difference R(x) of Tend(x) is calculated to obtain a vector R: R(x)=Tend(x+1)-Tend(x) Wherein, the value range of R(x) is [-2, 0, 2], when R(x) takes the value -2, x+1 is a peak position of the image histogram; when R(x) takes the value 2, x+1 is a valley position of the image histogram; The first segmentation parameter is corrected based on the target segmentation factor to obtain the second segmentation parameter; Wherein, the preset mapping relationship includes: wherein T 单峰 is the pixel value corresponding to the position of 1 / 2 between the wave trough before the single peak and the wave peak of the single peak when the peak-valley feature is single-peak feature, T 双峰 is the pixel value corresponding to the wave trough between the double peaks when the peak-valley feature is double-peak feature, T 多峰 is the pixel value corresponding to the wave trough before the maximum peak when the peak-valley feature is multi-peak feature, N is the maximum value of the pixel value in the initial image after normalization, ΔT is the segmentation correction factor, and T0 is the first segmentation parameter; Wherein, the first segmentation parameter is corrected based on the segmentation correction factor to obtain the second segmentation parameter, and specifically includes: Wherein, T is the second segmentation parameter; After the initial image is segmented based on the second segmentation parameter to obtain the segmented image, and the segmented image is determined as the water body image, the method further includes: When it is determined that the initial image contains mountain shadow, the radar incidence angle and mountain slope orientation information of each pixel point in the water body image are obtained, and the target pixel point meeting the mountain shadow is determined based on a preset mountain shadow formula; the region formed by the target pixel point is removed from the water body image to obtain a target water body image; Wherein, the preset mountain shadow formula includes: wherein incident 本地 (x) is the local incidence angle of pixel point x, incident 雷达 (x) is the radar incidence angle of pixel point x, and slope(x) is the slope of pixel point x.
2. The method of claim 1, wherein, After the initial image is segmented based on the second segmentation parameter to obtain the segmented image, and the segmented image is determined as the water body image, the method further includes: When it is determined that there is an image region with an area smaller than a preset area in the water body image, the image region is determined as a noise interference region, and the noise interference region is removed from the water body image.
3. The method of claim 1, wherein, The initial image is segmented based on the second segmentation parameter to obtain the segmented image, and the segmented image is determined as the water body image, including: The second segmentation parameter is determined as a segmentation threshold, and the pixel points in the initial image are divided according to the segmentation threshold, and the image region formed by the pixel points with a pixel value lower than the segmentation threshold is determined as the water body image.
4. The method of claim 1, wherein, The initial image includes: SAR image data of a target region is collected, and preset processing is performed on the SAR image data to obtain corresponding SAR intensity image data, wherein the preset processing at least includes radiation scaling operation, multi-view operation and geographic coding operation; The SAR intensity image data is processed according to a normalization algorithm to obtain the initial image.
5. A water body image detection apparatus based on SAR image data, characterized by, The device includes: An acquisition unit is configured to acquire an initial image and determine a first segmentation parameter based on the initial image, wherein the initial image is obtained by performing normalization operation on SAR image data; A correction unit is configured to acquire histogram features of the initial image and correct the first segmentation parameter based on the histogram features to obtain a second segmentation parameter; A segmentation unit is configured to segment the initial image based on the second segmentation parameter to obtain a segmented image, and determine the segmented image as a water body image. The correction unit is configured to determine a pixel element value feature based on the pixel element value distribution information of each pixel point in the initial image, determine a histogram feature corresponding to the pixel element value feature based on a preset mapping relationship, and correct the first segmentation parameter based on the histogram feature to obtain a second segmentation parameter. The pixel element value feature can be used to represent a pixel element value trend in the initial image. The preset mapping relationship includes a histogram feature corresponding to each pixel element value feature. The pixel element value feature includes a peak-valley feature. The peak-valley feature can be used to represent the distribution characteristics of the pixel element value in the pixel element value waveform graph. The peak-valley feature includes at least one of a single-peak feature, a double-peak feature, and a multi-peak feature. The histogram feature specifically includes a segmentation correction factor. The segmentation correction factor is obtained by deriving a preset fitting function based on the pixel element value of each pixel point in the initial image. The preset mapping relationship includes a segmentation correction factor corresponding to a single-peak feature, a segmentation correction factor corresponding to a double-peak feature, and a segmentation correction factor corresponding to a multi-peak feature. The correction unit includes: The acquisition module can be used to determine the peak-valley feature of the initial image, and acquire a segmentation correction factor corresponding to the peak-valley feature of the initial image in the preset mapping relationship, denoted as a target segmentation correction factor. Wherein, the pixel element value of the initial image is taken as the independent variable x, and the corresponding frequency is taken as the dependent variable y, and a fitting function y=f(x) is constructed. The first-order difference Diff(x) of the fitting function y=f(x) is calculated to obtain the difference vector Diff: Diff(x)=f(x+1)-f(x). The sign operation Sign(x) is performed on the difference vector Diff to obtain the vector Sign. The trend operation Tend(x) is performed on the vector Sign to obtain the vector Tend. The first-order difference R(x) of Tend(x) is calculated to obtain the vector R: R(x)=Tend(x+1)-Tend(x) Wherein, the value range of R(x) is [-2, 0, 2], when R(x) takes the value -2, x+1 is a wave peak position of the image histogram; when R(x) takes the value 2, x+1 is a wave valley position of the image histogram. The correction module can be used to correct the first segmentation parameter based on the target segmentation factor obtained by the acquisition module to obtain the second segmentation parameter. The device further includes: The determination unit can be used to acquire the radar incident angle and the mountain slope orientation information of each pixel point in the water body image obtained by the segmentation unit when it is determined that there is a mountain shadow in the initial image, and determine the target pixel point that meets the mountain shadow based on a preset mountain shadow formula. The removal unit can be used to remove the region formed by the target pixel point determined by the first determination unit from the water body image to obtain a target water body image. The preset mapping relationship includes: wherein T 单峰 is the pixel value corresponding to the wave trough between the wave trough before the single peak and the wave peak of the single peak when the peak-valley feature is single-peak feature, T 双峰 is the pixel value corresponding to the wave trough between the two peaks when the peak-valley feature is double-peak feature, T 多峰 is the pixel value corresponding to the wave trough before the maximum peak when the peak-valley feature is multi-peak feature, N is the maximum value of the pixel value in the initial image after normalization, ΔT is the segmentation correction factor, and T0 is the first segmentation parameter. The first segmentation parameter is corrected based on the segmentation correction factor to obtain the second segmentation parameter, which specifically includes: Wherein, T is the second segmentation parameter. The device also includes: The determination unit can be used to obtain the radar incident angle and the mountain slope orientation information of each pixel point in the water body image obtained by the segmentation unit when it is determined that there is a mountain shadow in the initial image, and determine the target pixel point conforming to the mountain shadow based on a preset mountain shadow formula; The clearing unit can be used to clear the region formed by the target pixel point determined by the first determination unit from the water body image to obtain a target water body image; The preset mountain shadow formula includes: wherein incident 本地 (x) is the local incidence angle of pixel point x, incident 雷达 (x) is the radar incidence angle of pixel point x, and slope(x) is the slope of pixel point x.
6. A storage medium, characterized by The storage medium includes a stored program, wherein the program controls the device where the storage medium is located to execute the water body image detection method based on SAR image data in any one of claims 1-4 when the program is running.
7. A water body image detection device based on SAR image data, characterized by, The device includes a storage medium and one or more processors, the storage medium is coupled with the processor, the processor is configured to execute the program instructions stored in the storage medium, and the program instructions execute the water body image detection method based on SAR image data in any one of claims 1-4 when running.
Citation Information
Patent Citations
SAR image water area automatic detection method based on recursive OTSU algorithm
CN107230214A
Method and device for extracting land surface water body based on remote sensing image
CN109472804A
Defect detection method for groove MOS (Metal Oxide Semiconductor) device
CN115578389A