Drilling tool seam height detection method and system based on monocular vision
By installing a monocular camera on the drilling platform, collecting drill tool images and identifying seam height, the problem of low efficiency in manual adjustment of jaw height is solved, automatic detection and adaptive correction are achieved, and drilling operation efficiency and safety are improved.
Patent Information
- Application Number
- CN202411343705.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-09-25
AI Technical Summary
Existing iron drilling equipment requires manual adjustment of jaw height and input drill rod diameter, resulting in low working efficiency and large human operation errors, which can easily cause jaw damage and drilling failure.
Using a monocular vision-based drilling tool joint height detection method, the drilling tool image is collected, the drilling tool joint height is identified, and the calibration relationship is updated through adaptive calibration to automatically detect the drilling. With seam height.
No additional calibration devices and sample data are required, drilling tool height detection and status detection are realized, manual calibration workload is reduced, drilling operation efficiency is improved, and failure risk is reduced.
Smart Images

Figure CN119399108A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of drilling engineering, and in particular to a method and system for detecting the height of a drilling tool joint based on monocular vision. Background Art
[0002] During the process of pulling out of the oil drilling platform and drilling down, the iron roughneck is a key equipment for performing the tasks of making up and breaking out the drill tools. During the making up process, the iron roughneck's jaws clamp the connector on the drill pipe, and through precise rotation operations, the two drill tools are tightly connected. When it is necessary to break out the screws, the iron roughneck's jaws rotate in the opposite direction to easily remove the connector. At present, most iron roughneck equipment needs to be manually adjusted in the process of using the iron roughneck and the drill pipe diameter is input to determine the jaw movement position, jaw clamping force and tightening torque, which reduces work efficiency; sometimes manual operation deviations occur, such as large errors in the height adjustment of the iron roughneck's jaws. When the jaw clamping belt contains the drill tool wear-resistant belt, it will cause the front teeth of the jaws to break, resulting in abnormal equipment loss and increasing the probability of drilling operation failures.
[0003] Therefore, there is an urgent need for a method to automatically detect the height of the drill joint to reduce human intervention, thereby improving the automation level of the iron driller, reducing the risk of operational failures, and improving the efficiency of drilling operations. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] In view of the problems existing in the above technologies, the present invention solves them to a certain extent. To this end, the purpose of the present invention is to provide a method and device for detecting the height of a drill joint based on monocular vision, which solves the technical problem that the height of the iron roughneck jaws needs to be manually adjusted during the use of the current iron roughneck equipment.
[0006] (II) Technical solution
[0007] In order to achieve the above object, the main technical solutions adopted by the present invention include:
[0008] In a first aspect, the present invention provides a method for detecting the height of a drill joint based on monocular vision, which detects the height of a drill joint based on a monocular camera installed on a drilling platform, comprising the following steps:
[0009] Step S1: After the monocular camera is installed on the drilling platform, the correspondence between the pixel height and the physical space height in the drilling tool image collected by the monocular camera is initially calibrated to obtain a calibration relationship;
[0010] Step S2, obtaining a drilling tool image captured by a monocular camera, and dividing the drilling tool image into regions of interest to obtain a ROI region of interest that only includes wellhead drilling tools or rathole drilling tools; wherein the field of view of the monocular camera includes the iron roughneck area, the wellhead rotary table area, and the rathole area;
[0011] Step S3, identifying that there is a female joint of the drilling tool in the ROI region of interest, and obtaining a female joint identification frame; the upper edge of the female joint identification frame coincides with the upper edge of the female joint of the drilling tool in the ROI region of interest;
[0012] Step S4, obtaining drilling tool joint height information according to the pixel height information at the upper edge of the female joint identification frame and the calibration relationship;
[0013] Step S5: After a preset time interval from the start of the last calibration, adaptively calibrate the correspondence between the pixel height and the physical space height in the drilling tool image collected by the monocular camera, and update the calibration relationship; repeat steps S2 to S5 according to the updated calibration relationship.
[0014] Optionally, the correspondence between the pixel height and the physical space height in the drilling tool image acquired by the monocular camera is initially calibrated, including:
[0015] Step A1, obtaining three drilling tool images captured by a monocular camera, wherein the three drilling tool images are taken when the physical heights of the iron roughneck's hand gripping jaws from the drilling platform surface are W1, W2, and W3 respectively;
[0016] Step A2, identifying the iron roughneck's hand grip jaws in the three drilling tool images, obtaining a jaw recognition frame, and determining the pixel heights of the iron roughneck's hand grip jaws in the three drilling tool images as P1, P2, and P3, respectively, according to the pixel coordinates of the center position of the jaw recognition frame;
[0017] Step A3: Perform initial calibration based on W1, W2, W3 and P1, P2, P3 to obtain a calibration relationship.
[0018] Optionally, an initial calibration is performed based on W1, W2, W3 and P1, P2, P3, and the formula is expressed as:
[0019] H x =(P x -P2)×Δh3+W2
[0020]
[0021]
[0022] Where P x is the pixel height of pixel x in the drilling tool image; H x is the physical space height corresponding to pixel x in the drilling tool image; K is the calibration quality evaluation index;
[0023] If |K-1|<0.0005, the calibration accuracy meets the use requirements. If |K-1|≥0.0005, repeat steps A1 to A3.
[0024] Optionally, step S3 is: identifying that there are a female joint and a male joint of the drill tool in the ROI region of interest, obtaining a female joint identification frame and a male joint identification frame; the upper edge of the female joint identification frame coincides with the upper edge of the female joint of the drill tool in the ROI region of interest, and the lower edge of the male joint identification frame coincides with the lower edge of the male joint of the drill tool in the ROI region of interest;
[0025] Step S4 also includes: obtaining drilling tool status information according to pixel height information at the upper edge of the female joint identification frame and pixel height information at the lower edge of the male joint identification frame.
[0026] Optionally, the drill tool status information is obtained based on the pixel height information at the upper edge of the female connector identification frame and the pixel height information at the lower edge of the male connector identification frame, including: obtaining a height difference value based on the pixel height information at the upper edge of the female connector identification frame and the pixel height information at the lower edge of the male connector identification frame; if the height difference value is greater than a first preset threshold value, the drill tool status is obtained as a male connector and female connector not connected state; if the height difference value is between the first preset threshold value and the second preset threshold value, the drill tool status is obtained as a male connector and female connector connected state; if the height difference value is less than the second preset threshold value, the drill tool status is obtained as a male connector and female connector tightened state; wherein the second preset threshold value is less than the first preset threshold value.
[0027] Optionally, step S3 further includes: identifying that only a female drill joint exists in the ROI region of interest, and obtaining the drill status as a female joint only state; identifying that only a male drill joint exists in the ROI region of interest, and obtaining the drill status as a male joint only state.
[0028] Optionally, adaptively calibrating the correspondence between the pixel height and the physical space height in the drilling tool image acquired by the monocular camera, and updating the calibration relationship, including:
[0029] Step B1: Use the drilling tool image collected in the last calibration as the reference image, perform SIFT feature extraction on the reference image, and obtain a reference key point descriptor set and a reference key point pixel coordinate set;
[0030] Step B2, obtaining a drilling tool image acquired in real time by a monocular camera as a correction image, performing SIFT feature extraction on the correction image, and obtaining a correction key point descriptor set and a correction key point pixel coordinate set;
[0031] Step B3. According to the reference key point descriptor set, the reference key point pixel coordinate set, the corrected key point descriptor set, and the corrected key point pixel coordinate set, use the brute-force matching method with an increased pixel neighborhood to match the reference key points and the corrected key points, and obtain the successfully matched key points;
[0032] Step B4. According to three groups of matched key points selected from the successfully matched key points, perform adaptive calibration and update the calibration relationship.
[0033] Optionally, according to the reference key point descriptor set, the reference key point pixel coordinate set, the corrected key point descriptor set, and the corrected key point pixel coordinate set, use the brute-force matching method with an increased pixel neighborhood to match the reference key points and the corrected key points. The formula is expressed as:
[0034]
[0035] If Δp < PI and Δd < DI, then am and bm are successfully matched;
[0036] In the formula, am is the reference key point, and bm is the corrected key point; d am is the descriptor of the reference key point am, is the nth-dimensional vector in the descriptor of the reference key point am; d bm is the descriptor of the reference key point bm, is the nth-dimensional vector in the descriptor of the reference key point bm; Δd is the Euclidean distance between the key point am and the key point bm; p amx is the pixel abscissa of the reference key point am, p amy is the pixel ordinate of the reference key point am; p bmx is the pixel abscissa of the reference key point bm, p bmy is the pixel ordinate of the reference key point bm; PI is the third preset threshold, and DI is the fourth preset threshold.
[0037] Optionally, according to three groups of matched key points selected from the successfully matched key points, perform adaptive calibration and update the calibration relationship. The updated calibration relationship formula is expressed as:
[0038] H x =(P x -P b2y )×Δh + a2h
[0039]
[0040] In the formula, P x is the pixel height of the pixel x in the drill string image; H xis the physical space height corresponding to pixel x in the drilling tool image; the reference key point a1 matches the correction key point b1, the reference key point a2 matches the correction key point b2, and the reference key point a3 matches the correction key point b3; p b1y is the pixel ordinate of the reference key point b1, p b2y is the pixel ordinate of the reference key point b2, p b3y is the pixel ordinate of the benchmark key point b3; a1h is the physical space height corresponding to the benchmark key point a1, a2h is the physical space height corresponding to the benchmark key point a2, and a3h is the physical space height corresponding to the benchmark key point a3; a1h is calculated based on the calibration relationship obtained from the last calibration and the pixel ordinate of the benchmark key point a1, a2h is calculated based on the calibration relationship obtained from the last calibration and the pixel ordinate of the benchmark key point a2, and a3h is calculated based on the calibration relationship obtained from the last calibration and the pixel ordinate of the benchmark key point a3.
[0041] In a second aspect, the present invention provides a drilling tool joint height detection system based on monocular vision, comprising a monocular camera and a detection device; the monocular camera is used to collect drilling tool images;
[0042] The detection device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program stored in the memory, the steps of the drilling tool joint height detection method based on monocular vision as described above are implemented.
[0043] (III) Beneficial effects
[0044] The beneficial effects of the present invention are:
[0045] The drill joint height detection method based on monocular vision proposed in the present invention can realize drill height detection and drill status detection without additional calibration device and sample data comparison. At the same time, in the drill detection method, by regularly collecting corrected images and extracting SIFT features for matching and comparison, adaptive correction of the height detection system is realized, which reduces the calibration workload of the staff. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The present invention is described with the aid of the following drawings:
[0047] Figure 1 It is a schematic diagram of the flow of a method for detecting the height of a drilling tool joint based on monocular vision according to a specific embodiment of the present invention;
[0048] Figure 2 In order to identify the existence of a female joint and a male joint of a drilling tool in the ROI region of interest according to a specific embodiment of the present invention, a schematic diagram of a female joint identification frame and a male joint identification frame is obtained. DETAILED DESCRIPTION
[0049] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation modes in conjunction with the accompanying drawings.
[0050] Figure 1 A schematic flow chart of a method for detecting drilling tool joint height based on monocular vision provided by the present invention.
[0051] like Figure 1 As shown, the drilling tool joint height detection method based on monocular vision includes the following steps:
[0052] Step S1: After the monocular camera is installed on the drilling platform, the correspondence between the pixel height and the physical space height in the drilling tool image collected by the monocular camera is initially calibrated to obtain a calibration relationship.
[0053] Specifically, after the monocular camera is installed on the drilling platform, the position of the monocular camera is fixed and no longer moves.
[0054] The field of view of the monocular camera includes the iron roughneck area, the wellhead rotary area, and the rathole area. The iron roughneck performs make-up and break-out operations on the wellhead drill pipe and the rathole drill pipe. In order to detect the height of the drill tool joint to guide the operation of the iron roughneck, the field of view of the monocular camera needs to include the iron roughneck area, the wellhead rotary area, and the rathole area.
[0055] Preferably, the correspondence between the pixel height and the physical space height in the drilling tool image captured by the monocular camera is initially calibrated, including:
[0056] Step A1, obtaining three drilling tool images captured by a monocular camera, wherein the three drilling tool images are taken when the physical heights of the iron roughneck's hand gripping jaws from the drilling platform surface are W1, W2, and W3, respectively.
[0057] Step A2, identifying the iron roughneck's hand grip jaws in the three drilling tool images, obtaining a jaw recognition frame, and determining the pixel heights of the iron roughneck's hand grip jaws in the three drilling tool images as P1, P2, and P3, respectively, based on the pixel coordinates of the center position of the jaw recognition frame.
[0058] Step A3: Perform initial calibration based on W1, W2, W3 and P1, P2, P3 to obtain a calibration relationship.
[0059] Specifically, the acquisition process of the three drilling tool images is as follows: first, the iron roughneck is controlled to move to the wellhead position, and then the iron roughneck's hand grip jaws are controlled to move to any three different heights, and the monocular camera is controlled to take pictures to obtain the three drilling tool images. The physical heights W1, W2, and W3 of the iron roughneck's hand grip jaws from the drilling platform surface can be read from the iron roughneck control system.
[0060] Further preferably, initial calibration is performed according to W1, W2, W3 and P1, P2, P3, and the formula is expressed as:
[0061] H x =(P x -P2)×Δh3+W2
[0062]
[0063] Where P x is the pixel height of pixel x in the drilling tool image; H x is the physical space height corresponding to pixel x in the drilling tool image; K is the calibration quality evaluation index;
[0064] If |K-1|<0.0005, the calibration accuracy meets the use requirements. If |K-1|≥0.0005, repeat steps A1 to A3.
[0065] Step S2, obtaining a drilling tool image captured by a monocular camera, and dividing the drilling tool image into regions of interest to obtain a ROI region of interest that only includes wellhead drilling tools or rathole drilling tools.
[0066] Step S3: Identify that there are a female joint and a male joint of a drilling tool in the ROI region of interest, and obtain a female joint identification frame and a male joint identification frame (such as Figure 2 The upper edge of the female joint identification frame coincides with the upper edge of the female joint of the drilling tool in the ROI region of interest, and the lower edge of the male joint identification frame coincides with the lower edge of the male joint of the drilling tool in the ROI region of interest.
[0067] Preferably, step S3 further includes: recognizing that only a female joint of the drill tool exists in the ROI region of interest, obtaining the drill tool status as a female joint-only state; recognizing that only a male joint of the drill tool exists in the ROI region of interest, obtaining the drill tool status as a male joint-only state. In this way, the drill tool status information, i.e., only female joint status information and only male joint status information, can be provided to the staff.
[0068] Step S4, obtain the drill joint height information according to the pixel height information at the upper edge of the female joint identification frame and the calibration relationship; obtain the drill status information according to the pixel height information at the upper edge of the female joint identification frame and the pixel height information at the lower edge of the male joint identification frame.
[0069] The drill joint height is the physical space height corresponding to the pixel at the upper edge of the female joint identification frame. The current drill joint height is calculated, and the driller can read the data to automatically perform the drill joint operation.
[0070] Preferably, according to the pixel height information at the upper edge of the female joint identification frame and the pixel height information at the lower edge of the male joint identification frame, the drill tool status information is obtained, including: according to the pixel height information at the upper edge of the female joint identification frame and the pixel height information at the lower edge of the male joint identification frame, the height difference is obtained; if the height difference is greater than the first preset threshold, the drill tool status is obtained as the male joint and female joint are not connected; if the height difference is between the first preset threshold and the second preset threshold, the drill tool status is obtained as the male joint and female joint are connected; if the height difference is less than the second preset threshold, the drill tool status is obtained as the male joint and female joint are tightened; wherein the second preset threshold is less than the first preset threshold. In this way, the drill tool joint height detection method provided by the present invention can provide comprehensive drill tool status information for the staff, including five status information of only female joint, only male joint, male and female buckle not connected, male and female buckle connected, and male and female buckle tightened; and provide a reference for the staff to control the iron driller (for example, when the drill tool status is only female joint state and only male joint state, the iron driller is prohibited from making and removing buckles in this state).
[0071] Step S5: After a preset time interval from the start of the last calibration, adaptively calibrate the correspondence between the pixel height and the physical space height in the drilling tool image collected by the monocular camera, and update the calibration relationship; repeat steps S2 to S5 according to the updated calibration relationship.
[0072] During long-term drilling work on the drilling platform, as the platform vibrates, the structure of the monocular camera will gradually change slightly, and the visual range of the monocular camera will also change slightly, resulting in errors between the calibrated pixel height in the drilling tool image and the physical space height, which in turn affects the automatic make-up and break-out operation of the iron roughneck. For this reason, it is necessary to adaptively calibrate the correspondence between the pixel height and the physical space height in the drilling tool image collected by the monocular camera after a preset time interval from the last calibration start.
[0073] Preferably, the correspondence between the pixel height and the physical space height in the drilling tool image collected by the monocular camera is adaptively calibrated, and the calibration relationship is updated, including:
[0074] Step B1: Use the drilling tool image collected in the last calibration as the reference image, perform SIFT feature extraction on the reference image, and obtain a reference key point descriptor set and a reference key point pixel coordinate set.
[0075] Step B2: obtaining a drilling tool image acquired in real time by a monocular camera as a rectified image, performing SIFT feature extraction on the rectified image, and obtaining a rectified key point descriptor set and a rectified key point pixel coordinate set.
[0076] Step B3: Based on the reference key-point descriptor set, the reference key-point pixel coordinate set, the corrected key-point descriptor set, and the corrected key-point pixel coordinate set, use the brute-force matching method with an increased pixel neighborhood to match the reference key-points and the corrected key-points, and obtain the successfully matched key-points.
[0077] Step B4: Based on three groups of matched key-points selected from the successfully matched key-points, perform adaptive calibration and update the calibration relationship.
[0078] Among them, the reference key-point descriptor set is represented as αd(d a1 ,d a2 ,...,d am ,...,d ao ), and each key-point descriptor is composed of a 128-dimensional vector. For example The reference key-point pixel coordinate set is represented as αp(p a1 ,p a2 ,...,p am ,...,p ao ), and the coordinate of p am is represented as (p amx ,p amy ). The corrected key-point descriptor set is represented as βd(d b1 ,d b2 ,...,d bm ,...,d bo ), and each key-point descriptor is composed of a 128-dimensional vector. For example The reference key-point pixel coordinate set is represented as βp(p b1 ,p b2 ,...,p bm ,...,p bo ), and the coordinate of p bm is represented as (p bmx ,p bmy ).
[0079] Further preferably, based on the reference key-point descriptor set, the reference key-point pixel coordinate set, the corrected key-point descriptor set, and the corrected key-point pixel coordinate set, use the brute-force matching method with an increased pixel neighborhood to match the reference key-points and the corrected key-points. The formula is expressed as:
[0080]
[0081] If Δp < PI and Δd < DI, then am and bm are successfully matched;
[0082] In the formula, am is the reference key-point, bm is the corrected key-point; d am is the descriptor of the reference key-point am, is the n-th dimension vector in the descriptor of the benchmark key point am; d bm is the descriptor of the benchmark key point bm, is the n-th dimension vector in the descriptor of the benchmark key point bm; Δd is the Euclidean distance between the key point am and the key point bm; p amx is the pixel horizontal coordinate of the benchmark key point am, p amy is the pixel ordinate of the benchmark key point am; p bmx is the pixel horizontal coordinate of the benchmark key point bm, p bmy is the pixel ordinate of the benchmark key point bm; PI is the third preset threshold, and DI is the fourth preset threshold.
[0083] The traditional key point brute force matching method directly calculates the Euclidean distance between two descriptors, which can easily result in incorrect key point matching. According to the actual working conditions of the drilling platform, the camera structure changes little, and the image pixel position changes are also limited. Therefore, based on the traditional key point brute force matching, pixel neighborhood calculation is added to improve the matching accuracy.
[0084] Further preferably, adaptive calibration is performed based on three groups of matching key points selected from the successfully matched key points to update the calibration relationship. The updated calibration relationship formula is expressed as:
[0085] H x =(P x -P b2y )×Δh+a2h
[0086]
[0087] Where P x is the pixel height of pixel x in the drilling tool image; H x is the physical space height corresponding to pixel x in the drilling tool image; the reference key point a1 matches the correction key point b1, the reference key point a2 matches the correction key point b2, and the reference key point a3 matches the correction key point b3; p b1y is the pixel ordinate of the reference key point b1, p b2y is the pixel ordinate of the reference key point b2, p b3y is the pixel ordinate of the benchmark key point b3; a1h is the physical space height corresponding to the benchmark key point a1, a2h is the physical space height corresponding to the benchmark key point a2, and a3h is the physical space height corresponding to the benchmark key point a3; a1h is calculated based on the calibration relationship obtained from the last calibration and the pixel ordinate of the benchmark key point a1, a2h is calculated based on the calibration relationship obtained from the last calibration and the pixel ordinate of the benchmark key point a2, and a3h is calculated based on the calibration relationship obtained from the last calibration and the pixel ordinate of the benchmark key point a3.
[0088] If the calibration relationship of the last calibration is the same as the calibration relationship of the first calibration, the calculation formula of a1h, a2h, and a3h is expressed as:
[0089] a1h=b1h=(P a1y -P2)Δh3+W2
[0090] a2h=b2h=(P a2y -P2)Δh3+W2
[0091] a3h=b3h=(P a3y -P2)Δh3+W2
[0092] Where b1h is the physical space height corresponding to the correction key point b1, b2h is the physical space height corresponding to the correction key point b2, and b3h is the physical space height corresponding to the correction key point b3.
[0093] In this way, the adaptive ability of the drilling tool joint height detection method is improved.
[0094] Preferably, three groups of matching key points are selected from the successfully matched key points, including: averaging the pixel horizontal coordinates and pixel vertical coordinates of all successfully matched benchmark key points to obtain the average pixel horizontal coordinate and the average pixel vertical coordinate, the pixel point represented by the average pixel horizontal coordinate and the average pixel vertical coordinate is the average pixel point, and selecting the key point matching groups corresponding to the benchmark key point with the largest pixel vertical coordinate, the benchmark key point with the smallest pixel vertical coordinate, and the benchmark key point closest to the average pixel point from the successfully matched key points.
[0095] The drill joint height detection method based on monocular vision proposed in the present invention can realize drill height detection and drill status detection without additional calibration device and sample data comparison. At the same time, in the drill detection method, by regularly collecting corrected images and extracting SIFT features for matching and comparison, adaptive correction of the height detection system is realized, which reduces the calibration workload of the staff.
[0096] The present invention also provides a drill joint height detection system based on monocular vision, comprising a monocular camera and a detection device; the monocular camera is used to collect drill tool images; the detection device comprises a memory and a processor, the memory stores a computer program, and when the processor executes the computer program stored in the memory, the steps of the above-mentioned drill joint height detection method based on monocular vision are implemented.
[0097] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may 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.
[0098] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions.
[0099] It should be noted that in the claims, any reference numerals placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In the claims enumerating several means, several of these means may be embodied by the same hardware. The use of the words first, second, third, etc., is for convenience of expression only and does not indicate any order. These words may be understood as part of the component name.
[0100] In addition, it should be noted that, in the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0101] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments after knowing the basic creative concept. Therefore, the claims should be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.
[0102] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention should also include these modifications and variations.
Claims
1. A method for detecting drilling tool joint height based on monocular vision, characterized in that: The method of detecting the drilling tool joint height based on a monocular camera installed on the drilling platform includes the following steps: Step S1: After the monocular camera is installed on the drilling platform, the correspondence between the pixel height and the physical space height in the drilling tool image collected by the monocular camera is initially calibrated to obtain a calibration relationship; Step S2, obtaining a drilling tool image captured by a monocular camera, and dividing the drilling tool image into regions of interest to obtain a ROI region of interest that only includes wellhead drilling tools or rathole drilling tools; wherein the field of view of the monocular camera includes the iron roughneck area, the wellhead rotary table area, and the rathole area; Step S3, identifying that there is a female joint of the drilling tool in the ROI region of interest, and obtaining a female joint identification frame; the upper edge of the female joint identification frame coincides with the upper edge of the female joint of the drilling tool in the ROI region of interest; Step S4, obtaining drilling tool joint height information according to the pixel height information at the upper edge of the female joint identification frame and the calibration relationship; Step S5: After a preset time interval from the start of the last calibration, adaptively calibrate the correspondence between the pixel height and the physical space height in the drilling tool image collected by the monocular camera, and update the calibration relationship; repeat steps S2 to S5 according to the updated calibration relationship.
2. The method for detecting drilling tool joint height based on monocular vision according to claim 1, characterized in that: Initial calibration of the correspondence between pixel height and physical space height in the drilling tool image captured by the monocular camera, including: Step A1, obtaining three drilling tool images captured by a monocular camera, wherein the three drilling tool images are taken when the physical heights of the iron roughneck's hand gripping jaws from the drilling platform surface are W1, W2, and W3 respectively; Step A2, identifying the iron roughneck's hand grip jaws in the three drilling tool images, obtaining a jaw recognition frame, and determining the pixel heights of the iron roughneck's hand grip jaws in the three drilling tool images as P1, P2, and P3, respectively, according to the pixel coordinates of the center position of the jaw recognition frame; Step A3: Perform initial calibration based on W1, W2, W3 and P1, P2, P3 to obtain a calibration relationship.
3. The method for detecting drilling tool joint height based on monocular vision according to claim 2, characterized in that: According to W1, W2, W3 and P1, P2, P3, the initial calibration is performed, and the formula is expressed as: H x =(P x -P2)×Δh3+W2 Where P x is the pixel height of pixel x in the drilling tool image; H x is the physical space height corresponding to pixel x in the drilling tool image; K is the calibration quality evaluation index; If |K-1|<0.0005, the calibration accuracy meets the use requirements. If |K-1|≥0.0005, repeat steps A1 to A3.
4. The method for detecting drilling tool joint height based on monocular vision according to claim 1, characterized in that: Step S3 is: identifying that there are a female joint and a male joint of the drill tool in the ROI region of interest, obtaining a female joint identification frame and a male joint identification frame; the upper edge of the female joint identification frame coincides with the upper edge of the female joint of the drill tool in the ROI region of interest, and the lower edge of the male joint identification frame coincides with the lower edge of the male joint of the drill tool in the ROI region of interest; Step S4 also includes: obtaining drilling tool status information according to pixel height information at the upper edge of the female joint identification frame and pixel height information at the lower edge of the male joint identification frame.
5. The method for detecting drilling tool joint height based on monocular vision according to claim 4, characterized in that: According to the pixel height information at the upper edge of the female joint identification frame and the pixel height information at the lower edge of the male joint identification frame, the drilling tool status information is obtained, including: Based on the pixel height information at the upper edge of the female joint recognition frame and the pixel height information at the lower edge of the male joint recognition frame, obtain the height difference; if the height difference is greater than the first preset threshold, obtain that the drill tool state is the state where the male and female joints are not connected; if the height difference is between the first preset threshold and the second preset threshold, obtain that the drill tool state is the state where the male and female joints are connected; if the height difference is less than the second preset threshold, obtain that the drill tool state is the state where the male and female joints are tightened; where the second preset threshold is less than the first preset threshold.
6. The method for detecting drilling tool joint height based on monocular vision according to claim 4, characterized in that: Step S3 further includes: when it is recognized that only the female joint of the drill tool exists in the ROI (Region of Interest), obtain that the drill tool state is the state of only the female joint; when it is recognized that only the male joint of the drill tool exists in the ROI, obtain that the drill tool state is the state of only the male joint.
7. The method for detecting drilling tool joint height based on monocular vision according to claim 1, characterized in that: Perform adaptive calibration on the correspondence between the pixel height and the physical space height in the drill tool image collected by the monocular camera, and update the calibration relationship, including: Step B1: Use the drill tool image collected in the previous calibration as the reference image, perform SIFT feature extraction on the reference image, and obtain the reference key point descriptor set and the reference key point pixel coordinate set. Step B2: Obtain the drill tool image collected by the monocular camera in real time as the corrected image, perform SIFT feature extraction on the corrected image, and obtain the corrected key point descriptor set and the corrected key point pixel coordinate set. Step B3: According to the reference key point descriptor set, the reference key point pixel coordinate set, the corrected key point descriptor set, and the corrected key point pixel coordinate set, use the brute-force matching method with an increased pixel neighborhood to match the reference key points and the corrected key points, and obtain the successfully matched key points. Step B4: Perform adaptive calibration according to three groups of matched key points selected from the successfully matched key points, and update the calibration relationship.
8. The method for detecting drilling tool joint height based on monocular vision according to claim 7, characterized in that: According to the reference key point descriptor set, the reference key point pixel coordinate set, the corrected key point descriptor set, and the corrected key point pixel coordinate set, use the brute-force matching method with an increased pixel neighborhood to match the reference key points and the corrected key points, and the formula is expressed as: If Δp < PI and Δd < DI, then am and bm are successfully matched. In the formula, am is the reference key point, bm is the correction key point; dam is the descriptor of the reference key point am, is the n-th dimension vector in the descriptor of the benchmark key point am; d bm is the descriptor of the benchmark key point bm, is the n-th dimension vector in the descriptor of the benchmark key point bm; Δd is the Euclidean distance between the key point am and the key point bm; p amx is the pixel horizontal coordinate of the benchmark key point am, p amy is the pixel ordinate of the benchmark key point am; p bmx is the pixel horizontal coordinate of the benchmark key point bm, p bmy is the pixel ordinate of the benchmark key point bm; PI is the third preset threshold, and DI is the fourth preset threshold.
9. The method for detecting drilling tool joint height based on monocular vision according to claim 7, characterized in that: Perform adaptive calibration according to three groups of matched key points selected from the successfully matched key points, and update the calibration relationship. The updated calibration relationship formula is expressed as: H x =(P x -P b2y )×Δh+a2h Where P x is the pixel height of pixel x in the drilling tool image; H x is the physical space height corresponding to pixel x in the drilling tool image; the reference key point a1 matches the correction key point b1, the reference key point a2 matches the correction key point b2, and the reference key point a3 matches the correction key point b3; p b1y is the pixel ordinate of the reference key point b1, p b2y is the pixel ordinate of the reference key point b2, p b3y is the pixel ordinate of the reference key point b3; a1h is the physical space height corresponding to the reference key point a1, a2h is the physical space height corresponding to the reference key point a2, and a3h is the physical space height corresponding to the reference key point a3; a1h is calculated according to the calibration relationship obtained in the previous calibration and the pixel ordinate of the reference key point a1, a2h is calculated according to the calibration relationship obtained in the previous calibration and the pixel ordinate of the reference key point a2, and a3h is calculated according to the calibration relationship obtained in the previous calibration and the pixel ordinate of the reference key point a3.
10. A drilling tool joint height detection system based on monocular vision, characterized in that: It includes a monocular camera and a detection device; The monocular camera is used to collect drill tool images; The detection device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program stored in the memory, the steps of the drilling tool joint height detection method based on monocular vision described in any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Calibration method and system for external parameters of double-station camera
CN111696161A
Unsupervised under-bridge pedestrian intrusion detection method and device
CN112418118A
Drilling tool detection method and device based on monocular vision
CN117132558A
Tapered shoulder position measurement in real-time
US20210277732A1