CN112465892A - Improved RANSAC algorithm-based blast hole identification method - Google Patents

Improved RANSAC algorithm-based blast hole identification method Download PDF

Info

Publication number
CN112465892A
CN112465892A CN202011242222.6A CN202011242222A CN112465892A CN 112465892 A CN112465892 A CN 112465892A CN 202011242222 A CN202011242222 A CN 202011242222A CN 112465892 A CN112465892 A CN 112465892A
Authority
CN
China
Prior art keywords
points
model
radius
blast hole
distance
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.)
Pending
Application number
CN202011242222.6A
Other languages
Chinese (zh)
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.)
North Blasting Technology Co ltd
Original Assignee
North Blasting Technology Co ltd
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 North Blasting Technology Co ltd filed Critical North Blasting Technology Co ltd
Priority to CN202011242222.6A priority Critical patent/CN112465892A/en
Publication of CN112465892A publication Critical patent/CN112465892A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a blast hole identification method based on an improved RANSAC algorithm, and relates to a detection method of a circular blast hole. It includes: shooting a blast hole area to obtain an image, and randomly selecting a contour in the image; randomly taking three points in the contour, and solving corresponding circle center coordinates (x0, y0) and radius r according to the coordinates of the three points, namely a model; calculating the distance between other points in the contour and the center of the circle according to the obtained coordinates (x0, y0) of the center of the circle and the radius r, and if the difference between the distance between a certain point and the center of the circle and the radius r is less than shift, adding the point into a point set of the model; if the number of the midpoint in the set is more than sum, adding the model and the sum value into a candidate set; repeatedly circulating for k times, and selecting the model with the largest number of votes in the candidate set; the model is the blast hole. The invention can effectively reduce the cycle number, thereby improving the calculation efficiency.

Description

