I have these lines (blues lines) that extract from a raster and need to unite them automatically (red lines). Currently I'm doing it manually using a plugin (Join multiple lines) but it's very tiring. Is there any way to grow and join the lines automatically? I thought of joining based on the angle of inclination but I do not know how to proceed. I use QGIS and Ecognition.
What I have:
What I want: