I'm trying to trace a few curvy lines (vessels) in a retina image. The vessels are very clear in the image, so I thought this would be very straight forward, but I'm having a hard time figuring this out. Here is a link to the actual image: https://drive.google.com/open?id=1cRTk37U7LSeaV6rhvg0K6FKYsnDhlQZr
And I'm looking for the following tracing. Also would like to have that red tracing in a separate file:


Here is one possible approach implemented in Imagemagick. You likely can find similar functionality in OpenCV. Not the best detection, but gets most of the lines.
Input: