Oil spilling area measuring and calculating method based on improved edge detection
Through the improved Canny algorithm and bilateral filters, edge detection in offshore oil spill monitoring is solved, and the problem of inaccurate edge identification of oil spill areas in the prior art is achieved, achieving higher recognition accuracy and reliability of oil spill area calculation.
Patent Information
- Application Number
- CN202411752004.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-02
AI Technical Summary
The prior art is difficult to effectively remove impurity information in offshore oil spill monitoring, resulting in inaccurate identification of the edge of the oil spill area and affecting the accuracy of the calculation of the oil spill area.
The improved Canny algorithm is used, combined with bilateral filters and adaptive threshold selection, edge detection of thermal infrared remote sensing images is carried out, interference factors are eliminated, and adaptability to thermal infrared image processing is enhanced.
While ensuring the complete characteristics of edge information, impurity information is effectively eliminated, the accuracy of edge identification of oil spill areas is improved, and the pollution area of irregular oil film areas can be quickly, objectively and reasonably evaluated.
Smart Images

Figure CN119625046A_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 about 80% of the world's total trade in goods, and the development of the shipping industry has also promoted the development of the global economy. However, with the increasing number of ships at sea, their tonnage and size, shipping safety and pollution prevention face more complex challenges.
[0003] my country is the world's second largest oil importer, and more than 90% of China's oil imports are transported by ship. In recent years, with the continuous increase in my country's maritime trade business, the pressure on maritime transportation has also gradually increased, and the risk of oil spill pollution from ships has continued to increase.
[0004] Among the existing marine environment monitoring systems, remote sensing monitoring is still the most effective method. However, the remote sensing data collected directly is mixed with a large amount of information and is affected by many objective factors. There is a lot of interference information. In order to minimize the impact of interference, highlight the required information, and accurately identify and evaluate the oil spill situation, the collected raw data needs to be processed by computer to more easily extract effective information. Therefore, the processing method of digital images obtained by remote sensing monitoring has become the key. Summary of the invention
[0005] The purpose of the present invention is to propose a method for calculating 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 cruise monitoring of oil spills;
[0009] The edge of the oil spill area is detected on the thermal infrared remote sensing image and the area formed by interference factors is eliminated 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 is agreed to be a digital image of M×N size, and the key information such as cropping and rotation of the collected thermal infrared image is reconstructed to obtain the target image of the oil pollution, and 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, etc. 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, so as to highlight the texture structure of the image.
[0013] Improved Canny algorithm, in the image edge detection algorithm, compared with other classic edge detection algorithms, the Canny operator is better in suppressing noise and retaining edges, but it still has some shortcomings in retaining edge details and reducing pseudo edges. In view of these problems, combined with the characteristics of thermal infrared oil film images, an improved Canny operator edge detection algorithm is proposed for the identification of oil film area. On the basis of the classic Canny operator, a bilateral filter that can remove noise while maintaining good edge characteristics is used to replace the Gaussian filter, and the threshold and non-maximum suppression are improved to enhance its adaptability to thermal infrared image processing.
[0014] Furthermore, the area of the final oil spill area is calculated according to the pixel area method in combination with the focal length, flight altitude, angle and other parameter information of the aerial monitoring, and the actual area of the oil spill area calculated is visualized. The method for calculating the area of the oil spill area is:
[0015] Obtain the height of the real plane corresponding to the calculated aerial image, deduce the real area represented by each pixel, calculate the number of the entire pixels and sum them up 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 by the following formula:
[0018]
[0019] 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 point S. i , the area of the oil film region can be obtained.
[0020] Furthermore, the specific method for performing oil spill area edge detection on the second image is:
[0021] 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 I, and the gray value of image I at position p = (x, y) is set to I p , the gray value of the processed image RI at position p is RI p , the formula of the bilateral filter is:
[0022]
[0023] In the above formula, q = (u, v) is the neighborhood point of the target point p, S is the set of domain points, and W p is the normalization factor, is the spatial proximity factor, is the grayscale similarity factor;
[0024]
[0025] In the above formula, σ s is the standard deviation of the distance, σ r is the standard deviation of the grayscale, the σ s With σ r These two factors determine the influence range of the spatial domain filter kernel function and the grayscale filter kernel function, and can be manually adjusted according to actual conditions to change the actual effect of the filter.
[0026] Furthermore, in the improvement of non-maximum suppression based on the Canny algorithm, the method is specifically as follows: interpolation processing is performed on the points in the sequence one by one, 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;
[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 interfered by noise;
[0028] In view of the symmetric characteristics of the neighborhood, only 4 of the 8 directions need to be considered in actual operation. 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 to the horizontal direction) and 45° to 90° and 90° to 135° (biased to the vertical direction). In the case of the 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 size 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 with the image pixels, the grayscale values of the pixels therein 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 intensity of the central 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. The main information response of the edge of the oil film area ensures the recognition efficiency while improving the accuracy of edge recognition, and extracts clear and complete areas of crude oil film and diesel oil film. The method is based on the principle of pixel area method for measurement, and combines the geometric relationship of aerial photography within a small angle and parameter information 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 obvious by describing in detail the embodiments shown in the accompanying drawings. The same reference numerals in the accompanying drawings of the present invention represent the same or similar elements. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work. In the accompanying drawings:
[0032] Figure 1It is a flow chart of a pixel area measurement method based on an improved edge detection method for oil spill area estimation;
[0033] Figure 2 It is a flow chart of a pixel area measurement method based on an improved edge detection method for oil spill area estimation;
[0034] Figure 3 This is a flow chart of oil film image morphological processing based on a pixel area method for measuring oil spill area using an improved edge detection method;
[0035] Figure 4 It is a flowchart of an improved Canny algorithm for the pixel area measurement method of the oil spill area measurement method based on improved edge detection;
[0036] Figure 5 The figure is a schematic diagram of a method for calculating the area of an oil spill region using a pixel area measurement method based on an improved edge detection method for calculating the area of an oil spill. DETAILED DESCRIPTION
[0037] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0038] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0039] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand the advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0040] The purpose of the present invention is to propose a method for calculating 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.
[0041] like Figure 1 As shown in the figure, the thermal infrared remote sensing image of the oil film area is obtained by using the UAV cruise monitoring, and the key information such as cropping and rotation of the collected 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 is agreed to be a digital image of M×N size, and the key information such as cropping and rotation of the collected thermal infrared image is reconstructed to obtain the target image of the oil pollution, and 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 noise, illumination changes, inconsistent image size and other problems. 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 segmented by image edge detection to determine the edge contour of the target area in the image. After 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, the internal edge of the image is expanded, the edge gap is filled and then the gap is 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 will be counted, and then the actual area of the oil film area will be calculated, thereby realizing the all-day recognition of the oil pollution area in small-scale waters;
[0049] After 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, the internal edge of the image is expanded to fill the edge gaps and then fill the gaps, and finally a closed solid surface binary image is obtained. After completing the image segmentation task, the pixels in the feature area will be counted, and then the actual area of the oil film area will be calculated, thereby realizing the all-day identification of the oil pollution area 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, etc. 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, so as to highlight the texture structure of the image.
[0051] like Figure 4 As shown in the figure, the improved Canny algorithm is better in suppressing noise and retaining edges in image edge detection algorithms than other classic edge detection algorithms, but it still has some shortcomings in retaining edge details and reducing pseudo edges. In view of these problems, combined with the characteristics of thermal infrared oil film images, an improved Canny operator edge detection algorithm is proposed for oil film area recognition. On the basis of the classic Canny operator, a bilateral filter that can remove noise while maintaining good edge characteristics is used to replace the Gaussian filter, and the threshold and non-maximum suppression are improved to enhance its adaptability to thermal infrared image processing.
[0052] Furthermore, if Figure 5 As shown, the area of the final oil spill area is calculated according to 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] Obtain the height of the real plane corresponding to the calculated aerial image, deduce the real area represented by each pixel, calculate the number of the entire pixels and sum them up to obtain the area of the oil film region;
[0054] 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.
[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 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 point S. i , the area of the oil film region can be obtained.
[0058] Furthermore, 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. The formula of the bilateral filter is defined as follows: the second image acquired at a certain moment is defined as image I, and the gray value of image I at position p = (x, y) is set to I p , the gray value of the processed image RI at position p is RI p , the formula of the bilateral filter is:
[0060]
[0061] In the above formula, q = (u, v) is the neighborhood point of the target point p, S is the set of domain points, and W p is the normalization factor, is the spatial proximity factor, is the grayscale similarity factor;
[0062]
[0063] In the above formula, σ s is the standard deviation of the distance, σ r is the standard deviation of the grayscale, the σ s With σ r These two factors determine the influence range of the spatial domain filter kernel function and the grayscale filter kernel function, and can be manually adjusted according to actual conditions to change the actual effect of the filter.
[0064] Furthermore, in the improvement of non-maximum suppression based on the Canny algorithm, the method is specifically as follows: interpolation processing is performed on the points in the sequence one by one, 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 interfered by noise;
[0066] In view of the symmetric characteristics of the neighborhood, only 4 of the 8 directions need to be considered in actual operation. 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 to the horizontal direction) and 45° to 90° and 90° to 135° (biased to the vertical direction). In the case of the 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 size 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 with the image pixels, the grayscale values of the pixels therein 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 intensity of the central 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 cruise monitoring of oil spills; The edge of the oil spill area is detected on the thermal infrared remote sensing image and the area formed by interference factors is eliminated 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 aerial photography information such as height, angle, and position.
2. The oil spill area estimation method based on improved edge detection according to claim 1 is 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 size of the image is agreed to be a digital image of M×N size. The key information such as cropping and rotation of the collected thermal infrared image is reconstructed to obtain 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 morphologically processed to obtain the second image.
3. The oil spill area estimation method based on improved edge detection according to claim 1 is characterized in that: The final area of the oil spill area is calculated according to 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 oil spill area calculated is visualized. The method for calculating the area of the oil spill area is: Obtain the height of the real plane corresponding to the calculated aerial image, deduce the real area represented by each pixel, calculate the number of the entire pixels and sum them up 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 And the image plane height AB can be calculated by the following formula: ; ; In the formula, Represents half the height of the negative, is the focal length, , 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 conduct 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.
4. The method for calculating oil spill area based on improved edge detection according to claim 1, characterized in that: The specific method for detecting the edge of the oil spill area 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 can be manually adjusted according to actual conditions to change the actual effect of the filter.
5. The method for calculating oil spill area based on improved edge detection according to claim 4, characterized in that: The improvement of non-maximum suppression based on the Canny algorithm 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. Adaptive threshold selection,For each M×N size 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 with the image pixels, the grayscale values of the pixels therein 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 intensity of the central 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
Method and device for remotely measuring oil pollution area of offshore sea area
CN117745799A
Image edge detection method based on Canny algorithm
CN118552746A
Building engineering area measurement method and system based on aerial photography of unmanned aerial vehicle
CN118823587A
Cited By
Canal water surface oil spill monitoring and early warning method and system and electronic equipment
CN120976794A