Improved RANSAC algorithm-based blast hole identification method
Technical Field
The invention relates to a detection method of a circular blast hole.
Background
With the progress of science and technology, 5G large-scale commercial application, particularly the emergence of intelligent mining equipment, requires to be unmanned in the blasting field, and the charging is an important link of blasting, and the key of the unmanned charging link lies in the rapid and accurate identification of a machine on-site blast hole. Since the blast holes are generally circular, from the viewpoint of machine vision, the blast holes are converted into circular recognition. The method is used for identifying the blast hole based on the improved RANSAC algorithm. The RANSAC algorithm is an algorithm commonly used in computer vision, and is often used in the calculation of matrices, and the RANSAC (random sample consensus) random sample consensus is an algorithm idea, proposed by Fischler and Bolles in 1981. The RANSAC algorithm has three assumptions:
there are correct points, i.e. local points, in the sample data.
There are points of error in the sample data, i.e. noise points, that may result from erroneous operation or calculation.
Third, there is a method of calculating the model assuming that the correct sample points are given.
And according to the RANSAC, noise points can be effectively removed, and the function of selecting the optimal sample point is used for finding the circle center. The flow is shown in figure 1. There is a further step of contour screening before the RANSAC circle test. Since the RANSAC algorithm is based on edge points on the contour. The number of contours found from binary images is usually very large. With very small profiles, profiles that are significantly out of round, outermost profiles, etc. These contours are all invalid contours, and it takes a lot of time to enter the phase of finding the center of a circle. Therefore, a screening of the contours must be performed.
The RANSAC algorithm detects the circle first step is to randomly select three points and then calculate the radius of the circle center, namely the model. If the selected point is not a point on a true circle, the correct model is not obtained. The method is important for randomly selecting sample points on random Hough transform, random circle detection and RANSAC, and is an important starting point for improving the algorithm, improving the precision and reducing the time. Some edge points in the same connected domain are selected on the basis of edge detection; some are based on a priori conditions, known radius or other conditions, etc.
When the radius is not known and edge detection is not needed, sampling is carried out on the basis of the selected contour, and the problem that random point selection is likely to be invalid is also faced. In the case of an irregular circular contour, when points are selected at random, the points are closer, and the points closer to each other usually have the same property, and the probability that all the points are outliers becomes higher, as shown in fig. 3.
In the screening, the center coordinates Z (a, B) and the coordinates of three points a (x1, y1), B (x2, y2) and C (x3, y3) are assumed to obtain the center coordinates (a, B) and the radius, but this results in too many loop calculations.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a shot hole identification method based on an improved RANSAC algorithm, which can obviously improve the RANSAC operation efficiency and precision. The technical scheme is as follows:
a shot hole identification method based on an improved RANSAC algorithm comprises the following steps:
the method includes the steps of shooting a blast hole area to obtain an image, and randomly selecting a contour in the image; (for example, take a picture with camera or high definition video acquisition instrument)
Secondly, randomly taking three points in the contour, and solving corresponding circle center coordinates (x0, y0) and a radius r according to the coordinates of the three points, namely a model;
thirdly, calculating the distance between other points in the contour and the circle center according to the obtained coordinates (x0, y0) of the circle center and the radius r, and if the difference between the distance between a certain point and the circle center and the radius r is less than shift (namely distance-radius | < shift, wherein shift is an allowed error and is an absolute value of the difference between the distance between the point on the contour and the circle center and the radius), adding the point into a point set of the model;
fourthly, if the number of the middle points in the set (namely the number of points in the data set which meet the model) is greater than sum (sum is the minimum value of the number of points which meet the model), adding the model and the sum value into the candidate set;
fifthly, repeatedly circulating the steps from the fifth step to the fourth step for k times (k is the minimum iteration number, namely the models for calculating several times; any value can be selected according to needs), and selecting the model with the largest candidate centralized voting number;
sixthly, the model is the blast hole.
Preferably, the step fifthly is: and performing least square fitting on the selected points on the model to obtain an accurate model, wherein the model is the blast hole.
Or more preferably, the shift is 1.
Or more preferably, the cycle interruption condition is 0.5 × total number of points of the contour.
Or more preferably, k is 30.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
the method comprises the steps of firstly screening according to the number of points and the area of the outline in the outline, and screening when the number of points and the area are smaller than a certain value. This value is typically determined by the size of the picture, the size of the circle in the picture. This value may also be a fixed value, e.g. 100, since the main purpose is to filter out fragmented small contours. Other large non-target contours, the outermost rectangular contour, cannot be removed, but contain many points, which is time consuming. Very small outline points can be screened out by the size and the number of the outline points; meanwhile, by combining the structural characteristics of the circle, edge detection is firstly carried out to determine coordinates of three points, and then the center coordinates of the circle are calculated, so that large outlines which are not circles can be screened out in advance, the cycle times can be effectively reduced, a large amount of time is saved, and the center of the circle is searched by using the RANSAC algorithm, so that the calculation efficiency is greatly improved.
Aiming at the defects of the RANSAC algorithm, the invention optimizes several items in the actual detection center of the round hole, so that the speed and the precision of detecting the round blast hole are greatly improved.
The method comprises the steps of randomly selecting points in a data set and adding constraint, namely, the distance between the points is larger than a certain value, and setting a distance threshold value shift, so that local points can be selected more, and effective circulation is promoted.
And secondly, adding cycle interruption in a link of randomly taking points to obtain an optimal model in the shortest time.
Setting an optimal threshold shift.
And selecting a point set meeting the optimal model, and performing one-time fine adjustment on the circle center by using least square fitting.
Drawings
FIG. 1 is a flow chart of the RANSAC algorithm detection circle in the prior art;
FIG. 2 is a flow chart of the modified RANSAC algorithm for detecting round blastholes in example 1;
fig. 3 is an irregular circular profile.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Example 1
A shot hole identification method based on an improved RANSAC algorithm comprises the following steps:
first, three points are randomly selected in one contour, and corresponding circle center coordinates (x) are obtained according to coordinates of the three points0,y0) And radius r, i.e. the model;
secondly, according to the obtained circle center coordinates (x)0,y0) And radius r, calculating the distance between other points in the contour and the circle center, and if the difference between the distance between a certain point and the circle center and the radius r is less than shift (namely distance-radius | < shift, wherein shift is an allowable error and is an absolute value of the difference between the distance between the point on the contour and the circle center and the radius), adding the point into a point set of the model;
if the number of the middle points in the set (namely the number of the points in the data set meeting the model) is greater than sum (sum is the minimum value meeting the number of the model points), adding the model and the sum value into the candidate set;
fourthly, repeatedly cycling steps of firstly, carrying out operation for three times (k is the minimum iteration number, namely, calculating models for several times;
and fifthly, taking the selected model as the blast hole.
Example 2
A shot hole identification method based on an improved RANSAC algorithm comprises the following steps:
first, three points are randomly selected in one contour, and corresponding circle center coordinates (x) are obtained according to coordinates of the three points0,y0) And radius r, i.e. the model;
secondly, according to the obtained circle center coordinates (x)0,y0) And radius r, calculating the distance between other points in the contour and the circle center, and if the difference between the distance between a certain point and the circle center and the radius r is less than shift (namely distance-radius | < shift, wherein shift is an allowable error and is an absolute value of the difference between the distance between the point on the contour and the circle center and the radius), adding the point into a point set of the model;
if the number of the middle points in the set (namely the number of the points in the data set meeting the model) is greater than sum (sum is the minimum value meeting the number of the model points), adding the model and the sum value into the candidate set;
fourthly, repeatedly cycling steps of firstly, carrying out operation for three times (k is the minimum iteration number, namely, calculating models for several times;
and fifthly, performing least square fitting on the selected points on the model to obtain an accurate model, wherein the model is the blast hole.
The most voted model is selected by voting in RANSAC and is not taken as the final model. Because the resulting model is derived from only three points in the contour, three points can be satisfied exactly, not necessarily for other points in the set of points.
Based on this situation, the present embodiment will satisfy the point set of the model, and then perform a least squares fit. The model with the most votes can be used as an output model, the point concentration of the model is satisfied, the probability of the local point is greatly improved compared with that before RANSAC, and least square fitting is performed for one time, which means that fine adjustment is performed on the basis of the model to accurately position the circle center.
Example 3
The RANSAC algorithm in the invention is based on point selection on the contour, and compared with edge extraction, the selected points naturally have constraints, namely are located in the same contour.
The operation of this embodiment is basically the same as that of embodiment 1, except that this embodiment additionally adds a constraint to make the distance between three randomly selected points greater than a certain value, i.e., sets a distance threshold shift.
This threshold value may be set to a fixed value. Three points are randomly taken on the outline of the circle, the distance threshold value cannot be larger than the diameter, and the radius of different Mark points is different and cannot be set too large. This value itself is used only to prevent the sample points from being too close, provided that they are not too close.
Taking the Mark point used in fig. 3 as an example, where the minimum radius is also greater than 100, the maximum radius is already greater than 400, and the selected distance threshold is applied to a random value within the interval (80, 100). Or based on the universality, a fixed distance threshold is not set, three points on the contour are randomly selected, 1/5 from the last two points to the first point of the contour is obtained, and the effect is the same as that of distance constraint. Experiments prove that after sampling is restrained, a correct model is obtained by using fewer times, and effective circulation is promoted. The local point can be selected in a shorter time to obtain the model.
Example 4
The RANSAC algorithm in example 1 iterates k times to select the model with the largest number of votes. And the number k of iterations can be calculated. W represents the effective point ratio.
W is the number of local points/number of data sets
Assuming that n points are needed for estimating a model parameter, the probability that the selected points are all local interior points is expanded, the probability that the selected n points are not all local interior points is 1-Wn, and the probability that n points are still local exterior points after k iterations is (1-W)n)kIterate k times, at least one selectionThe probability that the points of (1) are all local points is 1- (1-W)n)kP is the probability that the points obtained by the RANSAC algorithm are all local points, i.e., the probability that the model is correct. Then P is 1- (1-W)n)kFrom p, the value of k can be calculated.
Assuming that the source image has 50% noise, that is, W is 50%, P is the probability that all points acquired by the RANSAC algorithm are local points, that is, the probability that the model is correct, according to the previous probability calculation, and generally, the confidence P is greater than 95%.
Then P is 1- (1-W)n)k(n is 3, W is 50%), let n be 30, p>98 percent; n is 50 and P is about 99.87%. RANSAC adopts a mode of circularly and randomly taking points, so that the probability of taking correct points in 30 times of point taking is ensured to be 98%, namely all correct points are necessarily taken once, and the optimal model is obtained.
For the Mark point, when the shift is set to be 1, the detection circle center is accurate, the effect is stable, and the method is suitable for the circle center positioning of a plurality of Mark points. This is set as the optimum threshold value for detecting the Mark point in this embodiment.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (5)

