A workpiece photographed image processing device, comprising: a first conversion parameter calculation unit configured to calculate, based on a first photographed image obtained by photographing a lattice pattern with a camera located at a position deviated from directly above a center of a placement location of a workpiece, a first conversion parameter for correcting an image distortion due to a lens of the camera; a lens distortion correction unit configured to correct, by using the first conversion parameter, the image distortion due to the lens included in a second photographed image obtained by photographing a jig board with the camera; a second conversion parameter calculation unit configured to extract a plurality of first reference points of the jig board within the second photographed image in which the image distortion is corrected by the lens distortion correction unit, and to calculate, based on the actual first reference points of the jig board and the extracted first reference points within the second photographed image, a second parameter for converting two-dimensional coordinates within a three-dimensional space photographed by the camera into positions of pixels within the second photographed image; a third conversion parameter calculation unit configured to extract, by using the second parameter, a region corresponding to an actual predetermined region of the jig board within the second photographed image in which the image distortion is corrected by the lens distortion correction unit, to extract a plurality of second reference points based on an image of the extracted region within the second photographed image, to add, by using the first conversion parameter, the image distortion due to the lens to the second reference points, and to calculate, based on the actual second reference points of the jig board and the second reference points within the second photographed image to which the image distortion due to the lens is added, a third conversion parameter for converting the two-dimensional coordinates within the three-dimensional space into the positions of the pixels within the second photographed image; and a trapezoidal distortion correction unit configured to specify, by using the third conversion parameter, to which pixels in the third photographed image the two-dimensional coordinates within the three-dimensional space photographed by the camera correspond when a third photographed image is generated by photographing, with the camera, the placement location at which the workpiece is placed, to align the specified pixels corresponding to the respective coordinates in a two-dimensional manner, and to generate a fourth photographed image in which a trapezoidal distortion in the third photographed image is corrected. a first conversion parameter calculation unit configured to calculate, based on a first photographed image obtained by photographing a lattice pattern with a camera located at a position deviated from directly above a center of a placement location of a workpiece, a first conversion parameter for correcting an image distortion due to a lens of the camera; a lens distortion correction unit configured to correct, by using the first conversion parameter, the image distortion due to the lens included in a second photographed image obtained by photographing a jig board with the camera; a second conversion parameter calculation unit configured to extract a plurality of first reference points of the jig board within the second photographed image in which the image distortion is corrected by the lens distortion correction unit, and to calculate, based on the actual first reference points of the jig board and the extracted first reference points within the second photographed image, a second parameter for converting two-dimensional coordinates within a three-dimensional space photographed by the camera into positions of pixels within the second photographed image; a third conversion parameter calculation unit configured to extract, by using the second parameter, a region corresponding to an actual predetermined region of the jig board within the second photographed image in which the image distortion is corrected by the lens distortion correction unit, to extract a plurality of second reference points based on an image of the extracted region within the second photographed image, to add, by using the first conversion parameter, the image distortion due to the lens to the second reference points, and to calculate, based on the actual second reference points of the jig board and the second reference points within the second photographed image to which the image distortion due to the lens is added, a third conversion parameter for converting the two-dimensional coordinates within the three-dimensional space into the positions of the pixels within the second photographed image; and a trapezoidal distortion correction unit configured to specify, by using the third conversion parameter, to which pixels in the third photographed image the two-dimensional coordinates within the three-dimensional space photographed by the camera correspond when a third photographed image is generated by photographing, with the camera, the placement location at which the workpiece is placed, to align the specified pixels corresponding to the respective coordinates in a two-dimensional manner, and to generate a fourth photographed image in which a trapezoidal distortion in the third photographed image is corrected.