Simple demonstrations of some means to remove outliers, mostly for personal edification. Feel free to use as inspiration for whatever your needs may be.
You can build the examples using the typical CMake workflow.
Demonstratied in src/mad.cpp
Demonstrated in src/ransac.cpp