I don't think Sobel operator is good for your case. Actually the gradient magnitude should roughly sketch the edges already. The latter steps are refining the edge extraction. I am not sure how you implemented the thinning process, what I did is using interpolation to find the pixels where the norms of gradient are local maximum. When I applied Sobel operator, I didn't get very thick edges, but the edges are not very continuous at some points:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 270 270 270 270 270 270 270 270 0 0 0 0
0 0 0 270 0 0 0 0 0 0 270 270 0 0 0 0
0 0 270 0 0 0 0 0 0 0 0 0 0 0 270 0
0 0 270 0 0 270 270 270 270 0 0 270 0 0 270 0
0 0 270 0 0 270 0 0 0 0 0 270 0 0 270 0
0 0 270 0 0 270 0 0 0 0 0 270 0 0 270 0
0 0 270 0 0 270 0 0 0 0 0 270 0 0 270 0
0 0 270 0 0 0 0 0 0 0 0 270 0 0 270 0
0 0 270 270 0 0 0 0 0 0 0 270 0 0 270 0
0 0 270 270 0 270 270 270 270 270 270 270 0 0 270 0
0 0 0 0 0 0 0 0 0 0 0 0 0 270 270 0
0 0 0 0 0 0 0 0 0 0 0 0 270 270 0 0
0 0 0 0 270 270 270 270 270 270 270 270 270 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
When I used standard deviation of the gaussian function to convolve the original image in order to get the gradient, I can finally get clear thin edges:
0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 494 494 494 494 494 494 494 494 494 494 1 1
0 494 1 1 1 1 1 1 1 1 1 1 494 1
0 494 1 1 494 494 494 494 494 494 1 1 494 1
0 494 1 494 494 1 1 1 1 494 494 1 494 1
0 494 1 494 1 1 1 1 1 1 494 1 494 1
0 494 1 494 1 1 1 1 1 1 494 1 494 1
0 494 1 494 1 1 1 1 1 1 494 1 494 1
0 494 1 494 1 1 1 1 1 1 494 1 494 1
0 494 1 494 494 1 1 1 1 494 494 1 494 1
0 494 1 1 494 494 494 494 494 494 1 1 494 1
0 494 1 1 1 1 1 1 1 1 1 1 494 1
0 1 494 494 494 494 494 494 494 494 494 494 1 1
0 1 1 1 1 1 1 1 1 1 1 1 1 1