I have several png files that look similar to this this:
Everything is tra
The process you're looking for is known as skeletonization, there's a good summary of techniques in this post: Determine the midline of a bent, elongated region