How can I use Hough Transforms to fit a Plane
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.
In the past, we have used principal component analysis (PCA) for this.
https://docs.opencv.org/4.0.0/d3/d8d/...
When you run PCA on 3d data, you should get 3 eigenvectors. I believe the one with the minimum eigenvalue is the best fit normal to the plane.
you have point clouds? then hough transform sounds useless. I would recommend PCA, as mentioned above, or RANSAC.