Implementation of the Zhang-Suen thinning algorithm using OpenCV