Monitoring target positioning early warning and automatic correction method of laser gas detector

By combining video imaging and laser detection technology, image feature extraction and pinhole camera model are used to automatically correct the target position of the laser detection equipment, solving the rotation system error problem caused by the equipment transmission gear loss, and achieving efficient and low-cost gas leakage detection.

CN120232841APending Publication Date: 2025-07-01HENAN HANWEI ELECTRONICS

Patent Information

Application Number
CN202510440347.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

The existing scanning laser gas detection equipment cannot detect gas leakage in a timely and accurate manner due to rotational system errors caused by the equipment transmission gear loss. The existing technical solutions increase labor costs or hardware costs, and cannot adapt to complex outdoor environments.

Method used

Combining video imaging technology and laser detection technology, through computer vision image feature extraction and pinhole camera model, the target position of the laser detection device is automatically corrected, and the SURF feature extraction algorithm and plane matrix conversion algorithm are used to calculate the offset and compensation angle to achieve automatic correction without additional hardware.

Benefits of technology

It improves the detection accuracy and timeliness of laser detection equipment, reduces manual interference and hardware costs, is suitable for complex outdoor environments, and reduces safety hazards caused by equipment errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120232841A_ABST
    Figure CN120232841A_ABST
Patent Text Reader

Abstract

The invention provides a method for positioning, early warning and automatically correcting a monitoring target of a laser gas detector, which comprises the following steps of: aligning the central position of a camera with a monitoring target object to obtain an initial picture, and extracting image features to obtain a sample set A; a camera shoots an actual picture to extract image features to obtain a sample set B at a target position; calculating an offset distance and an offset according to the picture features in the sample set B and the sample set A; if the offset distance is smaller than an error threshold value, performing gas detection to analyze the concentration; if the offset distance is greater than or equal to the error threshold, determining an adjustment direction according to the offset, and calculating a new target detection angle by using the adjustment amplitude; and moving the camera in the horizontal direction and the vertical direction towards the adjustment direction by the adjustment amplitude to obtain a horizontal offset and a vertical offset, calculating a compensation angle, if the compensation angle is greater than a preset threshold value, sending an alarm notice, otherwise, resetting the target position according to the compensation angle. According to the invention, the accuracy and timeliness of gas detection around the target object are ensured, and the cost expenditure is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gas detection, and particularly to a method for monitoring target positioning, early warning and automatic correction of a laser gas detector. Background Art

[0002] With the development of industrial technology, the scale of industrial parks across the country is expanding day by day, and the industrial agglomeration effect is becoming more and more significant. However, the accompanying risk of gaseous leakage cannot be underestimated. On the one hand, the application of new technologies and new processes has made the types of gases involved in the production process more and more complex, and some gases with high toxicity, strong corrosiveness or flammable and explosive characteristics are widely used, which undoubtedly increases the potential harm of gaseous leakage. For example, in the field of high-end chip manufacturing, etching processes use a variety of high-purity and highly active gases. Once leaked, the damage to the human respiratory and nervous systems may be more hidden and persistent than traditional chemical industrial gases. Therefore, the safety patrol of gas leakage is of great importance.

[0003] Currently, the scanning laser gas detection technology used in society plays a key role in safeguarding the safety of industrial parks. With its high-precision laser emission and reception system, this technology can accurately monitor the complex gas environment in the park. Compared with traditional gas detection methods, it has stronger pertinence. Its laser wavelength can be accurately set according to different target gases. For example, for the common industrial toxic gas hydrogen sulfide, a wavelength that perfectly matches its absorption spectrum is selected to ensure that even extremely trace leaks can be sensitively detected.

[0004] In terms of working mode, the scanning laser gas detection technology often adopts rotary scanning, rotating at a stable angular velocity in all directions to conduct a carpet-like scan of key areas such as the gas storage tank area, pipeline-intensive area, and production workshop in the park. Once there is a gas leak, the laser beam passes through the leak area, and gas molecules absorb the laser energy. The receiving device quickly captures the signal of the light intensity change. Through complex algorithm analysis, the type, concentration of the gas and the approximate location of the leak source can be determined instantly.

[0005] At present, after the scanning laser gas detection equipment is installed and fixed in the factory, due to irresistible factors, the transmission gears of the equipment are worn, that is, the system error of the equipment rotation is generated. This system error will cause the laser detection to fail to correctly align with the target, resulting in the situation that dangerous gas leaks cannot be detected in the first time, seriously affecting the safety factor of the industrial park.

[0006] In order to solve the above problems, the detection equipment needs to be calibrated regularly, but it will inevitably affect the accuracy of equipment detection. Therefore, a solution is urgently needed that can automatically detect the rotation system error caused by the loss of the warning gear, and perform detection and positioning correction technology to solve the errors caused by actual use, thereby improving the accuracy of the equipment and reducing the occurrence of dangerous accidents in the park. Therefore, the existing solutions include the following methods:

[0007] 1. Manual regular maintenance and calibration: The industrial park formulates an inspection plan to regularly calibrate the target angle of the equipment. Disadvantages: Increased labor costs, and gas detection errors caused by equipment abnormalities during the inspection period are inevitable, which may cause gas leaks to fail to be warned in time, causing accidents. It relies too much on manual operation and cannot meet the use scenarios that require 24-hour uninterrupted monitoring.

[0008] 2. Install error compensation device: Install angle sensor and displacement sensor to accurately measure the rotation angle and axial displacement of the gear. When the error is detected to exceed a certain threshold, the control system adjusts the speed or direction of the motor, or uses mechanical compensation devices such as fine-tuning the axial position of the gear to reduce the impact of the error on the scanning accuracy. Disadvantages: Increase the cost of hardware purchase, and after the angle deviation, human intervention is still required for the equipment to return to normal working state.

[0009] 3. Machine vision technology: manually mark the image markers, compare the overlap of the marked objects, determine whether there is an error in the target, try to adjust the minimum step length, and repeat the verification many times to make the camera target direction close to the expected direction. Disadvantages: Manually mark significant reference objects, and repeatedly analyze and verify the images, which takes too long. In the case of gas generating thick smoke to cover the target, the calibration work cannot be performed normally. Coordinate mapping cannot be achieved when the predetermined markers are missing, and the number of image analysis is too many, which seriously affects the detection efficiency of the PTZ camera.

