Condense BoofCV code to single java source for performance optimization