I have a matrix (vector of vectors) with several points (measurements from sensors) that are supposed to represent walls. All the walls are parallel/perpendicular.
I want to fit these points to the respective walls. I thought of using ransac but I can't find a easy way to implement this on the matrix in cpp, without having to do visualization code, like point cloud library.
Do I have to write my own RANSAC or does this exist?
You may try RANSAC in OpenCV library. If it is not enough, take it's code (it is open source) and modify it according to your problem details. Or you may add some pictures here for better understanding of your issue details.