Image enhancement and adjustment method for concrete water seepage detection based on computer vision

Through the image enhancement and adjustment method based on computer vision, the light source and camera parameters of the anti-seepage instrument are adaptively adjusted, which solves the misjudgment problem caused by the instability of the light source in traditional detection, improves detection accuracy and efficiency, and reduces costs.

CN119850430APending Publication Date: 2025-04-18JIANGSU ZHONGJI ENG & TECH RES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411963684.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-18

Smart Images

  • Figure CN119850430A_ABST
    Figure CN119850430A_ABST
Patent Text Reader

Abstract

The invention relates to an image enhancement and adjustment method for concrete water seepage detection based on computer vision. The method comprises the steps that a light source and a camera are arranged above a workbench, and a plurality of mark blocks are arranged on the surface of the workbench; turning on a light source and a camera; acquiring an image including a plurality of mark blocks through a camera, and acquiring average photosensitive intensity Gravg from the image; the method further comprises a step of adjusting parameter values of brightness, saturation and sharpness of the camera. Enhancing the acquired image through an image enhancement algorithm; evaluating the enhanced image through an image evaluation index, if the enhanced image belongs to a threshold value, outputting the enhanced image, otherwise, repeating the above steps until the enhanced image is output; according to the image enhancement and adjustment method for concrete water seepage detection based on computer vision, the light source and the camera can be adaptively adjusted according to the fed-back image evaluation index, and the image output by the camera is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a light source of an anti-seepage instrument, camera adjustment and a test block image processing method, and in particular to an image enhancement and adjustment method for concrete water seepage detection based on computer vision. Background Art

[0002] In the field of bridge material quality inspection, the impermeability tester is widely used in the impermeability test of various materials. The traditional impermeability tester injects high-pressure liquid into the test block and detects the impermeability performance of the material through manual observation. This detection method not only has a large impact on the test results due to human factors, but also has a high labor intensity for the testers. With the continuous development of artificial intelligence technology, it has been gradually applied to impermeability testing to improve the automation of impermeability testing. However, whether it is manual testing by testers or automated testing through artificial intelligence technology, the ambient light source during testing is crucial. If the light intensity during testing is too bright or too dark, and the color temperature is too low or too high, it will affect manual or automated judgment. For example, some inconspicuous penetration features are not easy to be found, resulting in misjudgment of manual or intelligent detection. Therefore, it is necessary to design an adjustment method to adaptively adjust the relevant parameters of the light source and the camera so that the lighting environment can reach the optimal state, so that the camera can have a better imaging effect, and enhance the image collected by the camera to improve the accuracy of subsequent artificial intelligence recognition. Summary of the invention

[0003] In order to solve the above technical problems, the present invention provides an image enhancement and adjustment method for concrete water seepage detection based on computer vision, which can adaptively adjust the light source and camera according to the feedback image evaluation index and enhance the image output by the camera to improve the image clarity and subsequent automatic recognition accuracy.

[0004] The image enhancement and adjustment method for concrete water seepage detection based on computer vision of the present invention comprises the steps of arranging a light source and a camera above a workbench, and the image enhancement and adjustment method for concrete water seepage detection based on computer vision also comprises the following steps: Step S1, setting a number of marking blocks on the surface of the workbench; Step S2, turning on the light source and the camera; Step S3, obtaining an image including several marker blocks through a camera, and obtaining the average light sensitivity G of the several marker blocks from the image. ravg ; Step S4: When step S4 is executed for the first time, each parameter is initialized by the following formula; α b= C br / G ravg ; =C sharp ; =C br ; =C sat ; When step S4 is not executed for the first time, ΔG=(G s -G rgvg )*1% Calculate the brightness adjustment value and adjust the light source brightness to , where G s is the brightness value of the standard light source, =L M +ΔG,L M Is the current brightness value of the light source; Set each parameter using the following formula; α b= C br / G ravg =C sharp* a b ; α d =L h / ; =α b* α d ; fl(lk)=(1-(10000) / T-6500)*lk; =C sat *f(lk); Adjust the camera's brightness, saturation, and sharpness parameters to the above values. , , ; where α b is the brightness adjustment coefficient, C sharp is the current sharpness parameter value of the camera, is the pre-adjusted value of the camera sharpness parameter, C br is the current brightness parameter value of the camera, is the pre-adjusted value of the camera brightness parameter, C sat is the current saturation parameter value of the camera, is the pre-adjusted value of the camera saturation parameter; α d is the light intensity attenuation coefficient, L h is the height of the light source, Adjust the brightness of the light source; T is the current color temperature of the light source, lk is the preset color temperature value, and fl(lk) is the white balance parameter adjustment value of the camera; Step S5, enhancing the image acquired in step S3 by using an image enhancement algorithm; Step S6, evaluating the enhanced image outputted in step S5 by using the image evaluation index, and outputting the enhanced image if the enhanced image is within the threshold, otherwise repeating steps S3-S6 until step S6 outputs the enhanced image within the threshold; In step S5, the image enhancement algorithm includes the following steps:

[0005] Step S51, performing Laplace transform on the input image; Step S52, by the formula E(x,y)=I(x,y)+α b* * L(x,y) enhances the image transformed in step S51; Where I(x, y) is the original image, L(x, y) is the image after Laplace transformation output in step S51, and E(x, y) is the enhanced image; Step S53: convert the image outputted in step S52 into the HSV color space, and adjust the image saturation S by the following formula: origin To the new saturation value S new ; S new =S origin *(1+( / 100)); Step S54, restore the image output in step S52 to the RGB color space, and use the formula F(x,y)=E'(x,y)+ Output the final enhanced image, where E'(x,y) is the image restored from the HSV color space.

[0006] Furthermore, in the computer vision-based image enhancement and adjustment method for concrete water seepage detection of the present invention, the four marking blocks are respectively arranged at the four corners of the workbench.

[0007] Furthermore, in the computer vision-based image enhancement and adjustment method for concrete water seepage detection of the present invention, the color of the marker block is black.

[0008] Furthermore, in the computer vision-based image enhancement and adjustment method for concrete water seepage detection of the present invention, the image evaluation index in step S6 is the PSNR image evaluation index.

[0009] The image enhancement and adjustment method for concrete water seepage detection based on computer vision of the present invention has the advantage that it uses an image enhancement algorithm to perform enhancement processing on the image taken by the camera, and then evaluates the enhanced image through the image evaluation index. If the enhanced image evaluation index exceeds the threshold, the light source and camera-related parameters are adjusted respectively to further improve the image quality taken by the camera until the enhanced image is within the threshold range, so that the subsequent artificial intelligence algorithm can easily obtain the permeability performance of the inspected product on the enhanced image, greatly improving the characteristic detection rate of permeation in complex environments, reducing the workload of staff, and reducing the cost of anti-permeability experiments.

[0010] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it in accordance with the contents of the specification, the embodiments of the present invention are described in detail below. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 It is a flow chart of the image enhancement and adjustment method for concrete water seepage detection based on computer vision. DETAILED DESCRIPTION

[0012] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0013] Example 1: See Figure 1 The image enhancement and adjustment method for concrete water seepage detection based on computer vision of this embodiment includes the steps of arranging a light source and a camera above a workbench, and the image enhancement and adjustment method for concrete water seepage detection based on computer vision also includes the following steps; Step S1, setting a number of marking blocks on the surface of the workbench; Step S2, turning on the light source and the camera; Among them, the height of the light source from the workbench is fixed at 80cm, the initial brightness can be set to 2000lm, the initial color temperature is 2000K, the camera initial brightness parameters, initial saturation parameters, and initial sharpness parameters are all set to 50. The initial parameters of the above light sources can be saved in the system in Json format, and the camera parameters are saved in the camera memory.

[0014] Step S3, obtaining an image including several marker blocks through a camera, and obtaining the average light sensitivity G of the several marker blocks from the image. ravg ; Specifically, the system reads the current internal parameters of the camera through the camera SDK, and reads the camera RTSP (Real-time Streaming Protocol) stream through OpenCV and decodes it to obtain the three-dimensional array of the current image frame.

[0015] Since the shape and position of the marker blocks are relatively fixed, the system can obtain separate image data of each marker block in the image by segmenting the image.

[0016] In order to facilitate the acquisition of individual image data of each marker block, the marker block is preferably a square marker block.

[0017] For the convenience of description, in this embodiment, the number of the above-mentioned marker blocks is preferably four, the four marker blocks are black, and are respectively arranged at the four corners of the workbench, so that in the image captured by the camera, the four marker blocks are respectively located at the four corners of the image, and the image of the tested test block is located in the middle of the image. The system can extract a separate image of each marker block from the image through the fixed coordinates, size, camera height and other parameters of the marker block, and the specific steps are conventional techniques in the field and will not be repeated here.

[0018] After obtaining the individual images of the marker blocks, since the image is an RGB three-channel color image, the system first grayscales the individual images of each marker block using the following formula.

[0019] ; Among them, R, G, B are the R channel, G channel and B channel values ​​of a certain pixel of the image, respectively, and Y is the grayscale value after conversion. Among them, the weight values ​​0.299, 0.587 and 0.114 are based on the sensitivity of the human eye to different colors of light. Since the human eye is most sensitive to green light, accounting for about 60%-70%, the sensitivity to red light is relatively high, accounting for about 20%-30%, and the sensitivity to blue light is the lowest, accounting for about 10%-20%.

[0020] In order to convert a color image into a grayscale image, a weighted average method is used to combine the values ​​of the three channels. The above 0.299, 0.587 and 0.114 are obtained through a lot of experiments and research, and are used to represent the different sensitivities of the human eye to these three colors.

[0021] These weights ensure that during the grayscale conversion process, the generated grayscale values ​​more accurately reflect the brightness perception of the original image.

[0022] After obtaining the individual images of each marker block, the system obtains the marker block grayscale value of a marker block image through the following formula; ; Among them, G(i,j) is the gray matrix of a certain marker block, i and j are the horizontal and vertical coordinates of a pixel point of the marker block in the image, respectively, and x 11 is the starting position of the horizontal coordinate of a certain marker block in the image, y 11 is the starting position of the vertical coordinate of a certain marker block in the image, x 12 is the horizontal coordinate end point of the marker block in the image, y 12 is the vertical coordinate end point of the marker block in the image.

[0023] Through the above formula, the system can obtain the grayscale values ​​of the four marker blocks, which are respectively recorded as A 1 Gr,A 2 Gr,A 3 Gr,A 4 Gr, and then the average photosensitivity G of the four marker blocks is calculated by the following formula ravg ; .

[0024] Step S4: When the system executes step S4 for the first time, the system initializes various parameters using the following formulas; α b= C br / G ravg ; =C sharp ; =C br ; =C sat ; When step S4 is not executed for the first time, ΔG=(G s -G rgvg )*1% Calculate the brightness adjustment value and adjust the light source brightness to , where G s is the brightness value of the standard light source, =L M +ΔG,L M Is the current brightness value of the light source; And set each parameter through the following formula; α b= C br / G ravg =C sharp* a b ; α d =L h / ; =α b* α d ; fl(lk)=(1-10000 / (T-6500))*lk; =C sat *f(lk); And adjust the camera's brightness parameter, saturation parameter and sharpness parameter values ​​to the above , , ; Among them, α b is the brightness adjustment coefficient, which is the ratio of the current brightness parameter to the average grayscale value of the marker block. When it is equal to 1, it means that the brightness of the light source is the optimal value, and the light source and camera-related parameters do not need to be adjusted, otherwise they need to be adjusted.

[0025] C sharp is the current sharpness parameter value of the camera, is the pre-adjusted value of the camera sharpness parameter, C br is the current brightness parameter value of the camera, is the pre-adjusted value of the camera brightness parameter, C sat is the current saturation parameter value of the camera, is the pre-adjusted value of the camera saturation parameter; α d is the light intensity attenuation coefficient, L h is the height of the light source, Adjust the brightness of the light source; T is the current color temperature of the light source, lk is the preset color temperature value, and its specific value can be gradually adjusted by 1% of the current value or standard value. fl(lk) is the white balance parameter adjustment value of the camera; Step S5, enhancing the image acquired in step S3 by using an image enhancement algorithm; Step S6, evaluating the enhanced image outputted in step S5 by using the image evaluation index, and outputting the enhanced image if the enhanced image is within the threshold, otherwise repeating steps S3-S6 until step S6 outputs the enhanced image within the threshold; Specifically, the system may fuse the image in step S3 and the enhanced image output in step S6 with evaluation indicators such as peak signal-to-noise ratio and SSIM, and determine the enhanced image output that is within the threshold.

[0026] In step S5, the image enhancement algorithm includes the following steps:

[0027] Step S51, performing Laplace transform on the input image, specifically refer to the following formula; ; Step S52, by the formula E(x,y)=I(x,y)+α b* * L(x,y) enhances the image transformed in step S51; Wherein, I(x, y) is the original image, L(x, y) is the image after Laplace transformation output in step S51, and E(x, y) is the enhanced image; Step S53: convert the image outputted in step S52 into the HSV color space, and adjust the image saturation S by the following formula: origin To the new saturation value S new ; S new =S origin *(1+( / 100)); Step S54, restore the image output in step S52 to the RGB color space, and use the formula F(x,y)=E'(x,y)+ Output the final enhanced image, where E'(x,y) is the image restored from the HSV color space.

[0028] Preferably, in the image enhancement and adjustment method for concrete water seepage detection based on computer vision of the present invention, the image evaluation index in step S6 is the PSNR image evaluation index, and its specific calculation method is as follows; ; ; If the PNSR value is within the threshold range of 20-40db, the enhanced image is considered to meet the requirements and is output, otherwise the above steps S3-S6 are repeated.

[0029] Where I(x,y) is the original image, F(x,y) is the output enhanced image, W and H are the width and height of the image, N is the total number of pixels, and R represents the dynamic range of the image or the maximum possible value of the pixel value. For 8-bit images, R is a constant of 255.

[0030] The computer vision-based image enhancement and adjustment method for concrete water seepage detection uses an image enhancement algorithm to enhance the image taken by the camera, and then evaluates the enhanced image through an image evaluation index. If the enhanced image evaluation index exceeds a threshold, the light source and camera-related parameters are adjusted respectively to further improve the image quality taken by the camera until the enhanced image is within the threshold range, thereby enabling the subsequent artificial intelligence algorithm to easily obtain the permeability performance of the inspected product on the enhanced image, greatly improving the characteristic detection rate of permeation in complex environments, reducing the workload of staff, and reducing the cost of anti-permeability experiments.

[0031] The computer vision-based image enhancement and adjustment method for concrete water seepage detection can adapt to different brands of cameras and light sources and optimize the adjustments, thereby greatly improving the feature detection rate of infiltration in complex environments, thereby reducing the workload of staff and the cost of anti-seepage experiments.

[0032] The above is only a preferred embodiment of the present invention, which is used to assist those skilled in the art to implement the corresponding technical solution, and is not used to limit the scope of protection of the present invention. The scope of protection of the present invention is defined by the attached claims. It should be pointed out that for those of ordinary skill in the art, on the basis of the technical solution of the present invention, several equivalent improvements and variations can be made, and these improvements and variations should also be regarded as the scope of protection of the present invention. At the same time, it should be understood that although this specification is described in accordance with the above-mentioned embodiments, not every embodiment contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions of each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A computer vision-based image enhancement and adjustment method for concrete water seepage detection, comprising the steps of arranging a light source and a camera above a workbench, characterized in that: The image enhancement and adjustment method for concrete water seepage detection based on computer vision also includes the following steps: Step S1, setting a number of marking blocks on the surface of the workbench; Step S2, turning on the light source and the camera; Step S3, obtaining an image including several marker blocks through a camera, and obtaining the average light sensitivity G of the several marker blocks from the image. ravg ; Step S4: When step S4 is executed for the first time, the parameters are initialized by the following formulas; α b= C br / G ravg ; =C sharp ; =C br ; =C sat ; When step S4 is not executed for the first time, ΔG=(G s -G rgvg )*1% Calculate the brightness adjustment value and adjust the light source brightness to , where G s is the brightness value of the standard light source, =L M +ΔG,L M Is the current brightness value of the light source; Set each parameter using the following formula; a b= C br / G ravg =C sharp * a b ; α d =L h / ; =α b* α d ; fl(lk)=(1-(10000) / T-6500)*lk; =C sat *f(lk); Adjust the camera's brightness, saturation, and sharpness parameters to the above values. , , ; where α b is the brightness adjustment coefficient, C sharp is the current sharpness parameter value of the camera, is the pre-adjusted value of the camera sharpness parameter, C br is the current brightness parameter value of the camera, is the pre-adjusted value of the camera brightness parameter, C sat is the current saturation parameter value of the camera, is the pre-adjusted value of the camera saturation parameter; α d is the light intensity attenuation coefficient, L h is the height of the light source, Adjust the brightness of the light source; T is the current color temperature of the light source, lk is the preset color temperature value, and fl(lk) is the white balance parameter adjustment value of the camera; Step S5, enhancing the image acquired in step S3 by using an image enhancement algorithm; Step S6, evaluating the enhanced image outputted in step S5 by using the image evaluation index, and outputting the enhanced image if the enhanced image is within the threshold, otherwise repeating steps S3-S6 until step S6 outputs the enhanced image within the threshold; In step S5, the image enhancement algorithm includes the following steps: Step S51, performing Laplace transform on the input image; Step S52, by the formula E(x,y)=I(x,y)+α b* * L(x,y) enhances the image transformed in step S51; Where I(x, y) is the original image, L(x, y) is the image after Laplace transformation output in step S51, and E(x, y) is the enhanced image; Step S53: convert the image outputted in step S52 into the HSV color space, and adjust the image saturation S by the following formula: origin To the new saturation value S new ; S new =S origin *(1+( / 100)); Step S54: restore the image outputted in step S52 to the RGB color space and calculate the image using the formula F(x,y)=E'(x,y)+ Output the final enhanced image, where E'(x,y) is the image restored from the HSV color space.

2. The image enhancement and adjustment method for concrete water seepage detection based on computer vision according to claim 1, characterized in that: The number of the marking blocks is four, and the four marking blocks are respectively arranged at the four corners of the workbench.

3. The image enhancement and adjustment method for concrete water seepage detection based on computer vision according to claim 2, characterized in that: The color of the marking block is black.

4. The image enhancement and adjustment method for concrete water seepage detection based on computer vision according to claim 1, characterized in that: The image evaluation index in step S6 is the PSNR image evaluation index.