A pallet detection device, comprising: a point cloud acquisition unit configured to acquire point cloud data indicating a point cloud measured by a two-dimensional distance measurement device on a depth map; a straight line detection unit configured to detect a straight line corresponding to a front surface of a pallet (10, 10A, 10B, 10C) based on the point cloud in a region presumed to include the front surface of the pallet (10, 10A, 10B, 10C) in the point cloud data; a line segment detection unit configured to detect a line segment indicating the front surface of the pallet (10, 10A, 10B, 10C) based on the straight line; and a position/orientation acquisition unit configured to acquire position and orientation of the pallet (10, 10A, 10B, 10C) based on the line segment, wherein the straight line detection unit is configured to: acquire one or more straight line candidates as candidates for the straight line, assign, for each of the one or more straight line candidates, a score to the point cloud so that points in front of the straight line candidate at a specified distance or more are assigned with a score with a constant whose priority in selection is lower than the rest of points, select the straight line from the one or more straight line candidates based on a score accumulated value obtained by accumulating the score for the point cloud in the region presumed to include the front surface of the pallet (10, 10A, 10B, 10C), and in the calculation of the score accumulated value, assign a higher priority score to points within the specified distance from the straight line candidate than to points in front of the straight line candidate at the specified distance or more, and the closer to the straight line candidate, the higher the priority of the score. a point cloud acquisition unit configured to acquire point cloud data indicating a point cloud measured by a two-dimensional distance measurement device on a depth map; a straight line detection unit configured to detect a straight line corresponding to a front surface of a pallet (10, 10A, 10B, 10C) based on the point cloud in a region presumed to include the front surface of the pallet (10, 10A, 10B, 10C) in the point cloud data; a line segment detection unit configured to detect a line segment indicating the front surface of the pallet (10, 10A, 10B, 10C) based on the straight line; and a position/orientation acquisition unit configured to acquire position and orientation of the pallet (10, 10A, 10B, 10C) based on the line segment, wherein the straight line detection unit is configured to: acquire one or more straight line candidates as candidates for the straight line, assign, for each of the one or more straight line candidates, a score to the point cloud so that points in front of the straight line candidate at a specified distance or more are assigned with a score with a constant whose priority in selection is lower than the rest of points, select the straight line from the one or more straight line candidates based on a score accumulated value obtained by accumulating the score for the point cloud in the region presumed to include the front surface of the pallet (10, 10A, 10B, 10C), and in the calculation of the score accumulated value, assign a higher priority score to points within the specified distance from the straight line candidate than to points in front of the straight line candidate at the specified distance or more, and the closer to the straight line candidate, the higher the priority of the score. acquire one or more straight line candidates as candidates for the straight line, assign, for each of the one or more straight line candidates, a score to the point cloud so that points in front of the straight line candidate at a specified distance or more are assigned with a score with a constant whose priority in selection is lower than the rest of points, select the straight line from the one or more straight line candidates based on a score accumulated value obtained by accumulating the score for the point cloud in the region presumed to include the front surface of the pallet (10, 10A, 10B, 10C), and in the calculation of the score accumulated value, assign a higher priority score to points within the specified distance from the straight line candidate than to points in front of the straight line candidate at the specified distance or more, and the closer to the straight line candidate, the higher the priority of the score.