[0010] Other patented technical solutions:

[0011] 1. The Chinese patent with application number CN202410301984.0 (Automatic correction method, device, pan-tilt device and storage medium for pan-tilt camera) requires the installation of a magnetic angle sensor on the pan-tilt camera to measure the rotation angle and axial displacement of the gear, and re-execute the detection by calculating the angle of the actual detection target to correct the mechanical gear deviation. This patent requires the configuration of hardware devices such as magnetic angle sensors, which increases the procurement cost. In addition, since the gear itself is already worn, the calculated new rotation angle, when sent to the device for execution, the device will still not be able to accurately turn to the predetermined direction due to hardware reasons when rotating according to the command, and it cannot completely accurately aim at the target object.

[0012] 2. The Chinese patent with the application number CN202111459382.0 (Calibration Parameter Adjustment Method, Device, Electronic Device and Readable Medium) simulates a three-dimensional virtual image through the original image and the actual image taken, calculates the average value and the error reference value of the distance between the actual position of the target point and the photographed target point, and reversely deduces the errors of the device shooting parameters, including angles, focal lengths, etc., and provides them to the personnel performing the calibration work, so as to solve the situation that the previous adjustment effect relied on experience, which was neither accurate nor time-consuming and laborious. The core problem solved by this patent is that the camera calibration work is separated from the manual method relying on experience, and provides reference error values to guide the calibration work of the operator. It is not a solution to the angle deviation caused by the wear of the rotating gear of the device, and this patent cannot solve the problem that the device does not reach the expected position due to gear wear during the rotation of the pan-tilt.

[0013] 4. The Chinese patent with the application number CN202210497583.8 (A Camera Mechanical Error Calibration Method and System Based on Machine Vision Comparison) is a calibration method that manually presets marked markers, compares the coordinate errors of two pictures based on image recognition technology, and then gradually adjusts the camera direction in the smallest step until all marker objects are in the predetermined positions. This patent requires manual presetting of markers, and each detection requires multiple gradual angle adjustments, which takes a long time in the case of large deviations. When the preset marker object does not appear in the actual picture, or only some objects appear, or similar marker objects appear in other scenarios, the calibration work cannot be performed, and it is not suitable for complex outdoor environments.

[0014] 5. The Chinese patent with the application number CN201510053491.0 (A Method for Locating Feature Objects Based on Machine Vision) is a method for finding the center point of a specific object based on image recognition technology, which only supports special application scenarios, is not suitable for irregular and tiny device objects, and requires scenarios where mechanical parts can accurately reach the commanded positions. Summary of the Invention

[0015] Aiming at the technical problems of existing laser gas detection equipment, such as equipment transmission gear loss, excessive human interference, and inapplicability to complex outdoor environments, the present invention proposes a method for monitoring target positioning warning and automatic correction of a laser gas detector, which combines video imaging technology and laser detection technology to quickly correct the detection position, ensuring the accuracy and timeliness of gas detection around the target object, and solving the problems of excessive human interference and inapplicability to complex outdoor environments in the prior art.

[0016] To achieve the above object, the technical solution of the present invention is realized as follows: A method for monitoring target positioning warning and automatic correction of a laser gas detector, the steps of which are as follows:

[0017] Step 1: Align the central position of the camera with the monitoring target object and take the initial picture M, and obtain the initial key parameters of the laser detector and the camera at the target position; extract the image features of the initial picture M to obtain the initial feature matrix sample set A;

[0018] Step 2: Control the laser detector and the camera to the target position, take the actual picture N of the monitoring target object, and extract the image features of the actual picture N to obtain the sample set B composed of feature matrices;

[0019] Step 3: Compare the picture features in the sample set B and the sample set A, and calculate the offset distance and offset amount between the actual position and the target position of the monitoring target object;

[0020] Step 4: If the offset distance is less than the error threshold, it means that the monitoring target object is already at the central position of the actual picture N, and directly perform gas detection and concentration analysis; if the offset distance is greater than or equal to the error threshold, then the target object is not at the central position of the actual picture N, and go to Step 5;

[0021] Step 5: Determine the adjustment direction according to the offset amount, and calculate the new target detection angle by using the adjustment amplitude and the key parameters of the laser detector at the target position;

[0022] Step 6: Calculate the correction angle: Move the camera horizontally in the adjustment direction by the corresponding adjustment amplitude, repeat Steps 3 and 4 to obtain the horizontal offset amount; move the camera vertically in the adjustment direction by the corresponding adjustment amplitude, repeat Steps 3 and 4 to obtain the vertical offset amount; calculate the horizontal direction coefficient by using the adjustment amplitude and the horizontal offset amount, calculate the vertical direction coefficient by using the adjustment amplitude and the vertical offset amount, calculate the compensation angle by using the horizontal direction coefficient, the vertical direction coefficient and the offset amount. If the compensation angle is greater than the preset threshold, send an alarm notification to the operation and maintenance personnel, otherwise reset the target position according to the compensation angle, return to Step 3, and the laser detector uses the compensated target detection angle for laser gas concentration detection.

[0023] Preferably, the initial key parameters include the horizontal angle and vertical angle of the laser detector, and the focal length of the camera;

[0024] When taking the initial picture M, obtain the horizontal angle E and vertical angle F of the laser detector and the focal length parameter f of the camera. The central point pixel coordinates of the initial picture M are (x, y);

[0025] The laser detector and the camera are fixed on a pan-tilt head, the pan-tilt head is fixed on a bracket, a horizontal rotation gear and a vertical rotation gear are arranged inside the pan-tilt head, the vertical rotation gear is arranged above the horizontal rotation gear, both the laser detector and the camera are connected to the vertical rotation gear, the horizontal rotation gear drives the vertical rotation gear to rotate horizontally, the horizontal rotation gear rotates within a range of 360°, and the vertical rotation gear rotates within a range of 45° above and below the horizontal line.

[0026] Preferably, the number of the initial pictures M in the first step is at least two, and the focal lengths of the cameras of the at least two initial pictures are different; the initial picture M includes the pictures taken when the focal length of the camera is the smallest;

[0027] The target positions obtained in the first step are the work plan items of the laser detector and the camera. The laser detector needs to monitor the target positions of the horizontal angle E, the vertical angle F and the focal length parameter f of the camera during one working cycle;

[0028] Use the SURF feature extraction algorithm to sample 10*N1 picture features in the initial picture M. The picture features include the edge positions of all objects, obtain the picture feature matrix data, and form a sample set A{a1,a2,a3...........a 10*N1}, where a1,a2,a3...........a 10*N1 respectively represent the 10*N1 image features extracted from the initial picture M; N1 is greater than or equal to 50;

[0029] Use the SURF feature extraction algorithm to process the actual picture N to sample 10*N1 picture features, obtain the picture feature matrix data, and form a sample set B{b1,b2,b3...........b 10*N1}, where b1,b2,b3...........b 10*N1 are the 10*N1 picture features in the actual picture N.

[0030] Preferably, the method for comparing the picture features in the sample set B and the sample set A is: perform one-by-one feature matching on the picture features of the sample set A and the sample set B, find all the matching pixel pairs, and obtain a pixel pair result set C0{(ax1, bx1), (ax2,bx2)........(ax n , bx n )}, where ax1,ax2...........ax n are the picture features in the sample set A, and bx1,bx2...........bx n are the picture features in the sample set B. (ax1, bx1), (ax2,bx2)........(ax n ,bxn ) respectively represent the first pixel pair, the second pixel pair... the nth pixel pair in the result set C0, where n represents the total number of pixel pairs, and n ≤ 10 * N1;

[0031] By the characteristics of the normal distribution, data points in the pixel pair result set C0 that are on both sides of the mean and whose corresponding probability distributions are outside the range of the mean plus or minus twice the standard deviation are removed, and the remaining coordinate pairs are retained to obtain the pixel pair result set C.

[0032] Preferably, the method for calculating the offset distance and offset amount between the actual position and the target position of the monitored target object is as follows:

[0033] If the total number n of pixel pairs in the pixel pair result set C is greater than or equal to N1, it is considered that the matching is successful. The pixel pair result set C is input into the plane matrix conversion algorithm findHomography() to obtain the conversion matrix, and the central point pixel coordinates (x, y) of the initial image M are mapped using the conversion matrix to obtain the coordinates (xx, yy) of the monitored target object in the actual image N, and the central point coordinates (x1, y1) of the actual image N. The offset distance of the central point is calculated: According to the coordinates (xx, yy) of the monitored target object and the central point coordinates (x1, y1), the offset amount of the position (x2, y2) = (xx - x1, yy - y1) is calculated.

[0034] Preferably, the method of one-by-one feature matching is to calculate the similarity between the image features of the sample set A and the sample set B to obtain all matching pixel pairs; when the similarities are the same, the image feature with the largest similarity ranking is selected;

[0035] If the total number n of pixel pairs in the pixel pair result set C is less than N1, it is judged whether the focal length parameter f of the camera is the smallest. If so, the maintenance personnel are notified by an alarm that the monitored target object cannot be obtained; if the focal length parameter f of the camera is not the smallest, the captured image taken when the focal length of the camera is adjusted to the smallest is replaced with the initial image M, the position where the captured image is located is used as the target position, and step two is returned to capture the actual image N again.

[0036] Preferably, the method for calculating the new target detection angle using the adjustment amplitude and the key parameters of the laser detector at the target position is as follows: According to the horizontal angle E and vertical angle F at the target position, and the translation offset amount (x2, y2), the adjustment amplitude is 0.1° for both horizontal and vertical directions to obtain the new target detection angle:

[0037] When the translation parameters x2 <= 0 and y2 <= 0, the new target detection angle is: horizontal angle E1 = E - 0.1, vertical angle F1 = F + 0.1;

[0038] When the translation parameter x2 <= 0 and y2 > 0, the new target detection angles are: horizontal angle E1 = E - 0.1, vertical angle F1 = F - 0.1;

[0039] When the translation parameter x2 > 0 and y2 <= 0, the new target detection angles are: horizontal angle E1 = E + 0.1, vertical angle F1 = F + 0.1;

[0040] When the translation parameter x2 > 0 and y2 > 0, the new target detection angles are: horizontal angle E1 = E + 0.1, vertical angle F1 = F - 0.1.

[0041] Preferably, when the horizontal direction movement adjustment amplitude of the camera is 0.1° and the vertical direction remains unchanged, repeat steps two to three to obtain the horizontal offset x3 presented on the actual picture; when the vertical direction of the camera moves 0.1° and the horizontal direction remains unchanged, repeat steps two to three to obtain the vertical offset y3 presented on the actual picture;

[0042] According to the basic principle of the pinhole camera model, calculate the proportionality coefficients: the horizontal direction coefficient is β = 0.1 / x3, and the vertical direction coefficient is θ = 0.1 / y3;

[0043] The horizontal direction continues to move by an angle of x2 * β, and the vertical direction continues to move by an angle of -y2 * θ.

[0044] Preferably, move the camera center position to the coordinates (xx, yy) of the monitored target object, and the moving angle directions of the camera are: the horizontal angle En in the horizontal direction = E + x2 * β, and the vertical angle Fn in the vertical direction = F - y2 * θ;

[0045] If the compensated offset angle is greater than the preset threshold, that is, |En - E| > preset threshold or |Fn - F| > preset threshold, it is necessary to send an alarm notification to the operation and maintenance personnel, informing that the correction amplitude is too large and interference for maintenance is required; otherwise, use the corrected horizontal angle En and vertical angle Fn as the target position and return to step two.

[0046] Preferably, if the offset distance d < d0, it means that the target aligned by the camera and the laser is the center position, and directly perform gas monitoring; if the offset distance d >= d0, it means that the monitored target object is not at the center position and position correction is required; where d0 is the acceptable error threshold;

