Tank mouth three-dimensional positioning method and system based on binocular camera image

Through the three-dimensional positioning method based on binocular camera images, the problem of insufficient adaptability and limited accuracy in the chemical industry is solved, and high-precision port positioning under different conditions is achieved to ensure the safety and stability of liquid filling.

CN119850707APending Publication Date: 2025-04-18INSPUR YUNZHOU (SHANDONG) IND INTERNET CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411717363.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The existing vent positioning technology has problems such as insufficient adaptability and limited accuracy in the chemical industry. Especially when facing special or complex scenarios of different storage tanks or containers, it is difficult to achieve accurate alignment, which affects the safety and stability of liquid filling.

Method used

The three-dimensional positioning method based on binocular camera images is adopted, and the parallax image is obtained through binocular cameras and distortion removal is performed. The center and radius of the infusion hole are detected by Hoff circle detection method, combined with the positioning of the base point of the calibration plate, the depth information is obtained by triangulation method, and the three-dimensional position time series is processed through the filter to achieve high-precision infusion hole positioning.

Benefits of technology

Under different lighting conditions and camera-filling distances, the high-precision three-dimensional position of the filling port in the world coordinate system can be accurately obtained, improving the adaptability and accuracy of positioning, and ensuring the safety and stability of liquid filling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850707A_ABST
    Figure CN119850707A_ABST
Patent Text Reader

Abstract

The invention provides a filling port three-dimensional positioning method and system based on a binocular camera image. The filling port three-dimensional positioning method comprises the steps that parallax images of a filling port and a calibration plate are acquired through a binocular camera; distortion removal is carried out on the parallax image through a preset formula, and a filling opening distortion-removed image and a calibration plate distortion-removed image are generated; detecting the center and radius of the filling port in the image through a Hough circle detection method based on the distortion-removed image of the filling port; based on the dedistorted image of the calibration plate, carrying out base point positioning through a preset edge detection algorithm, and obtaining a base point of the calibration plate; obtaining depth information through a preset triangulation method based on the center of the pouring opening and the base point of the calibration plate, and obtaining three-dimensional position coordinates of the center of the pouring opening; and based on the three-dimensional position coordinates of the irrigation opening circle center, filtering processing is carried out through a preset filter, a three-dimensional position time sequence of the irrigation opening circle center is obtained, and irrigation opening three-dimensional positioning is carried out according to the three-dimensional position time sequence of the irrigation opening circle center. The problem that an existing pouring opening is poor in positioning precision is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visual positioning technology, and in particular to a three-dimensional positioning method and system for a port based on binocular camera images. Background Art

[0002] In the liquid filling scenario of the chemical industry, the crane can be easily connected to tanks or containers at different heights and positions to achieve safe and efficient filling of liquids. Filling port positioning is a key link in the operation of the crane, which requires the crane to be able to accurately align with the inlet of the tank or container to ensure that the liquid can flow in smoothly and accurately.

[0003] With the continuous development of science and technology, the positioning technology of crane pipe filling mouth is also constantly improving. At present, there are many crane pipe filling mouth positioning technologies based on different principles on the market, including mechanical positioning, hydraulic positioning, and electrical positioning.

[0004] Although there are many different filling port positioning technologies, there are still some limitations: (1) Lack of adaptability: In the chemical industry, the inlet positions and shapes of different tanks or containers may vary greatly. Although the existing technology has a certain degree of adaptability, it may still not meet the needs in some special or complex scenarios; (2) Limited accuracy: The positioning accuracy is easily affected by ambient light and the filling port position, which affects the safety and stability of subsequent control operations. Summary of the invention

[0005] The present invention provides a three-dimensional positioning method and system for a filling port based on binocular camera images, which are used to solve the problem of poor positioning accuracy of the existing filling port.

[0006] The present invention provides a three-dimensional positioning method for a port based on binocular camera images, comprising: Obtain the parallax image of the filling port and the calibration plate through a binocular camera; Dedistorting the disparity image using a preset formula to generate a Guankou dedistorted image and a calibration plate dedistorted image; Based on the dedistorted image of the Guankou, the center and radius of the Guankou circle in the image are detected by the Hough circle detection method; Based on the dedistorted image of the calibration plate, the base point is located by using a preset edge detection algorithm to obtain the base point of the calibration plate; Depth information is obtained by using a preset triangulation method based on the center of the filling hole and the base point of the calibration plate to obtain the three-dimensional position coordinates of the center of the filling hole; The three-dimensional position coordinates of the Guankou center are filtered through a preset filter to obtain a three-dimensional position time series of the Guankou center, and the Guankou is three-dimensionally positioned according to the three-dimensional position time series of the Guankou center.

[0007] According to a Guankou three-dimensional positioning method based on binocular camera images provided by the present invention, the disparity image is distorted by a preset formula to generate a Guankou dedistorted image and a calibration plate dedistorted image, specifically comprising: The points on the pixel plane of the disparity image are converted to a normalized coordinate plane, and the tangential distortion and the radial distortion are parameterized in the normalized coordinate plane; The tangential distortion and radial distortion represented by parameters are removed by preset formulas to generate the dedistorted image of the Guankou and the dedistorted image of the calibration plate.

[0008] According to a method for three-dimensional positioning of a Guankou based on a binocular camera image provided by the present invention, the Guankou center and radius in the image are detected by a Hough circle detection method based on the Guankou dedistorted image, specifically comprising: Based on the Guankou dedistorted image, the edge in the image is extracted by the edge detection algorithm in the Hough circle detection method to obtain an edge binary image; Determine edge normals based on the edge binary image using edge detection operators for all edge pixels; All pixel positions on the edge normal are accumulated by one through a preset circle center space accumulator, and the pixel position with the largest accumulated value in the circle center space accumulator is regarded as the center of the filling mouth; Based on the center of the filling mouth, the Euclidean distances of all edge pixels from the center of the circle are calculated, and the distance values ​​that appear are accumulated by one through a preset radius space accumulator, and the radius value with the largest accumulated value in the radius space accumulator is regarded as the filling mouth radius.

[0009] According to a method for three-dimensional positioning of a port based on a binocular camera image provided by the present invention, the method performs base point positioning based on a dedistorted image of a calibration plate by using a preset edge detection algorithm to obtain the base point of the calibration plate, specifically comprising: Based on the dedistorted image of the calibration plate, the candidate corner points are determined by a preset edge detection algorithm; Based on checking the pixels around the corner point candidate points and calculating the relative positions and angles between the candidate points, a corner point is selected for confirmation; The base point positioning information is obtained by sorting and filtering based on the corner points, and the base points of the calibration plate are obtained.

[0010] According to a method for three-dimensional positioning of a Guankou based on binocular camera images provided by the present invention, the depth information is obtained by a preset triangulation method based on the Guankou circle center and the base point of the calibration plate to obtain the three-dimensional position coordinates of the Guankou circle center, specifically including: Based on the normalized coordinates of the center of the filling hole and the base point of the calibration plate in the two-dimensional image and the camera parameters, a depth calculation equation is constructed through a preset triangulation method; Based on the depth-finding equation, the optimal solution is obtained by the least square method to obtain the depth information; The depth information is combined with the normalized coordinates of the center of the Guankou circle in the two-dimensional image to obtain the three-dimensional position coordinates of the center of the Guankou circle.

[0011] According to a method for three-dimensional positioning of a Guankou based on binocular camera images provided by the present invention, the three-dimensional position coordinates based on the Guankou circle center are filtered through a preset filter to obtain a three-dimensional position time series of the Guankou circle center, and the three-dimensional positioning of the Guankou is performed according to the three-dimensional position time series of the Guankou circle center, specifically comprising: Sort the three-dimensional position coordinates of the center of the Guankou circle according to the time series to form preliminary time series data; Based on the preliminary time series data, a data window including the current time point and multiple time points before and after the center position of the irrigation mouth at each time point is selected; In the data window, a preset filter is used to perform local polynomial fitting to obtain the smoothed estimate at the current time point to generate a three-dimensional position time series of the center of the Guankou circle; The three-dimensional positioning of the Guankou is performed based on the three-dimensional position time series of the Guankou center.

[0012] The present invention also provides a three-dimensional positioning system for a Guankou port based on binocular camera images, comprising: An image acquisition module is used to acquire the parallax images of the filling port and the calibration plate through a binocular camera; A distortion removal module, used to remove the distortion of the parallax image by a preset formula to generate a Guankou dedistorted image and a calibration plate dedistorted image; A guankou circle center acquisition module is used to detect the guankou circle center and radius in the image by using a Hough circle detection method based on the guankou dedistorted image; The calibration plate base point acquisition module is used to locate the base points based on the dedistorted image of the calibration plate by using a preset edge detection algorithm to acquire the base points of the calibration plate; A depth acquisition module, used to obtain depth information based on the center of the filling mouth and the base point of the calibration plate through a preset triangulation method to obtain the three-dimensional position coordinates of the center of the filling mouth; The Guankou three-dimensional positioning module is used to perform filtering processing based on the three-dimensional position coordinates of the Guankou center through a preset filter to obtain the three-dimensional position time series of the Guankou center, and perform three-dimensional positioning of Guankou according to the three-dimensional position time series of the Guankou center.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the three-dimensional positioning method for a port based on a binocular camera image as described above is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the three-dimensional positioning method for a port based on a binocular camera image as described in any one of the above is implemented.

[0015] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned three-dimensional positioning methods for a port based on binocular camera images.

[0016] The present invention provides a three-dimensional positioning method and system for Guankou based on binocular camera images, which eliminates the influence of radial distortion and tangential distortion by dedistorting the image; uses the Hough transform algorithm to detect the center of Guankou, and uses the corner point detection algorithm to detect the points and base points in the calibration plate; uses the triangulation algorithm to perform three-dimensional positioning of spatial points for the two-dimensional points detected in the binocular image; and uses a filter to perform three-dimensional point time series denoising to reduce the positioning error in the final result. Based on the above detection and positioning methods, the high-precision three-dimensional position of Guankou in the world coordinate system can be obtained under different lighting conditions and different camera-Guankou distances. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flow chart of the three-dimensional positioning method of the port based on binocular camera images provided by the present invention.

[0019] Figure 2 It is a schematic diagram of the Guankou three-dimensional positioning scene based on binocular camera images provided by the present invention.

[0020] Figure 3 The present invention provides a schematic diagram of the module connection of a three-dimensional positioning system for a Guankou port based on binocular camera images.

[0021] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention.

[0022] Figure numerals: 110: image acquisition module; 120: distortion removal module; 130: Guankou circle center acquisition module; 140: calibration plate base point acquisition module; 150: depth acquisition module; 160: Guankou three-dimensional positioning module; 410: processor; 420: communication interface; 430: memory; 440: communication bus. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] Combine the following Figure 1 and Figure 2 The present invention describes a three-dimensional positioning method of a Guankou based on a binocular camera image, comprising: step 100, obtaining a parallax image of the Guankou and a calibration plate through a binocular camera.

[0025] The left and right eyes of a binocular camera provide two images with parallax. In order to obtain better imaging effects, a lens is usually added in front of the camera. The addition of the lens will affect the propagation of light, that is, the straight lines in the real world become curves in the image, thus producing radial distortion; at the same time, due to installation errors, the lens and the imaging plane will not be completely parallel, which will also change the projection position, thus producing tangential distortion. The existence of radial distortion and tangential distortion will interfere with the accuracy of three-dimensional positioning.

[0026] Therefore, it is necessary to remove radial distortion and tangential distortion to ensure the accuracy of subsequent filling port positioning.

[0027] Step 200: Dedistort the disparity image using a preset formula to generate a dedistorted image of the injection port and a dedistorted image of the calibration plate.

[0028] Specifically, the points on the pixel plane of the disparity image are converted to a normalized coordinate plane, and the tangential distortion and the radial distortion are parameterized in the normalized coordinate plane; The tangential distortion and radial distortion represented by parameters are removed by preset formulas to generate the dedistorted image of the Guankou and the dedistorted image of the calibration plate.

[0029] In the present invention, before performing the dedistortion operation, the points on the pixel plane must first be converted to the normalized coordinate plane, and the conversion relationship is as follows.

[0030] .

[0031] in, and are the normalized coordinates on the normalized plane, is the internal parameter of the camera.

[0032] Radial distortion can be regarded as the change of coordinate points along the length direction, that is, the distance of coordinate points from the origin changes; tangential distortion can be regarded as the change of coordinate points along the tangent direction, that is, the change of horizontal angle. Assuming that radial distortion is a polynomial relationship, three parameters are used: To express radial distortion, use Two parameters express tangential distortion, and the distortion removal formula is as follows.

[0033] .

[0034] in, Represents the distance from the coordinate point on the normalized plane to the center point.

[0035] Step 300: Based on the dedistorted image of the filling port, the center and radius of the filling port in the image are detected by using the Hough circle detection method.

[0036] Specifically, based on the Guankou dedistorted image, the edge in the image is extracted by the edge detection algorithm in the Hough circle detection method to obtain an edge binary image; Determine edge normals based on the edge binary image using edge detection operators for all edge pixels; All pixel positions on the edge normal are accumulated by one through a preset circle center space accumulator, and the pixel position with the largest accumulated value in the circle center space accumulator is regarded as the center of the filling mouth; Based on the center of the filling mouth, the Euclidean distances of all edge pixels from the center of the circle are calculated, and the distance values ​​that appear are accumulated by one through a preset radius space accumulator, and the radius value with the largest accumulated value in the radius space accumulator is regarded as the filling mouth radius.

[0037] In the present invention, for the location of the filling port, the present invention adopts the Hough circle detection method to detect the filling port center and radius in the image. First, the Canny edge detection algorithm is applied to the image to extract the edge in the image and obtain the edge binary image; then, according to the Sobel operator (edge ​​detection operator) of all edge pixels, its local gradient is considered, and the edge normal is determined by the slope; the center space accumulator Initialized to 0, all pixel positions on the normal are accumulated by 1 in the accumulator; the pixel position with the largest accumulated value in the accumulator is regarded as the center of the filling circle. For the center of the circle, the Euclidean distance of all edge pixels from the center of the circle is calculated; the radius space accumulator Initialized to 0, the distance value that appears in the radius space accumulator is accumulated by 1; the radius value with the largest accumulated value in the accumulator is regarded as the filling mouth radius.

[0038] Specifically, the basic idea of ​​the Sobel operator is to detect edges in an image by calculating the gradient of each pixel in the image. Specifically, the Sobel operator uses a small 3x3 matrix (called a convolution kernel or filter) to perform a convolution operation with the image to obtain the gradient value of each pixel in the horizontal and vertical directions.

[0039] The Sobel operator can perform weighted averaging and differentiation: The Sobel operator not only realizes the differentiation operation of the image, but also performs weighted averaging of the surrounding pixels, which can reduce the impact of noise to a certain extent.

[0040] Edge detection: The Sobel operator can effectively detect edges in images, especially in areas with large grayscale changes.

[0041] Simple calculation: Since the Sobel operator uses a 3x3 convolution kernel and the values ​​in the convolution kernel are small integers, the amount of calculation is relatively small and easy to implement.

[0042] Step 400: Based on the dedistorted image of the calibration plate, base point positioning is performed using a preset edge detection algorithm to obtain base points of the calibration plate.

[0043] Specifically, the candidate corner points are determined based on the dedistorted image of the calibration plate through a preset edge detection algorithm; Based on checking the pixels around the corner point candidate points and calculating the relative positions and angles between the candidate points, a corner point is selected for confirmation; The base point positioning information is obtained by sorting and filtering based on the corner points, and the base points of the calibration plate are obtained.

[0044] In the present invention, for the location of points within the calibration plate, the algorithm first binarizes the grayscale image; then uses Canny edge detection as an important clue to the location of corner points; based on the detected edge information, the algorithm searches for possible corner point candidates at edge intersections or specific positions, and these candidate points need to meet specific geometric and color features, such as four adjacent black and white squares appearing alternately; the candidate points are verified to ensure that they are indeed the corner points of the chessboard, which involves a detailed inspection of the pixels around the candidate points, and the calculation of the relative positions and angles between the candidate points.

[0045] The edge detection algorithm will sort and filter the detected corner points. The purpose of sorting is to arrange the corner points in the order of the chessboard for subsequent processing. The purpose of filtering is to remove possible duplicate corner points or incorrectly detected corner points to ensure that the final set of corner points is accurate and valid. For the base point positioning of the calibration plate, the algorithm selects the inner point in the upper left corner and uses the intersection position of a chessboard vector in the upper left corner as the base point, that is, the origin of the world coordinate system.

[0046] Step 500: Depth information is obtained based on the center of the filling port and the base point of the calibration plate by a preset triangulation method to obtain the three-dimensional position coordinates of the center of the filling port.

[0047] Specifically, a depth calculation equation is constructed based on the normalized coordinates of the center of the filling hole and the base point of the calibration plate in the two-dimensional image and the camera parameters through a preset triangulation method; Based on the depth-finding equation, the optimal solution is obtained by the least square method to obtain the depth information; The depth information is combined with the normalized coordinates of the center of the Guankou circle in the two-dimensional image to obtain the three-dimensional position coordinates of the center of the Guankou circle.

[0048] In the present invention, the triangulation method is used to solve the corresponding depth information based on the detected Guankou circle center and the calibration plate base point, so as to obtain the three-dimensional position of the Guankou circle center. First, the normalized coordinates of these two points in the two-dimensional image are used as input. Using the projection coordinates in the two-view images, combined with the camera parameters, the equation is constructed as follows.

[0049] .

