RANSAC (Random Sample Consensus) is an iterative algorithm that separates data points into inliers and outliers by randomly sampling subsets of data, fitting a model to each subset, and selecting the model with the highest number of supporting data points; it is widely used in robotics and computer vision applications like visual odometry where sensor data contains noise and outliers.
RANSAC: Random Sample Consensus in 5 Minutes
Added:[Music] so Rancic stands for random sample consensus and it's a quite simple but highly effective algorithm that you can use if your data is affected by outliers so whenever you work with real-world sensors your sensor data will never be perfect and quite often your sensor data is affected by outliers so by data points that are not explained well by the real world and rancic is kind of a trial and error approach that will group your data points into an entire set and into an outlier set so that you can forget about the outliers and work with your inliers so let me use a very small but simple example you know to illustrate how rancic works let's say we want to fit a line through to the data points how can we do that so consider these our data points some of those data points will lie on the line at least approximately but others are outliers and how can we separate them into inliers and outliers okay let's simply give it a try and let's say we just randomly draw two of our data points and fit a line through those two points why - because two is the minimum number of points that I need not to fit a line so let's say I select those two points and a fit a line through those two points and then I simply check how many of the remaining data points so all the data points except the two that has fair samples will agree with this line in this example this would be four data points which either lie on the line or close to the line okay say perfect this model gets a score of four let's repeat the process and see how we will do next time so I again sample two data points in this case those two I will fit my model for them so solve the task that I want to solve and then score how many data points agree with this model in this case this would be 12 and then I repeat this process over and over again let's say ten times hundred times thousand times and then select the model which has the highest score so which has the best support of the remaining data points and that's my solution which is then the entire points there so the supporting points the two points that our sample is my entire set worth of the outlier set so I can just continue working with my green points and that's basically that's what ransacked is about so it's a simple three-step procedure the first step is sampling so we sample a subset of data points and we consider those data points to be in Liars for this iteration so we treat them as in liars and say all the computations that we do are based on these two points and we treat them as in layers so the step number two and this is a task specific step we'll take those potential in layers and we'll compute the model parameters or solve the tasks that we actually want to solve and then the third step is a scoring step where we see how many of the remaining data points will support this model and sit by simply counting them I can compute the score and then I repeat this process over and over again and the end take the model that is best supported by the data which then tells me which are the in layer points which are the outlier points and the question you may have is how often should I actually do that often should I try that and that's actually something that we can compute so if you want to succeed with probability P let's say 99.9 percent then this formula tells us that if you want to succeed with probability P and the outlier ratio in our data points is M so let's say 20 percent or 40 percent or 60 percent and we need to sample s points in order to compute my model so in our example this would have been two then this formula tells you how many trials T you need in order to succeed with probability P so rancic is a frequently used algorithm whenever you work with real-world Center data for example to compute visual odometry that means estimating the motion of a camera through the environment by taking into account the corresponding points in pairs of consecutive images so that are then can compute the relative orientation of the camera just based on those correspondences and given that this approach is kind of sensitive to outliers so you need to make sure we have only in liars in order to estimate the trajectory well and rancic is an approach that helps me get rid of those outliers here
Up Next

Latent Diffusion Models Explained: How Stable Diffusion Works
@AICoffeeBreak
99.2K views•2022-08-31

BitTorrent Protocol Explained: Piece Selection & Peer Choking
@StevenGordonAU
481 views•2013-02-22

Camera Calibration with Zhang's Method | Computer Vision Tutorial
@CyrillStachniss
53.3K views•2020-04-20

Enigma Machine Mechanics: WWII Encryption Explained
@JaredOwen
13.2M views•2021-12-11
Related Study Plans & Knowledge Roadmaps
Structured learning paths in Computer Science










![[АиСД] Алгоритмы и структуры данных 10. Элементарная геометрия](https://i.ytimg.com/vi/wF6XlSNWdVo/maxresdefault.jpg)

















![[CVPR 2020] RANSAC in 2020 tutorial: Recent Advances on RANSAC](https://i.ytimg.com/vi_webp/Nfd9dzeSSG8/maxresdefault.webp)








