2D line fitting using RANSAC
I have a very simple Mat object which is a binary image. All the pixels are 0 except a few which are 1(some of which are inliers and some are outliers). I want to fit a line on these 1 pixels using RANSAC. Is there any built in method to do that or I have to write one?
I am using OpenCV v2.4.8 on Fedora 20 GNU/Linux.
Hi. Are you using C++, java, python... ?
FYI, here are the different classifiers available in OpenCV http://docs.opencv.org/trunk/modules/ml/doc/ml.html
I know that the function findHomography is able to use RANSAC to find the a good fit between two sets of points, but I personnaly don't know if you can use it as a standalone without ripping it form the source code of findHomography/other relevant source code.
Luckily someone knowledgeable will answer!
Thank you Doombot :) btw, I am using C++