I want to find the plane of best fit for a set of data. I think the Hough Transform will be the most fruitful approach. Overall, I want to be able to detect the slope of a hill seen in an image. I would like help finding any good documentation or examples of fitting a plane to a set of 3d data using c++ and open CV. Eventually I will implement RANSAC or some method to make sure the process is optimized, but any thoughts are appreciated.