1. A workpiece detector comprising: a camera configured to acquire a two-dimensional image of a search range within which workpieces are disposed; a three-dimensional sensor configured to detect a three-dimensional shape of a three-dimensional detection area; a workpiece extraction section configured to process the two-dimensional image to extract a plurality of candidate workpieces among the workpieces; an area setting section configured to set a plurality of three-dimensional detection areas respectively corresponding to the plurality of candidate workpieces; a prioritizing section configured to set an order of priority to the plurality of three-dimensional detection areas so as to give higher priority to one three-dimensional detection area among the plurality of three-dimensional detection areas when the one three-dimensional detection area contains more of the plurality of candidate workpieces; a sensor control section configured to control the three-dimensional sensor to detect the three-dimensional shape of each of the plurality of three-dimensional detection areas in the order of priority; and a workpiece detection section configured to, every time the three-dimensional shape is detected, search the workpieces based on the detected three-dimensional shape so as to detect a pickable workpiece among the workpieces.