A pantograph displacement measuring device comprising: a plurality of markers affixed, so as to be spaced apart in a vehicle width direction, to an end surface of a pantograph on a railway vehicle; an area sensor camera that is installed on a roof of the railway vehicle and that captures an image of the plurality of markers; an overhead-wire positional deviation measuring device (2,3,11) that is installed on the roof of the railway vehicle and that measures a positional deviation of an overhead wire in the vehicle width direction; and an image processing device that determines a height-direction displacement of the pantograph based on an input image captured by the area sensor camera while the railway vehicle is traveling, and that determines a height of the pantograph by using the height-direction displacement of the pantograph and the positional deviation of the overhead wire acquired by using the overhead-wire positional deviation measuring device (2, 3, 11), wherein the positional deviation of the overhead wire is used to determine the markers among the plurality of markers, between which the overhead wire is located; wherein the image processing device determines the height-direction displacement of the pantograph corresponding to the deviation position of the overhead wire by - extracting vertical lines from the image captured by the area sensor camera, each of which corresponds to the position of a respective marker, - respectively preparing marker images formed by rotating each of the vertical lines by 90 degrees to form rows, - preparing from an image that was captured in advance by the area sensor camera reference templates for single lines of the respective markers based on the marker images, and - using the respective reference templates to perform pattern matching with the input image by comparing the reference templates of the markers among the plurality of markers, between which the overhead wire is located, with the marker images of the markers among the plurality of markers, between which the overhead wire is located. a plurality of markers affixed, so as to be spaced apart in a vehicle width direction, to an end surface of a pantograph on a railway vehicle; an area sensor camera that is installed on a roof of the railway vehicle and that captures an image of the plurality of markers; an overhead-wire positional deviation measuring device (2,3,11) that is installed on the roof of the railway vehicle and that measures a positional deviation of an overhead wire in the vehicle width direction; and an image processing device that determines a height-direction displacement of the pantograph based on an input image captured by the area sensor camera while the railway vehicle is traveling, and that determines a height of the pantograph by using the height-direction displacement of the pantograph and the positional deviation of the overhead wire acquired by using the overhead-wire positional deviation measuring device (2, 3, 11), wherein the positional deviation of the overhead wire is used to determine the markers among the plurality of markers, between which the overhead wire is located; wherein the image processing device determines the height-direction displacement of the pantograph corresponding to the deviation position of the overhead wire by - extracting vertical lines from the image captured by the area sensor camera, each of which corresponds to the position of a respective marker, - respectively preparing marker images formed by rotating each of the vertical lines by 90 degrees to form rows, - preparing from an image that was captured in advance by the area sensor camera reference templates for single lines of the respective markers based on the marker images, and - using the respective reference templates to perform pattern matching with the input image by comparing the reference templates of the markers among the plurality of markers, between which the overhead wire is located, with the marker images of the markers among the plurality of markers, between which the overhead wire is located. - extracting vertical lines from the image captured by the area sensor camera, each of which corresponds to the position of a respective marker, - respectively preparing marker images formed by rotating each of the vertical lines by 90 degrees to form rows, - preparing from an image that was captured in advance by the area sensor camera reference templates for single lines of the respective markers based on the marker images, and - using the respective reference templates to perform pattern matching with the input image by comparing the reference templates of the markers among the plurality of markers, between which the overhead wire is located, with the marker images of the markers among the plurality of markers, between which the overhead wire is located.