CN109902696B - Dangerous chemical stacking distance measurement method based on segmented straight line fitting - Google Patents

Dangerous chemical stacking distance measurement method based on segmented straight line fitting Download PDF

Info

Publication number
CN109902696B
CN109902696B CN201910167046.5A CN201910167046A CN109902696B CN 109902696 B CN109902696 B CN 109902696B CN 201910167046 A CN201910167046 A CN 201910167046A CN 109902696 B CN109902696 B CN 109902696B
Authority
CN
China
Prior art keywords
angular
point
points
corner
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910167046.5A
Other languages
Chinese (zh)
Other versions
CN109902696A (en
Inventor
刘学君
袁碧贤
晏涌
魏宇晨
张哲闻
李新彤
陈海峰
黄泽辰
熊剑宇
李翠清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Petrochemical Technology
Original Assignee
Beijing Institute of Petrochemical Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Petrochemical Technology filed Critical Beijing Institute of Petrochemical Technology
Priority to CN201910167046.5A priority Critical patent/CN109902696B/en
Publication of CN109902696A publication Critical patent/CN109902696A/en
Application granted granted Critical
Publication of CN109902696B publication Critical patent/CN109902696B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to a dangerous chemical stacking distance measurement method based on piecewise linear fitting, which comprises the following steps: the method comprises the steps of carrying out image acquisition on the stack of the hazardous chemical substance, carrying out angular point detection on the acquired image, carrying out de-noising processing on the detected angular point, carrying out piecewise linear fitting on the de-noised angular point, extracting effective angular points according to intersection points obtained by fitting and the de-noised angular points, and carrying out distance measurement on the stack of the hazardous chemical substance by using the extracted effective angular points. Aiming at the key problem of effective angular point extraction of binocular vision ranging, the Shi-Tomasi angular point detection and the improved segmented line fitting are combined, and a line intersection point obtained after the segmented line fitting is supplemented as an effective angular point, so that the problems of false angular points and angular point omission in the conventional angular point detection method are solved, the detection accuracy of the stacking angular points of hazardous chemicals is improved, and the ranging error is reduced.

Description

Dangerous chemical stacking distance measurement method based on segmented straight line fitting
Technical Field
The invention relates to a dangerous chemical stacking distance measurement method, in particular to a dangerous chemical stacking distance measurement method based on piecewise linear fitting.
Background
Along with the development of society, the demand of dangerous chemical warehouse is more and more, and because dangerous chemicals have the characteristics of flammability, explosiveness, easy corrosion and the like, the dangerous chemicals have serious potential safety accident hazard in the warehouse, and the safety of personnel and cities is concerned. Therefore, the monitoring and early warning of the safe storage state of the goods in the hazardous chemical substance warehouse are particularly important. At present, a mode of stacking and stacking hazardous chemical substances is generally adopted in a hazardous chemical substance warehouse, the stack of hazardous chemical substances mostly consists of standard cuboid and cube boxes and has the basic characteristics of line segments and angular points, and the safe 5-distance stack distance, the wall distance, the column distance, the lamp distance and the beam distance of the stack of hazardous chemical substances are important factors for monitoring the safe storage distance of the hazardous chemical substance warehouse. For the corner detection problem, related researchers have researched various detection methods, such as a feature From Acquired Segment Test (FAST) corner detection algorithm proposed by rossen E, etc., in 2006, which is well known for rapidity and is suitable for image processing with high real-time requirements, but the FAST algorithm can only detect a single type of corner, and corner omission occurs. Awrangjeb and Lu propose an angular point detection algorithm with multiple chord lengths based on chord-to-point distance accumulation (CPDA), and the noise has better robustness. The Harris operator is ideal for extracting the corner points, and has the difficulties of fixed size and difficult setting of threshold. In recent years, binocular vision three-dimensional detection technology is widely applied to the field of distance measurement, and the monitoring of safe storage distance in a warehouse based on binocular vision distance measurement has important research significance for carrying out potential safety hazard technical supervision on dangerous chemical warehouses.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a hazardous chemical substance stacking distance measurement method based on segmented straight line fitting, which solves the problems of false angular points and angular point omission in the conventional angular point detection method, so as to improve the detection accuracy of the hazardous chemical substance stacking angular points and reduce the distance measurement error.
The purpose of the invention is realized by adopting the following technical scheme:
a dangerous chemical stacking ranging method based on piecewise linear fitting comprises the following steps:
carrying out image acquisition on the stack of the hazardous chemical substances;
carrying out corner detection on the acquired image to obtain a corner detection image;
denoising the angular point detection image to obtain an angular point denoising image;
performing piecewise linear fitting on the angular points in the angular point denoising image to obtain intersection points of fitted lines;
extracting effective angular points by using the intersection points of the fitted straight lines and the angular points in the angular point denoising image;
and measuring the distance of the stack of the hazardous chemicals by using the effective angle points.
Further, the performing corner detection on the acquired image includes: and performing corner detection on the acquired image by adopting a Shi-Tomasi corner detection algorithm.
Further, the denoising processing is performed on the corner detection image, and the denoising processing includes: denoising the detection angular point image by adopting a K neighborhood algorithm so as to remove angular points outside the dangerous chemical stack and inside the dangerous chemical stack in the detection angular point image and only reserve the angular points on the edge of the dangerous chemical stack.
Further, the performing piecewise linear fitting on the corners in the corner denoising image includes: firstly, grouping the angular points in the angular point denoising image, then respectively performing linear fitting on each group of grouped angular points, and calculating to obtain the intersection points of the fitted linear lines.
Further, grouping the corners in the corner denoised image includes:
establishing three containers for respectively storing the length, width and height slopes of the dangerous chemical stacks, wherein each container comprises a plurality of sub-containers;
selecting an angular point ai from angular points in the angular point denoising image, and establishing a 9 multiplied by 9 neighborhood range of the angular point ai by taking the angular point ai as a center;
judging whether the angular point ai has other new angular points in the neighborhood range, if so, calculating the slope k of the two angular points, and storing the two angular points into the sub-containers of the container meeting the slope according to the slope k; if not, continuously detecting the next angular point;
and when the slope of the detection corner point meets one of the length, width and height slopes, but no other new corner point exists in the neighborhood range of the corner point, opening a new sub-container in the container meeting the slope of the corner point.
Further, the performing linear fitting on each group of corner points after grouping respectively includes: and respectively performing linear fitting on each group of angular points after grouping by adopting a least square method.
Further, the extracting effective corner points by using the intersection points of the fitted straight lines and the corner points in the corner point denoising image includes:
judging whether the intersection point of the straight line obtained after fitting is an angular point, if so, judging the intersection point to be an effective angular point and storing; if not, selecting any angular point on the straight line of the intersection point, taking the angular point as the circle center, taking i (i >0) as the radius to make a circle, continuously enlarging the radius, stopping enlarging the radius when detecting that the circle comprises two intersection points positioned at two sides of the circle center, judging that the two intersection points in the circle are effective angular points and storing.
Further, the distance measurement of the stack of hazardous chemicals by using the effective angle point comprises:
among the n effective corner points, the corner point a1 and the other corner point a2 of the straight line where the corner point a 3578 is located are detected, the distance d1 is measured, the corner point a2 and the other corner point a3 of the straight line where the corner point a2 is located are detected, the distance d2 is measured, and the like, and the distances between all the effective corner points are measured.
Further, before distance measurement, internal and external parameters of the camera are calibrated and image matching is carried out by adopting a Zhang calibration method and a SURF stereo matching algorithm.
Furthermore, a binocular camera is adopted to acquire images of the dangerous chemical stacks.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
the dangerous chemical stacking angular point detection and ranging method is a method for monitoring safe storage distance in a warehouse based on binocular vision ranging, and the binocular vision ranging is non-contact measurement and can be used for carrying out technical supervision on potential safety hazards of a dangerous chemical warehouse. The method combines a Shi-Tomasi angular point detection algorithm and a segmented line fitting algorithm, utilizes a line intersection obtained after segmented line fitting to perform feedback judgment on angular points subjected to Shi-Tomasi detection and K neighborhood denoising, can remove false angular points influencing distance detection, find back missing effective angular points and effectively remove noise points so as to extract effective angular points required by ranging, and is verified that the angular point detection accuracy of the method reaches over 80 percent and the distance error is within 2cm, so that the method improves the extraction accuracy of the effective angular points in distance measurement, has higher precision compared with the traditional detection method, and has original important research significance on subsequent stereo matching, distance monitoring and three-dimension.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a hazardous chemical stacking ranging method based on piecewise linear fitting;
FIG. 2 is a schematic diagram of the distribution of corner points detected by the Shi-Tomasi algorithm;
FIG. 3 is a 9 × 9 neighborhood of corner points;
FIG. 4 is a flow chart of a piecewise linear fitting method;
FIG. 5 is a flow chart of a valid corner determination method;
FIG. 6a is a schematic view of an edge corner point;
FIG. 6b is a schematic view of edge corners with added intersections;
FIG. 6c is a schematic diagram of effective corner extraction at non-intersection positions;
fig. 7a is a schematic diagram of an extracted effective corner point;
FIG. 7b is a schematic diagram of effective angular point ranging;
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
First preferred embodiment:
in view of the fact that the conventional corner point detection algorithm is prone to problems of corner point omission, false corner points and the like, and accurate dangerous chemical stacking ranging information cannot be obtained, the invention provides a dangerous chemical stacking ranging method based on piecewise linear fitting, and fig. 1 is a flow chart of the dangerous chemical stacking ranging method based on piecewise linear fitting, and as shown in fig. 1, the method specifically comprises the following steps:
carrying out image acquisition on the stack of the hazardous chemical substances;
performing corner detection on the acquired image by adopting a Shi-Tomasi corner detection algorithm to obtain a corner detection image;
denoising the corner detection image by adopting a K neighborhood algorithm to obtain a corner denoising image;
performing piecewise linear fitting on the angular points in the angular point denoising image to obtain linear intersection points;
extracting effective angular points required by ranging according to the straight line intersection and the angular points in the angular point denoising image;
and measuring the distance of the dangerous chemical stacks by using the extracted effective angular points.
The invention provides a Shi-Tomasi corner point detection and segmented line fitting combined algorithm, which aims at the problem of effective corner point extraction of binocular vision ranging. According to the method, the intersection point of the fitting straight line is supplemented as the effective angular point, so that the detection accuracy of the dangerous chemical stacking angular point can be improved, and the distance measurement error can be reduced.
Second preferred embodiment:
a corner point is usually defined as the intersection of two or more edges, strictly speaking a local neighborhood of a corner point has boundaries of two different regions in different directions. Then for an image, if a small change in any direction at a certain point in the image causes a large change in gray scale, we refer to it as a corner point. Most of the current image corner detection methods detect image points with specific features, which have specific coordinates in the image and have some mathematical features, such as local maximum or minimum gray scale, some gradient features, etc. The Shi-Tomasi corner point detection algorithm is a method for obtaining image characteristics in a computer vision system, and the basic idea is to use a fixed window to slide on an image in any direction, judge whether the window is a corner point by comparing the gray level change degrees of image pixels in the window before and after sliding, and judge whether the gray level of the image pixels in the window is changed in all directions at the corner point, so that the corner point can be obtained by calculating and finding a pixel point corresponding to the local maximum of a first derivative (namely the gradient of the gray level), and the derivative is sensitive to noise. The specific calculation process is as follows:
assuming that the pixel value of the gray image at the point (x, y) is I (x, y), an n × n window is established with the point (x, y) as the center, and the gray variation of the pixel generated after the window is shifted by [ u, v ] can be represented as:
Figure BDA0001986668360000061
in the formula, w (x, y) is a window function, the window function is expressed by a binary gaussian function, and [ u, v ] is an offset of the window.
Taylor expansion is performed on equation (1) to obtain:
Figure BDA0001986668360000062
in the formula IxAnd IyThe partial derivatives of the gray scale image in the x and y directions, respectively.
The matrix in equation (2) is a covariance matrix, denoted by M:
Figure BDA0001986668360000071
obtained according to formulas (1) to (3):
Figure BDA0001986668360000072
by calculating the eigenvalue of the matrix M, if the smaller of the two calculated eigenvalues is greater than the minimum threshold, a strong corner point will be obtained.
The third preferred scheme is as follows:
since the corner points obtained by the Shi-Tomasi algorithm are detected, there are some false corner points, i.e., noise points, as shown in fig. 2, the Shi-Tomasi algorithm detects a corner point distribution diagram, and the corner points detected by the Shi-Tomasi algorithm can be classified into three categories, i.e., outside the goods, inside the goods, and on the edges of the goods. In fig. 2, the category I is the outer corner points of the goods, the category II is the inner corner points of the goods, the category III is the overlapping parts and belongs to the inner corner points of the goods, and the category III is the edge corner points of the goods. In fig. 2, the lower solid line part is the target cargo, i.e. the cargo whose size needs to be measured, and for the target cargo, the part ((c) -c) in the figure is noise and (c) is the effective angular point. Because noise points can cause bad influence on linear fitting, the method adopts a K neighborhood algorithm to carry out denoising processing on the detected angular points so as to remove the angular points outside the stack of the hazardous chemical substance and inside the stack of the hazardous chemical substance in the image of the detected angular points and only reserve the angular points on the edge of the stack of the hazardous chemical substance. Typically 90% of the noise is distributed inside and outside the stack of hazardous chemicals, so the detected corner point image can be converted into a standard binary image with pixel values containing only 0 and 1 to remove the noise, where black pixel values are 0 and white pixel values are 1, and then the noise pixel values are 0 or 1. The specific denoising process is as follows:
establishing a 9 × 9 neighborhood map shown in fig. 3 by taking the corner (x, y) as a center, wherein the 9 × 9 neighborhood map is a neighborhood range of the corner (x, y);
calculating the pixel average value in the neighborhood range of the angular point (x, y), and judging the position of the angular point according to the calculated pixel information value, wherein the calculation formula of the pixel average value is as follows:
Figure BDA0001986668360000073
in the formula Ii(x,y)Pixel information values in the neighborhood range of the angular points (x, y) are obtained, and n is the number of the angular points;
if the calculated pixel average value is between 0 and 0.2), the corner point is a cargo outer corner point; if the calculated pixel average value is between 0.2 and 0.8, the corner point is a goods edge corner point; if the calculated pixel average value is between (0.8-1), the corner point is an inner corner point of the goods;
deleting corner points inside and outside the goods, with the pixel average value between 0-0.2 and 0.8-1, such as the positions of (r) and (r) in the graph 2, deleting the corner points at the positions, and keeping the corner points at the edges of the goods, with the pixel average value between 0.2-0.8, such as the corner points at the positions of (c) in the graph 2, keeping the corner points.
Fourth preferred embodiment:
after the K neighborhood denoising of the corner detection image is completed, the problem that the denoised corner image still has the corner redundancy and the corner loss is found, and all effective corners can be known to be straight line intersection points through analysis. Generally, in the process of piecewise linear fitting, linear fitting is performed on a segment from a head point to a tail point in a plurality of point sets according to different slopes from front to back, but for dangerous chemical warehouse goods, a detected angular point is a plurality of closed point sets, and the conventional piecewise linear fitting cannot meet the requirements of the invention. In order to perform piecewise linear fitting on the corner points of the edges of the stacks of the hazardous chemical substances reserved in the denoised images of the corner points, the invention firstly groups the corner points in the denoised images of the corner points according to the slope range of the boundaries of the stacks of the hazardous chemical substances, then respectively performs linear fitting on each group of the grouped corner points by adopting a least square method, and calculates to obtain the intersection points of all the straight lines. The flow chart of the piecewise straight line fitting method shown in fig. 4 specifically includes:
1. corner point grouping
Firstly, three containers K1, K2 and K3 are established, and slope ranges corresponding to the lengths, the widths and the heights of the stacks of the hazardous chemical substances are respectively stored, wherein the slope range of a straight line of the lengths of the stacks of the hazardous chemical substances is K1 epsilon [0.23,0.4], the slope range of a straight line of the widths of the stacks of the hazardous chemical substances is K2 epsilon [ 1.9, -1], the slope range of a straight line of the heights of the stacks of the hazardous chemical substances is K3 epsilon [ - ∞, -0.9], [6, + ], and each container comprises a plurality of sub containers h1, h 2.
Selecting an angular point ai from all the angular points subjected to denoising, establishing a 9 x 9 neighborhood range of the angular point ai by taking the angular point ai as a center, judging whether other new angular points exist in the neighborhood range of the angular point ai, if so, solving the slope k of the two angular points, and storing the two angular points into a sub-container of a container meeting the slope range according to the slope k; if not, continuously detecting the next angular point; and when the slope of the detection corner point meets one of the length, width and height slopes, but no other new corner point exists in the neighborhood range of the corner point, opening a new sub-container in the container meeting the slope of the corner point. For example, if the slope of a straight line between two corner points satisfies a high slope range, but the corner point cannot detect other new corner points in a neighborhood range, and the corner point is proved not to be at the current high position, a new sub-container is opened in the container storing the corner point, and if the slope is judged to satisfy the second high position by calculation, the corner point is stored in the newly opened sub-container. After the angular points are grouped, the points on the stack can be classified into various types, and the angular points of different types cannot be fitted, so that the fitting complexity can be greatly reduced, and the accuracy of straight line fitting is improved.
2. Straight line fitting
Then, a least square method is adopted to respectively perform straight line fitting on each group of angular points after grouping, and the specific calculation process is as follows:
given corner point (x)i,yi) And calculating an approximate curve as:
Figure BDA0001986668360000091
let the first order polynomial of the line be:
y=kx+b (7)
the deviation is calculated according to equations (6) to (7) as
Figure BDA0001986668360000092
Taking the integral error into consideration, taking the square sum of the formula (8) to obtain the square deviation sum as:
Figure BDA0001986668360000093
the partial derivatives are calculated for each variable in equation (9) so that the partial derivative value is 0, and the minimum sum of squared deviations is calculated:
Figure BDA0001986668360000094
Figure BDA0001986668360000095
and (3) calculating the values of k and b, and further calculating a linear analytical formula after fitting as follows:
Figure BDA0001986668360000101
wherein k is a slope of a straight line, and b is a constant;
and calculating the fitting straight line analytic expression to obtain N intersection points of the straight line.
Fifth preferred embodiment:
after the piecewise linear fitting is completed, an accurate linear intersection point is obtained. Then, extracting effective corners required for ranging according to the straight line intersection points and the corners in the corner de-noising image, where fig. 5 is a flowchart of an effective corner extraction method, as shown in fig. 5, the method includes:
firstly, judging whether a straight line intersection point i is an angular point, if so, judging that the straight line intersection point i is an effective angular point and storing; if the two intersection points are not the angular points, selecting any angular point j on the straight line where the straight line intersection point i is located, taking the angular point j as the center of the circle and r (r >0) as the radius to make a circle, continuously enlarging the radius, stopping enlarging the radius when detecting that the circle comprises the two intersection points, judging the two intersection points in the circle as effective angular points and storing the two intersection points. And repeating the process to finish the extraction of all effective corner points. For example, the edge corner schematic diagram shown in fig. 6(a) shows that the effective corner is not completely extracted and there is a redundant corner as shown in fig. 6(a), and fig. 6(b) is an edge corner schematic diagram with an intersection added, and it can be seen from fig. 6(b) that the effective corner is completely extracted, but the redundant corner causes interference, where the detection position of both the corner and the intersection is necessarily the effective corner, so the present invention extracts the coincident point of the straight line intersection and the corner as the effective corner. Fig. 6(c) is a schematic diagram of extracting effective corner points at non-intersection positions, as shown in fig. 6(c), when a detected corner point is not a straight intersection point, the currently detected corner point is used as a circle center, r (r >0) is used as a radius to make a circle, the radius is continuously enlarged, when the circle comprises two intersection points, and the two intersection points are located at two sides of the circle center, then the circle stops enlarging, the two intersection points are used as effective corner points and extracted, and thus, the extraction of 6 effective corner points required by the dangerous chemical product stack is completed.
Sixth preferred embodiment:
and then distance measurement is carried out by utilizing the extracted effective corner points. The distance measurement is carried out by taking the schematic diagram of the effective angular points shown in fig. 7a as an example, and as can be seen from fig. 7a, the distance of line segments between the angular points is the length, the width and the height of the goods. Fig. 7b is a schematic diagram of effective corner point distance measurement, and as shown in fig. 7b, among 6 effective corner points, first, a corner point a1 located at the first position and a corner point a2 located at the second position of a straight line are detected, the detected distance is d1, the effective corner points rotate counterclockwise, a corner point a2 and a corner point a3 located at the third position of the straight line are detected, the detected distance is d2, and so on, the distances between all the corner points can be measured.
Seventh preferred embodiment:
in order to verify the effectiveness of the method, a2 x 1m simulation warehouse environment is built, in a laboratory environment, 100 groups of different stacking combinations are formed by 100 x 100mm boxes and 80 x 80mm boxes, and the four top corners of the simulation warehouse are respectively provided with 200-ten-thousand-pixel CMOS binocular cameras for image capture of the box stacks, so that the image processing of 100 groups of different stacking combinations is completed. In the experimental process, the size of the pixel of the image collected by the invention is 640 x 480, the collected image is sequentially subjected to Shi-Tomasi angular point detection, noise point removal by a K neighborhood method and piecewise linear fitting, and the intersection point and the box body are basically at the same position as can be seen from the fitting result. And then, carrying out size measurement on the stack of the hazardous chemical substance, wherein factors influencing measurement results mainly comprise errors of calibrating internal and external parameters of the camera, errors existing in stereo matching, deviation of angular points and the like, so that the internal and external parameters of the camera are calibrated and image matching is carried out by adopting a Zhang calibration method and an SURF stereo matching algorithm, and the distance measurement results are shown in table 1.
TABLE 1 distance measurement results
Distance between two adjacent plates Actual size/cm Detection size/cm
①-② 10 11.53
②-③ 20 18.96
③-④ 20 20.86
④-⑤ 10 15.36
⑤-⑥ 20 21.60
⑥-① 20 19.53
As can be seen from Table 1, the method has the corner detection accuracy of over 80 percent and the measurement error range of basically within 2 cm.
Eighth preferred embodiment:
in order to verify the detection effect of the method, the corner detection algorithm of the invention is compared with Shi-Tomasi corner detection algorithm, subpixel level corner detection algorithm and Harris corner detection algorithm in experiments. The CPU of the test computer is Intel CORE i 77500U, the memory is 16GB, the operating system is Windows 10, and the test computer is realized by Opencv + Visual Studio2013 programming. After a large number of experiments and statistical analysis, 100 groups of pictures were randomly selected for comparison experiments, and the evaluation results are shown in table 2.
TABLE 2 Algorithm comparison results
Algorithm Angular point rate of erroneous determination/%) Missing corner rate/%) Rate of correct corner% time/mS
Shi-Tomasi 90.87 45.19 54.81 568
Sub-pixel level 87.37 45.18 54.82 217
Harris 43.23 67.72 32.28 270
Method for producing a composite material 36.52 19.44 80.56 153
The data in table 2 is an average value of 100 groups of pictures, and the misjudgment angular point rate is calculated by the ratio of the number of misjudgment angular points to the number of angular points to be detected; the missing angular point rate is calculated by the ratio of the number of missing angular points to the number of angular points to be detected; the correct angular point rate is calculated by the ratio of the number of correct angular points to the number of angular points to be detected. As can be seen from Table 2, the algorithm reduces most of the noise, the points obtained by intersection after straight line fitting make up for the missing corner points, the average correct corner point rate reaches more than 80%, and when the number of effective corner points is small, the correct corner point rate can reach 100%.
The experimental results show that the Shi-Tomasi corner detection and the improved piecewise linear fitting are combined, so that the extraction accuracy of the effective corner in distance measurement is improved, and the precision of the algorithm is further improved by combining the K neighborhood denoising method and linear intersection feedback judgment.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (9)

1. A dangerous chemical stacking distance measurement method based on piecewise linear fitting is characterized by comprising the following steps:
carrying out image acquisition on the stack of the hazardous chemical substances;
carrying out corner detection on the acquired image to obtain a corner detection image;
denoising the angular point detection image to obtain an angular point denoising image;
performing piecewise linear fitting on the angular points in the angular point denoising image to obtain intersection points of fitted lines;
extracting effective angular points by using the intersection points of the fitted straight lines and the angular points in the angular point denoising image;
measuring the distance of the stack of the hazardous chemical substances by using the effective angle points;
the method for extracting the effective angular points by using the intersection points of the fitted straight lines and the angular points in the angular point denoising image comprises the following steps:
judging whether the intersection point of the straight line obtained after fitting is an angular point, if so, judging the intersection point to be an effective angular point and storing; if the intersection points are not the angular points, selecting any angular point on a straight line where the intersection points are located, taking the angular point as a circle center, taking i as a radius to make a circle, wherein i is greater than 0, continuously enlarging the radius, stopping enlarging the radius when detecting that the circle comprises two intersection points positioned at two sides of the circle center, judging that the two intersection points in the circle are effective angular points, and storing.
2. The range finding method of claim 1, wherein the performing corner point detection on the captured image comprises: and performing corner detection on the acquired image by adopting a Shi-Tomasi corner detection algorithm.
3. The range finding method according to claim 1, wherein the denoising processing is performed on the corner detection image, and comprises: denoising the detection angular point image by adopting a K neighborhood algorithm so as to remove angular points outside the dangerous chemical stack and inside the dangerous chemical stack in the detection angular point image and only reserve the angular points on the edge of the dangerous chemical stack.
4. The range finding method of claim 1, wherein the piecewise linear fitting of the corners in the denoised image of the corners comprises: firstly, grouping the angular points in the angular point denoising image, then respectively performing linear fitting on each group of grouped angular points, and calculating to obtain the intersection points of the fitted linear lines.
5. The method of claim 4, wherein the grouping of the corners in the denoised image of corners comprises:
establishing three containers for respectively storing the length, width and height slopes of the dangerous chemical stacks, wherein each container comprises a plurality of sub-containers;
selecting an angular point ai from angular points in the angular point denoising image, and establishing a 9 multiplied by 9 neighborhood range of the angular point ai by taking the angular point ai as a center;
judging whether the angular point ai has other new angular points in the neighborhood range, if so, calculating the slope k of the two angular points, and storing the two angular points into the sub-containers of the container meeting the slope according to the slope k; if not, continuously detecting the next angular point;
and when the slope of the detection corner point meets one of the length, width and height slopes, but no other new corner point exists in the neighborhood range of the corner point, opening a new sub-container in the container meeting the slope of the corner point.
6. The distance measuring method according to claim 4, wherein the step of respectively fitting straight lines to each group of grouped corner points comprises: and respectively performing linear fitting on each group of angular points after grouping by adopting a least square method.
7. The method of claim 1, wherein the using the effective angle point to perform distance measurement on the stack of hazardous chemicals comprises:
among the n effective corner points, the corner point a1 and the other corner point a2 of the straight line where the corner point a 3578 is located are detected, the distance d1 is measured, the corner point a2 and the other corner point a3 of the straight line where the corner point a2 is located are detected, the distance d2 is measured, and the like, and the distances between all the effective corner points are measured.
8. The distance measuring method according to claim 1, wherein before the distance measurement, the inside and outside parameters of the camera are calibrated and image matching is performed using a tensor calibration method and a SURF stereo matching algorithm.
9. The distance measuring method according to claim 1, wherein a binocular camera is used for image acquisition of the stack of the hazardous chemical substances.
CN201910167046.5A 2019-03-06 2019-03-06 Dangerous chemical stacking distance measurement method based on segmented straight line fitting Active CN109902696B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910167046.5A CN109902696B (en) 2019-03-06 2019-03-06 Dangerous chemical stacking distance measurement method based on segmented straight line fitting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910167046.5A CN109902696B (en) 2019-03-06 2019-03-06 Dangerous chemical stacking distance measurement method based on segmented straight line fitting