[0047] The angular attributes of the horizontal rotation gear of the laser detector are as follows: the due north direction on the horizontal plane is 0° or 360°, the due east direction is 90°, the due south direction is 180°, and the due west direction is 270°. When adjusting clockwise, the angle needs to increase, and when adjusting counterclockwise, the angle needs to decrease. The angular attributes of the vertical rotation gear of the laser detector are as follows: the vertical plane ranges from 45° upward and -45° downward. When adjusting upward, the angle needs to increase, and when adjusting downward, the angle needs to decrease.

[0048] Compared with the prior art, the beneficial effects of the present invention are as follows: In the field of Internet of Things technology, based on the existing equipment of the pan-tilt laser detector and according to the image feature extraction technology and camera imaging principle in the field of computer vision, the effectiveness of equipment monitoring is verified by calculating the difference between the position coordinates of the target object and the center position coordinates of the camera. Based on the basic principle of the pinhole camera model, the proportional coefficient of the picture displacement and the angular displacement is calculated. By predicting the steering angle difference of the camera, the steering positioning of the equipment is reset, enabling the monitoring target scheme of the laser detection equipment to be accurate and error-free, ensuring the safe operation of enterprise equipment, reducing accidents, and extending the service life of the equipment. Without adding new hardware devices, the cost expenditure is reduced, solving the problems of excessive manual interference and inability to achieve full automation commonly found in existing technical solutions, as well as the drawbacks of being limited to the ideal indoor environment and unable to adapt to the complex outdoor environment with constantly changing factors. The effects of the present invention are specifically reflected in:

[0049] 1. When initializing and defining the target position, prepare multiple initial pictures of the monitored target object at different focal lengths to support the strategy of selecting different original pictures according to different focal lengths during the actual operation of the equipment, thus avoiding repeated focusing of the camera and damage to the equipment hardware. At the same time, it can make up for the abnormal situation where the target object is not captured (or not fully captured) during the actual positioning due to too large a focal length.

[0050] 2. Apply the image feature extraction technology in the field of computer vision, namely the SURF feature extraction algorithm, to automatically obtain as many image feature vectors as possible. Use the method of coordinate position mapping for two pictures to calculate the difference of coordinate pairs, and remove abnormal coordinate pairs through normal distribution to improve the mapping accuracy.

[0051] 3. According to the basic principle of the pinhole camera model, it can be known that the vertical and horizontal movement angles of the camera are approximately proportional to the difference in imaging pixel distances. By comparing the captured images after moving 0.1 degrees in both the horizontal and vertical directions with the coordinate positions of the target object in the original picture, the ratio coefficient of the vertical / horizontal angle difference and the position distance after imaging is calculated in real time under the current equipment hardware conditions and current focal length, providing a data basis for adjusting the transfer angle in subsequent steps.

[0052] 4. Use the ratio coefficient of the camera angle difference and the position distance after imaging at the current focal length calculated in real time to predict the angle that needs to be compensated for the center position coordinate to move to the monitoring target object coordinate, so as to obtain the new camera positioning angle under gear wear, reset the program parameters, and finally achieve the purpose of correction, and the angle that needs to be transferred can be calculated in one step. Brief Description of the Drawings

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0054] Figure 1 It is a flowchart of the present invention.

[0055] Figure 2 It is a schematic diagram of the specific monitoring target object of the present invention.

[0056] Figure 3 It is a schematic diagram of the pixel point coordinates of the picture of the present invention.

[0057] Figure 4 It is the actual picture collected during the inspection of the present invention.

[0058] Figure 5 It is a schematic diagram of the image feature matching of the present invention.

[0059] Figure 6 It is a schematic diagram of the shooting coordinates of the actual picture of the present invention.

[0060] Figure 7 It is a schematic diagram of the structure of the gas detection device of the present invention.

[0061] Among them, 1 is a laser detector, 2 is a camera, and 3 is a pan-tilt. Detailed Embodiments

[0062] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0063] As Figure 1 shown, a method for monitoring target positioning, warning and automatic correction of a laser gas detector, the implementation steps of the technical solution:

[0064] Step 1: Use a camera to take an initial picture M of the monitored target object, and obtain the initial key parameters of the laser detector and the camera at the target position, including the horizontal angle and vertical angle of the laser detector, and the focal length of the camera; perform image feature extraction on the initial picture M to obtain an initial feature matrix sample set A.

[0065] Align the center position of the camera of the gas detection device with the target object to be monitored, such as Figure 2 the central valve, take the original picture M, and obtain the horizontal angle E and vertical angle F of the laser detector and the focal length parameter f of the camera and the center point pixel coordinates (x, y) of the initial picture M at this time, that is, the center point coordinates of the monitored target object.

[0066] Such as Figure 7 As shown in the figure, above the bracket of the scanning laser gas detection device used in the gas detection device of the present invention, there is a pan-tilt 3. A laser detector 1 and a camera 2 are fixed on the pan-tilt 3. The laser detector is used to monitor the specific gas concentration of the target object, and transmit the monitoring data back to the background, and determine whether to perform an alarm operation after analysis. The camera is used to take pictures of the target object detected during the actual operation of the laser detector and transmit the pictures back to the background for recording or analysis. The pan-tilt is provided with a horizontal rotation gear and a vertical rotation gear. The vertical rotation gear is arranged above the horizontal rotation gear. The horizontal rotation gear drives the vertical rotation gear to move horizontally and rotate. The horizontal rotation gear is used to control the horizontal angle of the laser detector and rotate within a range of 360°. The vertical rotation gear is used to control the vertical angle of the laser detector and adjust within a range of 45° above and below the horizontal line. The rotation strategy of the scanning laser gas detection device is: control the rotation angle of the device through a program so that the laser beam emitted by the laser detector can cover the monitoring of multiple target areas.

[0067] The initial key parameters of the laser detector and the camera, including the horizontal angle and vertical angle of the laser detector and the focal length of the camera, belong to the basic information of the hardware device. The hardware device provides a data interface and can obtain it in real time.

[0068] If the device has no wear, the center point position should coincide with the target position; if the device has wear, there is a deviation between the center point position and the target position, and the camera rotates to the target position according to the instruction, and there is actually a deviation.

