An object edge position detection device and method
By using preset edge detection algorithms and pre-deployed angle sensors in object detection technology to determine the edge position and angle range of the object, and combining laser ranging for fusion processing, the problems of low ranging efficiency and insufficient detection accuracy in the prior art are solved, and more efficient and accurate object detection is achieved.
Patent Information
- Application Number
- CN202410579163.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-10
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2044-05-10
AI Technical Summary
The existing object detection technology is limited by the number of laser beams and laser power, resulting in low distance measurement efficiency when detecting multi-pixel objects, limited measurement distance, and low detection accuracy of objects exceeding the measurement distance.
The preset edge detection algorithm determines the edge position of the object in the object image, combines the pre-deployed angle sensor to obtain the included angle, determines the angle range to which the object belongs, and performs laser ranging based on the pre-deployed laser, and combines the angle threshold, angle range and edge position of the object to determine the edge position of the object.
It effectively solves the problem of inefficient detection efficiency of traditional detection devices and improves object detection accuracy and detection efficiency.
Smart Images

Figure CN118674739B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of edge detection, and particularly relates to a device and method for detecting the edge position of an object. Background Art
[0002] With the continuous development and progress of technology, object detection technology has become one of the research hotspots. Laser detection is often used in object detection technology because of its advantages of high ranging accuracy, high stability, and simple structure. By irradiating a laser onto the surface of an object and then receiving the reflected laser, the distance information and angle information of the object can be determined. However, the existing object detection technology is often limited by the number of laser beams, resulting in low ranging efficiency when detecting multi-pixel objects, and is also limited by the laser power, so the measurement distance of laser ranging is limited, and the detection accuracy of objects beyond the measurement distance is low.
[0003] Therefore, the present invention provides a device and method for detecting the edge position of an object. Summary of the Invention
[0004] The present invention provides a device and method for detecting the edge position of an object, which is used to determine the edge position of an object in an object image according to a preset edge detection algorithm; obtain an included angle according to a pre-deployed angle sensor to determine the angle range to which the object belongs; perform laser ranging on the object based on a pre-deployed laser, and perform fusion processing in combination with a preset angle threshold, angle range, and the edge position of the object to determine the edge position of the object; perform data verification on the edge position of the object and visually output the detection result, effectively solving the problem of low detection efficiency of traditional detection devices and improving the object detection accuracy and detection efficiency.
[0005] The present invention provides a device and method for detecting the edge position of an object, including:
[0006] On the one hand, the present invention provides a device for detecting the edge position of an object, including:
[0007] An edge position module, configured to determine the edge position of an object in an object image according to a preset edge detection algorithm;
[0008] A belonging range module, configured to obtain the included angle between the object and the angle sensor according to a pre-deployed angle sensor, and determine the angle range to which the object belongs in combination with the edge position of the object;
[0009] An edge position module, configured to perform laser ranging on the object based on a pre-deployed laser to determine the distance data of the object based on a preset detection point, and perform fusion processing in combination with a preset angle threshold, angle range, and the edge position of the object to determine the edge position of the object;
[0010] The verification output module is used to perform data verification on the edge position of an object. When the data verification passes, it determines that the edge position of the object is detected correctly and visually outputs the detection result.
[0011] According to a detection device for the edge position of an object provided by the present invention, the edge position module includes:
[0012] The image preprocessing unit is used to obtain an object image, input the object image into openCV according to a preset image processing format, and when it is detected that the input of the object image is completed, perform image preprocessing on the object image to obtain a primary object image.
[0013] The image gradient unit is used to filter the primary object image according to a preset edge detection algorithm to obtain a Sobel horizontal convolution kernel and a vertical convolution kernel, and determine the image gradient amplitude of the primary object image according to the filtering result, where the image gradient amplitude includes a horizontal gradient value and a vertical gradient value.
[0014] According to a detection device for the edge position of an object provided by the present invention, the edge position module includes:
[0015] The edge primary processing unit is used to, according to the image gradient amplitude of the primary object image, when it is detected that both the horizontal gradient value and the vertical gradient value of a pixel point in the primary object image are less than the corresponding gradient amplitudes of the neighboring pixel points, eliminate the pixel point once.
[0016] The edge secondary processing unit is used to, when it is detected that the image gradient amplitude of a pixel point in the primary object image is greater than a corresponding set high threshold, determine that the pixel point is an edge pixel point of the primary object image;
[0017] When it is detected that the image gradient amplitude of a pixel point in the primary object image is less than a corresponding set low threshold, the pixel point is eliminated twice;
[0018] When it is detected that the image gradient amplitude of a pixel point in the primary object image is between the corresponding set high threshold and the corresponding set low threshold, and the image gradient amplitude of the neighboring pixel points is greater than the corresponding set high threshold, determine that the pixel point is an edge pixel point of the primary object image;
[0019] Determine the edge position of the object according to the edge pixel points.
[0020] According to a detection device for the edge position of an object provided by the present invention, the scope module includes:
[0021] The sensor deployment unit is used to determine the type of the pre-deployed angle sensor and the first pre-deployed position according to the object detection requirements.
[0022] An angle acquisition unit, configured to perform initial calibration on the angle sensor according to a first pre-deployment position. When it is determined that the calibration is completed, angle data for measuring the angle of the object is output to determine the included angle between the object and the angle sensor.
[0023] An angle analysis unit, configured to divide an angle range of an object detection area with the angle sensor as the origin, and determine the angle range to which the object belongs according to the edge position of the object and the included angle.
[0024] According to a detection device for an object edge position provided by the present invention, an edge position module includes:
[0025] A laser deployment module, configured to determine a second pre-deployment position of a laser according to the angle range to which the object belongs.
[0026] A debugging module, configured to install the laser according to the second pre-deployment position and debug the laser. If the divergence angle of the laser beam emitted by the laser is greater than the divergence angle of the diffraction grating, the convex lens is adjusted and the laser beam is expanded and shaped. When it is monitored that the number of laser sub-beams generated when the laser beam passes through the diffraction grating is the preset number of laser sub-beams, it is determined that the laser deployment is completed.
[0027] A laser reception module, configured to filter background light noise interference for the laser reception paths corresponding to the laser sub-beams reflected back when each laser sub-beam received by a laser receiver irradiates the object surface. When the interference filtering of the laser reception path is completed, the adjacent spot spacing of each laser sub-beam is determined.
[0028] A laser reception judgment module, configured to determine that the laser reception work is normal when it is monitored that the adjacent spot spacing of each laser sub-beam is consistent with the adjacent spot spacing of the laser sub-beams generated when the laser beam passes through the diffraction grating.
[0029] According to a detection device for an object edge position provided by the present invention, an edge position module includes:
[0030] A laser detection time unit, configured to obtain the number of edge pixel points included in the edge position of the object. If the number of edge pixel points is not greater than the preset number of laser sub-beams, control the pre-deployed laser to directly measure the distance to the object, obtain the first emission time of the laser beam emitted by the pre-deployed laser, and obtain the first average reception time of the laser receiver receiving the laser sub-beams, so as to determine the first laser detection time.
[0031] Otherwise, control the pre-deployed laser to perform laser ranging on the object in the horizontal and vertical directions, obtain the second emission time set of the laser beams emitted by the pre-deployed laser in each horizontal and vertical direction, and obtain the second average reception time for the corresponding laser receiver to receive the laser sub-beams, so as to determine the second laser detection time;
[0032] The object distance detection unit is configured to, when the laser detection time is not greater than the preset detection time, determine the first distance data of the object based on the preset detection point according to the laser detection time and the propagation speed of the laser in the air;
[0033] Otherwise, obtain the preset laser pulse modulation signal of the laser, perform mixing processing on the received signals of the laser sub-beams received by the laser receiver, and determine the second distance data of the object based on the preset detection point according to the laser detection time, the propagation speed of the laser in the air, and the signal frequency of the mixing processing result;
[0034] The edge position unit is configured to determine the initial edge position of the object according to the edge position of the object and in combination with the distance data of the object based on the preset detection point;
[0035] The edge position accuracy unit is configured to determine the detection accuracy of the edge position according to the preset angle threshold, the angle range, the edge position of the object, and the distance data of the object based on the preset detection point;
[0036] ;
[0037] wherein, F is the detection accuracy of the edge position; represents the distance data of the i1-th edge pixel point based on the preset detection point; represents outputting 1 when Gj1 is greater than maxGj1; otherwise, outputting 0; Gj1 represents the image gradient amplitude of the j1-th pixel point of the object; maxGj1 represents the maximum image gradient amplitude of the neighborhood pixel points of the j1-th pixel point of the object; y represents the preset angle threshold; y1 represents the preset included angle between the object and the pre-deployed angle sensor; y2 represents the actual included angle between the object and the pre-deployed angle sensor; represents the influence weight of the distance data of the edge pixel point based on the preset monitoring point on the detection accuracy of the edge position; It represents the influence weight of the included angle on the detection accuracy of the edge position; n1 represents the number of edge pixel points; m1 represents the number of pixel points of the object image; c represents the propagation speed of laser in air; ti1 represents the laser detection time of the i1-th edge pixel point; t represents the preset laser detection time; wi1 represents the signal frequency when the i1-th edge pixel point performs laser ranging; B is the signal modulation bandwidth; SNR is the signal-to-noise ratio of the mixed processing result; (y01, y02) is the angle range; ln is the symbol of the logarithmic function;
[0038] When the detection accuracy of the edge position is greater than the preset edge position accuracy, it is determined that the initial edge position of the object is consistent with the edge position of the object, and then the initial edge position is used as the edge position of the object;
[0039] Otherwise, it is determined that there is an error between the initial edge position of the object and the edge position of the object, the edge position of the object is re-acquired, and the preset angle threshold is adjusted according to the error rate to determine the edge position of the object.
[0040] According to a detection device for the edge position of an object provided by the present invention, the verification output module includes:
[0041] The data verification unit is used to perform data verification on the edge position of the object, obtain the edge position of the object in each time period within the object detection area, and determine that the data verification is passed when the sum of the edge position detection errors in each time period is lower than the preset detection error;
[0042] Otherwise, it is determined that the data verification fails, and the edge position in the corresponding time period is marked as a verification failure;
[0043] The data output unit is used to visually output the edge position of the object periodically, and stop the data output when it is detected that the edge position of the object exceeds the object detection area.
[0044] On the other hand, the present invention also provides a method for detecting the edge position of an object, including:
[0045] Step 1: Determine the edge position of the object in the object image according to the preset edge detection algorithm;
[0046] Step 2: Obtain the included angle between the object and the angle sensor according to the pre-deployed angle sensor, and combine the edge position of the object to determine the angle range to which the object belongs;
[0047] Step 3: Perform laser ranging on the object based on the pre-deployed laser to determine the distance data of the object based on the preset detection point, and perform fusion processing by combining the preset angle threshold, the angle range, and the edge position of the object to determine the edge position of the object;
[0048] Step 4: Perform data verification on the edge position of the object. After the data verification passes, it is determined that the edge position of the object is detected correctly, and the detection result is visually output.
[0049] A detection device and method for the edge position of an object provided by the present invention determine the edge position of the object in the object image according to a preset edge detection algorithm; obtain an included angle according to a pre-deployed angle sensor to determine the angle range to which the object belongs; perform laser ranging on the object based on a pre-deployed laser, and perform fusion processing in combination with a preset angle threshold, the angle range, and the edge position of the object to determine the edge position of the object; perform data verification on the edge position of the object and visually output the detection result, solving the problem of low object detection efficiency of traditional detection devices and achieving the beneficial effects of improving object detection accuracy and detection efficiency.
[0050] Other features and advantages of the present invention will be described in the following specification, and, in part, will be obvious from the specification, or will be understood by implementing the present invention. The objectives and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in the written specification and the drawings.
[0051] The technical solutions of the present invention will be further described in detail below through the drawings and embodiments. Description of the Drawings
[0052] In order to more clearly illustrate the technical solutions of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0053] Figure 1 It is a schematic structural diagram of the detection device for the edge position of the object provided in the embodiment of the present invention;
[0054] Figure 2 It is a schematic flowchart of the detection method for the edge position of the object provided in the embodiment of the present invention. Detailed Embodiments
[0055] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention with reference to the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments in 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.
[0056] The following will be combined withFigure 1 - Figure 2 Describe the present invention.
[0057] Figure 1 It is a schematic flowchart of a detection device for the edge position of an object provided by an embodiment of the present invention.
[0058] As Figure 1 shown, a detection device for the edge position of an object provided by an embodiment of the present invention includes:
[0059] An edge position module, configured to determine the edge position of an object in an object image according to a preset edge detection algorithm;
[0060] A belonging range module, configured to obtain the included angle between the object and the angle sensor according to a pre-deployed angle sensor, and determine the angle range to which the object belongs in combination with the edge position of the object;
[0061] An edge position module, configured to perform laser ranging on the object based on a pre-deployed laser, determine the distance data of the object based on a preset detection point, and perform fusion processing in combination with a preset angle threshold, angle range, and the edge position of the object to determine the edge position of the object;
[0062] A verification output module, configured to perform data verification on the edge position of the object. When the data verification passes, it is determined that the detection of the edge position of the object is correct, and the detection result is visually output.
[0063] In this embodiment, the preset edge detection algorithm refers to a technology for image processing, mainly used to identify edge information in an image. Common edge detection algorithms include: Sobel edge detection algorithm, Canny edge detection algorithm, and Laplacican edge detection algorithm.
[0064] In this embodiment, the edge position of the object refers to the edge information in the object image determined by openCV according to the preset edge detection algorithm.
[0065] In this embodiment, the angle range to which the object belongs refers to the object included angle determined according to the pre-deployed angle sensor, combined with the edge position of the object. For example, the angle range a1 - a2 to which the object belongs is determined.
[0066] In this embodiment, laser ranging refers to irradiating a laser onto the surface of an object, then receiving the reflected laser, and further determining the distance information and angle information of the object. For example, laser ranging is performed on the object through a pre-deployed laser to determine the distance information b1 and angle information c1 of the object.
[0067] In this embodiment, the preset detection point refers to a point used to represent the distance data of an object. For example, for detection point d1, laser ranging is performed on the object based on a pre-deployed laser, and the distance data b1 of the object based on detection point d1 is determined.
[0068] In this embodiment, the edge position of the object refers to the position information determined by fusing the distance data of the object based on the preset detection point, in combination with the preset angle threshold, angle range, and the edge position of the object.
[0069] In this embodiment, data verification of the edge position of the object refers to the process of verifying the edge detection error of the object in each time period within the object detection area, which is used to ensure accurate detection of the edge position of the object.
[0070] The beneficial effects of the above technical solution are as follows: The edge position of the object in the object image is determined according to the preset edge detection algorithm; the included angle is obtained based on the pre-deployed angle sensor to determine the angle range to which the object belongs; laser ranging is performed on the object based on the pre-deployed laser, and fusion processing is performed in combination with the preset angle threshold, angle range, and the edge position of the object to determine the edge position of the object; data verification is performed on the edge position of the object, and the detection result is visually output; effectively solves the problem of low detection efficiency of traditional detection devices, and improves the object detection accuracy and detection efficiency.
[0071] An embodiment of the present invention provides a detection device for the edge position of an object. The edge position module includes:
[0072] An image preprocessing unit for acquiring an object image, inputting the object image into openCV according to a preset image processing format, and when it is monitored that the input of the object image is completed, performing image preprocessing on the object image to obtain a primary object image.
[0073] An image gradient unit for filtering the primary object image according to a preset edge detection algorithm to obtain Sobel horizontal convolution kernels and vertical convolution kernels, and determining the image gradient amplitude of the primary object image according to the filtering result, where the image gradient amplitude includes a horizontal gradient value and a vertical gradient value.
[0074] In this embodiment, the preset image processing format, for example, the grayscale image format, uniformly converts the obtained object image into a grayscale image.
[0075] In this embodiment, image preprocessing is performed on the object image to obtain a primary object image. For example, image smoothing processing is performed on the image to remove the noise in the image.
[0076] In this embodiment, the preset edge detection algorithm, for example, the Sobel edge detection algorithm and the Canny algorithm.
[0077] In this embodiment, the Sobel horizontal convolution kernel is used to detect the brightness mutation of pixel points in the horizontal direction; the Sobel vertical convolution kernel is used to detect the brightness mutation of pixel points in the vertical direction.
[0078] In this embodiment, filtering the primary object image refers to the operation of processing the noise in the image and enhancing the edge information in the image.
[0079] In this embodiment, the image gradient refers to a vector used to represent the change direction and change degree of the image brightness.
[0080] In this embodiment, the image gradient magnitude refers to the image brightness magnitude determined according to the horizontal gradient magnitude and vertical gradient magnitude of each pixel point; the image gradient magnitude is used to represent the degree of image brightness change. The larger the image gradient magnitude, the greater the corresponding image brightness change.
[0081] The beneficial effects of the above technical solutions are as follows: By inputting the object image into openCV, it is convenient to uniformly process the image; determining the image gradient magnitude of the primary object image is beneficial to subsequent detection of the edge position of the object.
[0082] An embodiment of the present invention provides a detection device for the edge position of an object. The edge position module includes:
[0083] The primary edge processing unit is configured to, according to the image gradient magnitude of the primary object image, when it is detected that both the horizontal gradient value and the vertical gradient value of a pixel point in the primary object image are less than the corresponding gradient magnitudes of the neighboring pixel points, then perform a primary elimination on the pixel point;
[0084] The secondary edge processing unit is configured to, when it is detected that the image gradient magnitude of a pixel point in the primary object image is greater than the corresponding set high threshold, determine that the pixel point is an edge pixel point of the primary object image;
[0085] When it is detected that the image gradient magnitude of a pixel point in the primary object image is less than the corresponding set low threshold, then perform a secondary elimination on the pixel point;
[0086] When it is detected that the image gradient magnitude of a pixel point in the primary object image is between the corresponding set high threshold and the corresponding set low threshold, and the image gradient magnitudes of the neighboring pixel points are greater than the corresponding set high threshold, then determine that the pixel point is an edge pixel point of the primary object image;
[0087] Determine the edge position of the object according to the edge pixel points.
[0088] In this embodiment, when it is detected that both the horizontal gradient value and the vertical gradient value of a pixel point in the primary object image are smaller than the corresponding gradient amplitudes of the neighboring pixel points, the pixel point is removed once. For example, if the gradient amplitude of pixel point a1 is b1 and the maximum gradient amplitude of the neighboring pixel points of pixel point a1 is b2, and b1 < b2, then pixel point a1 is removed once.
[0089] In this embodiment, when it is detected that the image gradient amplitude of a pixel point in the primary object image is greater than the corresponding set high threshold value. For example, the set high threshold value is b2, and the image gradient amplitude b3 of pixel point a2 is greater than the corresponding set high threshold value b2, then pixel point a2 is determined as an edge pixel point.
[0090] In this embodiment, the edge pixel points of the primary object image refer to the pixel points included in the edge information in the image, which are used to represent the structural information of the image.
[0091] In this embodiment, the corresponding set low threshold value b4 < b2.
[0092] In this embodiment, when it is detected that the image gradient amplitude of a pixel point in the primary object image is between the corresponding set high threshold value and the corresponding set low threshold value, and the image gradient amplitude of the neighboring pixel points is greater than the corresponding set high threshold value. For example, the image gradient amplitude of pixel point a3 is b5, the maximum image gradient amplitude of the corresponding neighboring pixel points is b6, and b4 < b5 < b2 < b6, then pixel point a3 is determined as an edge pixel point.
[0093] The beneficial effects of the above technical solution are as follows: By performing primary edge processing and secondary edge processing on the object image, the edge position of the object is determined, laying a data foundation for subsequent determination of the object's edge position, and thus effectively improving the efficiency of object edge position detection.
[0094] The embodiment of the present invention provides a detection device for the edge position of an object. The scope module includes:
[0095] A sensor deployment unit, configured to determine the type of the angle sensor to be pre-deployed and the first pre-deployment position according to the object detection requirements;
[0096] An angle acquisition unit, configured to perform initial calibration on the angle sensor according to the first pre-deployment position. When it is determined that the calibration is completed, output the angle data for measuring the angle of the object, and determine the included angle between the object and the angle sensor;
[0097] An angle analysis unit, configured to divide the angle range of the object detection area with the angle sensor as the origin, and determine the angle range to which the object belongs according to the object edge position and the included angle.
[0098] In this embodiment, determine the type of the pre-deployed angle sensor, for example, a magnetic angle sensor, an inclination sensor, and a capacitive angular displacement sensor; determine the first pre-deployment position of the pre-deployed angle sensor, for example, the first pre-deployment position a1.
[0099] In this embodiment, the first pre-deployment position refers to the deployment position of the angle sensor, which can be used to accurately detect an object, and there is no problem of undetected due to object occlusion.
[0100] In this embodiment, initial calibration of the angle sensor according to the first pre-deployment position means to determine that the angle sensor is working properly. For example, if the angle between a known point and the first pre-deployment position a1 is b1, when the angle sensor detects the angle of the point as b1, it is determined that the angle sensor is working properly; otherwise, the angle sensor is calibrated.
[0101] In this embodiment, divide the angle range of the object detection area. For example, divide the object detection area into 4 areas, with a 90-degree angle range as one area.
[0102] The beneficial effects of the above technical solutions are as follows: By pre-deploying an angle sensor to determine the angle range to which the object belongs, it is beneficial for subsequent laser ranging; at the same time, determining the angle range to which the object belongs is beneficial for quickly detecting the edge position of the object and improving the detection efficiency.
[0103] An embodiment of the present invention provides a detection device for the edge position of an object. The edge position module includes:
[0104] A laser deployment module for determining the second pre-deployment position of the laser according to the angle range to which the object belongs;
[0105] A debugging module for installing the laser according to the second pre-deployment position and debugging the laser. If the divergence angle of the laser beam emitted by the laser is greater than the divergence angle of the diffraction grating, adjust the convex lens and expand and shape the laser beam. When the number of laser sub-beams generated when the laser beam passes through the diffraction grating is the preset number of laser sub-beams, it is determined that the laser deployment is completed;
[0106] A laser receiving module for filtering background light noise interference of the laser receiving paths corresponding to the reflected laser sub-beams received by the laser receiver for each laser sub-beam irradiating the object surface, and determining the adjacent spot spacing of each laser sub-beam when the interference filtering of the laser receiving path is completed;
[0107] A laser receiving judgment module for determining that the laser receiving works normally when it is monitored that the adjacent spot spacing of each laser sub-beam is consistent with the adjacent spot spacing of the laser sub-beams generated when the laser beam passes through the diffraction grating.
[0108] In this embodiment, the second pre-deployment position of the laser can be consistent with the first pre-deployment position of the angle sensor, and is also deployed in the object detection area within the angle range of the object.
[0109] In this embodiment, expanding and shaping the laser beam refers to the operation of expanding the laser beam into a1 number of laser sub-beams. For example, the laser beam is expanded and shaped into a1 number of laser sub-beams.
[0110] In this embodiment, when it is monitored that the number of laser sub-beams generated by the laser beam passing through the diffraction grating is the preset number of laser sub-beams, for example, the preset number of laser sub-beams a1, that is, laser ranging is performed on a1 pixel points of the object at one time.
[0111] In this embodiment, background light noise interference filtering is performed on the laser receiving paths corresponding to the reflected laser sub-beams to ensure that the laser sub-beams do not interfere with each other and ensure the accuracy of ranging.
[0112] The beneficial effects of the above technical solutions are: By deploying the laser, adjusting the convex lens, and expanding and shaping the laser beam, multi-beam distance measurement of the object is effectively realized, the detection efficiency is improved, and at the same time, the mutual interference of each beam is effectively avoided, ensuring the accuracy of laser ranging.
[0113] An embodiment of the present invention provides a detection device for the edge position of an object, and an edge position module, including:
[0114] A laser detection time unit, configured to obtain the number of edge pixel points included in the edge position of the object. If the number of edge pixel points is not greater than the preset number of laser sub-beams, control the pre-deployed laser to directly range the object, obtain the first emission time of the laser beam emitted by the pre-deployed laser, and obtain the first average reception time of the laser receiver receiving the laser sub-beam, so as to determine the first laser detection time;
[0115] Otherwise, control the pre-deployed laser to perform laser ranging on the object in the horizontal direction and the vertical direction, obtain the second emission time set of the laser beam emitted by the pre-deployed laser in each horizontal direction and each vertical direction, and obtain the second average reception time of the corresponding laser receiver receiving the laser sub-beam, so as to determine the second laser detection time;
[0116] An object distance detection unit, configured to determine the first distance data of the object based on a preset detection point according to the laser detection time and the propagation speed of the laser in the air when the laser detection time is not greater than the preset detection time;
[0117] Otherwise, obtain the preset laser pulse modulation signal of the laser, perform mixing processing with the received signals of the laser sub-beams received by the laser receiver, and determine the second distance data of the object based on the preset detection point according to the laser detection time, the propagation speed of the laser in the air, and the signal frequency of the mixing processing result;
[0118] An edge position unit, configured to determine the initial edge position of the object according to the edge position of the object and in combination with the distance data of the object based on the preset detection point;
[0119] An edge position accuracy unit, configured to determine the detection accuracy of the edge position according to a preset angle threshold, an angle range, the edge position of the object, and the distance data of the object based on the preset detection point;
[0120] ;
[0121] Wherein, F is the detection accuracy of the edge position; represents the distance data of the i1-th edge pixel point based on the preset detection point; represents that when Gj1 is greater than maxGj1, output 1; otherwise, output 0; Gj1 represents the image gradient amplitude of the j1-th pixel point of the object; maxGj1 represents the maximum image gradient amplitude of the neighborhood pixels of the j1-th pixel point of the object; y represents the preset angle threshold; y1 represents the preset included angle between the object and the pre-deployed angle sensor; y2 represents the actual included angle between the object and the pre-deployed angle sensor; represents the influence weight of the distance data of the edge pixel point based on the preset monitoring point on the detection accuracy of the edge position; represents the influence weight of the included angle on the detection accuracy of the edge position; n1 represents the number of edge pixel points; m1 represents the number of pixel points of the object image; c represents the propagation speed of the laser in the air; ti1 represents the laser detection time of the i1-th edge pixel point; t represents the preset laser detection time; wi1 represents the signal frequency when the i1-th edge pixel point performs laser ranging; B is the signal modulation bandwidth; SNR is the signal-to-noise ratio of the mixing processing result; (y01, y02) is the angle range; ln is the logarithmic function symbol;
[0122] When the detection accuracy of the edge position is greater than the preset edge position accuracy, it is determined that the initial edge position of the object is consistent with the edge position of the object, and then the initial edge position is used as the edge position of the object;
[0123] Otherwise, it is determined that there is an error between the initial edge position of the object and the edge position of the object, the edge position of the object is re-obtained, and the preset angle threshold is adjusted according to the error rate to determine the edge position of the object.
[0124] In this embodiment, the pre-deployed laser is controlled to directly measure the distance to the object. For example, if the number of edge pixel points is a1 and the preset number of laser sub-beams is a2, and a1 < a2, then the distance is directly measured.
[0125] In this embodiment, the first laser detection time refers to the time used when the laser directly measures the distance, which is determined according to the first emission time and the first average reception time. For example, if the first emission time is t1 and the first average reception time is t2, then the first laser detection time is t2 - t1.
[0126] In this embodiment, controlling the pre-deployed laser to perform laser ranging on the object in the horizontal and vertical directions is used to perform laser ranging on all edge pixel points.
[0127] In this embodiment, the second laser detection time refers to the detection time when the laser is used to perform laser ranging on an object with the number of edge pixel points greater than the preset number of laser sub-beams.
[0128] In this embodiment, the second emission time set refers to the set of emission times when the pre-deployed laser performs laser ranging on the object in the horizontal and vertical directions, such as time t1, time t3, and time t4.
[0129] In this embodiment, the preset detection time refers to the maximum allowable detection time for directly detecting the object distance by laser. When the detection time is greater than the preset detection time, the accuracy of the strategy for directly detecting the object distance by laser decreases and needs to be improved.
[0130] In this embodiment, the preset detection point is determined according to the object detection requirements. For example, the first pre-deployed position of the angle sensor is selected as the preset detection point.
[0131] In this embodiment, the first distance data refers to the distance data of object detection determined when the laser detection time is not greater than the preset detection time.
[0132] In this embodiment, the second distance data refers to the distance data of object detection determined by improving the laser ranging strategy when the laser detection time is greater than the preset detection time.
[0133] In this embodiment, the preset laser pulse modulation signal refers to a laser with a signal modulation bandwidth of B and a signal frequency of w1, which is used for laser ranging when the laser detection time is greater than the preset detection time.
[0134] In this embodiment, obtaining the preset laser pulse modulation signal of the laser and performing mixing processing with the received signals of the respective laser sub-beams received by the laser receiver means using the preset laser pulse modulation signal as a reference signal to perform frequency mixing processing on the received signals, thereby obtaining the distance information corresponding to the object, and at the same time, ensuring the accuracy of the distance information.
[0135] In this embodiment, the initial edge position of the object refers to the position information determined based on the edge position of the object in combination with the distance data of the object based on the preset detection points. Only the detection efficiency is ensured, and the detection accuracy cannot be ensured.
[0136] In this embodiment, the detection accuracy of the edge position includes the detection accuracy of the distance and the detection accuracy of the angle.
[0137] In this embodiment, according to the preset angle threshold, the angle range, the edge position of the object, and the distance data of the object based on the preset detection points, the detection accuracy of the edge position is determined. By reducing the number of pixel points during object detection through the edge position of the object, the detection efficiency is improved, and at the same time, the detection accuracy of the distance and the angle is ensured.
[0138] In this embodiment, the preset angle threshold refers to the allowable fluctuation threshold between the preset included angle between the object and the pre-deployed angle sensor and the corresponding actual included angle. For example, the preset angle threshold d1. When the fluctuation value of the preset included angle between the object and the pre-deployed angle sensor is not greater than the preset angle threshold, it is determined that the angle measurement accuracy of the object meets the requirements.
[0139] The beneficial effects of the above technical solution are: By fusing the distance data of the object based on the preset detection points in combination with the preset angle threshold, the angle range, and the edge position of the object, the edge position of the object is determined, which not only ensures the accuracy of object detection but also effectively improves the efficiency of object detection.
[0140] An embodiment of the present invention provides a detection device for the edge position of an object, and a verification output module, including:
[0141] A data verification unit for performing data verification on the edge position of the object, obtaining the edge position of the object in each time period within the object detection area. When the sum of the edge position detection errors in each time period is lower than the preset detection error, it is determined that the data verification passes;
[0142] Otherwise, it is determined that the data verification fails, and the edge position of the corresponding time period is marked as a verification failure;
[0143] A data output unit for periodically visualizing and outputting the edge position of the object, and stopping the data output when it is detected that the edge position of the object exceeds the object detection area.
[0144] In this embodiment, the edge positions in the corresponding time periods are marked as verification failures. For example, the detection error of the object in the object detection area during time period t1 is 0, the detection error during time period t2 is a1, and the detection error during time period t3 is a2. The edge positions corresponding to time period t2 - time period t3 are marked as verification failures.
[0145] In this embodiment, when it is detected that the edge position of the object exceeds the object detection area, for example, the distance between the position of the object detection area and the preset detection point is b1, and the edge position of the object is b2 > b1, it is determined that the detection of the object edge position ends, and the data output is stopped.
[0146] The beneficial effects of the above technical solution are: by performing data verification on the edge position of the object, the accuracy of object detection is ensured; the detection results are visually output, which is conducive to determining the edge position of the object in real time and meeting the user's needs.
[0147] Figure 2 It is a schematic flowchart of the method for detecting the edge position of an object provided by an embodiment of the present invention.
[0148] As Figure 2 shown, an embodiment of the present invention provides a method for detecting the edge position of an object, including:
[0149] Step 1: Determine the edge position of the object in the object image according to a preset edge detection algorithm;
[0150] Step 2: Obtain the included angle between the object and the angle sensor according to a pre-deployed angle sensor, and combine the object edge position to determine the angle range to which the object belongs;
[0151] Step 3: Perform laser ranging on the object based on a pre-deployed laser, determine the distance data of the object based on a preset detection point, and perform fusion processing in combination with a preset angle threshold, angle range, and the object edge position to determine the edge position of the object;
[0152] Step 4: Perform data verification on the edge position of the object. When the data verification passes, it is determined that the detection of the object edge position is correct, and the detection results are visually output.
[0153] The beneficial effects of the above technical solution are: determine the edge position of the object in the object image according to a preset edge detection algorithm; obtain the included angle according to a pre-deployed angle sensor and determine the angle range to which the object belongs; perform laser ranging on the object based on a pre-deployed laser, and perform fusion processing in combination with a preset angle threshold, angle range, and the object edge position to determine the edge position of the object; perform data verification on the edge position of the object and visually output the detection results; effectively solve the problem of low detection efficiency of traditional detection devices, and improve the object detection accuracy and detection efficiency.
[0154] 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 them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A device for detecting the edge position of an object, characterized in that: include: An edge position module, used to determine the edge position of an object in an object image according to a preset edge detection algorithm; A range module, used to obtain the angle between the object and the angle sensor according to the pre-deployed angle sensor, and determine the angle range to which the object belongs in combination with the edge position of the object; An edge position module is used to perform laser ranging on the object based on a pre-deployed laser, determine the distance data of the object based on a preset detection point, and perform fusion processing based on a preset angle threshold, an angle range and the edge position of the object to determine the edge position of the object; The verification output module is used to perform data verification on the edge position of the object. When the data verification passes, it is determined that the edge position detection of the object is correct, and the detection result is output visually; Among them, the edge position module includes: a laser detection time unit, used to obtain the number of edge pixel points included in the edge position of the object, and if the number of edge pixel points is not greater than the preset number of laser sub-beams, control the pre-deployed laser to directly measure the distance to the object, obtain the first emission time of the laser beam emitted by the pre-deployed laser, and obtain the first average receiving time of the laser sub-beam received by the laser receiver, so as to determine the first laser detection time; Otherwise, controlling the pre-deployed laser to perform laser ranging on the object in the horizontal direction and the vertical direction, obtaining a second emission time set of the laser beam emitted by the pre-deployed laser in each horizontal direction and each vertical direction, and obtaining a second average receiving time of the corresponding laser receiver receiving the laser sub-beam, so as to determine a second laser detection time; An object distance detection unit, used to determine first distance data of the object based on a preset detection point according to the laser detection time and a propagation speed of the laser in the air when the laser detection time is not greater than a preset detection time; Otherwise, a preset laser pulse modulation signal of the laser is obtained, and mixed with the reception signals of each laser sub-beam received by the laser receiver, and second distance data of the object based on the preset detection point is determined according to the laser detection time, the propagation speed of the laser in the air, and the signal frequency of the mixed processing result; An edge position unit, used to determine an initial edge position of the object according to the edge position of the object and the distance data of the object based on a preset detection point; An edge position accuracy unit, used to determine the detection accuracy of the edge position according to a preset angle threshold, an angle range, an edge position of an object, and distance data of the object based on a preset detection point; ; Where, F is the detection accuracy of the edge position; Indicates the distance data of the i1th edge pixel based on the preset detection point; Indicates that when Gj1 is greater than maxGj1, output 1; otherwise, output 0; Gj1 represents the image gradient amplitude of the j1-th pixel of the object; maxGj1 represents the maximum image gradient amplitude of the neighborhood pixel points of the j1-th pixel point of the object; y represents the preset angle threshold; y1 represents the preset angle between the object and the pre-deployed angle sensor; y2 represents the actual angle between the object and the pre-deployed angle sensor; Indicates the influence weight of the edge pixel point on the detection accuracy of the edge position based on the distance data of the preset monitoring point; represents the influence weight of the angle on the detection accuracy of the edge position; n1 represents the number of edge pixels; m1 represents the number of pixels in the object image; c represents the propagation speed of the laser in the air; ti1 represents the laser detection time of the i1th edge pixel; t represents the preset laser detection time; wi1 represents the signal frequency when the i1th edge pixel performs laser ranging; B is the signal modulation bandwidth; SNR is the signal-to-noise ratio of the mixed processing result; (y01, y02) is the angle range; ln is the logarithmic function symbol; When the edge position detection accuracy is greater than the preset edge position accuracy, determining that the initial edge position of the object is consistent with the edge position of the object, and then taking the initial edge position as the edge position of the object; Otherwise, it is determined that there is an error between the initial edge position of the object and the edge position of the object, the edge position of the object is reacquired, and the preset angle threshold is adjusted according to the error rate to determine the edge position of the object.
2. The device for detecting the edge position of an object according to claim 1, characterized in that: Edge location module, including: An image preprocessing unit is used to obtain an object image, input the object image into openCV according to a preset image processing format, and when it is detected that the object image input is completed, perform image preprocessing on the object image to obtain a primary object image; The image gradient unit is used to obtain the Sobel horizontal convolution kernel and the vertical convolution kernel according to the preset edge detection algorithm to filter the primary object image, and determine the image gradient amplitude of the primary object image according to the filtering result, wherein the image gradient amplitude includes the horizontal gradient value and the vertical gradient value.
3. The device for detecting the edge position of an object according to claim 2, characterized in that: Edge location module, including: an edge primary processing unit, configured to remove a pixel point in the primary object image according to the image gradient amplitude of the primary object image, when it is detected that the horizontal gradient value and the vertical gradient value of the pixel point in the primary object image are both smaller than the corresponding gradient amplitude of the neighboring pixel point; The edge secondary processing unit is used to determine that the pixel point in the primary object image is an edge pixel point of the primary object image when the image gradient amplitude of the pixel point in the primary object image is greater than the corresponding set high threshold; When it is detected that the image gradient amplitude of a pixel point in the primary object image is less than the corresponding set low threshold, the pixel point is secondary eliminated; When it is detected that the image gradient amplitude of a pixel point in the primary object image is between a corresponding set high threshold and a corresponding set low threshold, and the image gradient amplitude of a neighboring pixel point is greater than the corresponding set high threshold, the pixel point is determined to be an edge pixel point of the primary object image; The edge position of the object is determined according to the edge pixel points.
4. The device for detecting the edge position of an object according to claim 1, characterized in that: Scope modules include: A sensor deployment unit, configured to determine a type of a pre-deployed angle sensor and a first pre-deployed position according to an object detection requirement; an angle acquisition unit, configured to perform an initial calibration on the angle sensor according to the first pre-deployment position, and output angle data of the angle measurement of the object when it is determined that the calibration is completed, so as to determine the angle between the object and the angle sensor; The angle analysis unit is used to divide the object detection area into angle ranges with the angle sensor as the origin, and determine the angle range to which the object belongs according to the edge position of the object and the angle.
5. The device for detecting the edge position of an object according to claim 1, characterized in that: Edge position module, including: A laser deployment module, used to determine a second pre-deployment position of the laser according to the angular range to which the object belongs; A debugging module is used to install the laser according to the second pre-deployment position and debug the laser. If the divergence angle of the laser beam emitted by the laser is greater than the divergence angle of the diffraction grating, the convex lens is adjusted to expand and shape the laser beam. When it is monitored that the number of laser sub-beams generated by the laser beam passing through the diffraction grating is the preset number of laser sub-beams, it is determined that the laser deployment is completed; The laser receiving module is used to receive the laser sub-beams reflected from the surface of the object by the laser receiver, perform background light noise interference filtering on the laser receiving paths corresponding to the reflected laser sub-beams, and determine the spacing between adjacent light spots of each laser sub-beam when the interference filtering of the laser receiving paths is completed; The laser receiving judgment module is used to judge that the laser receiving operation is normal when it is monitored that the adjacent spot spacing of each laser sub-beam is consistent with the adjacent spot spacing of the laser sub-beam generated when the laser beam passes through the diffraction grating.
6. The device for detecting the edge position of an object according to claim 1, characterized in that: Verify output modules, including: A data verification unit is used to perform data verification on the edge position of the object, obtain the edge position of the object in each time period in the object detection area, and determine that the data verification is passed when the sum of the edge position detection errors in each time period is lower than a preset detection error; Otherwise, the data verification is judged to have failed, and the edge position of the corresponding time period is marked as verification failure; The data output unit is used to periodically visualize and output the edge position of the object, and stop data output when it is detected that the edge position of the object exceeds the object detection area.
7. A method for detecting the edge position of an object, characterized in that: include: Step 1: Determine the edge position of the object in the object image according to a preset edge detection algorithm; Step 2: Obtain the angle between the object and the angle sensor according to the pre-deployed angle sensor, and determine the angle range to which the object belongs in combination with the edge position of the object; Step 3: Perform laser ranging on the object based on the pre-deployed laser to determine the distance data of the object based on the preset detection point, and perform fusion processing based on the preset angle threshold, angle range and the edge position of the object to determine the edge position of the object; Step 4: Perform data verification on the edge position of the object. When the data verification passes, it is determined that the edge position of the object is detected correctly, and the detection result is output visually; Wherein, step 3 includes: Obtaining the number of edge pixel points included in the edge position of the object, and if the number of edge pixel points is not greater than the preset number of laser sub-beams, controlling the pre-deployed laser to directly measure the distance to the object, obtaining a first emission time of the laser beam emitted by the pre-deployed laser and obtaining a first average receiving time of the laser sub-beam received by the laser receiver, so as to determine a first laser detection time; Otherwise, controlling the pre-deployed laser to perform laser ranging on the object in the horizontal direction and the vertical direction, obtaining a second emission time set of the laser beam emitted by the pre-deployed laser in each horizontal direction and each vertical direction, and obtaining a second average receiving time of the corresponding laser receiver receiving the laser sub-beam, so as to determine a second laser detection time; When the laser detection time is not greater than the preset detection time, determining first distance data of the object based on the preset detection point according to the laser detection time and the propagation speed of the laser in the air; Otherwise, a preset laser pulse modulation signal of the laser is obtained, and mixed with the reception signals of each laser sub-beam received by the laser receiver, and second distance data of the object based on the preset detection point is determined according to the laser detection time, the propagation speed of the laser in the air, and the signal frequency of the mixed processing result; Determine the initial edge position of the object according to the edge position of the object and in combination with the distance data of the object based on the preset detection points; Determine the detection accuracy of the edge position according to a preset angle threshold, an angle range, an edge position of the object, and distance data of the object based on a preset detection point; ; Where, F is the detection accuracy of the edge position; Indicates the distance data of the i1th edge pixel based on the preset detection point; Indicates that when Gj1 is greater than maxGj1, output 1; otherwise, output 0; Gj1 represents the image gradient amplitude of the j1-th pixel of the object; maxGj1 represents the maximum image gradient amplitude of the neighborhood pixel points of the j1-th pixel point of the object; y represents the preset angle threshold; y1 represents the preset angle between the object and the pre-deployed angle sensor; y2 represents the actual angle between the object and the pre-deployed angle sensor; Indicates the influence weight of the edge pixel point on the detection accuracy of the edge position based on the distance data of the preset monitoring point; represents the influence weight of the angle on the detection accuracy of the edge position; n1 represents the number of edge pixels; m1 represents the number of pixels in the object image; c represents the propagation speed of the laser in the air; ti1 represents the laser detection time of the i1th edge pixel; t represents the preset laser detection time; wi1 represents the signal frequency when the i1th edge pixel performs laser ranging; B is the signal modulation bandwidth; SNR is the signal-to-noise ratio of the mixed processing result; (y01, y02) is the angle range; ln is the logarithmic function symbol; When the edge position detection accuracy is greater than the preset edge position accuracy, determining that the initial edge position of the object is consistent with the edge position of the object, and then taking the initial edge position as the edge position of the object; Otherwise, it is determined that there is an error between the initial edge position of the object and the edge position of the object, the edge position of the object is reacquired, and the preset angle threshold is adjusted according to the error rate to determine the edge position of the object.
Citation Information
Patent Citations
Learning accompanying method and device based on text corner detection, robot and medium
CN117745826A
Laser reflection type edge detection device and method
CN117805853A