Publications (2)

Publication Number Publication Date
CN109902696A CN109902696A (en) 2019-06-18
CN109902696B true CN109902696B (en) 2021-01-15

Family

ID=66946482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910167046.5A Active CN109902696B (en) 2019-03-06 2019-03-06 Dangerous chemical stacking distance measurement method based on segmented straight line fitting

Country Status (1)

Country Link
CN (1) CN109902696B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114777702B (en) * 2022-04-22 2024-03-12 成都市绿色快线环保科技有限公司 Stacked plate volume identification method, device and system thereof
CN116359974B (en) * 2023-04-20 2023-08-04 杭州湘亭科技有限公司 Method for processing uranium radioactive pollution detection data in pipeline

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101261115A (en) * 2008-04-24 2008-09-10 吉林大学 Spatial circular geometric parameter binocular stereo vision measurement method
CN103499337A (en) * 2013-09-26 2014-01-08 北京航空航天大学 Vehicle-mounted monocular camera distance and height measuring device based on vertical target
CN103996045A (en) * 2014-06-04 2014-08-20 南京大学 Multi-feature fused smoke identification method based on videos

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6079333B2 (en) * 2013-03-15 2017-02-15 株式会社リコー Calibration apparatus, method and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101261115A (en) * 2008-04-24 2008-09-10 吉林大学 Spatial circular geometric parameter binocular stereo vision measurement method
CN103499337A (en) * 2013-09-26 2014-01-08 北京航空航天大学 Vehicle-mounted monocular camera distance and height measuring device based on vertical target
CN103996045A (en) * 2014-06-04 2014-08-20 南京大学 Multi-feature fused smoke identification method based on videos