[0069] To prevent the monitored target object actually photographed from not appearing in the initial picture M, add a spare original picture. Adjust the focal length of the camera to the minimum (different focal length initial pictures M can be prepared according to actual situations), take the original picture M0, obtain the picture of the maximum range of vision that the camera can capture, and obtain the horizontal angle E0 and vertical angle F0 of the laser detector at this time as the spare target position, the focal length parameter f0 of the camera, and the center point pixel coordinates (x0, y0).

[0070] Referring to the image feature extraction technology in the field of computer vision, the SURF feature extraction algorithm can be selected. In the initial image M, 1000 image features are sampled. According to the strategy of the SURF feature extraction algorithm, the edge positions of all objects in the initial image M will be sampled to obtain the image feature matrix data, which forms the sample set A {a1, a2, a3...........a 1000}, a1, a2, a3...........a 1000 respectively represent 1000 image features extracted from the initial image M. The SURF feature extraction algorithm can automatically obtain the feature matrix data of all objects in the image.

[0071] The SURF feature extraction algorithm automatically obtains all feature vectors in the image and obtains as many image feature identifiers as possible, which can avoid the situation where other moving objects cover some identifiers in the outdoor complex environment, resulting in the inability to achieve coordinate mapping during image comparison. For example, in the case of a gas leak, thick smoke covers the target detection object, resulting in the inability to locate the detection work.

[0072] As Figure 3 shown, in the present invention, the numerical definition of the pixel coordinates of the image is as follows: 1) The upper left corner of the image is the starting position coordinate (0, 0); 2) The abscissa x is the number of pixels from the leftmost side of the image; 3) The ordinate y is the number of pixels from the uppermost side of the image. The pixel coordinate value is defined by a general method.

[0073] Step 2: Formulate an equipment inspection plan and enter the information of the target position of the inspection work.

[0074] Take the target position obtained in Step 1 as a work plan item of the laser detector, that is, the laser detector must monitor the target position of the horizontal angle E, vertical angle F, and the focal length parameter f of the camera during one working cycle. The focal length parameter of the camera can change at any time. This step is to set the inspection plan, and the content of the plan is to set an instruction for the camera to take pictures at a certain determined position and a certain determined focal length, and the laser detector performs the detection work.

[0075] Step 3: Control the laser detector to the target position in Step 1, obtain the actual image N of the monitored target object, and extract the image features of the actual image N to obtain the feature matrix to form the sample set B.

[0076] During the operation of the laser detector, target monitoring is performed. It moves to the horizontal angle E and vertical angle F, adjusts the focal length parameter f of the camera, and takes the actual image N of the monitored target object. Due to gear wear, there will be a deviation between the actual reached position and the target position. As Figure 4 shown, the valve of the target monitoring object is no longer in the center position.

[0077] Referring to the image feature extraction technology in the field of computer vision (note: SURF feature extraction algorithm), in the actual picture N, 1000 picture features are automatically sampled to obtain the picture feature matrix data, which constitutes the sample set B {b1, b2, b3............b 1000}, where b1, b2, b3...........b 1000 are 1000 picture features in the actual picture N.

[0078] Step 4: Compare the picture features in the sample set B and the sample set A, and calculate the offset distance and offset amount between the actual position and the target position of the monitored target object.

[0079] The picture features of the sample set A and the sample set B are matched one by one to find all matching pixel pairs. For example, Figure 5 the drawn line is the matching pixel, and the pixel pair result set C0 {(ax1, bx1), (ax2, bx2)........(ax n , bx n )} is obtained, and the distance difference of the coordinate pairs is calculated. ax1, ax2...........ax n are the picture features in the sample set A, and bx1, bx2...........bx n are the picture features in the sample set B. (ax1, bx1), (ax2, bx2)........(ax n , bx n ) represent the first pixel pair, the second pixel pair........ the nth pixel pair in the result set C0 respectively, and n represents the total number of pixel pairs.

[0080] The method of performing one-by-one feature matching is to calculate the similarity between picture features and obtain the matching relationship. When the similarities are the same, the picture feature with the largest similarity ranking is selected. When obtaining the picture features, the features of those pixels will be recorded, and there is a one-to-one correspondence between the picture features and the pixels, which are recorded.

[0081] By the characteristics of the normal distribution, data points in the pixel pair result set C0 that are on both sides of the mean and whose corresponding probability distributions are outside the range of the mean plus or minus twice the standard deviation are removed. Since in the normal distribution, approximately 95% of the data falls within the interval of the mean plus or minus twice the standard deviation, outliers with too large a deviation from the mean are removed, and the remaining coordinate pairs are retained to obtain the pixel pair result set C for monitoring the coordinate mapping of the target object. If the total number n of pixel pairs in the pixel pair result set C is greater than or equal to 100, it is considered a successful match. The pixel pair result set C is input into the plane matrix conversion algorithm findHomography() to obtain the conversion matrix, and the center point pixel coordinates (x, y) of the initial image M are mapped using the conversion matrix to obtain the coordinates (xx, yy) of the monitored target object in the actual image N. For the center point coordinates (x1, y1) of the actual image N in the right figure, the center point offset distance can be calculated: Calculate the position offset based on the coordinates (xx, yy) of the monitored target object and the center point coordinates (x1, y1).

[0082] The actual result obtained by the algorithm in the following figure (right figure) is:

[0083] The pixel coordinates (xx, yy) of the monitored target object = (969, 553)

[0084] The center point pixel coordinates (x1, y1) = (960, 566)

[0085] The center point offset distance:

[0086] Offset: (x2, y2) = (xx - x1, yy - y1) = (9, -13)

[0087] The offset angle can be calculated through the offset and the movement coefficient.

[0088] If the total number n of pixel pairs in the pixel pair result set C is less than 100, determine whether the focal length parameter f of the camera is the minimum. If it is, notify the operation and maintenance personnel with an alarm that the monitored target object cannot be obtained. If the focal length parameter f of the camera is not the minimum, replace the original image M0 taken when the camera's focal length is adjusted to the minimum with the initial image M, use the standby target position as the target position, and return to step three to reshoot the actual image N. If the total number of pixel pairs n < 100, it means that due to the inappropriate focal length of the camera, the target object does not appear in the picture. Then directly use the minimum focal length to reshoot. The minimum focal length is the focal length at which the camera can capture the most complete object. This prevents the target object from not appearing in the picture due to the inappropriate focal length of the camera.

[0089] Step 5: Determine whether the device needs position correction: If the offset distance is less than the error threshold, it means that the monitored target object is already at the center position of the actual picture N, and gas detection and concentration analysis can be directly carried out; if the offset distance is greater than or equal to the error threshold, the target object is not at the center position of the actual picture N, and go to Step 6 for position correction.

[0090] Set the acceptable error threshold d0 according to the actual business scenario. If the offset distance d < d0, it means that the target aligned by the camera and the laser is at the center position, and no position correction is required, and gas monitoring can be directly executed; if the offset distance d >= d0, it means that it is not at the center position and the alignment is not the object to be monitored, and position correction is required, and the following execution steps are needed. The error threshold d0 is a prefabricated parameter input by the user, and the default value of the error threshold d0 is 10 pixels.

[0091] Step 6: Calculate the angle movement coefficient: Determine the adjustment direction according to the offset, and calculate the new target detection angle by using the adjustment amplitude and relevant parameters of the target position.

[0092] Angle attributes of the horizontal rotation gear of the laser detector: The due north direction on the horizontal plane is 0° (360°), the due east direction is 90°, the due south direction is 180°, and the due west direction is 270°. The angle needs to be increased for clockwise adjustment and decreased for counterclockwise adjustment. Angle attributes of the vertical rotation gear of the laser detector: The vertical plane range is 45° upward and -45° downward. The angle needs to be increased for upward adjustment and decreased for downward adjustment.

[0093] In order to enable the laser detector to detect the real target object, that is, the target object at the center position of the initial picture M, it is necessary to adjust the angle of the detector's laser beam so that the coordinates of the target object in the actual picture N move from the position of the center point coordinates (x1, y1) to the pixel coordinates (xx, yy) of the monitored target object. Figure 6 It is a schematic diagram of the shooting coordinates of the actual picture N.

[0094] According to the horizontal angle E and vertical angle F of the original picture M, that is, the target position, and the translation offset (x2, y2) = (9, -13), and the horizontal and vertical adjustment amplitudes are 0.1° respectively, the new target detection angle is obtained:

[0095] When the translation parameter x2 <= 0, y2 <= 0, the new target detection angle is: horizontal angle E1 = E - 0.1, vertical angle F1 = F + 0.1;

[0096] When the translation parameter x2 <= 0, y2 > 0, the new target detection angle is: horizontal angle E1 = E - 0.1, vertical angle F1 = F - 0.1;

[0097] When the translation parameters x2 > 0 and y2 <= 0, the new target detection angles are: horizontal angle E1 = E + 0.1, vertical angle F1 = F + 0.1;

[0098] When the translation parameters x2 > 0 and y2 > 0, the new target detection angles are: horizontal angle E1 = E + 0.1, vertical angle F1 = F - 0.1.

[0099] Step 7: Calculate the correction angle: Move the camera horizontally in the adjustment direction by the corresponding adjustment amplitude, and repeat Steps 3 and 4 to obtain the horizontal offset; move the camera vertically in the adjustment direction by the corresponding adjustment amplitude, and repeat Steps 3 and 4 to obtain the vertical offset; calculate the horizontal direction coefficient using the adjustment amplitude and the horizontal offset, calculate the vertical direction coefficient using the adjustment amplitude and the vertical offset, calculate the compensation angle using the horizontal direction coefficient, the vertical direction coefficient, and the offset. If the compensation angle is greater than the preset threshold, send an alarm notification to the operation and maintenance personnel; otherwise, reset the target position and return to Step 2.

[0100] When the camera moves horizontally by 0.1° and the vertical direction remains unchanged, repeat Steps 3 and 4 to obtain the horizontal offset x3 presented on the actual picture; when the camera moves vertically by 0.1° and the horizontal direction remains unchanged, repeat Steps 3 and 4 to obtain the vertical offset y3 presented on the actual picture; according to the basic principle of the pinhole camera model, it can be known that the angles of the camera's vertical and horizontal movements are approximately proportional to the difference in imaging pixel distances;

[0101] Based on the basic principle of the pinhole camera model, the calculated proportionality coefficients are: the horizontal direction coefficient is β = 0.1 / x3, and the vertical direction coefficient is θ = 0.1 / y3;

[0102] When moving horizontally by 9 pixels, the continued horizontal movement angle is 0.9 / x3;

[0103] When moving vertically upward by 13 pixels, the continued vertical movement angle is 1.3 / y3;

[0104] From this, it can be obtained that when the camera center position moves to the coordinates (xx, yy), the angles in the horizontal and vertical directions for the camera to move are: the horizontal angle En = E + 0.9 / x3 in the horizontal direction, and the vertical angle Fn = F + 1.3 / y3 in the vertical direction.

[0105] If the compensated offset angle is greater than 5°, that is, En - E > 5 or Fn - F > 5, an alarm notification needs to be sent to the operation and maintenance personnel, informing that the correction amplitude is too large and interference requires repair. Otherwise, proceed to Step 8.

[0106] The preset threshold of the compensation angle is a pre-set parameter customarily input by humans. In this article, it is set to 5.

[0107] Step 8: Compensate the target position using the compensation angle to obtain a new target monitoring angle, and the laser detector uses the new target monitoring angle to detect the laser gas concentration.

[0108] There is a problem with the value of the actual picture N. Use the corrected horizontal angle En and vertical angle Fn, input the work plan value, and repeat Steps 3, 4, 5, 6, and 7. At this time, the center position of the actual picture captured by the camera is the expected target, and the obtained laser gas detection result is valid data.