1. A method for identifying a blast hole based on the improved RANSAC algorithm, the method comprising:
the method includes the steps of shooting a blast hole area to obtain an image, and randomly selecting a contour in the image;
secondly, randomly taking three points in the contour, and solving the corresponding circle center coordinate (x) according to the coordinates of the three points0,y0) And radius r, i.e. the model;
according to the obtained center coordinates (x)0,y0) And radius r, calculating the distance between other points in the contour and the circle center, if the difference between the distance between a certain point and the circle center and the radius r is less than shift (i.e. | distance-radius | < shift, wherein shift is an allowable error and is the distance between the point and the circle center on the contourThe absolute value of the difference between the distance from the center of the circle and the radius), then this point is added to the set of points of the model;
fourthly, if the number of the middle points in the set (namely the number of points in the data set which meet the model) is greater than sum (sum is the minimum value of the number of points which meet the model), adding the model and the sum value into the candidate set;
fifthly, repeatedly circulating the steps from the fifth step to the fourth step for k times (k is the minimum iteration number, namely the models for calculating several times; any value can be selected according to needs), and selecting the model with the largest candidate centralized voting number;
sixthly, the model is the blast hole.
2. The improved RANSAC algorithm-based borehole identification method according to claim 1, characterized in that the step of fifthly is: and performing least square fitting on the selected points on the model to obtain an accurate model, wherein the model is the blast hole.
3. A method for borehole identification based on the modified RANSAC algorithm as claimed in claim 1 or 2, characterized in that shift is 1.
4. A method for borehole identification based on the improved RANSAC algorithm as claimed in claim 1 or 2, characterized in that the cycle-out condition is given by 0.5 x total number of points of the profile.
5. A method for shot hole identification based on the modified RANSAC algorithm as claimed in claim 1 or 2, wherein k is 30.
CN202011242222.6A 2020-11-09 2020-11-09 Improved RANSAC algorithm-based blast hole identification method Pending CN112465892A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011242222.6A CN112465892A (en) 2020-11-09 2020-11-09 Improved RANSAC algorithm-based blast hole identification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011242222.6A CN112465892A (en) 2020-11-09 2020-11-09 Improved RANSAC algorithm-based blast hole identification method

Publications (1)

Publication Number Publication Date
CN112465892A true CN112465892A (en) 2021-03-09

Family

ID=74825308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011242222.6A Pending CN112465892A (en) 2020-11-09 2020-11-09 Improved RANSAC algorithm-based blast hole identification method

Country Status (1)

Country Link
CN (1) CN112465892A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108986126A (en) * 2018-06-15 2018-12-11 哈尔滨工业大学 The center of circle detection method of RANSAC algorithm is detected and improved based on Gauss curve fitting sub-pixel edge
CN109859206A (en) * 2019-02-28 2019-06-07 易思维(杭州)科技有限公司 A kind of extracting method of circular hole feature
CN109978901A (en) * 2019-03-07 2019-07-05 江苏亿通高科技股份有限公司 A kind of fast, accurately circle detection and circle center locating method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108986126A (en) * 2018-06-15 2018-12-11 哈尔滨工业大学 The center of circle detection method of RANSAC algorithm is detected and improved based on Gauss curve fitting sub-pixel edge
CN109859206A (en) * 2019-02-28 2019-06-07 易思维(杭州)科技有限公司 A kind of extracting method of circular hole feature
CN109978901A (en) * 2019-03-07 2019-07-05 江苏亿通高科技股份有限公司 A kind of fast, accurately circle detection and circle center locating method

Similar Documents

Publication Publication Date Title
US20190011263A1 (en) Method and apparatus for determining spacecraft attitude by tracking stars
CN104778688A (en) Method and device for registering point cloud data
CN102169581A (en) Feature vector-based fast and high-precision robustness matching method
CN109902619B (en) Image closed loop detection method and system
CN109493367A (en) The method and apparatus that a kind of pair of target object is tracked
CN114743259A (en) Pose estimation method, pose estimation system, terminal, storage medium and application
Liu et al. Dynamic RGB-D SLAM based on static probability and observation number
CN112649793A (en) Sea surface target radar trace condensation method and device, electronic equipment and storage medium
CN112085773A (en) Plane fitting method and device for removing local outliers
CN110163894B (en) Sub-pixel level target tracking method based on feature matching
CN112465892A (en) Improved RANSAC algorithm-based blast hole identification method
CN104881670A (en) Rapid target extraction method used for SAR azimuth estimation
CN112085759A (en) Straight line fitting method and device based on big data
CN115841496A (en) Contour extraction method and device for SEM image, computer equipment and storage medium
CN115908491A (en) On-line real-time tracking and matching method for circular non-coding mark points in binocular sequence image
CN110163273B (en) RANSAC algorithm-based image matching method with genetic factors
CN110930519B (en) Semantic ORB-SLAM sensing method and device based on environment understanding
CN113706505A (en) Cylinder fitting method and device for removing local outliers in depth image
CN112241975B (en) Matching positioning method and matching positioning device for feature templates
CN113658156A (en) Sphere fitting method and device for removing local outliers in depth image
CN116152277B (en) Map segmentation method and device, electronic equipment and medium
CN111639691A (en) Image data sampling method based on feature matching and greedy search
CN108447067A (en) It is a kind of that the visible images sea horizon detection method being fitted with RANSAC is cut out based on energy seam
CN114694013B (en) Distributed multi-machine cooperative vision SLAM method and system
CN117409275B (en) Multi-angle radar image processing method

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