A non-transitory computer program product, comprising a computer usable medium having a computer readable program code embodied therein, said computer readable program code adapted to be executed to implement a method of controlling a digital photographing apparatus, said method comprising:
- determining at least one target subject from an input image;
- extracting a target subject focus value of the at least one target subject while auto-focusing the at least one target subject;
- determining whether the target subject focus value stays within an in-focus range for a reference time or longer;
- and
- in response to a determination that the target subject focus value has stayed within an in-focus range for a reference time or longer, auto-photographing the at least one target subject.