Also Published As

Publication number Publication date
CN109902696A (en) 2019-06-18

Similar Documents

Publication Publication Date Title
CN105184801B (en) It is a kind of based on multi-level tactful optics and SAR image high-precision method for registering
CN106951879B (en) Multi-feature fusion vehicle detection method based on camera and millimeter wave radar
CN107610176B (en) Pallet dynamic identification and positioning method, system and medium based on Kinect
CN103425988B (en) Real-time positioning and matching method with arc geometric primitives
CN109902696B (en) Dangerous chemical stacking distance measurement method based on segmented straight line fitting
CN109727273B (en) Moving target detection method based on vehicle-mounted fisheye camera
CN111007531A (en) Road edge detection method based on laser point cloud data
CN115546202B (en) Tray detection and positioning method for unmanned forklift
CN111242000A (en) Road edge detection method combining laser point cloud steering
CN103295232A (en) SAR (specific absorption rate) image registration method based on straight lines and area
CN114488194A (en) Method for detecting and identifying targets under structured road of intelligent driving vehicle
CN110211178B (en) Pointer instrument identification method using projection calculation
CN107194896B (en) Background suppression method and system based on neighborhood structure
CN104537367A (en) VIN code checking method
CN103679720A (en) Fast image registration method based on wavelet decomposition and Harris corner detection
CN116051822A (en) Concave obstacle recognition method and device, processor and electronic equipment
CN103778411A (en) Circle detection method and device based on raster image division
CN104077769A (en) Error matching point pair removing algorithm in image registration
CN112132875A (en) Multi-platform point cloud matching method based on surface features
CN116310837A (en) SAR ship target rotation detection method and system
CN111695548B (en) High-voltage line detection method based on millimeter wave radar
CN103337080A (en) Registration technology of infrared image and visible image based on Hausdorff distance in gradient direction
Dos Santos et al. Building boundary extraction from LiDAR data using a local estimated parameter for alpha shape algorithm
CN109785388B (en) Short-distance accurate relative positioning method based on binocular camera
Xu et al. A method of 3d building boundary extraction from airborne lidar points cloud

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant