Box body carrier contour scanning identification method of offshore oil production platform
Through depth camera acquisition and image processing technology, high-precision recognition of the box carrier profile of the offshore oil production platform is achieved, solving the problems of low efficiency and susceptibility to the environment, and improving the recognition accuracy and safety.
Patent Information
- Application Number
- CN202411734842.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-05-06
AI Technical Summary
In the prior art, the identification of box carriers of offshore oil production platforms mainly relies on manual inspection, is inefficient, is susceptible to environmental impact, and poses a threat to the safety of staff in severe weather or night conditions.
The depth camera is used to collect color images and depth images of the box carrier, and through image processing technologies such as filtering and noise reduction, edge detection, straight line detection and rectangular contour connection, high-precision recognition of the box carrier profile.
It realizes high-precision and high-speed identification of the box vehicle profile, improves identification accuracy and efficiency, reduces manual intervention costs, and significantly improves the safety and automation level of offshore oil production platforms.
Smart Images

Figure CN119941616A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of automatic monitoring and identification in marine engineering, and in particular relates to a method for scanning and identifying the contour of a box carrier of an offshore oil production platform. Background Art
[0002] At present, in offshore oil platform operations, it is often necessary to accurately identify whether the outer shells of various types of box carriers meet the usage specifications to ensure efficient transportation and safe storage of materials. At present, the traditional identification method mainly relies on manual inspections. Workers need to go to the site regularly to determine the status of the box carriers through visual inspections or simple measuring tools. This method is not only time-consuming and labor-intensive, but also easily affected by human factors (such as fatigue, distraction) and environmental factors (such as wind and waves, fog, changes in light between day and night, etc.), resulting in low recognition efficiency and prone to errors. In severe weather or night conditions, manual inspections are not only inefficient, but may also pose a threat to the safety of workers. Summary of the invention
[0003] The present invention is proposed to solve the problems existing in the prior art such as low efficiency and susceptibility to environmental influences of traditional manual recognition methods, and its purpose is to provide a method for scanning and recognizing the contour of a box carrier of an offshore oil production platform.
[0004] The present invention is achieved through the following technical solutions:
[0005] A method for scanning and identifying the contour of a box carrier of an offshore oil production platform comprises the following steps:
[0006] S1. Use a depth camera to collect a color image and a depth image of the box vehicle, and filter and reduce noise on the collected color image of the box vehicle;
[0007] S2, attaching a corresponding RGB color to each pixel in the depth image of the box vehicle collected in step S1;
[0008] S3, analyzing the depth distribution range of the box vehicle, setting a depth threshold, and using a global threshold iteration algorithm to binarize the depth image to obtain a foreground image that is estimated to belong to the box vehicle;
[0009] S4, edge detection and straight line detection are performed on the vehicle foreground image, and the edges are connected with a rectangle as the contour target to obtain a closed contour of the candidate target; wherein, the edge detection is implemented by the Canny algorithm, and the straight line detection is implemented by the Hough algorithm;
[0010] S5. Filter according to the aspect ratio of the vehicle, select from the candidate target closed contours those that meet the predetermined vehicle rectangular features, and analyze whether the current vehicle contour depth data meets the predetermined vehicle deformation requirements.
[0011] In the above technical solution, step S2 specifically includes the following steps:
[0012] S21. Construct a three-dimensional vector p ir =(x,y,z), where x,y are the pixel coordinates of the point, and z is the depth value of the pixel;
[0013] S22, obtain the spatial point coordinates P in the Kinect coordinate system ir ;
[0014] Space point coordinates P ir The calculation formula is:
[0015] P ir =H ir -1 *p ir ……(1);
[0016] Where: H ir is the intrinsic parameter matrix of the depth camera Kinect; p ir is a three-dimensional vector;
[0017] S23, the spatial point coordinates P in the Kinect coordinate system obtained in step S22 ir Convert to the spatial point coordinates P in the RGB camera coordinate system rgb , the conversion formula is:
[0018] P rgb =R*P ir +T……(2);
[0019] Where: R is the rotation matrix, T is the translation vector;
[0020] The projection coordinates p of the point on the RGB image plane rgb The calculation formula is:
[0021] p rgb =H rgb *P rgb ……(3);
[0022] Where: H rgb is the intrinsic parameter matrix of the RGB camera;
[0023] S24, using the internal parameter matrix H of the RGB camera rgb Multiply by P rgb , we get p rgb , p rgb is a three-dimensional vector, whose x and y coordinates are the pixel coordinates of the point in the RGB image. The color of the pixel is taken out as the color of the corresponding pixel in the depth image.
[0024] S25 . Repeat steps S21 to S24 for each pixel in the depth image to obtain a registered depth map.
[0025] In the above technical solution, the calculation method of the rotation matrix and the translation vector is: according to the external parameter matrix, a point P in a global coordinate system is transformed into a camera coordinate system, and the depth camera and the RGB camera are transformed respectively, and the following relationship is obtained:
[0026] P ir =R ir *P+T ir ……(4);
[0027] P rgb =R rgb *P+T rgb ……(5);
[0028] Combining equations (4) and (5), we get
[0029] P rgb =R rgb *R ir -1 *P ir +T rgb -R rgb *R ir -1 *T ir ……(6);
[0030] Combining equation (2) and equation (6), we get:
[0031] R=R rgb *R ir -1
[0032] T=T rgb -R rgb *R ir -1 *T ir =T rgb -R*T ir ……(7).
[0033] In the above technical solution, step S3 specifically includes the following steps:
[0034] S31, selecting an initial estimated value T for the global threshold;
[0035] S32, dividing the image by T to generate two groups of pixels, one group G1 consisting of pixels with gray values greater than T, and the other group G2 consisting of pixels with gray values less than or equal to T;
[0036] S33, calculating the average grayscale values m1 and m2 of the G1 and G2 pixels;
[0037] S34, calculating a new threshold value T';
[0038] S35, repeating steps S32 and S34 until the difference between T and T' in consecutive iterations is less than a predefined parameter;
[0039] In the above technical solution, the initial estimated value T is the average grayscale of the image.
[0040] In the above technical solution, the calculation formula of the new threshold value T' is: T'=(m1+m2) / 2...(7).
[0041] In the above technical solution, step S4 specifically includes the following steps:
[0042] S41, performing Gaussian filtering on the foreground image to remove noise;
[0043] S42, calculating a gradient image and an angle image;
[0044] S43, suppressing the non-maximum points of the gradient image obtained in step S42 to remove non-edge pixels; by using the non-maximum suppression method to find the points with local maximum values in the gradient image as edge points, and setting the grayscale values of the points corresponding to the non-maximum values to 0, a thin and accurate single-pixel edge can be formed;
[0045] S44, dual threshold algorithm detects and connects image edges;
[0046] S45, performing Hough detection on the edge binary image, searching for all rectangular contour lines in the Hough space, determining the points of the rectangular contour, and then drawing the candidate target closed contour.
[0047] In the above technical solution, step S5 specifically includes the following steps:
[0048] S51, finding a contour surface feature data set corresponding to the vehicle in the system according to the aspect ratio feature of the vehicle;
[0049] S52: Analyze the collected vehicle contour data set to determine whether the vehicle shell is deformed and whether it meets the usage specifications.
[0050] The beneficial effects of the present invention are:
[0051] The present invention provides a method for scanning and recognizing the contour of a box carrier of an offshore oil production platform. By integrating high-resolution image acquisition, advanced image processing technology and intelligent recognition algorithms, the contour of the box carrier (such as oil storage tanks, equipment boxes, containers, etc.) is automatically recognized with high precision and high efficiency, and deformation problems of the box carrier are discovered. This method can not only improve recognition accuracy and efficiency and reduce manual intervention costs, but also significantly improve the safety and automation level of the offshore oil production platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0053] In order to enable those skilled in the art to better understand the technical solution of the present invention, the technical solution of the present invention is further described below with reference to the accompanying drawings and through specific implementation methods.
[0054] like Figure 1 As shown, a method for scanning and identifying the outline of a box carrier of an offshore oil production platform includes the following steps:
[0055] S1. Use a depth camera to simultaneously collect a color image and a depth image of the box vehicle, and filter and reduce noise on the collected color image (RGB image) of the box vehicle;
[0056] S2, attaching a corresponding RGB color to each pixel in the depth image of the box vehicle collected in step S1, specifically comprising the following steps:
[0057] S21. Construct a three-dimensional vector p ir =(x,y,z), where x,y are the pixel coordinates of the point, and z is the depth value of the point;
[0058] S22, obtain the spatial point coordinates P in the Kinect coordinate system ir , spatial point coordinates P ir The calculation formula is:
[0059] P ir =H ir -1 *p ir ……(1);
[0060] Where: H ir is the intrinsic parameter matrix of the depth camera Kinect; p ir is a three-dimensional vector;
[0061] S23, the spatial point coordinates P in the Kinect coordinate system obtained in step S22 ir Convert to the spatial point coordinates P in the RGB camera coordinate system rgb, the conversion formula is:
[0062] P rgb =R*P ir +T……(2);
[0063] Where: R is the rotation matrix, T is the translation vector;
[0064] The projection coordinates p of the point on the RGB image plane rgb The calculation formula is:
[0065] p rgb =H rgb *P rgb ……(3);
[0066] Where: H rgb is the intrinsic parameter matrix of the RGB camera;
[0067] p ir and p rgb Homogeneous coordinates are used, so when constructing p ir When the original pixel coordinates (x, y) should be multiplied by the depth value, and the final RGB pixel coordinates must be pixel rgb Divide by the z component, that is, (x / z, y / z), and the value of the z component is the distance from the point to the RGB camera (in millimeters);
[0068] How to find the rotation matrix and translation vector that connect the two coordinate systems. This requires the use of the camera's external parameters. The external parameter matrix is actually composed of a rotation matrix R ir (R rgb ) and the translation vector T ir (T rgb ), which means transforming a point P in the global coordinate system to the camera coordinate system, transforming the depth camera and RGB camera respectively, and having the following relationship:
[0069] P ir =R ir *P+T ir ……(4);
[0070] P rgb =R rgb *P+T rgb ……(5);
[0071] Combining equations (4) and (5), we get
[0072] P rgb =R rgb *R ir -1 *P ir +T rgb -Rrgb *R ir -1 *T ir ……(6);
[0073] Combining equation (2) and equation (6), we get:
[0074] R=R rgb *R ir -1
[0075] T=T rgb -R rgb *R ir -1 *T ir =T rgb -R*T ir ……(7);
[0076] S24, using the internal parameter matrix H of the RGB camera rgb Multiply by P rgb , we get p rgb , p rgb It is also a three-dimensional vector, whose x and y coordinates are the pixel coordinates of the point in the RGB image. The color of the pixel is taken out as the color of the corresponding pixel in the depth image.
[0077] S25, repeating the operations of steps S21 to S24 for each pixel in the depth image to obtain a registered depth map;
[0078] S3, analyzing the depth distribution range of the vehicle, setting a depth threshold; using a global threshold iteration algorithm to binarize the depth image, and obtaining a foreground image estimated to belong to the box vehicle, specifically including the following steps:
[0079] S31, selecting an initial estimated value T for the global threshold, where the initial estimated value T is the average grayscale of the image;
[0080] S32, dividing the image by T to generate two groups of pixels, one group G1 consisting of pixels with gray values greater than T, and the other group G2 consisting of pixels with gray values less than or equal to T;
[0081] S33, calculating the average grayscale values m1 and m2 of the G1 and G2 pixels;
[0082] S34, calculate a new threshold value T',
[0083] The calculation formula of T' is: T'=(m1+m2) / 2……(7);
[0084] S35, repeating steps S32 and S34 until the difference between T and T' in consecutive iterations is less than a predefined parameter;
[0085] S4, edge detection and line detection are performed on the vehicle foreground image, and the edges are connected with a rectangle as the contour target to obtain a closed contour of the candidate target; wherein the edge detection is implemented by the Canny algorithm, and the line detection is implemented by the Hough algorithm, which specifically includes the following steps:
[0086] S41, performing Gaussian filtering on the foreground image to remove noise;
[0087] S42, calculating a gradient image and an angle image;
[0088] S43, suppressing the non-maximum points of the gradient image obtained in step S42 to remove non-edge pixels; by using the non-maximum suppression method to find the points with local maximum values in the gradient image as edge points, and setting the grayscale values of the points corresponding to the non-maximum values to 0, a thin and accurate single-pixel edge can be formed;
[0089] Since the gradient image obtained in step S42 has problems of uneven edge width, blur and misrecognition, it is necessary to suppress the non-maximum points of the gradient image to remove those non-edge pixels;
[0090] S44, using a dual threshold algorithm to detect and connect image edges;
[0091] The specific method is based on the reference "Canny Edge Detection Step 4 - Double Threshold Detection & Edge Connection";
[0092] S45, performing Hough detection on the edge binary image, searching for all rectangular contour lines in the Hough space, determining the points of the rectangular contour, and then drawing the closed contour of the candidate target;
[0093] The Hough detection of the edge binary image is performed according to the record of the prior art "Binary Image Analysis-Hough Line Detection";
[0094] S5, filtering according to the aspect ratio of the vehicle, selecting from the candidate target closed contours those that meet the predetermined vehicle rectangular features, and analyzing whether the current vehicle contour depth data meets the predetermined vehicle deformation requirements, specifically including the following steps:
[0095] S51, finding a contour surface feature data set corresponding to the vehicle in the system according to the aspect ratio feature of the vehicle;
[0096] S52: Analyze the collected vehicle contour data set to determine whether the vehicle shell is deformed and whether it meets the usage specifications.
[0097] The contour data set analysis is specifically as follows:
[0098] First, the collected contour dataset is cleaned to remove noise and outliers;
[0099] Then, the contour data is converted into a unified contour polygon format, and the aspect ratio geometric features of the contour are extracted to analyze the density, uniformity, directionality and other features of the contour points, which are used to identify the local features and details of the contour and extract the gradient, curvature and other features of the contour edge;
[0100] Finally, based on these characteristics, it is determined whether the vehicle's shell is deformed and whether it meets the usage specifications.
[0101] The present invention integrates advanced image acquisition, processing and recognition technologies to achieve automatic and accurate recognition and positioning of the contours of various box vehicles (such as oil storage tanks, equipment boxes, containers, etc.) on offshore oil production platforms, and analyzes whether the vehicle is within the safe use range based on the surface deformation characteristics of the vehicle, thereby more accurately assessing the potential risks of the vehicle use process; the present invention not only solves the problems of low efficiency and susceptibility to environmental influences in traditional manual recognition methods, but also significantly improves the safety and efficiency of offshore oil production platform operations; by realizing automated recognition and management, it reduces manual intervention and inspection times, thereby reducing operation and maintenance costs. At the same time, the efficient operation of the present invention also improves overall operating efficiency and further reduces unit costs.
[0102] The applicant declares that the above is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Those skilled in the art should understand that any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention shall fall within the protection scope and disclosure scope of the present invention.
Claims
1. A method for scanning and identifying the contour of a box carrier of an offshore oil production platform, characterized in that: The following steps are involved: S1. Use a depth camera to collect a color image and a depth image of the box vehicle, and filter and reduce noise on the collected color image of the box vehicle; S2, attaching a corresponding RGB color to each pixel in the depth image of the box vehicle collected in step S1; S3, analyzing the depth distribution range of the box vehicle, setting a depth threshold, and using an iterative algorithm of a global threshold to binarize the depth image to obtain a foreground image that is estimated to belong to the box vehicle; S4, edge detection and straight line detection are performed on the vehicle foreground image, and the edges are connected with a rectangle as the contour target to obtain a closed contour of the candidate target; wherein, the edge detection is implemented by the Canny algorithm, and the straight line detection is implemented by the Hough algorithm; S5. Filter according to the aspect ratio of the vehicle, select from the candidate target closed contours those that meet the predetermined vehicle rectangular features, and analyze whether the current vehicle contour depth data meets the predetermined vehicle deformation requirements.
2. The method for scanning and identifying the outline of a box carrier of an offshore oil production platform according to claim 1, characterized in that: The step S2 specifically includes the following steps: S21. Construct a three-dimensional vector p ir =(x,y,z), where x,y are the pixel coordinates of the point, and z is the depth value of the point; S22, obtain the spatial point coordinates P in the Kinect coordinate system ir ; Space point coordinates P ir The calculation formula is: P ir =H ir -1 *p ir ……(1); Where: H ir is the intrinsic parameter matrix of the depth camera Kinect; p ir is a three-dimensional vector; S23, the spatial point coordinates P in the Kinect coordinate system obtained in step S22 ir Convert to the spatial point coordinates P in the RGB camera coordinate system rgb , the conversion formula is: P rgb =R*P ir +T……(2); Where: R is the rotation matrix, T is the translation vector; The projection coordinates p of the point on the RGB image plane rgb The calculation formula is: p rgb =H rgb *P rgb ……(3); Where: H rgb is the intrinsic parameter matrix of the RGB camera; S24, using the internal parameter matrix H of the RGB camera rgb Multiply by P rgb , we get p rgb , p rgb is a three-dimensional vector, whose x and y coordinates are the pixel coordinates of the point in the RGB image. The color of the pixel is taken out as the color of the corresponding pixel in the depth image. S25 . Repeat steps S21 to S24 for each pixel in the depth image to obtain a registered depth map.
3. The method for scanning and identifying the contour of a box carrier of an offshore oil production platform according to claim 2, characterized in that: The calculation method of the rotation matrix and the translation vector is: according to the external parameter matrix, a point P in the global coordinate system is transformed into the camera coordinate system, and the depth camera and the RGB camera are transformed respectively, and the following relationship exists: P ir =R ir *P+T ir ……(4); P rgb =R rgb *P+T rgb ……(5); Combining equations (4) and (5), we get P rgb =R rgb *R ir -1 *P ir +T rgb -R rgb *R ir -1 *T ir ……(6); Combining equation (2) and equation (6), we get: R=R rgb *R ir -1 T=T rgb -R rgb *R ir -1 *T ir =T rgb -R*T ir ……(7)。 4. The method for scanning and identifying the contour of a box carrier of an offshore oil production platform according to claim 1, characterized in that: The step S3 specifically comprises the following steps: S31, selecting an initial estimated value T for the global threshold; S32, dividing the image by T to generate two groups of pixels, one group G1 consisting of pixels with gray values greater than T, and the other group G2 consisting of pixels with gray values less than or equal to T; S33, calculating the average grayscale values m1 and m2 of the G1 and G2 pixels; S34, calculating a new threshold value T'; S35, repeating steps S32 and S34 until the difference between T and T' in consecutive iterations is less than a predefined parameter.
5. The method for scanning and identifying the outline of a box carrier of an offshore oil production platform according to claim 4, characterized in that: The initial estimated value T is the average grayscale of the image.
6. The method for scanning and identifying the outline of a box carrier of an offshore oil production platform according to claim 4, characterized in that: The calculation formula of the new threshold value T' is: T'=(m1+m2) / 2...(7).
7. The method for scanning and identifying the outline of a box carrier of an offshore oil production platform according to claim 1, characterized in that: The step S4 specifically comprises the following steps: S41, performing Gaussian filtering on the foreground image to remove noise; S42, calculating a gradient image and an angle image; S43, suppressing the non-maximum points of the gradient image obtained in step S42 to remove non-edge pixels; by using the non-maximum suppression method to find the points with local maximum values in the gradient image as edge points, and setting the grayscale values of the points corresponding to the non-maximum values to 0, a thin and accurate single-pixel edge can be formed; S44, dual threshold algorithm detects and connects image edges; S45, performing Hough detection on the edge binary image, searching for all rectangular contour lines in the Hough space, determining the points of the rectangular contour, and then drawing the candidate target closed contour.
8. The method for scanning and identifying the outline of a box carrier of an offshore oil production platform according to claim 1, characterized in that: The step S5 specifically comprises the following steps: S51, finding a contour surface feature data set corresponding to the vehicle in the system according to the aspect ratio feature of the vehicle; S52: Analyze the collected vehicle contour data set to determine whether the vehicle shell is deformed and whether it meets the usage specifications.