A computer-implemented method for determining a contact point between a pantograph and a power supply line represented in an image (410, 420), the power supply line comprising a contact wire and a catenary, and the method comprising: based on edges represented in the image (410, 420), determining a first intersection point and a second intersection point, wherein the first intersection point is formed by an intersection of a first edge with a top edge of the pantograph, and the second intersection point is formed by an intersection of a second edge with the top edge of the pantograph, wherein one of the first edge and the second edge is an edge of the contact wire and the other one is an edge of the catenary and the first edge and the second edge are separated by a distance or a distance range between the contact wire and the catenary, which are determined empirically; determining a first slope associated with the first edge, and a second slope associated with the second edge; and identifying one of the first intersection point or the second intersection point as the contact point between the pantograph and the power supply line by: determining an absolute value of the first slope and an absolute value of the second slope; determining the first intersection point to be the contact point if the absolute value of the first slope is less than the absolute value of the second slope; and determining the second intersection point to be the contact point if the absolute value of the second slope is less than the absolute value of the first slope. based on edges represented in the image (410, 420), determining a first intersection point and a second intersection point, wherein the first intersection point is formed by an intersection of a first edge with a top edge of the pantograph, and the second intersection point is formed by an intersection of a second edge with the top edge of the pantograph, wherein one of the first edge and the second edge is an edge of the contact wire and the other one is an edge of the catenary and the first edge and the second edge are separated by a distance or a distance range between the contact wire and the catenary, which are determined empirically; determining a first slope associated with the first edge, and a second slope associated with the second edge; and identifying one of the first intersection point or the second intersection point as the contact point between the pantograph and the power supply line by: determining an absolute value of the first slope and an absolute value of the second slope; determining the first intersection point to be the contact point if the absolute value of the first slope is less than the absolute value of the second slope; and determining the second intersection point to be the contact point if the absolute value of the second slope is less than the absolute value of the first slope. determining an absolute value of the first slope and an absolute value of the second slope; determining the first intersection point to be the contact point if the absolute value of the first slope is less than the absolute value of the second slope; and determining the second intersection point to be the contact point if the absolute value of the second slope is less than the absolute value of the first slope.