In-situ detection environment self-adaptive vision system and method for small-diameter loess geological information
By using an adaptive vision system inside loess cavities and employing automatic object distance adjustment and light-adjusting technology, the problem of poor imaging quality inside loess cavities was solved, achieving high-quality loess geological information detection and improving the accuracy and adaptability of the detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2026-03-27
AI Technical Summary
Traditional methods and in-situ detection instruments for detecting loess geological information are insufficient to meet the needs of detecting key geological information within loess cavities. In particular, the imaging quality is poor in loess cavities with narrow apertures, high darkness and humidity, and changing optical environments, which affects the image analysis results.
An environmentally adaptive vision system for in-situ detection of small-diameter loess geological information was designed. It adopts a plate-level industrial camera, achieves focusing by automatically adjusting the object distance, and combines automatic dimming technology to ensure consistent image clarity and brightness, adapting to changes in aperture and differences in optical environment.
It achieves high-quality image acquisition inside loess cavities, ensuring consistent image clarity and brightness on the cavity walls, improving the accuracy and intelligence of loess geological information detection, and exhibiting strong adaptability while reducing the impact of the environment on the focusing structure.
Smart Images

Figure CN116106227B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of geological information detection technology, specifically relating to an adaptive vision system and method for in-situ detection of small-diameter loess geological information. Background Technology
[0002] The Loess Plateau is the most concentrated and largest loess distribution area in my country and even the world. Loess itself, as a special type of disaster-prone soil, possesses characteristics such as fragile structure, extremely high water sensitivity, and unique strength attenuation, often leading to geological disasters in loess areas. The numerous loess engineering projects, especially major projects such as hillside construction, gully control and land reclamation, and gully stabilization and loess protection, have severely disturbed the loess, triggering a number of new loess engineering disaster problems. To reveal the disaster-causing mechanisms of these engineering disasters, propose solutions, and prevent their occurrence, it is necessary to understand the relationship between loess geological information and the evolution of disaster occurrence and development. This requires exploring the geological structure and spatial distribution of key parts of loess slopes, and quantifying the variation patterns and deterioration processes of key parameters such as loess strength and deformation, considering water sensitivity and disturbance vulnerability. Traditional methods for detecting loess geological information and in-situ detection instruments are insufficient to meet the needs of detecting the aforementioned key geological information. To address this issue, Yang Haoyi, a member of the research team, proposed an in-situ detection device for loess cavities (detection holes drilled from the ground downwards in the loess layer) in his paper "Wheeled Pipeline Robot for In-situ Detection of Loess Geological Information". The pipeline robot is used as an adaptive carrier for in-situ detection inside loess cavities, and the detection system is coordinated to obtain geological information of key parts of loess slopes. The pipeline robot is equipped with a machine vision system, which enables fine detection of key information inside complex loess slopes.
[0003] However, the confined space within loess boreholes, with diameters typically ranging from 70-180mm, makes it impossible to accommodate an autofocus camera. Furthermore, due to ground stress and the borehole construction process, issues such as localized rockfalls, diameter reduction, and collapses are unavoidable. If a fixed-focus camera is used, it's impossible to ensure the borehole walls remain within the camera's depth of field during underground exploration, leading to blurred and distorted images. Simultaneously, the borehole environment is dark and humid, and the borehole walls contain minerals with varying optical properties. Even with a stable light source, the imaging optical environment will significantly change with these variations, affecting image brightness. All of these factors severely impact image quality, consequently affecting the quality of loess geological information detection. Therefore, to deeply understand the mechanisms of engineering geological disasters in the loess region and address the frequent occurrence of disasters on the Loess Plateau, it is necessary to develop a dedicated in-situ visual system for loess geological information detection. Summary of the Invention
[0004] Based on the problems existing in the prior art, the application provides a small-diameter loess geology information in-situ detection environment self-adaptive vision system and method, so that the vision system realizes automatic focusing and automatic light adjustment in the process of detecting in the hole, solves the problems of image distortion and inconsistency of optical imaging environment of the existing vision system, and improves the accuracy and intelligence of the vision system.
[0005] The pictures collected by the vision system are mainly used for analyzing the water content and surface porosity of loess, so certain requirements are put forward for the magnification of the vision system and the image quality of the collected pictures.
[0006] Firstly, for the working posture of the vision system, the vision system needs to complete the image collection of loess around the hole wall in a dark environment, if the shooting angle of the vision system is not perpendicular to the hole wall, the quality of the collected image is poor, which affects the subsequent analysis of the loess image, so the vision system needs to collect images vertically to the hole wall, and the images in the central region with relatively flat hole wall are beneficial to the subsequent work.
[0007] Secondly, the diameters of the loess holes required to be collected are 130mm, 140mm and 150mm respectively, the diameter of the loess hole changes constantly in the actual detection process, and conditions such as collapse and subsidence may occur in the hole, the object distance of the vision system changes constantly, which leads to the defocus of the industrial camera, and clear images cannot be collected. Therefore, the vision system needs to have certain self-adaptive adjustment function, which can not only adjust the imaging parameters of the vision system to realize focusing under the condition that the diameter changes, but also has the function of automatic focusing, and can adapt to different diameters to ensure that the images collected in the detection process are all in focus. This puts certain requirements on the overall size and adjustable range of the imaging parameters of the vision system. In addition, when the vision system is located at the in-focus position, the magnification of the imaging system is consistent, which ensures that the size of the loess particles collected is the same proportion, and certain design requirements are put forward for the automatic focusing function.
[0008] In addition, under the conditions of different loess water content and mineral noise interference, the image brightness generated by the same imaging parameter and light intensity is inconsistent, secondly, due to the change of the diameter in the actual detection process, the brightness of the collected images in the focusing process is inconsistent, which further leads to different image quality, which not only affects the focusing accuracy, but also cannot ensure that the image brightness in the data set and the sample set is consistent. Different optical imaging environments reduce the focusing accuracy and the information recognition accuracy of the neural network, so the vision system needs to have good automatic light adjustment performance, and can provide certain reference for the selection of the best optical imaging environment.
[0009] Based on the above requirements, the application proposes the following technical ideas:
[0010] The image of the loess hole wall is collected by the vision system, which needs to be perpendicular to the hole wall, so there are certain requirements for the overall size of the vision system. First, it meets the loess hole size requirements, and is designed for a small aperture of 130 mm. If it meets the requirements of a 130 mm aperture, it must meet the requirements of the other two large apertures. Considering the high image quality requirements of subsequent image analysis, the complex detection environment and the long continuous working time, an industrial camera with high imaging quality, strong environmental adaptability and high performance is selected. From the market research results, the minimum shooting distance of the industrial camera is about 70 mm, and considering the 130 mm working aperture, the camera and lens selection has certain size limitations. After a lot of market research, the industrial camera with automatic focusing function does not meet the size requirements, and the camera that meets the size requirements is a board-level industrial camera (select an appropriate camera to meet the vertical shooting), and the board-level industrial camera is a fixed-focus camera. Compared with adjusting the camera image distance or focal length by controlling the camera gel ring rotation, directly controlling the camera image distance is more adaptable to the loess hole detection environment, which not only reduces the influence of the loess detection environment on the focusing structure precision, but also reduces the size of the focusing structure. In addition, in terms of image quality, the size of the hole wall cracks and loess pores in the collected images of different apertures should be as consistent as possible. If the focusing scheme of adjusting the camera gel ring to adjust the image distance or focal length is selected, it cannot be achieved. Moreover, the board-level industrial camera available for selection is a fixed-focus camera, and the variable is the object distance. Based on the above scheme analysis, the automatic focusing scheme based on image processing is selected to adjust the object distance.
[0011] From the above selected automatic focusing method, the automatic focusing scheme of adjusting the object distance is adopted, and two key variables appear during the focusing process with the change of the object distance. One is the slight change of the size of the target object in the image, but since the object distance is mainly adjusted in this invention, and the camera has a large depth of field range, this variable has little effect on the focusing accuracy. The other variable is the change of the image brightness. The change of the object distance leads to the change of the distance between the light source and the target hole wall, and the optical imaging environment is inconsistent during the focusing process, which leads to the change of the image brightness collected, and brings a certain degree of error, reducing the focusing accuracy. Therefore, it is necessary to ensure that the optical imaging environment of the vision system during the loess hole collection process is as consistent as possible, and the brightness value of the collected image is within the set range. In addition, during the image collection process of the industrial camera, too strong or too weak light intensity will affect the capture of image detail information by the camera; only under appropriate light intensity, the industrial camera can collect clear images with sharp edges and rich detail information. Therefore, appropriate light intensity needs to be selected to ensure the quality of clear images.
[0012] Because the main working environment in the application is located in the dark loess hole, the image brightness is adjusted from the inside of the camera, which is more cumbersome and uncertain. The light source of the industrial camera in the dark environment is the only light source, and the effect of directly adjusting the intensity of the camera light source for scene brightness adjustment is more intuitive. In summary, the automatic light adjustment scheme based on image processing is selected to adjust the scene brightness, the brightness value of the collected image is calculated, the light source intensity is adjusted according to the calculation result, and the image brightness value evaluated by the image definition evaluation function in each automatic focusing process is ensured to be within the set range. The image brightness value of the focus position collected is consistent with the brightness value range in the sample set.
[0013] Based on the above idea, the application first proposes a small-diameter loess geology information in-situ detection environment adaptive vision system, which comprises an image acquisition module, a focusing module, an image processing module and a control module.
[0014] The image acquisition module comprises a light source, a camera and a light source controller, the axis of the light source is coaxial with the imaging optical axis of the camera; the camera is a board-level industrial camera;
[0015] The focusing module comprises a linear motion mechanism and a rotating mechanism; the image acquisition module is connected below the linear motion mechanism, the linear motion mechanism is used to drive the whole image acquisition module to move linearly along the optical axis direction of the light source; the linear motion mechanism is connected below the rotating mechanism, and the rotating mechanism is used to drive the linear motion mechanism and the whole image acquisition module to rotate around the direction perpendicular to the optical axis of the light source;
[0016] The image processing module comprises a light measurement module, a light adjustment module, an image definition evaluation module and a focusing search module; the light measurement module is used to calculate the brightness of the collected image; the light adjustment module is used to adjust the gear position of the light source controller until the brightness of the collected image meets the requirements; the image definition evaluation module is used to calculate the definition evaluation function value of the collected image; the focusing search module is used to search the image collected by the camera after adjusting the object distance to obtain the object distance position with the best definition evaluation function value;
[0017] The image acquisition module and the image processing module can transmit image data;
[0018] The control module is used to receive the instruction information of the upper computer and send feedback information to the lower computer, and control the focusing module to adjust the object distance of the camera or adjust the light source controller according to the instruction information.
[0019] Preferably, a pad plate is arranged between the camera and the light source.
[0020] Preferably, the linear movement mechanism comprises a screw guide rail sliding table, a sliding block, a first motor, a screw guide rail connecting piece and a sliding block connecting piece; the first motor drives the rotation of the screw on the screw guide rail sliding table, the sliding block is connected on the screw, and the bottom of the sliding block and the image acquisition module are connected through the sliding block connecting piece; the screw guide rail connecting piece is connected on the upper end surface of the screw guide rail sliding table and is used for connecting the rotating mechanism.
[0021] Preferably, the rotating mechanism comprises a second motor, and the output shaft of the second motor is connected with the upper end surface of the linear movement mechanism through a shaft coupling.
[0022] Preferably, the control module comprises a main control chip, a circuit and a serial port, and the main control chip communicates with the light source controller and the image processing module through the serial port.
[0023] The application also provides a control method of the in-situ environmental adaptive vision system for small-diameter loess geology information detection.
[0024] Step 1: a camera is used to acquire loess images, the brightness of the current acquired image is calculated, and it is judged whether the brightness of the current image is within the set range; if yes, step 2 is performed; if not, the light source controller is controlled to adjust the brightness of the light source until the brightness of the acquired image is within the set range, and step 2 is performed.
[0025] Step 2: the current brightness image is subjected to calculation of an image sharpness evaluation function, then the linear movement mechanism is controlled to adjust the camera object distance according to the image sharpness evaluation function value combined with a focusing search algorithm, and the light is adjusted according to step 1 at the current object distance position.
[0026] Step 3: step 2 is repeated until the object distance position of the best value of the image sharpness evaluation function is searched, which is the focus position, and the focusing is realized.
[0027] Step 4: after the focusing at the current position is completed, the camera is rotated by the rotating mechanism to acquire images of the next position of the hole wall, and steps 1 to 3 are repeated; until the image acquisition of the hole wall at the current depth is completed.
[0028] Preferably, the image sharpness evaluation function adopts a Tenengrad function.
[0029] Preferably, the focusing search algorithm comprises the following steps:
[0030] a) search direction judgment:
[0031] From the random position, the straight moving mechanism (21) drives the camera (12) to move to adjust the camera distance, collects an image every time of moving, collects three images continuously, and calculates the definition evaluation function values F1, F2 and F3 of the three images;
[0032] If F1
[0033] If F1
[0034] If F1 <f2>F3, keep the current search direction until F1<F2<F3 or F1>F2>F3;
[0035] b) coarse focusing search:
[0036] adjust the camera object distance with a coarse step, calculate the sharpness evaluation function value of each image ;
[0037] according to the sharpness evaluation function value , , peak region search, use two three-point method to determine whether to pass the peak position, if the peak position is passed, step c) is performed, otherwise, continue to search the peak region until the peak position is passed, and step c) is performed;
[0038] c) move to the peak in the reverse direction with a coarse step, and perform step d);
[0039] d) fine focusing search:
[0040] adjust the camera object distance with a small step, drive the camera (12) to continue searching in the upward direction, and calculate the sharpness evaluation function value of each image ;
[0041] according to the sharpness evaluation function value , , peak region search, use two three-point method to determine whether to pass the peak position, if the peak position is passed, step c) is performed, otherwise, continue to search the peak region until the peak position is passed, and step c) is performed;
[0042] Preferably, in step 1, the single-side traversal method is used to adjust the gear position of the light source controller step by step.
[0043] Compared with the prior art, the beneficial effects of the present application are:
[0044] (1) The adaptive vision system of the present application can realize vertical image collection of the hole wall of a loess hole with a diameter of 130mm~150mm and image collection around the hole wall through the design of the focusing mechanism.
[0045] (2) The adaptive vision system of the present application can realize image collection in a complex environment in a dark loess hole, and through automatic object distance adjustment focusing, the size of the collected hole wall pores is consistent, and through automatic light adjustment, the brightness value of the collected image is consistent.
[0046] (3) The adaptive vision system of the present application has better adaptability to loess hole detection environment, simple control, small size, reduces the influence of loess detection environment on focusing structure precision, and reduces the size of focusing structure, compared to controlling camera rubber ring rotation, adjusting camera image distance or focal length, and directly controlling object distance of camera image acquisition.
[0047] (4) The adaptive vision system of the present application adopts automatic focusing and automatic light adjustment methods based on image processing, so that the vision system has certain stability and precision, and can realize high-quality image acquisition of loess hole wall, and has stronger environmental adaptability.
[0048] Other features and advantages of the present application will be described in detail in the following specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0049] Figure 1 is a structural schematic view of the adaptive vision system of the present application mounted on a pipe robot.
[0050] Figure 2 is a front three-axis side view of the adaptive vision system in a working state according to the embodiment of the present application.
[0051] Figure 3 is a front view of the adaptive vision system in a working state according to the embodiment of the present application.
[0052] Figure 4 is a top view of the adaptive vision system in a working state according to the embodiment of the present application.
[0053] Figure 5 is a schematic view of internal module arrangement of the control cabinet according to the embodiment of the present application.
[0054] Figure 6 is a flow chart of the adaptive vision control method according to the embodiment of the present application.
[0055] Figure 7 is a flow chart of the automatic light adjustment method according to the embodiment of the present application.
[0056] Figure 8 is a flow chart of the automatic focusing search calculation method according to the embodiment of the present application.
[0057] Meaning of each reference sign in the drawings:
[0058] 1-image acquisition module, 2-focusing module, 4-control cabinet, 5-pipe robot;
[0059] 11-light source, 12-camera, 13-light source connecting piece, 14-camera connecting piece, 15-packing board, 16-circuit board of light source controller;
[0060] 21 - linear movement mechanism, 22 - rotation mechanism, 23 - coupling;
[0061] 211 - screw guide rail sliding table, 212 - sliding block, 213 - first motor, 214 - screw guide rail connecting piece, 215 - sliding block connecting piece; 221 - second motor;
[0062] 31 - master chip; 41 - fixed plate, 42 - connecting flange; 51 - drive plate. DETAILED DESCRIPTION
[0063] In the description of the application, unless otherwise explicitly specified and limited, the terms "arranged", "connected" and the like should be broadly understood, for example, it can be fixedly connected, or detachably connected or integrated; it can be directly connected, or indirectly connected, etc. "First", "second" and the like are used to distinguish similar objects and do not necessarily describe a specific order or sequence, and it should be understood that the data thus used can be interchangeable under appropriate circumstances. Unless otherwise stated, the orientation words used, such as "upper", "lower", "bottom", "top", generally refer to the definition based on the drawing surface of the corresponding drawing, and "inner", "outer" refer to the definition based on the outline of the corresponding drawing. In the present application, "front end fixed part", "rear end fixed part", "front end telescopic part", "rear end telescopic part" are defined with respect to the advancing direction of the robot.
[0064] It should be noted that the terms used herein are only intended to describe specific embodiments, and are not intended to limit exemplary embodiments according to the present application. As used herein, the singular form is intended to include the plural form unless the context clearly indicates otherwise, and it should be understood that the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0065] The following gives specific embodiments of the present application, it should be noted that the present application is not limited to the following specific embodiments, any equivalent transformation made on the basis of the technical solutions of the present application falls within the protection scope of the present application.
[0066] Embodiment 1
[0067] The embodiment discloses a tubular diameter loess geologic information in-situ detection environment adaptive vision system, comprising an image acquisition module 1, a focusing module 2, an image processing module and a control module.
[0068] Among them, such as Figure 2 and Figure 3 As shown, the image acquisition module 1 comprises a light source 11, a camera 12 and a light source controller, the light source controller is installed in the control cabinet 3, which is not shown in the figure, the light source controller adopts a Konica digital light source controller, and the camera adopts a board-level industrial camera. The camera 12 is provided with a camera connecting piece 14, the camera connecting piece 14 is L-shaped, the light source 11 is provided with a light source connecting piece 13, the light source connecting piece 13 is a plate piece, and the camera 12 and the light source 11 are provided with a spacer plate 15, the spacer plate 15 separates the light source 11 and the camera 12 by a certain distance, so as to prevent the light source 11 from causing shadow on the camera 12. The spacer plate 15 is fixed between the camera connecting piece 14 and the light source connecting piece 13 by bolts, the position of the light source 11 relative to the camera 12 is fixed by bolts, and the axis of the light source 11 is coaxial with the imaging optical axis of the camera 12.
[0069] The focusing module 2 comprises a linear motion mechanism 21 and a rotating mechanism 22. The linear motion mechanism 21 comprises a screw guide rail sliding table 211, a sliding block 212, a first motor 213, a screw guide rail connecting piece 214 and a sliding block connecting piece 215, the first motor 213 drives the screw on the screw guide rail sliding table 211 to rotate, the sliding block 212 is connected to the screw, the screw guide rail connecting piece 214 comprises a plate piece and a stand column connected perpendicularly to the plate piece, wherein the plate piece is connected to the upper end surface of the screw guide rail sliding table 211, and the stand column is connected to the rotating mechanism 22 through a shaft coupling 23. The sliding block connecting piece 215 is a plate body, the upper surface of the plate body is connected to the sliding block 212, and the lower surface is connected to the camera connecting piece 14.
[0070] The rotating mechanism 22 comprises a second motor 221, the output shaft of the second motor 221 is connected to the stand column of the screw guide rail connecting piece 214 through the shaft coupling 23, the second motor 221 is driven to rotate, thereby driving the linear motion mechanism 21 and the image acquisition module 1 to rotate as a whole around a direction perpendicular to the optical axis of the light source 11.
[0071] The first motor 213 and the second motor 221 of the embodiment are both step motors, the step motor is driven in S-shaped speed regulation mode, so as to realize smooth driving of the step motor, reduce unnecessary vibration and improve the precision of the vision system.
[0072] The image processing module comprises a light measurement module, a light adjustment module, an image definition evaluation module and a focusing search module. The light measurement module is used to calculate the brightness of the collected image, the light adjustment module is used to adjust the gear position of the light source controller until the brightness of the collected image meets the requirements, the image definition evaluation module is used to calculate the definition evaluation function value of the collected image, and the focusing search module is used to search the image collected by the camera after adjusting the object distance to obtain the object distance position with the best definition evaluation function value.
[0073] The automatic focusing and automatic light adjusting method based on image processing is adopted in the embodiment, so that the vision system has certain stability and precision, and high-quality image acquisition of loess wall can be realized, and the environmental adaptability is stronger.
[0074] The image processing module is arranged in the host computer, the bearing equipment of the host computer is a notebook computer, and the host computer also sends processed information or control instructions to the lower computer.
[0075] The image acquisition module 1 and the image processing module are connected through Ethernet for image data transmission.
[0076] The control module is used for receiving host computer instruction information and sending feedback information to the lower computer, and driving the first motor 213 and the second motor 221 to work or adjusting the light source controller according to the instruction information.
[0077] The control module of the embodiment comprises a main control chip 31, a circuit and a serial port, the main control chip 31 is selected from STM32F103ZET6, serial communication is selected between the main control chip 31 and the light source controller through RS232, serial communication is selected between the image processing module and the main control chip 31 through RS485, and the design of the hardware circuit mainly comprises a minimum system circuit and a serial communication circuit.
[0078] The image acquisition module and the focusing module in the above embodiment of the application are located at the front end of the motion direction of the pipeline robot 5 (a wheeled robot is adopted in the embodiment), and the focusing module 2 and the pipeline robot are provided with a control cabinet 4, as shown in Figure 5 The control cabinet 4 is provided with a driving plate 51 of the driving wheel motor of the pipeline robot 5, the main control chip 31, the circuit board 16 of the light source controller, the second motor 221 and a fixed plate; wherein the driving plate 51 is used for providing driving current of the driving wheel motor and providing power for the robot walking. The control cabinet 4 of the embodiment is a hollow cylindrical barrel, the two ends of the cylindrical barrel are provided with connecting flanges 42, the two ends of the fixed plate 41 are connected to the connecting flanges 42 at the two ends of the cylindrical barrel, the driving plate 51, the main control chip 31 and the circuit board 16 of the light source controller are connected to the fixed plate 41, the second motor 221 is connected to the connecting flange 42 at the bottom of the control cabinet 4, and the output shaft of the second motor 221 passes through the connecting flange 42 and remains outside the control cabinet 4.
[0079] The robot vision control system of the application comprises an upper computer and a lower computer part, the upper computer mainly realizes image receiving and processing, and sends processed information data or control instructions to the lower computer through RS485, and then the lower computer controls relevant components to perform corresponding work. The lower computer comprises a main control chip 31, a first motor 213, a second motor 221 and a light source controller, the main control chip 31 receives command information of the upper computer or sends feedback information to the upper computer through RS485, and drives the motor to work or adjusts the light source controller according to the instruction information.
[0080] The control process of the vision control system is as follows: firstly, the camera is controlled to collect images, and the collected images are received through a transmission interface, the received images are processed and calculated, and control instruction information is sent to the lower computer, the main control chip of the lower computer sends corresponding PWM control signals to drive the first motor 213 and the second motor 221 according to instruction analysis, so as to realize the adjustment and rotation of the camera object distance, and corresponding instructions are sent to the light source controller through RS232 to control the gear position, so as to realize the adjustment of scene brightness. In addition, the motor driving information and the light source brightness information can be fed back to the upper computer through RS485.
[0081] Embodiment 2
[0082] This embodiment discloses a control method of the small pipe diameter loess geology information in-situ detection environment adaptive vision system described in embodiment 1, and the flowchart is as shown in Figure 6 The specific steps are as follows:
[0083] Step 1: the camera 12 is used to collect loess images, and a light measurement function is used to calculate the brightness of the collected images. Since the average gray value of the image and the image brightness under different step lengths exist an approximate linear relationship, and the light source brightness level under the same object distance exists an approximate linear relationship, therefore, the light measurement function based on the average gray value of the image is selected in this embodiment.
[0084] It is judged whether the brightness of the current image is within the set range, if yes, step 2 is performed; if no, the light source controller is controlled to adjust the light source brightness until the brightness of the collected image is within the set range, and then step 2 is performed.
[0085] In the image search process, the difference of the average gray value generated by adjusting the light source controller at different positions is different, so it is not possible to directly adjust the relationship between the current value and the expected value. Due to the difference of the current object distance, the gray difference value of the front and rear two images is different after the focusing step moves, and the image gray difference value generated by adjusting the light source controller brightness level is also different, so it is not possible to determine a specific light adjustment search step, so the single-side traversal method is adopted, the image gray mean value range [A1, A2] is set, and the current image gray mean value A is less than A1 for example, the light source controller gear position is adjusted step by step until the current image gray mean value is greater than A1 when the light adjustment is completed, because the expected interval range is greater than the gray mean value change caused by adjusting the light source controller, so when greater than A1, the current image brightness mean value is in the set range. The same is true in the opposite direction. The light adjustment method of the embodiment is shown in the flowchart of Figure 7
[0086] Step 2, calculate the image sharpness evaluation function of the current brightness image, then control the linear motion mechanism 21 to adjust the camera 12 object distance according to the image sharpness evaluation function value combined with the focusing search algorithm, and then adjust the light at the current object distance position according to step 1;
[0087] The present application compares and analyzes different sharpness evaluation functions, and optimizes the Tenengrad function as the sharpness evaluation function of the present application through loess image experimental collection and analysis.
[0088] The focusing search algorithm of the embodiment specifically includes the following steps:
[0089] a) search direction judgment:
[0090] In the actual focusing process, the starting position of the motor is not fixed, so the search direction is first judged before focusing begins;
[0091] Starting from a random position, the linear motion mechanism 21 drives the camera 12 to move to adjust the camera object distance, collects an image every time it moves, and continuously collects three images, and calculates the sharpness evaluation function values F1, F2 and F3 of the three images;
[0092] If F1
[0093] If F1>F2>F3, it means that the search is towards the defocus direction, and the camera 12 is driven to search in the opposite direction, and step b) is performed;
[0094] If F1>F2<F3 or F1 <f2>F3, which indicates that the current search direction is maintained to continue searching until F1<F2<F3 or F1>F2>F3 appears;
[0095] b) coarse focusing search:
[0096] The camera 12 is driven to continue searching in the uphill direction with a coarse step length of 1 mm. The sharpness evaluation function value of each image is calculated ;
[0097] According to the sharpness evaluation function value , , , a peak region search is performed. If the peak position is passed, step c) is performed. Otherwise, the peak region search is continued until the peak position is passed, and step c) is performed.
[0098] The specific peak position passing judgment method is as follows: if , it indicates that the positive focus position is being searched, and the image search is continued; if , it indicates that the peak position may appear, and the search is continued for two steps. The evaluation value mean value of the two groups of consecutive two images is taken and . If is satisfied, it is determined that the downhill direction is passed; if or , it indicates that local noise is encountered, and the current direction search is continued.
[0099] c) The camera 12 is driven to move four steps in the reverse direction with a coarse step length, so as to be closer to the peak value. Step d) is performed, i.e., the fine focusing search stage is entered.
[0100] d) Fine focusing search:
[0101] The camera 12 is driven to continue searching in the uphill direction with a small step length of 0.1 mm. The sharpness evaluation function value of each image is calculated ;
[0102] According to the sharpness evaluation function value , , , a peak region search is performed. If the peak position is passed, the search position corresponding to the peak point is taken as the positive focus position. Otherwise, the peak region search is continued until the peak position is passed, and the search position corresponding to the peak point is taken as the positive focus position.
[0103] The specific peak position passing judgment method is the same as step b).
[0104] Figure 8 Figure 2 shows a flow chart of the focusing search algorithm.
[0105] Step 3, repeat step 2 until the best focus position of the image definition evaluation function is found, which is the focus position, and the focusing is achieved;
[0106] Step 4, after the current position focusing is completed, the camera 12 is rotated by the rotating mechanism 22 to collect images of the next position of the hole wall, and steps 1 to 3 are repeated until the image collection of the current depth vertical around the hole wall is completed.
[0107] The automatic focusing and automatic light adjustment method based on image processing adopted in the embodiment makes the visual system have certain stability and precision, and can realize high-quality image collection of the loess hole wall and has stronger environmental adaptability.
Claims
1. An environmental self-adaptive vision system and method for in-situ detection of geologic information of small-diametered loess, characterized in that, It comprises an image acquisition module (1), a focusing module (2), an image processing module and a control module; The image acquisition module (1) comprises a light source (11), a camera (12) and a light source controller, the axis of the light source (11) is coaxial with the imaging optical axis of the camera (12); the camera (12) is a board-level industrial camera, and a backing plate (15) is arranged between the camera (12) and the light source (11); The focusing module (2) comprises a linear motion mechanism (21) and a rotating mechanism (22); the image acquisition module (1) is connected below the linear motion mechanism (21), the linear motion mechanism (21) is used to drive the image acquisition module (1) to move linearly along the optical axis direction of the light source (11); the linear motion mechanism (21) is connected below the rotating mechanism (22), and the rotating mechanism (22) is used to drive the linear motion mechanism (21) and the image acquisition module (1) to rotate around the direction perpendicular to the optical axis of the light source (11); The image processing module comprises a light measurement module, a light adjustment module, an image sharpness evaluation module and a focusing search module; the light measurement module is used to calculate the brightness of the acquired image; the light adjustment module is used to adjust the gear position of the light source controller until the brightness of the acquired image meets the requirements; the image sharpness evaluation module is used to calculate the sharpness evaluation function value of the acquired image; and the focusing search module is used to search the image acquired by the camera after adjusting the object distance to obtain the object distance position with the best sharpness evaluation function value; The image acquisition module (1) and the image processing module can transmit image data; The control module is used for receiving host computer instruction information and sending feedback information to the lower computer, and controlling the focusing module (2) to adjust the object distance of the camera or the light source controller according to the instruction information; The control method of the small-diameter loess geological information in-situ detection environment self-adaptive vision system comprises the following steps: Step 1: using the camera (12) to acquire loess images, calculating the brightness of the current acquired image, judging whether the brightness of the current image is within the set range, if yes, proceeding to step 2; if not, controlling the light source controller to adjust the light source brightness until the brightness of the acquired image is within the set range, and then proceeding to step 2; Step 2: calculating the image sharpness evaluation function of the current brightness image, then controlling the linear motion mechanism (21) to adjust the object distance of the camera (12) according to the Tenengrad function value combined with the focusing search algorithm, and then adjusting the light at the current object distance position according to step 1; Step 3: repeating step 2 until the object distance position with the best image sharpness evaluation function value is searched, which is the focus position, and the focusing is realized; Step 4: after the focusing at the current position is completed, rotating the camera (12) through the rotating mechanism (22) to acquire images of the next position of the hole wall, and repeating steps 1 to 3; until the image acquisition of the hole wall at the current depth is completed; The focusing search algorithm comprises the following steps: a) search direction judgment: From the random position, the linear moving mechanism (21) drives the camera (12) to move to adjust the camera object distance, collects an image each time of moving, collects three images continuously, and calculates the sharpness evaluation function values F1, F2 and F3 of the three images; If F1<F2<F3, the current direction is kept to continue searching, and step b) is performed; If F1>F2>F3, the camera (12) is driven to search in the opposite direction, and step b) is performed; if F1>F2<F3 or F1 <f2>F3, the current search direction is kept until F1<F2<F3 or F1>F2>F3 appears;< / f2> b) coarse focusing search is performed: The camera object distance is adjusted with a coarse step, and the sharpness evaluation function value of each image is calculated; According to the value of the definition evaluation function , , Peak region search is performed, and whether the peak position is passed is determined using a two-part three-point method. If the peak position is passed, step c) is performed. Otherwise, the peak region search is continued until the peak position is passed, and step c) is performed. c) the coarse step is moved in the reverse direction to approach the peak value, and step d) is performed; d) fine focusing search is performed: Adjusting the camera object distance in small steps, driving the camera (12) to continue searching in the upward direction of the mountain, calculating the definition evaluation function value of each image ; According to the definition of the sharpness evaluation function value , , The peak region search is performed, and whether the peak position is passed is determined by using a two-part three-point mode. If the peak position is passed, the search position corresponding to the peak point is taken as the in-focus position. Otherwise, the peak region search is continuously performed until the peak position is passed, and the search position corresponding to the peak point is taken as the in-focus position.
2. The in-situ tubular-sedimentary-environment-adaptive vision system and method for detecting geologic information of small-diameter yellow earth according to claim 1, characterized in that, The linear moving mechanism (21) comprises a screw guide rail sliding table (211), a sliding block (212), a first motor (213), a screw guide rail connecting piece (214) and a sliding block connecting piece (215); the first motor (213) drives the screw of the screw guide rail sliding table (211) to rotate, the sliding block (212) is connected to the screw, and the bottom of the sliding block (212) is connected to the image acquisition module (1) through the sliding block connecting piece (215); the screw guide rail connecting piece is connected to the upper end surface of the screw guide rail sliding table, and is used for connecting the rotating mechanism.
3. The in-situ tubular-sedimentary-environment-adaptive vision system and method for detecting geologic information of small-diameter yellow earth as claimed in claim 1, wherein The rotating mechanism (22) comprises a second motor (221), and the output shaft of the second motor (221) is connected to the upper end surface of the linear moving mechanism (21) through a shaft coupling (23).
4. The in-situ tubular-sedimentary-environment-adaptive vision system and method for detecting geologic information of small-diameter yellow earth as claimed in claim 1, wherein, The control module comprises a main control chip (31), a circuit and a serial port, and the main control chip (31) communicates with the light source controller and the image processing module through the serial port.
5. The in-situ tubular-sedimentary-environment-adapted vision system and method for detecting geologic information of small-diameter yellow earth according to claim 1, characterized in that, In step 1, the single-side traversal method is adopted to adjust the gear position of the light source controller step by step.
Citation Information
Patent Citations
High-definition capillary electrophoresis gel imaging system
CN103079032A
Visual detection system of small pipe robot
CN103123030A
Multispectral microscopic imaging rapid and active focus system and method
CN106303242A
A power plant boiler pipeline detection robot
CN106609894A