A projector includes an image projection section which projects a white
image and a black image, a sensor which has an exposure adjustment
function, generates first sensing information by sensing the white image,
and generates second sensing information by sensing the black image, a
sensing condition setting section which controls exposure of the sensor
so that the sensor senses the white image at an automatic exposure
setting and senses the black image at the exposure setting determined
when sensing the white image, a difference information generation section
which generates difference information based on the first sensing
information and the second sensing information, and an endpoint detection
section which detects an endpoint of a projection region in a sensing
region based on the difference information.