The present invention relates to an image processing system, a projector, a program, an information storage medium, and an image processing method that detect a predetermined area based on sensing information. 
In recent years, a method of adjusting the position of a projected image by projecting an image onto a projection target such as a screen using a projector including a CCD camera, sensing the projected image using the CCD camera, and detecting the coordinates of four corners of the projection area in the sensing area has been proposed. 
In this case, if external light which causes a strong contrast, such as sunlight entering through a window shade, is reflected on the screen, the external light may be judged as an edge or a part of a shape during edge detection or shape detection. 
To deal with this problem, Japanese Patent Application Laid-open No.  2001-268326 proposes an image processing device which removes the effect of external light components on a sensed image. 
However, the effect of external light which causes a strong contrast cannot be removed by utilizing a method using a general differential image as that of the image processing device disclosed in Japanese Patent Application Laid-open No.  2001-268326.  This is because the sensed image becomes saturated due to the addition of the effect of external light to the projection light. 
The image processing device disclosed in Japanese Patent Application Laid-open No.  2001-268326 aims at removing the effect of external light after edge detection based on external light information near the edge or the like.  However, since the edge due to external light which causes a strong contrast differs to a large extent from the area near the edge, the effect of external light cannot be appropriately removed by using this method. 
The image processing device disclosed in Japanese Patent Application Laid-open No.  2001-268326 performs processing by obtaining the exposure.  However, since the exposure is determined based on the average brightness of the entire image, the effect cannot be appropriately judged when a strong contrast occurs on a part of an image due to external light. 
In the case where a projector projects an image onto a screen or the like, it is preferable that distortion of the projected image be corrected respective of the inclusion relationship between the projected image and the screen, even when the effect of external light occurs.