Digital image correction method for multiple cores
Through a digital image correction method of multiple cores, the problem that the prior art cannot effectively process multiple core images is solved, the geometric and brightness correction of the image is realized, and the image quality and research reliability are improved.
Patent Information
- Application Number
- CN202411880660.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-05-02
AI Technical Summary
The existing core image correction algorithms are mainly aimed at single or double cores, and cannot effectively process digital images of multiple cores, resulting in image distortion problems and affecting subsequent core information preservation and analysis.
A digital image correction method for multiple cores is proposed. The digital image of multiple cores is corrected by reading image data, judging the number of cores and establishing a rectangular coordinate system, performing geometric correction and brightness correction, and resampling the image.
This method can effectively correct the image geometric and brightness distortion of multiple cores, improve image quality and research reliability, save economic costs, and improve engineering efficiency.
Smart Images

Figure CN119919324A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of mineral exploration, and in particular relates to a digital image correction method for multiple rock cores. Background Art
[0002] Drill cores are the most direct and valuable objects for studying geological environment, rock material and engineering mechanical properties. Comprehensive and scientific digital recording of the true appearance of the cores can achieve permanent preservation of the characteristics of the drill cores, and have the advantages of non-destructive detection of core samples and rapid query of core information.
[0003] The digital image of the core is collected using an optical lens. The detector is a plane and the imaging surface is a plane. However, since the core is cylindrical, the collected digital image will inevitably be distorted. The distorted digital image needs to be effectively corrected to more realistically reflect the information carried by the core, provide a basis for the long-term preservation of the real core information, and avoid errors in the subsequent processing and analysis of the core.
[0004] The existing core image correction algorithms are for single or double cores. The correction algorithm for single cores is only for geometric correction and does not include brightness correction. The correction algorithm for double cores corrects both the geometric distortion and brightness distortion of the image. However, in actual engineering applications, the more cores are scanned and corrected at the same time, the more engineering efficiency can be improved and the more economic costs can be saved. However, there is currently a lack of correction algorithms for digital images of multiple cores. Therefore, the demand for digital image correction algorithms for multiple cores is very urgent. Summary of the invention
[0005] The purpose of the present invention is to provide a digital image correction method for multiple cores, which can make up for the lack of existing digital image correction algorithms for multiple cores, so that large-scale core scanning can be achieved at the same time, which can greatly improve engineering efficiency and save economic costs in both the core scanning and image correction stages; and through the algorithm, the geometric and brightness distortions of the image are corrected, avoiding subsequent errors caused by distortion, and improving the reliability of research identification and use.
[0006] The technical solution to achieve the purpose of the present invention is:
[0007] A digital image correction method for multiple rock cores, the method comprising:
[0008] Step S1: reading image data;
[0009] Step S2: Determine the number of cores, and establish different rectangular coordinate systems according to the odd and even numbers of the cores;
[0010] Step S3: geometrically correcting the image points of the points on the outer surface of the core cross section on the projection plane;
[0011] Step S4: performing brightness correction on the pixel points on the outer surface of the core cross section;
[0012] Step S5: resample the corrected image and calculate the pixel values of the pixels on the image.
[0013] In step S2, the method for establishing the single core rectangular coordinate system is: take the straight line tangent to the upper surface of the core as the X-axis direction, represent the projection plane, the Y-axis direction is perpendicular to the X-axis direction, and the Y-axis passes through the center P of the detector and the center numbered The center of the core cross section is O'; the intersection of the X-axis and the Y-axis is the coordinate origin O, and the XOY plane is perpendicular to the long axis of the core and parallel to the cross section.
[0014] In step S2, the method for establishing the even-numbered core rectangular coordinate system is as follows: the straight line tangent to the upper surface of the core is used as the X-axis direction, which represents the projection plane, the Y-axis direction is perpendicular to the X-axis direction, and the Y-axis passes through the center P of the detector and is at the number and The middle position of the two cores; the intersection of the X-axis and the Y-axis is the coordinate origin O, and the XOY plane is perpendicular to the long axis of the core and parallel to the cross section.
[0015] In step S3, for an odd number of cores, the core at the center The calculation formula for the coordinates (x, y) of a point X on the outer surface of the cross section is:
[0016]
[0017] Where n represents the number of cores; t represents the core number, 1≤t≤n; h represents the detector placement height, that is, the distance between the detector placement position and the X-axis; r represents the core radius; a represents the horizontal coordinate of the image point of the point on the outer surface of the core cross section on the projection plane;
[0018] The distance between the new position X' of the point on the outer surface of the core cross section after image correction on the projection plane and the origin O and the arc The arc length l is equal to that of the other two. The calculation formula of arc length l is:
[0019]
[0020] Wherein, O' represents the center of the rock core.
[0021] In step S3, for an odd number of cores, a point X on the outer surface of the cross section of the core t other than the center is t The coordinates (x t ,yt ), or for an even number of cores, a point X on the outer surface of the cross section of core t t The coordinates (x t ,y t ) is calculated as:
[0022]
[0023] Where, t represents the core number; a t The horizontal coordinate of the image point on the outer surface of the core cross section on the projection plane; r t Indicates the core radius; d t It indicates the shortest distance from the core to the Y axis; h indicates the detector placement height, that is, the distance between the detector placement position and the X axis;
[0024] Center of rock circle O t 'Intersection point O of the line connecting the sensor P on the outer surface of the core t The coordinates (x o ,y o ) and O t The image point O on the projection plane t The coordinates of o , 0) is calculated as:
[0025]
[0026] Arc The arc length l t The calculation formula is:
[0027]
[0028] In step S4, the calculation formula for brightness correction is:
[0029] L'=L·μ
[0030] μ=1 / cosθ t
[0031] Where L represents the brightness of the pixel before correction; L' represents the brightness of the pixel after correction; μ represents the correction coefficient; θ t Indicates straight line PX t With O t 'X t The acute angle of .
[0032] In step S4, θ t The calculation formula is as follows:
[0033] Odd core, for the center core θ t The calculation formula is:
[0034]
[0035] For odd-numbered cores, for cores numbered t other than the center, θ t The calculation formula is:
[0036]
[0037] Even-numbered cores, for core numbered t, θ t The calculation formula is:
[0038]
[0039] In step S5, the calculation formula of the pixel value is:
[0040]
[0041] Where I(p) represents the pixel value of pixel p; p represents the value of two adjacent pixel points X after correction. t ” and X t "+m pixels, X t ”≤p≤X t "+m, and p is an integer value; X t ” represents the new position of the point on the outer surface of the core cross section on the projection plane after image point correction; m represents the distance between two adjacent pixel points after correction; I(X t ') and I(X t '+1) represent two adjacent pixels X on the original image. t ' and X t '+1 pixel value.
[0042] The beneficial technical effects of the present invention are:
[0043] 1. The digital image correction method for multiple rock cores provided by the present invention can make up for the deficiencies of the existing digital image correction algorithm for multiple rock cores, greatly improve engineering efficiency and save economic costs.
[0044] 2. The digital image correction method for multiple cores provided by the present invention is used to perform image correction. After correction, the geometric and brightness distortions of the image are effectively corrected without loss of image quality, which provides convenience for subsequent image application and research and improves the reliability of image utilization.
[0045] 3. The digital image correction method for multiple cores provided by the present invention enables large-scale core scanning, has extremely high engineering application value, and also improves efficiency and saves economic costs in the core scanning stage. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A flow chart of a digital image correction method for multiple cores provided by the present invention;
[0047] Figure 2 A rectangular coordinate system of a single core in a digital image correction method for multiple cores provided by the present invention;
[0048] Figure 3 The invention provides an even-numbered core rectangular coordinate system in a digital image correction method for multiple cores. DETAILED DESCRIPTION
[0049] The present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0050] like Figure 1 As shown, the present invention provides a method for digital image correction of multiple cores, which specifically includes the following steps:
[0051] Step S1: reading image data;
[0052] Read multiple core image data to be processed from the storage medium.
[0053] Step S2: Determine the number of cores, and establish different rectangular coordinate systems according to the odd and even numbers of the cores;
[0054] Different rectangular coordinate systems are established according to the odd and even numbers of cores in the image. In the process of core image acquisition, the problem of the coordinate system of the correction algorithm is taken into consideration, and requirements are made for the placement of the detector.
[0055] The method for establishing the rectangular coordinate system of the singular core is as follows: Figure 2 As shown, the circle represents the cross section of the core, O' represents the center of the circle, n represents the number of cores, and the cores are numbered from left to right. The straight line tangent to the upper surface of the core is used as the X-axis direction, which represents the projection plane. The Y-axis direction is perpendicular to the X-axis direction, and the Y-axis passes through the center P of the detector and the center number is The center of the cross section of the core is O', that is, all the cores are symmetrical with respect to the Y axis. The intersection of the X axis and the Y axis is the origin of the coordinate O, and the XOY plane is perpendicular to the long axis of the core and parallel to the cross section.
[0056] The method for establishing the even-numbered core rectangular coordinate system is as follows: Figure 3 As shown, the circle represents the cross section of the core, O' represents the center of the circle, n represents the number of cores, and the cores are numbered from left to right. The straight line tangent to the upper surface of the core is used as the X-axis direction, which represents the projection plane. The Y-axis direction is perpendicular to the X-axis direction, and the Y-axis passes through the center P of the detector and is at the number and The middle position of the two cores, that is, all the cores are symmetrical with respect to the Y axis. The intersection of the X axis and the Y axis is the origin of the coordinate O, and the XOY plane is perpendicular to the long axis of the core and parallel to the cross section.
[0057] The detector is placed at a known height, h.
[0058] Step S3: geometrically correcting the image points of the points on the outer surface of the core cross section on the projection plane;
[0059] Geometric correction also requires distinguishing the number of cores first, with t representing the core number, 1≤t≤n.
[0060] X represents a point on the outer surface of the core cross section; X' is the intersection of the straight line PX and the X-axis, which represents the image point of point X on the projection plane; X" represents the new position of the image point X' after correction. Geometric correction is to determine the position of X" through an algorithm.
[0061] For the tth core, X t Indicates a point on the outer surface of the core cross section; X t ' is the straight line PX t The intersection with the X axis indicates that t The image point of the point on the projection plane; X t " represents the image point X t 'The new position after correction. Geometric correction is to determine the X t ” location.
[0062] The geometric correction method for odd cores is as follows:
[0063] For the central core First, we need to find the point on the core where the image is not distorted, that is, the intersection point O of the line connecting the center of the core circle O' and the sensor P on the outer surface of the core. The geometric relationship of this core is quite special. Point O on the outer surface of the core is also the imaging point O on the projection plane. The length and arc of the corrected line segment |OX”| The arc length l is equal, so the new position of X' can be determined. Assuming the coordinates of point X are (x, y), the coordinates of X' are (x", 0), the coordinates of X' can be obtained from the image as (a, 0), and the core radius is r. According to the equation of the core circle and the equation of the straight line PX', the coordinates of point X can be obtained
[0064]
[0065] The arc length l can be calculated using the following formula:
[0066]
[0067] For other cores numbered t, it is also necessary to first find the point on the core where the image is not distorted, that is, the center of the core circle O t 'Intersection point O of the line connecting the sensor P on the outer surface of the core t , the image point of this point on the projection plane is O t ". Assume that X t The point coordinates are (x t ,y t ), X t The coordinates are (x t ”,0),O t The coordinates are (x o ,y o ), according to the image we can get X t The coordinates of ' are (a t , 0), assuming O t The coordinates of ” are (a o , 0), the core radius is r t , the shortest distance from the core to the Y axis is d t First, according to the straight line PO t ' equation and geometric position relationships such as triangle similarity can be used to obtain O t Dot and O t The coordinates of
[0068]
[0069] Then according to the straight line PX t and the equation of the center circle, we can find X t Coordinates of the point
[0070]
[0071] For arc The arc length l can be calculated using the following formula: t :
[0072]
[0073] The geometric correction method for even-numbered cores is as follows:
[0074] For the core numbered t, first find the point on the core where the image is not distorted, that is, the center of the core circle O t 'Intersection point O of the line connecting the sensor P on the outer surface of the core t , the image point of this point on the projection plane is O t ". Assume X t The point coordinates are (x t ,y t ), X t The coordinates are (x t ”,0),O tThe coordinates are (x o ,y o ), according to the image we can get X t The coordinates of ' are (a t , 0), assuming O t The coordinates of ” are (a o , 0), the core radius is r t , the shortest distance from the core to the Y axis is d t First, according to the straight line PO t ' equation and geometric position relationships such as triangle similarity can be used to obtain O t Dot and O t The coordinates of
[0075]
[0076] Then according to the straight line PX t and the equation of the center circle, we can find X t Coordinates of the point
[0077]
[0078] For arc The arc length l can be calculated using the following formula: t :
[0079]
[0080] Step S4: performing brightness correction on the pixel points on the outer surface of the core cross section;
[0081] Assuming that the brightness of the pixel before correction is L, the brightness of the pixel after correction is L', and the correction coefficient is μ, the following relationship can be obtained:
[0082] L'=L·μ
[0083] like Figure 2 and Figure 3 As shown in t With O t 'X t The acute angle is θ t , for the correction factor calculation
[0084] μ=1 / cosθ t
[0085] For θ t To calculate the number of cores, it is necessary to distinguish the number of cores first.
[0086] Singular coreθ t The calculation of is as follows:
[0087] For the central core The calculation formula is
[0088]
[0089] For other cores numbered t, the calculation formula is:
[0090]
[0091] Even number core θ t The calculation of is as follows:
[0092] For the core numbered t, the calculation formula is:
[0093]
[0094] Step S5: resample the corrected image and calculate the pixel values of the pixels on the image so that the image resolution is consistent with the original image to ensure the image quality.
[0095] The pixel spacing of the original image is 1. After correction, the pixel spacing increases. In order to ensure the image quality, the image needs to be resampled and the pixel spacing is changed back to 1. The position weight method is used to resample the image. The specific method is as follows:
[0096] Assume that two adjacent pixels X on the original image t ' and X t '+1, their pixel values are I(X t ') and I(X t '+1), after correction their positions become X t ” and X t "+m, then for the pixel point p(X t ”≤p≤X t "+m, and p is an integer value), the calculation formula of the pixel value I(p) is as follows:
[0097]
[0098] Among them, X t ” represents the new position of the point on the outer surface of the core cross section on the projection plane after image point correction; m represents the distance between two adjacent pixel points after correction.
[0099] The present invention is described in detail above with reference to the accompanying drawings and embodiments, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of ordinary technicians in the field without departing from the purpose of the present invention. The contents not described in detail in the present invention can adopt the existing technology.
Claims
1. A digital image correction method for multiple cores, characterized in that: The method comprises: Step S1: reading image data; Step S2: Determine the number of cores, and establish different rectangular coordinate systems according to the odd and even numbers of the cores; Step S3: geometrically correcting the image points of the points on the outer surface of the core cross section on the projection plane; Step S4: performing brightness correction on the pixel points on the outer surface of the core cross section; Step S5: resample the corrected image and calculate the pixel values of the pixels on the image.
2. A digital image correction method for multiple cores according to claim 1, characterized in that: In step S2, the method for establishing the single core rectangular coordinate system is: take the straight line tangent to the upper surface of the core as the X-axis direction, represent the projection plane, the Y-axis direction is perpendicular to the X-axis direction, and the Y-axis passes through the center P of the detector and the center numbered The center of the core cross section is O'; the intersection of the X-axis and the Y-axis is the coordinate origin O, and the XOY plane is perpendicular to the long axis of the core and parallel to the cross section.
3. A digital image correction method for multiple cores according to claim 1, characterized in that: In step S2, the method for establishing the even-numbered core rectangular coordinate system is as follows: the straight line tangent to the upper surface of the core is used as the X-axis direction, which represents the projection plane, the Y-axis direction is perpendicular to the X-axis direction, and the Y-axis passes through the center P of the detector and is at the number and The middle position of the two cores; the intersection of the X-axis and the Y-axis is the coordinate origin O, and the XOY plane is perpendicular to the long axis of the core and parallel to the cross section.
4. A digital image correction method for multiple cores according to claim 1, characterized in that: In step S3, for an odd number of cores, the core at the center The calculation formula for the coordinates (x, y) of a point X on the outer surface of the cross section is: Where n represents the number of cores; t represents the core number, 1≤t≤n; h represents the detector placement height, that is, the distance between the detector placement position and the X-axis; r represents the core radius; a represents the horizontal coordinate of the image point of the point on the outer surface of the core cross section on the projection plane; The distance between the new position X' of the point on the outer surface of the core cross section after image correction on the projection plane and the origin O and the arc The arc length l is equal to that of the other two. The calculation formula of arc length l is: Wherein, O' represents the center of the rock core.
5. The digital image correction method of multiple cores according to claim 1, characterized in that: In step S3, for an odd number of cores, a point X on the outer surface of the cross section of the core t other than the center is t The coordinates (x t ,y t ), or for an even number of cores, a point X on the outer surface of the cross section of core t t The coordinates (x t ,y t ) is calculated as: Where, t represents the core number; a t The horizontal coordinate of the image point on the outer surface of the core cross section on the projection plane; r t Indicates the core radius; d t It indicates the shortest distance from the core to the Y axis; h indicates the detector placement height, that is, the distance between the detector placement position and the X axis; Center of rock circle O t 'Intersection point O of the line connecting the sensor P on the outer surface of the core t The coordinates (x o ,y o ) and O t The image point O on the projection plane t The coordinates of o , 0) is calculated as: in, Arc The arc length l t The calculation formula is:
6. A digital image correction method for multiple cores according to any one of claims 4 or 5, characterized in that: In step S4, the calculation formula for brightness correction is: L'=L·μ μ=1 / cosθ t Where L represents the brightness of the pixel before correction; L' represents the brightness of the pixel after correction; μ represents the correction coefficient; θ t Indicates straight line PX t With O t 'X t The acute angle of .
7. A digital image correction method for multiple cores according to claim 6, characterized in that: In step S4, θ t The calculation formula is as follows: Odd core, for the center core θ t The calculation formula is: For odd-numbered cores, for cores numbered t other than the center, θ t The calculation formula is: Even-numbered cores, for core numbered t, θ t The calculation formula is:
8. A digital image correction method for multiple cores according to claim 1, characterized in that: In step S5, the calculation formula of the pixel value is: Among them, I(p) represents the pixel value of pixel point p; p represents the two adjacent pixel points X after correction. t ” and X t "+m pixels, X t ”≤p≤X t "+m, and p is an integer value; X t ” represents the new position of the point on the outer surface of the core cross section on the projection plane after image point correction; m represents the distance between two adjacent pixel points after correction; I(X t ') and I(X t '+1) represent two adjacent pixels X on the original image. t ' and X t '+1 pixel value.