The invention relates to the field of borehole image analysis technology, in particular to an undistorted outspread method for annular images of the inner wall of borehole with a center offset.
The digital core is an interdisciplinary subject in the field of image processing and petroleum, coal, and other geological fields. Digital core technology uses computer image processing technology to depict the core microstructure in the form of images and provides basic research data for the exploration and development of petroleum, coal, and other geological science exploration through mathematical modeling, quantitative analysis, and simulation of various characteristics of strata.
Digital core technology usually requires drilling the rock mass first, then a wide-angle camera goes deep into the borehole to collect videos, and then the collected wide-angle images are outspread and spliced into a panoramic image so that the internal situation of the rock mass can be intuitively obtained, which provides a safe decision-making basis for the density selection of the supporting hydraulic support of the underground space excavation face such as coal mine roadway and tunnel.
Because it is difficult to ensure that the camera coincides with the optical axis of the hole center during the actual acquisition of the borehole image, that is, the center of the lens cannot guarantee to coincide with the center of the borehole, and there is usually a center offset. There will be some nonlinear distortions in the collected images, which will cause the subsequent mosaic images to be inaccurate, making it difficult to obtain the real internal conditions of the rock mass. The obtained geological information error will be very large if it is not corrected. The premise and core difficulty of correction is to solve the ratio of the distance between the optical axis of the single frame image camera and the center axis of the borehole to the radius of the borehole, and the angle between the connection of the two optical axes and the positive direction of the image after imaging (the positive direction of the image from left to right is stipulated).
There are two existing solutions. One solution is to add additional sensors to the camera, such as a laser sensor, which can emit a laser, a laser ring will be formed when the laser hits the inner wall of the borehole. By calculating the deviation between the laser ring and the standard circle, the distance between the optical axis of the camera and the inner wall of the borehole can be obtained, so the parameters to be corrected are obtained.
The other solution is to directly use the morphological method, such as using the Hough transform or least square method to fit the center circle. The principle of its dependence is that the gray value of the ring at the same depth is approximated, and the position of the ring center on the image is obtained. The angle and distance between the center of the circle and the center of the image can be solved. However, usually, only the pixels in the center circle area are calculated according to the gray value, and the number of pixels in the middle is small. At the same time, in complex scenes, the gray value is also difficult to characterize the ring at the same depth. The distortion correction parameters calculated by the morphological method have a large deviation angle error, and the accuracy of the correction parameters is low.
The purpose of the invention is to provide an undistorted outspread method for annular images of the inner wall of borehole with a center offset, it solves the problem that there is an error in the calculation of distortion correction parameters in the morphological method.
In order to achieve the above purpose, the invention provides an undistorted outspread method for annular images of the inner wall of borehole with a center offset.
Preferably, in S2, if the angle of axis angle 2 is different from that of axis angle 1, obtaining phase angle diagram 1 from
Preferably, in S3, if axis angle 1 and axis angle 2 are not zero, obtaining phase angle diagram 2 from
Preferably, in S4, selecting any point in
Preferably, in S5, selecting points with the same pixel gray value in radius ratio diagram of motion 1 and radius ratio diagram of motion 2 to obtain ring 1 and ring 2, obtaining radius ratio of axis distance 1 according to the center and radius of ring 1, and similarly, obtaining radius ratio of axis distance 2.
Preferably, in S6, obtaining corrected radius 1 and angle 1 according to radius ratio diagram of motion 1 and radius ratio diagram of motion 2, and obtaining corrected
Preferably, both
Preferably, radius ratio of motion 1 is a ratio of the distance from the point to the control point in
Preferably, radius ratio of axis distance 1 is a ratio of the radius to the distance from the center of the circle to the center of the image.
In S1, the images during the camera movement will be in the following four conditions, from simple to complex as follows.
When solving problems from (4) to (1), the steps in S2-S8 are adopted to solve the problem, and the corresponding correction steps in S2-S8 are used to correct the problem according to the different situations of the problem.
Therefore, an undistorted outspread method for annular images of the inner wall of borehole with a center offset has the following beneficial effects:
The invention is also applicable to endoscopic imaging technology for determining the diameter of the inner hole, which can be applied in the fields of opaque wine bottles, automobile engine inner holes, municipal pipeline inspection, and so on.
The following is a further detailed description of the technical solution of the invention through drawings and an embodiment.
The following is a further explanation of the technical solution of the invention through drawings and an embodiment.
Unless otherwise defined, the technical terms or scientific terms used in the invention should be understood by people with general skills in the field to which the invention belongs. ‘first’, ‘second’, and similar words used in the invention do not mean any order, quantity or importance, but are only used to distinguish different components. Similar words such as ‘include’ or ‘comprise’ mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects.
S1, putting a camera into a hole and pushing the camera inward to carry out a video acquisition at step 102;
S2, selecting two frames of images from the video obtained from S1 at step 104, namely
Field 1-2 is divided into a row offset graph and a column offset graph, a pixel gray value in the row offset graph is a row offset value of the midpoint of field 1-2, and a pixel gray value in the column offset graph is a column offset value of the midpoint of field 1-2. A tangent value of this point can be obtained from the row offset value and the column offset value, and a phase angle of this point can be obtained by bringing the tangent value into the arctangent function. Phase angle diagram 1 is obtained by the phase angles of all points.
Converting the row offset graph and the column offset graph into a distance, and the point on the obtained modular length graph is the distance of the trajectory distance of this point.
Axis angle 2 in
Different diameters are selected to obtain different detection circles, and then the corresponding axial angle differences are obtained, the average value of multiple axial angle differences is taken, and
S3, adjusting axis angle 1 and adjusted axis angle 2 in S2 until the angle is zero. At step 110, it is checked whether axis angle 1 and axis angle 2 are zero.
According to rotated
A trajectory line is determined according to the coordinates of any point in phase angle diagram 2 and the pixel gray value, the pixel gray value in phase angle diagram 2 is a phase angle of the displacement of the point, the equation of the trajectory line can be determined according to the coordinates of a point on the straight line and the slope of the straight line. A point that has the most intersected trajectory lines is selected as the control point, and then the coordinates of the control point are obtained.
Taking the control point as the center of the circle, detection circle 1 is generated in modular length graph 2, and the two points with the largest pixel gray value on detection circle 1 are obtained, that is, the two points with the longest displacement. These two points are symmetrical about the offset axis, then axis angle 3 is calculated at step 112 as half of the sum of phase angles of the two points. By setting detection circle 1 of different radii, several axis angles are obtained, and the average value is taken after eliminating the outliers.
S4, calculating a radius ratio of motion 1 according to adjusted
At step 118 radius ratio of motion 1 of any point in rotated
At step 116, it is checked whether the control point coincides with the image center. If the control point coincides with the center of the image, then the center distance of rotated
S5, at step 126 obtaining radius ratio of axis distance 1 and radius ratio of axis distance 2 are obtained according to radius ratio of motion 1 and radius ratio of motion 2 in S4, respectively. Because the points on the same motion trajectory are the points on the same depth ring in the physical space, and the radius ratio of motion is a fixed value and related to the physical depth. Therefore, the radius ratio of axis distance in the physical space can be accurately obtained.
The points with the same pixel gray value are selected from radius ratio diagram of motion 1, and ring 1 with the same depth is obtained, the center coordinates can be obtained from the radius of ring 1 and the points with the same pixel gray value, radius ratio of axis distance 1 is the ratio of the distance from the center of ring 1 to the center of the image to the radius. Several radii and center positions of ring 1 can be obtained, several radius ratios of axis distances can be obtained, and the radius ratios of axis distances of different ring 1 are averaged. Similarly, the average value of radius ratio of axis distance 2 is obtained from radius ratio diagram of motion 2.
S6, correcting
Corrected radius: Due to the existence of the axis distance in the physical space, the distance from each group of points to the center of the circle can be obtained from the radius ratio of axis distance, and the radius ratio of axis distance is equal to the radius ratio of axis distance in the physical space. After the corrected center coincides with the image center, the radius value from the point to the image center can be obtained.
As shown in
ArOr2 can be transformed into the functions of ArOr1 and Or1Or2 by cosine formula provided as equation (1), ArOr2 is related to the radius ratio of axis distance, therefore, the radius ratios before and after correction can be obtained by using the radius ratio of axis distance.
The angle after correction: due to the existence of the axis distance in the physical space, the functional relationship between the angle before correction and the angle after correction can be obtained from the radius ratio of axis distance.
There is a phase angle difference between a phase angle from the point to the center of the hole in the physical space and a phase angle from the corresponding point to the center of the image in
As shown in
Using the cosine formula for ∠α to obtain:
Using the cosine formula for ∠β to obtain:
Because AO2 is unknown, O1O2 and AO1 can be known from the radius ratio of axis distance. By taking the cosine formula of ∠β into the cosine formula of ∠α, the functional relationship between ∠β and ∠α is obtained.
S7, matching
The radius and angle after correction are known, according to the polar coordinate formula, the image before correction can correspond to the corrected image one by one, and the corrected image without distortion can be obtained.
From the correspondence between the length and angle of the image coordinates before and after correction, the mapping of the coordinates before and after correction can be known, the corresponding formula of polar coordinates is as follows:
S8, outspreading the undistorted image in S7 to obtain an undistorted outspread image according to a polar coordinate formula.
In the undistorted image, the center of the image is the center of the hole, the projection of a certain section of the image in the hole can be obtained by taking a circle of different radii in the center of the image, the rectangular image is obtained after outspreading by using the polar coordinate formula to outspread.
As shown in
The outspread formula in the above S8 is not unique. It is only one of the outspread methods. The ring coordinates and the rectangular coordinates correspond one by one through the formula.
After the undistorted image is outspread, the panoramic image of the ring is outspread into a rectangular image that is convenient for stitching and observation, and finally, the undistorted outspread image is obtained.
Finally, it should be explained that the above embodiment is only used to explain the technical solution of the invention rather than restrict it. Although the invention is described in detail concerning the better embodiment, the ordinary technical personnel in this field should understand that they can still modify or replace the technical solution of the invention, and these modifications or equivalent substitutions cannot make the modified technical solution out of the spirit and protection scope of the technical solution of the invention.
Number | Date | Country | Kind |
---|---|---|---|
202211687031.X | Dec 2022 | CN | national |
This application is a continuation application of International Application No. PCT/CN2022/143201, filed on Dec. 29, 2022, which is based upon and claims priority to Chinese Patent Application No. 202211687031.X, filed on Dec. 27, 2022, the entire contents of which are incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
5565624 | Deboaisne | Oct 1996 | A |
11532092 | LeFranc | Dec 2022 | B2 |
20120236139 | Chang | Sep 2012 | A1 |
20210332692 | Nguyen et al. | Oct 2021 | A1 |
Number | Date | Country |
---|---|---|
104811630 | Jul 2015 | CN |
104915640 | Sep 2015 | CN |
105931219 | Sep 2016 | CN |
106548456 | Mar 2017 | CN |
110378884 | Oct 2019 | CN |
113506208 | Oct 2021 | CN |
113470108 | Feb 2022 | CN |
114841922 | Aug 2022 | CN |
Entry |
---|
STIC provided English machine translation of CN 105931219 A (Year: 2016). |
STIC provided English Machine Translation of CN 110378884 A (Year: 2019). |
STIC provided English Machine Translation of CN 113470108 B (Year: 2022). |
Number | Date | Country | |
---|---|---|---|
20240209725 A1 | Jun 2024 | US |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2022/143201 | Dec 2022 | WO |
Child | 18373313 | US |