[0109] The present invention combines video imaging technology with laser detection technology, compares the captured actual picture of the target with the original initial picture, automatically obtains as much picture identification vector data as possible, calculates the pixel distance difference between the target object in the actual picture and the original initial picture, and according to the basic principle of the pinhole camera model, calculates the coefficient of the distance deviation corresponding to the camera angle deviation in real time, so as to predict the angle difference of the center point displacement to the target monitoring object, and reset and adjust the camera monitoring target shooting angle. The new angle after error correction is used in the next working cycle, so as to quickly correct the detection position, realize no error between the actual detection and the expected detection position of the laser detection target, and ensure the accuracy and timeliness of gas detection around the target object.

[0110] Compared with the existing technical solutions, the technical solution of the present invention only needs to deploy a computing program application, and only needs to prefabricate more than two target detection pictures to solve the problem of the steering positioning error of the pan-tilt laser gas detector caused by mechanical gear wear. There is no additional hardware configuration, such as angle sensors and displacement sensors, etc., which saves more costs. The present invention can be applied to complex outdoor environments. By automatically obtaining a large number of picture identification vectors, even if there are partial occlusions and changes in some environments, it does not affect the mapping of the coordinates of the monitored target object, and solves the disadvantages that the current technology is mainly applied to relatively ideal indoor environments and requires manual marking of special complete large-area identification objects as references.

[0111] In order to make the camera face the target monitoring object directly, the present invention provides a method for calculating the angle difference. The overall process can complete the purpose of angle correction by repeating the shooting and analyzing pictures 4 times, and can quickly locate the target monitoring object, solving the problem that the current technology uses the minimum step size offset to move step by step and repeats multiple times, which takes too long. The present invention includes the step of resetting the target monitoring angle, so that the pan-tilt laser device can directly use the new corrected angle in the monitoring work of the next cycle without repeating the correction process. The present invention provides a way to switch to a small focal length for picture comparison when it is detected that the target object is not within the actual picture by prefabricating multiple original pictures with different focal lengths (which can be extended to multiple, corresponding to multiple different focal lengths, at least two). This solves the problem that the prefabricated original target picture has too large a focal length setting, resulting in the target object not being within the image during actual work.

[0112] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for monitoring target positioning, early warning and automatic correction by a laser gas detector, characterized in that: The steps are as follows: Step 1: Align the center position of the camera and take an initial picture M of the monitored target object, and obtain the initial key parameters of the laser detector and the camera at the target position; perform image feature extraction on the initial picture M to obtain an initial feature matrix sample set A; Step 2: Control the laser detector and camera to the target position, take the actual picture N of the monitored target object, and extract the image features of the actual picture N to obtain the feature matrix Composed of sample set B; Step 3: Compare the image features in sample set B and sample set A, and calculate the offset distance and offset between the actual position of the monitored target object and the target position; Step 4: If the offset distance is less than the error threshold, it means that the monitoring target object is already at the center of the actual image N, and gas detection and concentration analysis are directly performed; if the offset distance is greater than or equal to the error threshold, the target object is not at the center of the actual image N, and step 5 is entered; Step 5: Determine the adjustment direction based on the offset, and calculate the new target detection angle using the adjustment amplitude and key parameters of the laser detector at the target position; Step 6: Calculate the correction angle: move the camera horizontally in the adjustment direction by the corresponding adjustment amplitude, repeat steps 3 and 4 to obtain the horizontal offset; move the camera vertically in the adjustment direction by the corresponding adjustment amplitude, repeat steps 3 and 4 to obtain the vertical offset; calculate the horizontal direction coefficient using the adjustment amplitude and the horizontal offset, calculate the vertical direction coefficient using the adjustment amplitude and the vertical offset, and calculate the compensation angle using the horizontal direction coefficient, the vertical direction coefficient and the offset. If the compensation angle is greater than the preset threshold, an alarm notification is sent to the operation and maintenance personnel, otherwise the target position is reset according to the compensation angle, and return to step 3. The laser detector uses the compensated target detection angle to perform laser gas concentration detection.

2. The method for monitoring target positioning, early warning and automatic correction by a laser gas detector according to claim 1 is characterized in that: The initial key parameters include the horizontal angle and vertical angle of the laser detector and the focal length of the camera; When the initial image M is taken, the horizontal angle E and vertical angle F of the laser detector and the focal length parameter f of the camera are obtained. The pixel coordinates of the center point of the initial image M are (x, y); The laser detector and the camera are fixed on a pan-tilt head, which is fixed on a bracket. A horizontal rotating gear and a vertical rotating gear are arranged inside the pan-tilt head. The vertical rotating gear is arranged on the upper part of the horizontal rotating gear. The laser detector and the camera are both connected to the vertical rotating gear. The horizontal rotating gear rotates horizontally with the vertical rotating gear. The horizontal rotating gear rotates within a range of 360°, and the vertical rotating gear rotates within a range of 45° above and below the horizontal line.

3. The method for monitoring target positioning, early warning and automatic correction by a laser gas detector according to claim 1 or 2, characterized in that: In the step 1, the number of the initial pictures M is set to be at least two, and the focal lengths of the cameras of the at least two initial pictures are different; the initial pictures M include pictures taken when the focal length of the camera is the smallest; The target position obtained in step 1 is the work plan item of the laser detector and the camera. The laser detector works for one cycle to monitor the target position of the horizontal angle E, the vertical angle F and the focal length parameter f of the camera; The SURF feature extraction algorithm is used to sample 1O*N1 image features in the initial image M. The image features include the edge positions of all objects, and the image feature matrix data is obtained to form a sample set A{a1,a2,a3...........a 10*N1 }, where a1, a2, a3............a 10*N1 They represent 10*N1 image features extracted from the initial image M; N1 is greater than or equal to 50; Use SURF feature extraction algorithm to process the actual image N sampling image features 10*N1, obtain the image feature matrix data, and form a sample set B{b1,b2,b3...........b 10*N1 }, where b1, b2, b3...........b 10*N1 It is the 10*N1 image features in the actual image N.

4. The method for monitoring target positioning, early warning and automatic correction by a laser gas detector according to claim 3 is characterized in that: The method for comparing the image features in sample set B and sample set A is: matching the image features of sample set A and sample set B one by one, finding all matching pixel pairs, and obtaining a pixel pair result set CO {(ax1, bx1), (ax2, bx2)........(ax n ,bx n )}, where ax1,ax2...........ax n are the image features in sample set A, bx1, bx2...........bx n are the image features in sample set B. (ax1, bx1), (ax2, bx2)........(ax n ,bx n ) represent the first pixel pair, the second pixel pair, and the nth pixel pair in the result set CO respectively, where n represents the total number of pixel pairs, n≤10*N1; By using the characteristics of normal distribution, the data points whose corresponding probability distributions on both sides of the mean are outside the range of the mean plus or minus two times the standard deviation are removed from the pixel pair result set CO, and the remaining coordinate pairs are retained to obtain the pixel pair result set C.

5. The method for monitoring target positioning, early warning and automatic correction by a laser gas detector according to claim 4 is characterized in that: The method for calculating the offset distance and offset amount between the actual position of the monitoring target object and the target position is: If the total number of pixel pairs n in the pixel pair result set C is greater than or equal to N1, the match is considered successful. The pixel pair result set C is input into the plane matrix conversion algorithm findHomography() to obtain the conversion matrix. The conversion matrix is ​​used to map the pixel coordinates (x, y) of the center point of the initial image M to obtain the coordinates (xx, yy) of the monitored target object in the actual image N. The coordinates of the center point of the actual image N are (x1, y1), and the offset distance of the center point is calculated: The offset coordinates of the position (x2, y2) = (Xx-x1, yy-y1) are calculated based on the coordinates (xx, yy) of the monitored target object and the center point coordinates (x1, y1).

6. The method for monitoring target positioning, early warning and automatic correction by a laser gas detector according to claim 5 is characterized in that: The one-by-one feature matching method is to calculate the similarity between the image features of sample set A and sample set B, and obtain all matching pixel pairs; when the similarity is the same, select the image feature with the largest similarity ranking; If the total number n of pixel pairs in the pixel pair result set C is less than N1, determine whether the focal length parameter f of the camera is the minimum. If so, an alarm is issued to the operation and maintenance personnel, indicating that the target object to be monitored cannot be obtained. If the focal length parameter f of the camera is not the minimum, replace the picture taken when the camera's focal length is adjusted to the minimum with the initial picture M, and use the location of the picture as the target location, and return to step 2 to retake the actual picture N.

7. The method for monitoring target positioning, early warning and automatic correction by a laser gas detector according to any one of claims 4 to 6, characterized in that: The method of calculating the new target detection angle by using the key parameters of the laser detector with the adjustment amplitude and target position is as follows: according to the horizontal angle E and vertical angle F of the target position and the translation offset coordinates (x2, y2), the amplitude is adjusted by 0.1° horizontally and vertically respectively to obtain the new target detection angle: When the translation parameters x2<=0, y2<=0, the new target detection angle is: horizontal angle E1=E-0.1, vertical angle F1=F+0.1; When the translation parameter x2<=0, y2>0, the new target detection angle is: horizontal angle E1=E-0.1, vertical angle F1=F-0.1; When the translation parameter x2>0, y2<=0, the new target detection angle is: horizontal angle E1=E+0.1, vertical angle F1=F+0.1; When the translation parameters x2>0, y2>0, the new target detection angles are: horizontal angle E1=E+0.1, vertical angle F1=F-0.

1.

8. The method for monitoring target positioning, early warning and automatic correction by a laser gas detector according to claim 7, characterized in that: When the camera moves horizontally by an adjustment range of 0.1° and the vertical direction remains unchanged, repeat steps 2-3 to obtain the horizontal offset x3 presented on the actual image; when the camera moves vertically by 0.1° and the horizontal direction remains unchanged, repeat steps 2-3 to obtain the vertical offset y3 presented on the actual image; According to the basic principle of the pinhole camera model, the proportional coefficients are calculated as follows: the horizontal coefficient is β = O.1 / x3, and the vertical coefficient is θ = O.1 / y3; The angle of further movement in the horizontal direction is x2*β; the angle of further movement in the vertical direction is -y2*θ.

9. The method for monitoring target positioning, early warning and automatic correction by a laser gas detector according to claim 8, characterized in that: The center position of the camera is moved to the coordinates (xx, yy) of the monitoring target object, and the angle direction of the camera movement is: the horizontal angle En = E + x2*β in the horizontal direction, and the vertical angle Fn = F - y2*θ in the vertical direction; If the compensation offset angle is greater than the preset threshold, that is, |En-E|>preset threshold or |Fn-F|>preset threshold, an alarm notification needs to be sent to the operation and maintenance personnel to inform them that the correction amplitude is too large and maintenance intervention is required; otherwise, the corrected horizontal angle En and vertical angle Fn are used as the target position and return to step 2.

10. The method for monitoring target positioning, early warning and automatic correction by a laser gas detector according to claim 9, characterized in that: If the offset distance d < d0, it indicates that the target aligned by the camera and the laser is the central position, and gas monitoring is directly performed; if the offset distance d >= d0, it indicates that the monitored target object is not at the central position and position correction is required; where dO is the acceptable error threshold. The angle attributes of the horizontal rotation gear of the laser detector are: the due north direction on the horizontal plane is 0° or 360°, the due east direction is 90°, the due south direction is 180°, and the due west direction is 270°. For clockwise adjustment, the angle needs to be increased, and for counterclockwise adjustment, the angle needs to be decreased; the angle attributes of the vertical rotation gear of the laser detector are: the range on the vertical plane is 45° in the upward direction and -45° in the downward direction. For upward adjustment, the angle needs to be increased, and for downward adjustment, the angle needs to be decreased.

Citation Information

Patent Citations

  • A method for locating the petal groove angle of a machine vision-based camera module

    CN105991913B

  • Correction parameter adjusting method and device, electronic equipment and readable medium

    CN114286075A

  • A method and system for calibrating camera mechanical errors based on machine vision comparison

    CN114979469B

  • Automatic correction method and device of pan-tilt camera, pan-tilt equipment and storage medium

    CN118338125A

Cited By

  • Camera calibration method and device for substation inspection and electronic equipment

    CN120451287A

  • Camera calibration method, device and electronic equipment for substation inspection

    CN120451287B