[0050] in are the normalized coordinates of the center of Guankou circle in two perspectives, is the depth value of the filling center at 1 viewing angle, is the relative position between the binocular cameras. The least square method is used to solve the above equation to approximate the optimal solution. After obtaining the depth information, the three-dimensional position coordinates of the center of the Guankou circle can be further obtained.

[0051] Step 600: Filter the three-dimensional position coordinates of the Guankou circle center through a preset filter to obtain a three-dimensional position time series of the Guankou circle center, and perform three-dimensional positioning of the Guankou according to the three-dimensional position time series of the Guankou circle center.

[0052] Specifically, the three-dimensional position coordinates of the center of the Guankou circle are sorted according to the time series to form preliminary time series data; Based on the preliminary time series data, a data window including the current time point and multiple time points before and after the center position of the irrigation mouth at each time point is selected; In the data window, a preset filter is used to perform local polynomial fitting to obtain the smoothed estimate at the current time point to generate a three-dimensional position time series of the center of the Guankou circle; The three-dimensional positioning of the Guankou is performed based on the three-dimensional position time series of the Guankou center.

[0053] In the present invention, the three-dimensional position of the center of the filling mouth obtained by the three-dimensional reconstruction process is often affected by various factors, such as filling mouth displacement, gradual change of light intensity, etc., resulting in errors in the results. In order to eliminate these errors and make full use of the continuity of the filling mouth position in the time series, the Savitzky-Golay filter is introduced to post-process the three-dimensional position of the center of the filling mouth.

[0054] The Savitzky-Golay filter is a filtering method based on local polynomial least squares fitting, which can reduce the interference of high-frequency noise while maintaining the shape and characteristics of the data. For the Guankou circle center position data in 3D reconstruction, the Savitzky-Golay filter is particularly effective because it can not only smooth the data, but also retain the changing trend and detailed information of the Guankou circle center.

[0055] The Savitzky-Golay (SG) filter is a digital filtering technique used to smooth data and remove noise while keeping the shape and width of the signal as unchanged as possible. The core idea of ​​the SG filter is to perform local polynomial fitting on the data points in the time domain and then replace the original values ​​with the fitted values ​​to achieve the purpose of smoothing the data.

[0056] The SG filter works by selecting a window around each point in the data (e.g. 2M+1 points) and fitting a polynomial within this window using the least squares method. The order (N) of the polynomial can be selected as needed, but is usually not more than 4th order, because higher order polynomials may lead to overfitting, increasing noise instead of reducing it.

[0057] Suppose there is a set of data points x[n], at each point n, the SG filter will find a polynomial , so that this polynomial is The best fit is found in this range of data points. are the coefficients of the polynomial, which are determined by minimizing the sum of squared errors.

[0058] .

[0059] in is the actual data value, is the value predicted by the polynomial.

[0060] The SG filter is able to smooth the data while maintaining key features of the signal, such as the location and width of the peak, and by adjusting the window size and polynomial order, the user can control the degree and effect of the smoothing.

[0061] Specifically, the solved three-dimensional position of the Guankou circle center is arranged in chronological order to form a time series data. Then, for the Guankou circle center position at each time point, a data window containing the point and several time points before and after it is selected. In this data window, the SG filter is used to perform local polynomial fitting to obtain the smoothed estimate at the point.

[0062] After processing with the Savitzky-Golay filter, a smoother and more accurate time series of the three-dimensional position of the center of the cavitation hole is generated. By utilizing the continuity and stability of the cavitation hole position in time, it is not only possible to better eliminate the errors caused by the displacement of the cavitation hole and the gradual change of light intensity, but also to reduce the influence of factors such as the camera baseline and resolution limitation on the positioning results, improve the accuracy and reliability of the data, and provide better data support for the subsequent real-time control of the crane pipe.

[0063] Based on the three-dimensional positioning method of Guankou based on binocular camera images provided by the present invention, the image is dedistorted to eliminate the influence of radial distortion and tangential distortion; the Hough transform algorithm is used to detect the center of Guankou, and the corner point detection algorithm is used to detect the points and base points in the calibration plate; for the two-dimensional points detected in the binocular image, the triangulation algorithm is used to perform three-dimensional positioning of the spatial points; and the filter is used to denoise the three-dimensional point time series to reduce the positioning error in the final result. Based on the above detection and positioning methods, the high-precision three-dimensional position of Guankou in the world coordinate system can be obtained under different lighting conditions and different camera-Guankou distances.

