A workpiece detection device comprising: a trapezoid correction unit configured to perform trapezoid correction on photographed image data obtained by photographing workpieces (W) loaded on a mounting place with a monocular camera ; a pattern matching unit configured to carry out a first pattern matching between an image of the trapezoid-corrected photographed image data and a first plurality of models that show images of a workpiece (W) to be detected and have a plurality of sizes and a plurality of angles so as to select a model having a size and an angle with a highest degree of matching; a primary detection unit configured to detect a position and an angle of an uppermost workpiece (W) from among the loaded workpieces (W) based on the model selected by the pattern matching unit ; an actual load height calculation unit configured to calculate an actual load height of the uppermost workpiece (W) based on a hand height detected by a workpiece holding robot when a gripper of the workpiece holding robot is positioned above the uppermost workpiece (W) based on the position and the angle of the uppermost workpiece (W) detected by the primary detection unit ; and a secondary detection unit configured to re-detect the position and the angle of the uppermost workpiece (W) based on a model having a size and an angle with a highest degree of matching that the pattern matching unit selects by carrying out a second pattern matching between the image of the trapezoid-corrected photographed image data and a second plurality of models that are either selected from among the first plurality of models based on the actual load height or newly created based on the actual load height, the second plurality of models being less than the first plurality of models. a trapezoid correction unit configured to perform trapezoid correction on photographed image data obtained by photographing workpieces (W) loaded on a mounting place with a monocular camera ; a pattern matching unit configured to carry out a first pattern matching between an image of the trapezoid-corrected photographed image data and a first plurality of models that show images of a workpiece (W) to be detected and have a plurality of sizes and a plurality of angles so as to select a model having a size and an angle with a highest degree of matching; a primary detection unit configured to detect a position and an angle of an uppermost workpiece (W) from among the loaded workpieces (W) based on the model selected by the pattern matching unit ; an actual load height calculation unit configured to calculate an actual load height of the uppermost workpiece (W) based on a hand height detected by a workpiece holding robot when a gripper of the workpiece holding robot is positioned above the uppermost workpiece (W) based on the position and the angle of the uppermost workpiece (W) detected by the primary detection unit ; and a secondary detection unit configured to re-detect the position and the angle of the uppermost workpiece (W) based on a model having a size and an angle with a highest degree of matching that the pattern matching unit selects by carrying out a second pattern matching between the image of the trapezoid-corrected photographed image data and a second plurality of models that are either selected from among the first plurality of models based on the actual load height or newly created based on the actual load height, the second plurality of models being less than the first plurality of models. <EOS>