A method for identifying a tool joint (118;402;602;700;800) connection, comprising: positioning a scanning system adjacent a pipe string, the scanning system having at least one sensor configured to scan the exterior of the pipe string; scanning the pipe string with the scanning system to obtain scan data; transmitting the scan data to a computer; analyzing the scan data with the computer by comparing the scan data with a training data set to determine whether the scan data includes an image of a tool joint (602;700); when the scan data is determined to include the image of the tool joint, determining, with the computer: a location of the tool joint based at least on: a distance to the pipe string measured by at least one distance measuring sensor; a curvature of the tool joint to estimate a first angle (β) of a first line between the sensor and a tool joint starting line with respect to horizontal and a second angle (α) of a second line between the sensor and a tool joint ending line with respect to horizontal; a length of the tool joint based at least on the first angle (β) and the second angle (a), and a tool joint connection line in the tool joint based at least on a tool joint centre line between the tool joint starting line and the tool joint ending line; and receiving an output from the computer indicating the determined location of the tool joint connection line in the pipe string. positioning a scanning system adjacent a pipe string, the scanning system having at least one sensor configured to scan the exterior of the pipe string; scanning the pipe string with the scanning system to obtain scan data; transmitting the scan data to a computer; analyzing the scan data with the computer by comparing the scan data with a training data set to determine whether the scan data includes an image of a tool joint (602;700); when the scan data is determined to include the image of the tool joint, determining, with the computer: a location of the tool joint based at least on: a distance to the pipe string measured by at least one distance measuring sensor; a curvature of the tool joint to estimate a first angle (β) of a first line between the sensor and a tool joint starting line with respect to horizontal and a second angle (α) of a second line between the sensor and a tool joint ending line with respect to horizontal; a length of the tool joint based at least on the first angle (β) and the second angle (a), and a tool joint connection line in the tool joint based at least on a tool joint centre line between the tool joint starting line and the tool joint ending line; and a distance to the pipe string measured by at least one distance measuring sensor; a curvature of the tool joint to estimate a first angle (β) of a first line between the sensor and a tool joint starting line with respect to horizontal and a second angle (α) of a second line between the sensor and a tool joint ending line with respect to horizontal; a length of the tool joint based at least on the first angle (β) and the second angle (a), and a tool joint connection line in the tool joint based at least on a tool joint centre line between the tool joint starting line and the tool joint ending line; and receiving an output from the computer indicating the determined location of the tool joint connection line in the pipe string.