#NEWLINE# def F_from_ransac( x1 , x2 , model , maxiter = 5000 , match_theshold = 1e-06 ) : #NEWLINE# #INDENT# ' Robust estimation of a fundamental matrix F from point \n        correspondences using RANSAC (ransac.py from\n        http://www.scipy.org/Cookbook/RANSAC).\n\n        input: x1,x2 (3*n arrays) points in hom. coordinates. ' #NEWLINE# from PCV.tools import ransac #NEWLINE# data = vstack ( ( x1 , maxiter ) ) #NEWLINE# ( F , ransac_data ) = ransac . ransac ( data . T , model , 8 , maxiter , match_theshold , 20 , return_all = True ) #NEWLINE# return ( F , ransac_data [ 'inliers' ] )