A shape detection system comprising: a distance image sensor that detects an image of a plurality of detection objects and distances to the detection objects, the detection objects being randomly arranged in a container; a sensor controller that detects a position and an orientation of each of the detection objects in the container on the basis of the result of the detection performed by the distance image sensor and a preset algorithm; and characterized in that the shape detection system further comprises a user controller that selects the algorithm to be used by the sensor controller and sets the algorithm for the sensor controller, and that the user controller includes: an algorithm database in which pre-registered shape patterns of the detection objects and detection algorithms corresponding to the shape patterns are stored in association with each other, selecting means for selecting the shape pattern of a desired one of the detection objects, specification input means for inputting a specification of the shape pattern selected by the selecting means, and algorithm setting means for correcting one of the detection algorithms in the algorithm database on the basis of the shape pattern selected by the selecting means and the specification input by the specification input means and setting the corrected detection algorithm as the algorithm for the sensor controller. a distance image sensor that detects an image of a plurality of detection objects and distances to the detection objects, the detection objects being randomly arranged in a container; a sensor controller that detects a position and an orientation of each of the detection objects in the container on the basis of the result of the detection performed by the distance image sensor and a preset algorithm; and characterized in that the shape detection system further comprises a user controller that selects the algorithm to be used by the sensor controller and sets the algorithm for the sensor controller, and that the user controller includes: an algorithm database in which pre-registered shape patterns of the detection objects and detection algorithms corresponding to the shape patterns are stored in association with each other, selecting means for selecting the shape pattern of a desired one of the detection objects, specification input means for inputting a specification of the shape pattern selected by the selecting means, and algorithm setting means for correcting one of the detection algorithms in the algorithm database on the basis of the shape pattern selected by the selecting means and the specification input by the specification input means and setting the corrected detection algorithm as the algorithm for the sensor controller. an algorithm database in which pre-registered shape patterns of the detection objects and detection algorithms corresponding to the shape patterns are stored in association with each other, selecting means for selecting the shape pattern of a desired one of the detection objects, specification input means for inputting a specification of the shape pattern selected by the selecting means, and algorithm setting means for correcting one of the detection algorithms in the algorithm database on the basis of the shape pattern selected by the selecting means and the specification input by the specification input means and setting the corrected detection algorithm as the algorithm for the sensor controller.