Added thinning morphology gold algorithm