1. A detection device comprising: a processor comprising hardware, wherein the processor is configured to: acquire an image of a luminal object, wherein the image has been captured by an image sensor; acquire distance information on a distance from the image sensor to the luminal object at the time the image sensor captured the image; calculate a feature quantity from the image, wherein the feature quantity relates to at least one of a color, a brightness, a color difference, and a spectrum of the luminal object; perform a correction process on the feature quantity using structural information about the luminal object extracted from the image based on the distance information; acquire a learning feature quantity stored in a learning feature quantity storage, wherein the learning feature quantity is calculated by a learning process performed on the feature quantity that has been subjected to the correction process using the structural information about the luminal object extracted from the image based on the distance information; and detect a target area from the image based on the learning feature quantity and the feature quantity that has been subjected to the correction process using the structural information about the luminal object extracted from the image based on the distance information; wherein the structural information is information about irregular structures of the luminal object.