An oil spill area calculation method based on improved edge detection
The thermal infrared remote sensing images were processed through the improved Canny algorithm and bilateral filter technology, which solved the influence of interference information in the remote sensing data, achieved accurate measurement of the oil spill area, and improved recognition efficiency and accuracy.
Patent Information
- Application Number
- CN202411752004.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-12-02
AI Technical Summary
In the existing remote sensing monitoring system, the information collected by remote sensing data is messy and affected by multiple interference factors, resulting in inaccurate identification of oil spills and difficulty in effectively assessing the oil spill area.
The improved Canny algorithm combined with bilateral filter and adaptive threshold technology is used to perform denoising, edge detection and area calculation on thermal infrared remote sensing images, and the actual area of the oil spill area is calculated based on aerial photography parameters.
It improves the accuracy and efficiency of oil spill area edge identification, can quickly and objectively evaluate the pollution area of irregular oil film areas, and provide clear and complete oil film area measurement.
Smart Images

Figure CN119625046B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field related to ship safety and pollution prevention, and in particular to a method for calculating oil spill area based on improved edge detection. Background Art
[0002] Maritime shipping accounts for approximately 80 percent of global trade in goods, and the development of the shipping industry has driven global economic growth. However, as the number, tonnage, and scale of ships at sea continue to increase, shipping safety and pollution prevention face increasingly complex challenges.
[0003] my country is the world's second-largest oil importer, and over 90% of its oil imports are transported by ship. In recent years, with the continuous increase in my country's maritime trade volume, the pressure on maritime transportation has also gradually increased, and the risk of oil spills from ships has continued to rise.
[0004] Remote sensing remains the most effective method among existing marine environmental monitoring systems. However, directly collected remote sensing data contains a large amount of information and is affected by numerous objective factors, resulting in a significant amount of interference. To minimize this interference, highlight the required information, and accurately identify and assess oil spills, the collected raw data requires computer image processing to more easily extract effective information. Therefore, processing methods for digital images obtained from remote sensing monitoring are crucial. Summary of the Invention
[0005] The purpose of the present invention is to propose a method for measuring oil spill area based on improved edge detection to solve one or more technical problems existing in the prior art and at least provide a beneficial option or create conditions.
[0006] A method for calculating oil spill area based on improved edge detection, the method comprising the following steps:
[0007] Set the size of thermal infrared images for UAV remote sensing monitoring;
[0008] Acquire thermal infrared remote sensing images based on drone patrol monitoring of oil spills;
[0009] The thermal infrared remote sensing image is used to detect the edge of the oil spill area and eliminate the area formed by interference factors to obtain the number of pixels in the oil spill area;
[0010] The actual area of the final oil spill area is visualized by combining thermal infrared remote sensing images with aerial photography information such as height, angle, and position.
[0011] Furthermore, by setting the size of the thermal infrared image of the UAV remote sensing monitoring, a thermal infrared remote sensing image of the oil spill is obtained, and the size of the image obtained is agreed to be a digital image of M×N size. The collected thermal infrared image is cropped, rotated and other key information is reconstructed to obtain a target image of the oil pollution. The target image is denoised to obtain a denoised grayscale image recorded as the first image, and the first image is subjected to morphological processing to obtain the second image.
[0012] Preferably, the edge of the image is where the local intensity change of the image is most obvious. It is the key to image feature extraction and image segmentation and recognition. Research on image edge detection operators is a very important part of remote sensing image processing technology. Among the traditional edge detection operators, the main edge detection operators are: Roberts operator, Prewitt operator, Sobel operator and Canny operator. The first three are first-order difference operators, that is, they highlight the edge of the object in the image by calculating the derivative of the image grayscale change. The Canny operator is a second-order difference operator and is very sensitive to the places where the grayscale changes strongly in the image, thereby highlighting the texture structure of the image.
[0013] Improved Canny algorithm: Compared with other classic edge detection algorithms, the Canny operator is more effective in suppressing noise and preserving edges in image edge detection. However, it still has some shortcomings in preserving edge details and reducing pseudo-edges. To address these issues, combined with the characteristics of thermal infrared oil film images, an improved Canny operator edge detection algorithm is proposed for oil film area identification. Based on the classic Canny operator, a bilateral filter is used instead of a Gaussian filter, which can remove noise while maintaining good edge characteristics. Improvements are also made to the threshold and non-maximum suppression methods to enhance its adaptability to thermal infrared image processing.
[0014] Furthermore, the area of the final oil spill area is calculated based on the pixel area method combined with the focal length, flight altitude, angle and other parameter information of the aerial monitoring, and the actual area of the calculated oil spill area is visualized. The method for calculating the area of the oil spill area is:
[0015] Obtaining the height of the real plane corresponding to the calculated aerial image, deducing the real area represented by each pixel, calculating the total number of pixels and summing them to obtain the area of the oil film region;
[0016] In the dark area within the camera's shooting range, define a closed shape S as the recognition area. S represents the area result obtained by the measurement method. The height and width are AB and DE of the real plane corresponding to the photo, respectively, where AB is the target data we want to test;
[0017] The vertical field of view half angle θ and the image plane height AB can be calculated using the following formula:
[0018]
[0019] In the formula, t=UV represents half of the height of the film, f=OV is the focal length, h=OM is the height of the unmanned aerial vehicle from the ground, is the tilt angle when the unmanned aerial vehicle is taking pictures, and the value is 0 degrees when taking pictures vertically, the infrared image telemetry experimental data is collected through the unmanned aerial vehicle to carry out aerial photography experiment, and after processing the experimental data, the total number of pixels in the feature area is multiplied by the actual area S of each pixel point i , so as to obtain the area of the oil film region.
[0020] Further, the specific method for carrying out oil spill region edge detection on the second image is:
[0021] Based on the Canny algorithm, the bilateral filter replaces the Gaussian filter, and the formula definition of the bilateral filter is as follows: define the second image obtained at a certain moment as image I, and set the gray value of image I at position p=(x, y) as I p , the gray value of the processed image RI at position p is RI p , and the formula of the bilateral filter is:
[0022]
[0023] In the above formula, q=(u, v) is the neighborhood point of target point p, S is the set of domain points, W p is a normalization factor, is a spatial proximity factor, is a gray scale similarity factor;
[0024]
[0025] In the above formula, σ s is the standard deviation of the distance, σ r is the standard deviation of the gray scale, and the σ s and σ r determine the influence range of the spatial domain filter kernel function and the gray scale filter kernel function, and the actual effect of the filter can be changed by manual adjustment.
[0026] Further, the improvement of non-maximum suppression based on the Canny algorithm is that: the points in the sequence are processed one by one, and the obtained interpolation result is compared with the original target pixel, if it does not meet the preset condition, the value of the point is set to zero;
[0027] Preferably, in the process of solving the global gradient, the first task is to select a specific pixel point and then analyze the gradient value of the point to determine whether it constitutes a local maximum point. This processing method often cannot provide satisfactory detection results in an environment with noise interference;
[0028] Due to the symmetry of the neighborhood, only four of the eight directions need to be considered in practice. These directions are further divided into two categories: one is the gradient vector close to the horizontal direction, and the other is the gradient vector close to the vertical direction. This paper focuses on the two cases of 0° to 45° and 135° to 180° (biased horizontal direction) and 45° to 90° and 90° to 135° (biased vertical direction). In the case of biased horizontal direction, P is used. y (i,j) / P x (i, j) represents the weight, and P is used in the case of vertical direction x (i,j) / P y (i,j) represents the weight.
[0029] Adaptive threshold selection. For each M×N digital image, we generate a 3×3 matrix that is translated within it and use the grayscale mean of all pixels within the matrix as the adaptive threshold. Since the 3×3 matrix will translate along with the image pixels, the grayscale values of the pixels in it will also change continuously, and the corresponding threshold will also be adjusted accordingly. At the same time, each threshold is compared based on the average value in the current 3×3 matrix and the gradient intensity of the center pixel.
[0030] The beneficial effects of the present invention are as follows: the improved Canny algorithm proposed in the present invention effectively eliminates impurity information while ensuring the integrity of edge information features. In terms of the main information response of the edge of the oil film area, while ensuring the recognition efficiency, the accuracy of edge recognition is improved, and the areas of crude oil film and diesel oil film are extracted clearly and completely. The method is based on the principle of pixel area method for measurement, and combines the geometric relationship and parameter information of aerial photography within a small angle to calculate the actual area of oil pollution, which can quickly, objectively and reasonably evaluate the pollution area of irregular oil film areas throughout the day. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The above and other features of the present invention will become more apparent through a detailed description of the embodiments shown in conjunction with the accompanying drawings. In the drawings of the present invention, the same reference numerals represent the same or similar elements. Obviously, the drawings described below are only some embodiments of the present invention. It is possible for a person skilled in the art to derive other drawings based on these drawings without inventive effort. In the drawings:
[0032] Figure 1A flow chart of a pixel area method measurement method of an improved edge detection based spilled oil area calculation method;
[0033] Figure 2 A flow chart of a pixel area method measurement method of an improved edge detection based spilled oil area calculation method;
[0034] Figure 3 A flow chart of an oil film image morphological processing of a pixel area method measurement method of an improved edge detection based spilled oil area calculation method;
[0035] Figure 4 A flow chart of an improved Canny algorithm of a pixel area method measurement method of an improved edge detection based spilled oil area calculation method;
[0036] Figure 5 A method schematic diagram of calculating spilled oil area of a pixel area method measurement method of an improved edge detection based spilled oil area calculation method. DETAILED DESCRIPTION
[0037] The embodiments of the present disclosure will be described in detail below with reference to the drawings.
[0038] In the description of the present application, the meaning of one or more is one or more, the meaning of multiple is two or more, greater than, less than, more than, etc. are understood as not including the number, above, below, within, etc. are understood as including the number. If it is described as first, second, it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features or the sequence of indicated technical features.
[0039] The embodiments of the present disclosure will be described in detail below with reference to the drawings.
[0040] The purpose of the present application is to provide an improved edge detection based spilled oil area calculation method to solve one or more technical problems in the prior art, at least to provide a beneficial choice or to create conditions.
[0041] As Figure 1 As shown in the figure, the thermal infrared remote sensing image of the oil film area is acquired by using UAV cruise monitoring, and the key information such as cropping and rotation of the acquired thermal infrared image is reconstructed to obtain the target image of the oil pollution;
[0042] Performing graphic denoising on the target image to obtain a denoised grayscale image is recorded as the first image;
[0043] performing morphological processing on the first image to obtain a second image;
[0044] The improved Canny algorithm is used to detect the edge of the oil spill area on the second image and the area formed by interference factors is eliminated to obtain the number of pixels in the oil spill area;
[0045] The final area of the oil spill is calculated based on the pixel area method combined with the focal length, flight altitude, angle and other parameter information of aerial monitoring;
[0046] The actual area of the calculated oil spill area is visualized.
[0047] Furthermore, by setting the size of the thermal infrared image of the UAV remote sensing monitoring, a thermal infrared remote sensing image of the oil spill is obtained, and the size of the image obtained is agreed to be a digital image of M×N size. The collected thermal infrared image is cropped, rotated and other key information is reconstructed to obtain a target image of the oil pollution. The target image is denoised to obtain a denoised grayscale image recorded as the first image, and the first image is subjected to morphological processing to obtain the second image.
[0048] Preferably, if Figure 2 As shown in the figure, for the thermal infrared image data collected by UAV remote sensing, the image data needs to be preprocessed before image recognition. This is because the original image often has problems such as noise, illumination changes, and inconsistent image size. These factors will affect the accuracy of oil film area extraction. After obtaining the original data set, preprocessing is required. This study performs denoising, enhancement, translation and other operations on the original aerial images, so that it is easier to identify the required targets in the image. The preprocessed image is subjected to image edge detection and segmentation to determine the edge contour of the target area in the image. After using edge detection-based image segmentation, the segmentation result may sometimes have some holes in the target area. For this reason, the holes are filled and solid areas are established. In addition, by performing an expansion operation on the edge of the image, the edge gaps are filled and then the gaps are filled, and finally a binary image of a closed solid surface is obtained. After completing the image segmentation task, the pixels in the feature area are counted, and then the actual area of the oil film area is calculated, thereby realizing the all-day recognition of the oil pollution area in small-scale waters.
[0049] When using edge detection-based image segmentation, the segmentation results may sometimes contain holes in the target area. To address this, these holes are filled to create a solid region. Furthermore, by dilating the image edges, gaps are filled before the gaps are filled, ultimately creating a closed, solid binary image. After completing the image segmentation task, the pixels in the feature region are counted, and the actual area of the oil film is calculated, enabling all-day identification of oil pollution areas in small-scale waters.
[0050] Preferably, if Figure 3 As shown in the figure, the edge of the image is where the local intensity change is most obvious. It is the key to image feature extraction and image segmentation and recognition. Research on image edge detection operators is a very important part of remote sensing image processing technology. Among the traditional edge detection operators, the main edge detection operators are: Roberts operator, Prewitt operator, Sobel operator and Canny operator. The first three are first-order difference operators, that is, they highlight the edge of the object in the image by calculating the derivative of the image grayscale change. The Canny operator is a second-order difference operator, which is very sensitive to the places where the grayscale changes strongly in the image, thereby highlighting the texture structure of the image.
[0051] like Figure 4 As shown in the figure, the improved Canny algorithm is more effective in image edge detection than other classic edge detection algorithms in suppressing noise and preserving edges. However, it still has some shortcomings in preserving edge details and reducing pseudo-edges. To address these issues, combined with the characteristics of thermal infrared oil film images, an improved Canny operator edge detection algorithm is proposed for oil film area identification. Based on the classic Canny operator, a bilateral filter that can remove noise while maintaining good edge characteristics is used instead of a Gaussian filter. Improvements are also made to the threshold and non-maximum suppression to enhance its adaptability to thermal infrared image processing.
[0052] Furthermore, if Figure 5 As shown, the final area of the oil spill area is calculated based on the pixel area method combined with the focal length, flight altitude, angle and other parameter information of aerial monitoring, and the actual area of the calculated oil spill area is visualized. The method for calculating the area of the oil spill area is:
[0053] Obtaining the height of the real plane corresponding to the calculated aerial image, deducing the real area represented by each pixel, calculating the total number of pixels and summing them to obtain the area of the oil film region;
[0054] In the dark area within the camera shooting range, define a closed shape S as the identification area, S represents the area result of the measurement method, and the height and width are AB and DE of the corresponding real plane of the photo, where AB is the target data we want to test;
[0055] The vertical field of view half-angle θ and the image plane height AB can be calculated by the following formula:
[0056]
[0057] In the formula, t=UV represents half the height of the film, f=OV is the focal length, h=OM is the height of the UAV from the ground, is the tilt angle when the UAV is taking pictures, and when taking vertical pictures, the value is 0 degree. Through the UAV aerial photography experiment to collect infrared image telemetry experimental data, and after processing the experimental data, multiply the total number of pixels in the feature area by the actual area S of each pixel point i , the area of the oil film region can be obtained.
[0058] Further, the specific method for performing oil spill area edge detection on the second image is:
[0059] Based on the Canny algorithm, the bilateral filter replaces the Gaussian filter, and the formula of the bilateral filter is defined as follows: define the second image obtained at a certain moment as image I, and set the gray value of image I at position p=(x, y) as I p , the gray value of the processed image RI at position p is RI p , and the formula of the bilateral filter is:
[0060]
[0061] In the above formula, q=(u, v) is the neighborhood point of target point p, S is the set of domain points, W p is the normalization factor, is the spatial proximity factor, is the gray scale similarity factor;
[0062]
[0063] In the above formula, σ s is the standard deviation of the distance, σ r is the standard deviation of the gray scale, and σ s and σ r are the two factors that determine the influence range of the spatial domain filter kernel function and the gray scale filter kernel function, and can be adjusted manually according to the actual situation, thereby changing the true effect of the filter.
[0064] Furthermore, in the improvement of non-maximum suppression based on the Canny algorithm, the method is as follows: interpolation is performed on each point in the sequence, and the interpolation result is compared with the original target pixel. If the preset condition is not met, the value of the point is set to zero;
[0065] Preferably, in the process of solving the global gradient, the first task is to select a specific pixel point and then analyze the gradient value of the point to determine whether it constitutes a local maximum point. This processing method often cannot provide satisfactory detection results in an environment with noise interference;
[0066] Due to the symmetry of the neighborhood, only four of the eight directions need to be considered in practice. These directions are further divided into two categories: one is the gradient vector close to the horizontal direction, and the other is the gradient vector close to the vertical direction. This paper focuses on the two cases of 0° to 45° and 135° to 180° (biased horizontal direction) and 45° to 90° and 90° to 135° (biased vertical direction). In the case of biased horizontal direction, P is used. y (i,j) / P x (i, j) represents the weight, and P is used in the case of vertical direction x (i,j) / P y (i,j) represents the weight.
[0067] Adaptive threshold selection. For each M×N digital image, we generate a 3×3 matrix that is translated within it and use the grayscale mean of all pixels within the matrix as the adaptive threshold. Since the 3×3 matrix will translate along with the image pixels, the grayscale values of the pixels in it will also change continuously, and the corresponding threshold will also be adjusted accordingly. At the same time, each threshold is compared based on the average value in the current 3×3 matrix and the gradient intensity of the center pixel.
Claims
1. A method for calculating oil spill area based on improved edge detection, characterized in that: The method comprises the following steps: Set the size of thermal infrared images for UAV remote sensing monitoring; Acquire thermal infrared remote sensing images based on drone patrol monitoring of oil spills; The thermal infrared remote sensing image is used to detect the edge of the oil spill area and eliminate the area formed by interference factors to obtain the number of pixels in the oil spill area; The actual area of the final oil spill area is visualized by combining thermal infrared remote sensing images with the height, angle and location information of aerial photography; The final area of the oil spill is calculated based on the pixel area method combined with the focal length, flight altitude, and angle parameter information of aerial monitoring, and the actual area of the calculated oil spill area is visualized. The method for calculating the area of the oil spill area is as follows: Obtaining the height of the real plane corresponding to the calculated aerial image, deducing the real area represented by each pixel, calculating the total number of pixels and summing them to obtain the area of the oil film region; In the dark area within the camera's shooting range, define a closed shape S as the recognition area. S represents the area result obtained by the measurement method. The height and width are AB and DE of the real plane corresponding to the photo, respectively, where AB is the target data we want to test; Vertical field of view half angle The image plane height AB is calculated using the following formula: ; ; In the formula, t=UV represents half of the film height, f=OV is the focal length, and h=OM refers to the height of the drone from the ground. It is the tilt angle of the drone during aerial photography. When shooting vertically, its value is 0 degrees. The drone is used to carry out aerial photography experiments to collect infrared image telemetry experimental data. After processing the experimental data, the total number of pixels in the feature area is multiplied by the actual area of each pixel. , the area of the oil film region can be obtained.
2. The oil spill area calculation method based on improved edge detection according to claim 1, characterized in that: The thermal infrared remote sensing image of the oil spill is obtained by setting the size of the thermal infrared image of the UAV remote sensing monitoring, and the image size is agreed to be a digital image of M × N size. The collected thermal infrared image is cropped and the key information is rotated to reconstruct the target image of the oil pollution. The target image is denoised to obtain a denoised grayscale image recorded as the first image, and the first image is subjected to morphological processing to obtain the second image.
3. The oil spill area calculation method based on improved edge detection according to claim 1, characterized in that: The specific method for performing oil spill area edge detection on the second image is: Based on the Canny algorithm, the bilateral filter replaces the Gaussian filter. The formula of the bilateral filter is defined as follows: The second image acquired at a certain moment is defined as image , set the image The gray value at position p=(x, y) is , the processed image The gray value at position p is , the formula of the bilateral filter is: ; ; In the above formula, is the neighborhood point of the target point p, is the set of domain points, is the normalization factor, is the spatial proximity factor, is the grayscale similarity factor; ; ; In the above formula, is the standard deviation of the distance, is the standard deviation of grayscale, and These two factors determine the influence range of the spatial domain filter kernel function and the grayscale filter kernel function, and through manual adjustment based on actual conditions, the actual effect of the filter is changed.
4. The oil spill area calculation method based on improved edge detection according to claim 3 is characterized in that: The improvement of non-maximum suppression based on the Canny algorithm is as follows: interpolate the points in the sequence one by one, and compare the interpolation result with the original target pixel. If the preset conditions are not met, the value of the point is set to zero; Adaptive threshold selection. For each M × N digital image, we generate a 3 × 3 matrix that is translated within it and use the grayscale mean of all pixels within the matrix as the adaptive threshold. Since the 3 × 3 matrix will translate along with the image pixels, the grayscale values of the pixels in it will also change continuously, and the corresponding thresholds will also be adjusted accordingly. At the same time, each threshold is compared based on the average value in the current 3 × 3 matrix and the gradient strength of the center pixel.
Citation Information
Patent Citations
Remote sensing image information extraction method based on FCN-8s and improved Canny edge detection
CN111985329A
Anti-interference aerial remote sensing image shadow accurate detection method
CN114118144A