[0064] refer to Figure 3 The present invention also discloses a three-dimensional positioning system for Guankou based on binocular camera images, comprising: An image acquisition module 110 is used to acquire a parallax image of the filling port and the calibration plate through a binocular camera; The distortion removal module 120 is used to remove the distortion of the parallax image by using a preset formula to generate a dedistorted image of the injection port and a dedistorted image of the calibration plate; A filling mouth center acquisition module 130 is used to detect the filling mouth center and radius in the image by using a Hough circle detection method based on the filling mouth dedistorted image; The calibration plate base point acquisition module 140 is used to locate the base points based on the dedistorted image of the calibration plate by using a preset edge detection algorithm to acquire the base points of the calibration plate; A depth acquisition module 150 is used to obtain depth information based on the center of the filling hole and the base point of the calibration plate through a preset triangulation method to obtain the three-dimensional position coordinates of the center of the filling hole; The Guankou three-dimensional positioning module 160 is used to perform filtering processing based on the three-dimensional position coordinates of the Guankou center through a preset filter to obtain the three-dimensional position time series of the Guankou center, and perform Guankou three-dimensional positioning according to the three-dimensional position time series of the Guankou center.

[0065] The process of removing the distortion of the disparity image by using a preset formula to generate a Guankou dedistorted image and a calibration plate dedistorted image specifically includes: The points on the pixel plane of the disparity image are converted to a normalized coordinate plane, and the tangential distortion and the radial distortion are parameterized in the normalized coordinate plane; The tangential distortion and radial distortion represented by parameters are removed by preset formulas to generate the dedistorted image of the Guankou and the dedistorted image of the calibration plate.

[0066] Based on the dedistorted Guankou image, the Guankou center and radius in the image are detected by the Hough circle detection method, including: Based on the Guankou dedistorted image, the edge in the image is extracted by the edge detection algorithm in the Hough circle detection method to obtain an edge binary image; Determine edge normals based on the edge binary image using edge detection operators for all edge pixels; All pixel positions on the edge normal are accumulated by one through a preset circle center space accumulator, and the pixel position with the largest accumulated value in the circle center space accumulator is regarded as the center of the filling mouth; Based on the center of the filling mouth, the Euclidean distances of all edge pixels from the center of the circle are calculated, and the distance values ​​that appear are accumulated by one through a preset radius space accumulator, and the radius value with the largest accumulated value in the radius space accumulator is regarded as the filling mouth radius.

[0067] Based on the dedistorted image of the calibration plate, the base point is located by using a preset edge detection algorithm to obtain the base point of the calibration plate, which includes: Based on the dedistorted image of the calibration plate, the candidate corner points are determined by a preset edge detection algorithm; Based on checking the pixels around the corner point candidate points and calculating the relative positions and angles between the candidate points, a corner point is selected for confirmation; The base point positioning information is obtained by sorting and filtering based on the corner points, and the base points of the calibration plate are obtained.

[0068] The depth information is obtained by using a preset triangulation method based on the center of the filling mouth and the base point of the calibration plate to obtain the three-dimensional position coordinates of the center of the filling mouth, specifically including: Based on the normalized coordinates of the center of the filling hole and the base point of the calibration plate in the two-dimensional image and the camera parameters, a depth calculation equation is constructed through a preset triangulation method; Based on the depth-finding equation, the optimal solution is obtained by the least square method to obtain the depth information; The depth information is combined with the normalized coordinates of the center of the Guankou circle in the two-dimensional image to obtain the three-dimensional position coordinates of the center of the Guankou circle.

[0069] The three-dimensional position coordinates of the Guankou circle center are filtered through a preset filter to obtain a three-dimensional position time series of the Guankou circle center. The three-dimensional positioning of Guankou is performed according to the three-dimensional position time series of the Guankou circle center, specifically including: Sort the three-dimensional position coordinates of the center of the Guankou circle according to the time series to form preliminary time series data; Based on the preliminary time series data, a data window including the current time point and multiple time points before and after it is selected for the key point position at each time point; In the data window, a preset filter is used to perform local polynomial fitting to obtain the smoothed estimate at the current time point to generate a three-dimensional position time series of the center of the Guankou circle; The three-dimensional positioning of the Guankou is performed based on the three-dimensional position time series of the Guankou center.

[0070] Based on the present invention, a three-dimensional positioning system for Guankou based on binocular camera images is provided. By dedistorting the image, the influence of radial distortion and tangential distortion is eliminated; the Hough transform algorithm is used to detect the center of Guankou, and the corner point detection algorithm is used to detect the points and base points in the calibration plate; for the two-dimensional points detected in the binocular image, the triangulation algorithm is used to perform three-dimensional positioning of the spatial points; and the filter is used to perform three-dimensional point time series denoising to reduce the positioning error in the final result. Based on the above detection and positioning methods, the high-precision three-dimensional position of Guankou in the world coordinate system can be obtained under different lighting conditions and different camera-Guankou distances.

