1.  Field of the Invention
The present invention relates to a control apparatus, a method for controlling an imaging device, and a storage medium. 
2.  Description of the Related Art
Cameras that can be controlled remotely with a personal computer (PC) are commercially available.  Sets of camera parameters such as pan, tilt, and zoom can be preset in these cameras.  The monitoring system using these cameras can perform parameter control of the camera in the preset order.  This operation is called a preset tour.  Japanese Patent No.  2548814 discloses a process for detecting movement in the images, the process being performed at each preset point in the preset tour.  In this case, when the camera moves from one preset point to another preset point, the motion detection is stopped so as to prevent error detection. 
When images of a camera capable of controlling pan, tilt, and zoom are put on the internet, it is desired to keep part of the field of view private.  In response to such desire, some commercially available network cameras can limit the field of view. 
Various techniques concerning tracking of a moving object are proposed.  For example, Japanese Patent Laid-Open No.  11-150676 discloses a tracking control technique based on the color of the moving object and a histogram.  In addition, a technique in which part of the moving object is stored as a template and tracking is performed, and a technique in which tracking is performed on the basis of the motion vector are known.  In addition, Japanese Patent Laid-Open No.  2003-219225 (corresponding to U.S. Patent Application No.  2003/142209) discloses a technique in which a moving area is detected from the interframe difference and tracking is performed, and then the color of the object is stored and tracking is continued. 
Moreover, Japanese Patent Laid-Open No.  2003-255442 (corresponding to U.S. Patent Application No.  2003/227548) discloses a technique used for a preset tour.  In this technique, movement in the images is detected at each preset point.  If there is any movement, the camera tracks the moving object.  Camera control of this technique includes a preset tour mode and a tracking mode.  The preset tour control is stopped during tracking. 
In the conventional techniques, the limitation of visible (field of view) range and the automatic tracking are not used together.  Therefore, the operation for the case where a shooting prohibited state occurs in the automatic tracking is not taken into account.  After transition is made from the preset tour to the tracking process, the tracking process is stopped according to predetermined conditions.  However, it is not taken into account how to return to the preset tour.  In the case where a plurality of visible-range limited areas are specified in the image, if the camera moves straight from one preset point to another preset point, the camera may pass through the visible-range limited area.