Questions tagged [ransac]

RANSAC is an abbreviation for "RANdom SAmple Consensus". It is an iterative method to estimate parameters of a mathematical model from a set of observed data which contains outliers. It is a non-deterministic algorithm in the sense that it produces a reasonable result only with a certain probability, with this probability increasing as more iterations are allowed.

The input to the RANSAC algorithm is a set of observed data values, a parameterized model which can explain or be fitted to the observations, and some confidence parameters.

RANSAC achieves its goal by iteratively selecting a random subset of the original data. These data are hypothetical inliers and this hypothesis is then tested as follows: A model is fitted to the hypothetical inliers, i.e. all free parameters of the model are reconstructed from the inliers.

All other data are then tested against the fitted model and, if a point fits well to the estimated model, also considered as a hypothetical inlier. The estimated model is reasonably good if sufficiently many points have been classified as hypothetical inliers.

The model is reestimated from all hypothetical inliers, because it has only been estimated from the initial set of hypothetical inliers.

Finally, the model is evaluated by estimating the error of the inliers relative to the model.

This procedure is repeated a fixed number of times, each time producing either a model which is rejected because too few points are classified as inliers or a refined model together with a corresponding error measure. In the latter case, we keep the refined model if its error is lower than the last saved model.

Source: Wikipedia

167 questions
6
votes
3 answers

Using estimateRigidTransform instead of findHomography

The example in the link below is using findHomography to get the transformation between two sets of points. I want to limit the degrees of freedom used in the transformation so want to replace findHomography with…
Tom smith
  • 670
  • 2
  • 15
  • 31
6
votes
1 answer

RANSAC for spline fitting

I am wondering if there is any way to create a model that can be used in a RANSAC scheme where a spline or polyline could be determined from a noisy 3D point cloud. What I have is a volume containing a set of points in each XY-plane, having say 400…
tompish
  • 79
  • 3
5
votes
3 answers

find robust fit of a model function in noisy signal

I have a noisy signal and a model function, for example: x=linspace(0,20); w=[2 6 -4 5]; y=w(1)*besselj(0,x)+w(2)*besselj(1,x)+w(3)*besselj(2,x)+w(4)*besselj(3,x); y(randi(length(y),[1 10]))=10*rand(1,10)-5; plot(x,y,'x') I thought to use RANSAC…
bla
  • 25,846
  • 10
  • 70
  • 101
5
votes
1 answer

Ground plane detection and removal for the localization of robot in 3D data

I am using the SACSegmentation from PCL segmentation module in order to filter out the groundplane. The method is fitting the front surface of the 3D object instead of fitting the groundplane as shown in 2nd pcd file below. Any suggestions what…
5
votes
1 answer

Find sinusoidal lines via RANSAC

I have a set of points that I need to group using their vicinity to the respective sinusoidal lines. I tried to determine the lines using a standard Hough transform, but that doesn't solve the problem (only a few lines are detected). I'd like to…
albus_c
  • 6,292
  • 14
  • 36
  • 77
5
votes
1 answer

RANSAC for cuboid

I have been able to successfully implement RANSAC on a 3D point cloud for the usual models, i.e. a sphere, line, plane. However, I'm having a hard time wrapping my head around how to do it for a cuboid, specifically just a 3d box. I'm unsure how to…
user26302
  • 190
  • 1
  • 11
5
votes
2 answers

Up to scale in 3D triangulation using epipolar geometry

I'm currently working on a project in which I have to estimate 3D coordinates of 2D interest points detected using a monocular camera. To be more precise, I have in input an image sequence (calibrated) and it is required, when receiving a new image,…
user75
  • 123
  • 1
  • 2
  • 4
5
votes
2 answers

OpenCV CV findHomography assertion error - counter => 4

I'm currently finishing my evaluation-tool for interest point detectors. In the last steps I found a confusing error. Mat findHomography(InputArray srcPoints, InputArray dstPoints, int method=0, double ransacReprojThreshold=3, OutputArray…
Mr.Mountain
  • 863
  • 8
  • 32
4
votes
1 answer

Finding powerlines in LIDAR point clouds with RANSAC

I'm trying to find powerlines in LIDAR points clouds with skimage.measures ransac() function. This is my very first time meddling with these modules in python so bear with me. So far all I knew how to do reliably was filtering low or 'ground' points…
user16541277
4
votes
1 answer

How align(register) and merge point clouds to get full 3d model?

I want to get 3d model of some real word object. I have two web cams and using openCV and SBM for stereo correspondence I get point cloud of the scene, and filtering through z I can get point cloud only of object. I know that ICP is good for this…
Aram Gevorgyan
  • 2,175
  • 7
  • 37
  • 57
4
votes
2 answers

OpenCV RANSAC returns the same transformation everytime

I am confused as to how to use the OpenCV findHomography method to compute the optimal transformation. The way I use it is as follows: cv::Mat h = cv::findHomography(src, dst, CV_RANSAC, 5.f); No matter how many times I run it, I get the same…
Luca
  • 10,458
  • 24
  • 107
  • 234
4
votes
3 answers

findHomography with RANSAC wrong outliering

I am doing some object detection using features2d (ORB, SIFT etc) I am investigating further into homography with RANSAC. I found out that many good points are marked wrongly as outliers. There are lots of outliers that shouldn't be outliers inside…
dynamic
  • 46,985
  • 55
  • 154
  • 231
3
votes
1 answer

Image alignment with ORB and RANSAC in scikit-image

I am attempting to align timelapse images using skimage.feature.orb to extract keypoints and then filtering them using skimage.measure.ransac. The transform modelled by RANSAC should then be able to align my images. The process appears to work well,…
3
votes
0 answers

How to choose the estimation algorithm for the findHomography() function?

In OpenCV, Why choose RANSAC instead of LMeDS or RHO? What advantages and disadvantages does each have? In which cases should each one be chosen? This question came up when I read the tutorial "Features2D + Homography to find a known object" Thanks…
SRG
  • 53
  • 8
3
votes
1 answer

PCL: Accessing fields of pcl::ModelCoefficients::Ptr for line model approximation using RANSAC

I am trying to estimate a line through the points of a point cloud using a RANSAC method provided by the Point Cloud Library. I can create the object, and estimate the line model without a problem, as so: pcl::PointCloud::ConstPtr…
budekatude
  • 433
  • 6
  • 24
1
2
3
11 12