[0071] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4As shown, the electronic device may include: a processor (processor) 410 , a communication interface (Communications Interface) 420 , a memory (memory) 430 and a communication bus 440 , wherein the processor 410 , the communication interface 420 , and the memory 430 communicate with each other through the communication bus 440 . The processor 410 can call the logic instructions in the memory 430 to execute a three-dimensional positioning method for the Guankou based on the binocular camera image, the method comprising: obtaining the disparity images of the Guankou and the calibration plate through the binocular camera; removing the distortion of the disparity images through a preset formula to generate a Guankou dedistorted image and a calibration plate dedistorted image; detecting the Guankou center and radius in the image through the Hough circle detection method based on the Guankou dedistorted image; locating the base point through a preset edge detection algorithm based on the calibration plate dedistorted image to obtain the calibration plate base point; obtaining the depth information through a preset triangulation method based on the Guankou center and the calibration plate base point to obtain the three-dimensional position coordinates of the Guankou center; filtering the three-dimensional position coordinates of the Guankou center through a preset filter to obtain the three-dimensional position time series of the Guankou center, and performing three-dimensional positioning of the Guankou according to the three-dimensional position time series of the Guankou center.

[0072] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0073] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute a method for three-dimensional positioning of a Guankou based on a binocular camera image provided by the above methods, the method including: obtaining a disparity image of the Guankou and a calibration plate through a binocular camera; removing distortion from the disparity image through a preset formula to generate a Guankou dedistorted image and a calibration plate dedistorted image; detecting the Guankou center and radius in the image through a Hough circle detection method based on the Guankou dedistorted image; locating the base point through a preset edge detection algorithm based on the calibration plate dedistorted image to obtain the calibration plate base point; obtaining depth information through a preset triangulation method based on the Guankou center and the calibration plate base point to obtain the three-dimensional position coordinates of the Guankou center; filtering through a preset filter based on the three-dimensional position coordinates of the Guankou center to obtain a three-dimensional position time series of the Guankou center, and performing three-dimensional positioning of the Guankou according to the three-dimensional position time series of the Guankou center.

[0074] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented by a processor to execute a method for three-dimensional positioning of a Guankou based on a binocular camera image provided by the above methods when the computer program is executed, the method comprising: obtaining a disparity image of the Guankou and a calibration plate through a binocular camera; performing distortion removal on the disparity image through a preset formula to generate a Guankou dedistorted image and a calibration plate dedistorted image; detecting the Guankou center and radius in the image through a Hough circle detection method based on the Guankou dedistorted image; performing base point positioning based on the calibration plate dedistorted image through a preset edge detection algorithm to obtain the calibration plate base point; obtaining depth information based on the Guankou center and the calibration plate base point through a preset triangulation method to obtain the three-dimensional position coordinates of the Guankou center; performing filtering processing based on the three-dimensional position coordinates of the Guankou center through a preset filter to obtain a three-dimensional position time series of the Guankou center, and performing three-dimensional positioning of the Guankou according to the three-dimensional position time series of the Guankou center.

[0075] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0076] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0077] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A three-dimensional positioning method for a port based on binocular camera images, characterized in that: include: Obtain the parallax image of the filling port and the calibration plate through a binocular camera; Dedistorting the disparity image using a preset formula to generate a Guankou dedistorted image and a calibration plate dedistorted image; Based on the dedistorted image of the Guankou, the center and radius of the Guankou circle in the image are detected by the Hough circle detection method; Based on the dedistorted image of the calibration plate, the base point is located by using a preset edge detection algorithm to obtain the base point of the calibration plate; Depth information is obtained by using a preset triangulation method based on the center of the filling port and the base point of the calibration plate to obtain the three-dimensional position coordinates of the center of the filling port; The three-dimensional position coordinates of the Guankou center are filtered through a preset filter to obtain a three-dimensional position time series of the Guankou center, and the Guankou is three-dimensionally positioned according to the three-dimensional position time series of the Guankou center.

2. The three-dimensional positioning method of the port based on binocular camera images according to claim 1 is characterized in that: The step of removing the distortion of the disparity image by using a preset formula to generate a Guankou dedistorted image and a calibration plate dedistorted image specifically includes: The points on the pixel plane of the disparity image are converted to a normalized coordinate plane, and the tangential distortion and the radial distortion are parameterized in the normalized coordinate plane; The tangential distortion and radial distortion represented by parameters are removed by preset formulas to generate the dedistorted image of the Guankou and the dedistorted image of the calibration plate.

3. The three-dimensional positioning method of the port based on binocular camera images according to claim 1 is characterized in that: The method of detecting the center and radius of the Guankou circle in the image by using the Hough circle detection method based on the Guankou dedistorted image specifically includes: Based on the Guankou dedistorted image, the edge in the image is extracted by the edge detection algorithm in the Hough circle detection method to obtain an edge binary image; Determine edge normals based on the edge binary image using edge detection operators for all edge pixels; All pixel positions on the edge normal are accumulated by one through a preset circle center space accumulator, and the pixel position with the largest accumulated value in the circle center space accumulator is regarded as the center of the filling mouth; Based on the center of the filling mouth, the Euclidean distances of all edge pixels from the center of the circle are calculated, and the distance values ​​that appear are accumulated by one through a preset radius space accumulator, and the radius value with the largest accumulated value in the radius space accumulator is regarded as the filling mouth radius.

4. The three-dimensional positioning method of the port based on binocular camera images according to claim 1 is characterized in that: The method of locating the base points based on the dedistorted image of the calibration plate by using a preset edge detection algorithm to obtain the base points of the calibration plate specifically includes: Based on the dedistorted image of the calibration plate, the candidate corner points are determined by a preset edge detection algorithm; Based on checking the pixels around the corner point candidate points and calculating the relative positions and angles between the candidate points, a corner point is selected for confirmation; The base point positioning information is obtained by sorting and filtering based on the corner points, and the base point of the calibration plate is obtained.

5. The method for three-dimensional positioning of a port based on binocular camera images according to claim 1, characterized in that: The method of obtaining depth information based on the center of the filling port and the base point of the calibration plate by a preset triangulation method to obtain the three-dimensional position coordinates of the center of the filling port specifically includes: Based on the normalized coordinates of the center of the filling hole and the base point of the calibration plate in the two-dimensional image and the camera parameters, a depth calculation equation is constructed through a preset triangulation method; Based on the depth-finding equation, the optimal solution is obtained by the least square method to obtain the depth information; The depth information is combined with the normalized coordinates of the center of the Guankou circle in the two-dimensional image to obtain the three-dimensional position coordinates of the center of the Guankou circle.

6. The method for three-dimensional positioning of a port based on binocular camera images according to claim 1, characterized in that: The three-dimensional position coordinates based on the Guankou circle center are filtered through a preset filter to obtain a three-dimensional position time series of the Guankou circle center, and the three-dimensional positioning of the Guankou is performed according to the three-dimensional position time series of the Guankou circle center, specifically including: Sort the three-dimensional position coordinates of the center of the Guankou circle according to the time series to form preliminary time series data; Based on the preliminary time series data, a data window including the current time point and multiple time points before and after the center position of the irrigation mouth at each time point is selected; In the data window, a preset filter is used to perform local polynomial fitting to obtain the smoothed estimate at the current time point to generate a three-dimensional position time series of the center of the Guankou circle; The three-dimensional positioning of the Guankou is performed based on the three-dimensional position time series of the Guankou center.

7. A three-dimensional positioning system for Guankou based on binocular camera images, characterized in that: include: An image acquisition module is used to acquire the parallax images of the filling port and the calibration plate through a binocular camera; A distortion removal module, used to remove the distortion of the parallax image by a preset formula to generate a Guankou dedistorted image and a calibration plate dedistorted image; A guankou circle center acquisition module is used to detect the guankou circle center and radius in the image by using a Hough circle detection method based on the guankou dedistorted image; The calibration plate base point acquisition module is used to locate the base points based on the dedistorted image of the calibration plate by using a preset edge detection algorithm to acquire the base points of the calibration plate; A depth acquisition module, used to obtain depth information based on the center of the filling mouth and the base point of the calibration plate through a preset triangulation method to obtain the three-dimensional position coordinates of the center of the filling mouth; The Guankou three-dimensional positioning module is used to perform filtering processing based on the three-dimensional position coordinates of the Guankou center through a preset filter to obtain the three-dimensional position time series of the Guankou center, and perform three-dimensional positioning of Guankou according to the three-dimensional position time series of the Guankou center.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the three-dimensional positioning method of the port based on binocular camera images as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the three-dimensional positioning method of the port based on binocular camera images as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the three-dimensional positioning method of the port based on binocular camera images as described in any one of claims 1 to 6 is implemented.