Disclosure of Invention
The invention aims at solving at least one of the technical problems in the prior art and provides a novel technical scheme for an enhancement method of a joint image of a tunnel face of an underground water seal cave depot.
According to one aspect of the invention, there is provided a method for enhancing a joint image of a tunnel face of an underground water seal cave depot, comprising the steps of:
step S100, acquiring a first node image of a tunnel face of a groundwater cave depot under a first lighting condition as an object to be processed;
Step S200, obtaining a second joint image of the tunnel face of the underground water seal cave depot under a second illumination condition as a target object; wherein the illuminance of the first illumination condition is less than the illuminance of the second illumination condition;
Step S300, performing contrast adjustment on the first node image to obtain a first sub-image;
step S400, performing illumination balance adjustment on the first sub-image to obtain a second sub-image;
step S500, performing nonlinear transformation and adaptive parameter adjustment on the second sub-image to obtain a third sub-image;
step S600, comparing and calculating the structural similarity index of the pixel points of the third sub-image and the second joint image;
And S700, searching parameter spaces related to the improved algorithm in the steps S300-S500 by using a constraint parameter searching method, adjusting the parameter spaces according to the searching result, and repeating the steps S300-S600 until the structural similarity index of the object to be processed and the target object is smaller than the target threshold.
Optionally, in step S300, the following method is used for contrast adjustment:
constraining smoothness of the first sub-image by introducing a regularization term to preserve detail information; the regularization term adopts a total variation regularization method, and aims to minimize total variation of the image, wherein a calculation formula is as follows:
min G(x, y)=|grad(G(x,y))|+λ*∑|G(x,y)-F(x,y)|;
In the above formula, G (x, y) represents an adjusted image pixel value; f (x, y) represents a first elemental image pixel value; grad represents the gradient operator and λ represents the regularization parameter.
Optionally, in step S400, the following method is used for illumination balance adjustment:
local contrast information is introduced to perform equalization adjustment, and the calculation formula is as follows:
G(x,y)=F(x, y)+λ*C(x,y) * (F(x,y) -μ(x,y));
In the above equation, G (x, y) represents the adjusted image pixel value, F (x, y) represents the first-term image pixel value, C (x, y) represents the local contrast, μ (x, y) represents the image local mean, and λ is the regularization parameter.
Optionally, in step S500, nonlinear transformation and adaptive parameter adjustment are performed by the following method:
the nonlinear transformation function is implemented by nonlinear mapping of image pixels;
The self-adaptive adjustment parameters dynamically adjust parameters in an algorithm according to local characteristics and statistical information of the image, and the calculation formula is as follows:
λ(x,y) =μ(x,y) + k *σ(x,y);
in the above formula, μ (x, y) represents the local mean of the image, σ (x, y) represents the local standard deviation of the image, and k is the adjustment factor.
Optionally, the nonlinear mapping is performed using the following formula:
G(x,y) = A*log(1+F(x,y));
In the above formula, G (x, y) represents the adjusted image pixel value, F (x, y) represents the first-element image pixel value, and a is a scaling parameter of the transformation function.
Optionally, in step S600, the following method is used to calculate the structural similarity index:
SSIM(x,y)=(2*μx*μy+σx*σy)/(μx2+μy2+σx2+σy2);
in the above equation, μx and μy are average values of the images x and y, respectively, and σx and σy are standard deviations of the images x and y, respectively.
Optionally, the illuminance of the first lighting condition is in a range of 10-50 lux.
Optionally, the illumination of the second illumination condition has a value ranging from 100 to 500 lux.
Optionally, the constraint parameter searching method comprises random searching, simulated annealing, particle swarm optimization and genetic algorithm.
Optionally, the target threshold value is in a range of 0.9-0.995.
The invention has the technical effects that:
In the embodiment of the application, the illumination change problem of the joint image of the tunnel face of the underground water seal tunnel warehouse is processed by adopting the image enhancement algorithm, so that the quality of the collected image of the tunnel face of the underground water seal tunnel warehouse can be effectively improved, the detail information in the image is enhanced, and the accuracy of joint identification is improved. And the contrast adjustment, the illumination balance adjustment, the nonlinear transformation and the self-adaptive parameter adjustment are sequentially carried out on the first node image, and the structural similarity index of the pixel points of the third sub-image and the second node image is compared and calculated until the structural similarity index of the object to be processed and the target object is smaller than the target threshold value, so that the image is clearer and brighter, and the interference of illumination change on node identification is reduced.
Therefore, the enhancement method for the joint image of the tunnel face of the underground water seal cave depot has important significance in the fields of underground energy storage, underground space development and the like, and can provide more accurate and reliable image data support for related research and practice.
Detailed Description
Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present application unless it is specifically stated otherwise.
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements throughout or elements having like or similar functionality. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The features of the application "first", "second" and the like in the description and in the claims may be used for the explicit or implicit inclusion of one or more such features. In the description of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
According to one aspect of the present invention, referring to fig. 1, there is provided an enhancement method for a tunnel face joint image of an underground water seal cave depot, which improves the effects of contrast adjustment and illumination equalization by introducing a nonlinear transformation function and adaptive adjustment parameters; meanwhile, by combining with the characteristic analysis of the joint of the tunnel face of the underground water seal cave depot, accurate joint identification is realized.
Specifically, the method for enhancing the joint image of the face of the underground water seal cave depot comprises the following steps:
step S100, acquiring a first node image of a tunnel face of a groundwater cave depot under a first lighting condition as an object to be processed;
Step S200, obtaining a second joint image of the tunnel face of the underground water seal cave depot under a second illumination condition as a target object; wherein the illuminance of the first illumination condition is less than the illuminance of the second illumination condition;
Step S300, performing contrast adjustment on the first node image to obtain a first sub-image;
step S400, performing illumination balance adjustment on the first sub-image to obtain a second sub-image;
step S500, performing nonlinear transformation and adaptive parameter adjustment on the second sub-image to obtain a third sub-image;
step S600, comparing and calculating the structural similarity index of the pixel points of the third sub-image and the second joint image;
And S700, searching parameter spaces related to the improved algorithm in the steps S300-S500 by using a constraint parameter searching method, adjusting the parameter spaces according to the searching result, and repeating the steps S300-S600 until the structural similarity index of the object to be processed and the target object is smaller than the target threshold. The purpose of the parameter space search is, among other things, to find an optimal combination of parameters so that the image enhancement algorithm can produce an optimal image quality, i.e. minimizing the structural differences between the image to be processed and the target image while preserving the image details.
It should be noted that, the parameter space refers to a set of all adjustable parameters in the algorithm, and these parameters jointly determine the behavior and output result of the algorithm. Searching the parameter space refers to the algorithm attempting to find the optimal solution in the parameter space, i.e. those parameter values that maximize the image quality index (e.g. SSIM), by constrained parameter search methods (e.g. random search, simulated annealing, particle swarm optimization, genetic algorithm, etc.). Adjusting the parameter space refers to adjusting the parameter space that the algorithm may need to adjust based on the search results, which may include changing the range of parameters, adding new parameters, or modifying weights for existing parameters, etc.
Further, once the parameter space is adjusted, the algorithm will repeatedly perform the image processing steps (S300 to S600) for applying new parameters and re-evaluating the image quality, which will be repeated until the structural similarity index between the image to be processed and the target image is smaller than the preset target threshold, which means that the image quality has reached or exceeded the required standard.
In brief, the search and adjustment of the parameter space is to optimize the performance of the image enhancement algorithm, ensuring that the final image output meets certain quality requirements. This process is iterative and requires constant evaluation and adjustment until a satisfactory result is achieved.
In the embodiment of the application, the illumination change problem of the joint image of the tunnel face of the underground water seal tunnel warehouse is processed by adopting the image enhancement algorithm, so that the quality of the collected image of the tunnel face of the underground water seal tunnel warehouse can be effectively improved, the detail information in the image is enhanced, and the accuracy of joint identification is improved. And the contrast adjustment, the illumination balance adjustment, the nonlinear transformation and the self-adaptive parameter adjustment are sequentially carried out on the first node image, and the structural similarity index of the pixel points of the third sub-image and the second node image is compared and calculated until the structural similarity index of the object to be processed and the target object is smaller than the target threshold value, so that the image is clearer and brighter, and the interference of illumination change on node identification is reduced.
Therefore, the enhancement method for the joint image of the tunnel face of the underground water seal cave depot has important significance in the fields of underground energy storage, underground space development and the like, and can provide more accurate and reliable image data support for related research and practice.
Optionally, in step S300, the following method is used for contrast adjustment:
constraining smoothness of the first sub-image by introducing a regularization term to preserve detail information; the regularization term adopts a Total Variation (Total Variation) regularization method, and aims to minimize Total Variation of the image, wherein a calculation formula is as follows:
min G(x, y)=|grad(G(x,y))|+λ*∑|G(x,y)-F(x,y)|;
In the above formula, G (x, y) represents an adjusted image pixel value; f (x, y) represents a first elemental image pixel value; grad represents the gradient operator and λ represents the regularization parameter.
In the above embodiment, in the contrast adjustment algorithm, a regularization term may be introduced to constrain the smoothness of the adjusted image, thereby preserving the detail information of the image. Meanwhile, the regular term considers the smoothness of the image, so that the adjusted image is more natural and smooth. Thus, the contrast adjustment algorithm may better balance contrast enhancement and detail preservation of the image after introducing the regularization term.
Optionally, in step S400, the following method is used for illumination balance adjustment:
local contrast information is introduced to perform equalization adjustment, and the calculation formula is as follows:
G(x,y)=F(x, y)+λ*C(x,y) * (F(x,y) -μ(x,y));
In the above equation, G (x, y) represents the adjusted image pixel value, F (x, y) represents the first-term image pixel value, C (x, y) represents the local contrast, μ (x, y) represents the image local mean, and λ is the regularization parameter.
It should be noted that in the illumination equalization algorithm, more complex image statistics, such as local contrast, color information, etc., may be considered to overcome some problems of the conventional illumination equalization algorithm when processing complex scenes. An improved approach is to introduce local contrast information, and to make equalization adjustments by taking into account the contrast of the neighborhood around each pixel point in the image.
In the above embodiment, by introducing local contrast information, the illumination equalization algorithm can better handle illumination changes in complex scenes and preserve details and color information of the image.
Optionally, in step S500, nonlinear transformation and adaptive parameter adjustment are performed by the following method:
the nonlinear transformation function is implemented by nonlinear mapping of image pixels;
The self-adaptive adjustment parameters dynamically adjust parameters in an algorithm according to local characteristics and statistical information of the image, and the calculation formula is as follows:
λ(x,y) =μ(x,y) + k *σ(x,y);
in the above equation, μx and μy are average values of the images x and y, respectively, and σx and σy are standard deviations of the images x and y, respectively.
It should be noted that the nonlinear transformation function may improve the effects of contrast adjustment and illumination equalization by performing nonlinear mapping on the image pixels. The nonlinear transformation function is particularly suitable for processing images with a wide brightness range, since it can provide better contrast adjustment and illumination equalization effects.
Further, the adaptive adjustment parameters can dynamically adjust parameters in the algorithm according to local features and statistical information of the image, so as to achieve a better image enhancement effect. By dynamically calculating the adaptive adjustment parameters according to the local statistical information of the image, the contrast enhancement and detail preservation can be better balanced, and the requirements of different image areas can be met.
In the embodiment, the contrast adjustment and illumination equalization algorithm can be further improved by introducing the nonlinear transformation function and the self-adaptive adjustment parameter, so that the method is suitable for the image enhancement scene collected by the joint of the tunnel face of the underground water seal cave depot.
Optionally, the nonlinear mapping is performed using the following formula:
G(x,y) = A*log(1+F(x,y));
In the above formula, G (x, y) represents the adjusted image pixel value, F (x, y) represents the first-element image pixel value, and a is a scaling parameter of the transformation function.
In the above embodiment, the nonlinear transformation function is relatively simple, and nonlinear mapping can be performed on the image pixels, so that the effects of contrast adjustment and illumination equalization are improved.
Optionally, a Structural Similarity Index (SSIM) is used to measure the similarity of two images of the rock joints of the underground water seal cave depot, which takes into account the structural information of the images, and is sensitive to brightness, contrast and direction. In step S600, a Structural Similarity Index (SSIM) calculation is performed using the following method:
SSIM(x,y)=(2*μx*μy+σx*σy)/(μx2+μy2+σx2+σy2);
in the above equation, μx and μy are average values of the images x and y, respectively, and σx and σy are standard deviations of the images x and y, respectively.
In the above embodiment, the similarity between the processed image and the target object image is evaluated by calculating the Structural Similarity Index (SSIM), so that the quality of the collected image of the tunnel face of the underground water seal cave depot can be effectively improved, the detailed information in the image is enhanced, and the accuracy of joint identification is improved.
Optionally, the illuminance of the first lighting condition is in a range of 10-50 lux.
In the above embodiment, the processing of the first node image is facilitated, so that the structural similarity indexes of the object to be processed and the target object are compared, so that the image is clearer and brighter, and the interference of illumination change on node identification is reduced.
Optionally, the illumination of the second illumination condition has a value ranging from 100 to 500 lux.
In the above embodiment, the structural similarity indexes of the object to be processed and the target object are compared, so that the image is clearer and brighter, and the interference of illumination change on joint identification is reduced.
The following object can be achieved by limiting the range of illuminance values:
The adaptability is improved: defining the illumination range may help the algorithm adapt to different subsurface environments, as the actual lighting conditions may vary from place to place and from time to time.
Improving the image quality: within a defined illumination range, it is ensured that the image is neither too dark, which leads to loss of detail, nor too bright, which leads to a highlight overflow.
The algorithm performance is improved: different illumination conditions have a significant impact on the performance of the image processing algorithm. Limiting the illumination range is helpful for optimizing algorithm parameters and improving the stability and accuracy of the algorithm.
Ensuring illumination balance: in a limited illumination range, the illumination balancing algorithm can work more effectively, and the influence of uneven illumination on the image quality is reduced.
Ensuring the accuracy of joint identification: proper illumination helps to improve the recognition accuracy of the joint image, since the visibility of the joint is closely related to the illumination condition.
The experiment and the test are convenient: in practical applications, the best parameter setting can be found in the illumination ranges through experiments and tests, so that the image enhancement effect is optimized.
Optionally, the constraint parameter searching method comprises random searching, simulated annealing, particle swarm optimization and genetic algorithm.
In the above embodiment, the parameter space involved in the improved algorithm in each step can be quickly and accurately searched by the constraint parameter searching method, and the structural similarity index of the object to be processed and the target object is quickly smaller than the target threshold value by adjusting the parameter space.
Optionally, the target threshold value is in a range of 0.9-0.995.
In the embodiment, the similarity between the processed image and the target object image can be evaluated through the value range of the target threshold, the quality of the collected image of the tunnel face of the underground water seal cave depot can be effectively improved, the detail information in the image is enhanced, and therefore the accuracy of joint identification is improved.
The target threshold is typically used to evaluate the effect of image processing algorithms, particularly in image quality metrics such as Structural Similarity (SSIM). The SSIM index is a value between-1 and 1, where 1 indicates that the two images are identical and 0 or near 0 indicates poor image quality.
It should be noted that the lower limit of the target threshold is 0.9, which indicates that the structural similarity between the image to be processed and the target image needs to reach at least 90% of similarity. The upper limit of the target threshold is close to 1 but not 1, for example 0.995, to allow a degree of natural variance, since the exact same image is difficult to achieve in practical applications. By defining the target threshold, the method not only can ensure that the result generated by the image enhancement algorithm at least reaches a certain quality standard, but also provides a clear optimization target for the target threshold, and the algorithm can adjust parameters according to the threshold so as to achieve a better image enhancement effect. Meanwhile, the same target threshold value is used in different image processing tasks, so that the consistency of results can be ensured, and comparison and evaluation are facilitated. Further, in practical applications, a complete structural similarity (ssim=1) may not be necessary, so setting a threshold close to 1 may balance image quality and processing efficiency. In addition, by adjusting the target threshold, the performance of the image enhancement algorithm can be flexibly adjusted according to the requirements of different applications.
Referring to fig. 2 to 6, fig. 2 to 6 correspond to images acquired in different steps of the present invention, respectively, each image representing the processing effect of the algorithm at different stages.
Fig. 2 is an image obtained in step S100, which shows an original joint image of the tunnel face of the underground water seal hole obtained under the first illumination condition. Fig. 2 reflects the image quality under low illumination conditions, and may suffer from uneven illumination, low contrast, or unclear details.
Fig. 3 is an image acquired in step S200. Which represents the joint image of the tunnel face acquired under the second illumination condition as the target object.
Fig. 3 reflects an improvement of the image under higher illumination conditions, such as better illumination conditions and contrast, compared to fig. 2, but still requires further enhancement to improve the recognition accuracy of the joint.
Fig. 4 is an image acquired in step S300, which is an image subjected to contrast adjustment, i.e., a first sub-image. Fig. 4 reflects the effects of the contrast adjustment step, including enhancing the local contrast of the image, making the joint features more pronounced.
Fig. 5 is an image obtained in step S400, which is an image subjected to illumination balance adjustment, i.e., a second sub-image. Fig. 5 reflects the effect of illumination balance adjustment, and shows how to reduce the problem of uneven illumination in an image, so that the whole image looks more balanced and natural.
Fig. 6 is an image acquired in step S500, which is an image subjected to nonlinear transformation and adaptive parameter adjustment, i.e., a third sub-image. Fig. 6 illustrates the resulting image enhancement effect, including improved image detail, contrast, and overall visual quality, to facilitate recognition and analysis of joints.
Through fig. 2 and fig. 6, it can be shown how the algorithm gradually improves the image quality, and finally, the purpose of improving the joint recognition accuracy is achieved.
In the embodiment of the application, the enhancement method for the joint image of the tunnel face of the underground water seal cave depot improves the effects of contrast adjustment and illumination equalization, and reduces the loss of image details, thereby realizing the accurate identification of the joint of the tunnel face of the underground water seal cave depot and being suitable for the actual application requirements.
Therefore, the enhancement method for the joint image of the tunnel face of the underground water seal cave depot has wide application value and economic benefit in the field of recognition of the joint of the tunnel face of the underground water seal cave depot.
It is to be understood that the above embodiments are merely illustrative of the application of the principles of the present invention, but not in limitation thereof. Various modifications and improvements may be made by those skilled in the art without departing from the spirit and substance of the invention, and are also considered to be within the scope of the invention.