The present invention provides a distance-measuring device has an AF area
sensor that includes an image pick up element formed on a semiconductor
substrate for receiving two images having a parallax therebetween, and a
photo reception signal processing circuit formed on the semiconductor
substrate for processing signals corresponding to light received by the
image pick up element. On the basis of sensor data (outline data)
obtained by integration executed in the AF area sensor in an outline
detection mode, the distance-measuring device detects a main subject in a
photography screen, sets a distance-measuring area including the main
subject, and measures a distance to the main subject.