1. An imaging device, comprising: an image sensor that includes imaging pixels disposed in a two-dimensional array and focus detection pixels disposed along a specific direction over part of the array of the imaging pixels; a recognizing circuit that recognizes an image pattern indicating a pixel output change along a direction perpendicular to the specific direction in which the focus detection pixels are disposed based upon outputs from the imaging pixels present around each focus detection pixel; and a determining circuit that determines an image output at the focus detection pixel based upon an output from the focus detection pixel and the outputs from the imaging pixels present around the focus detection pixel through an arithmetic operation method corresponding to the image pattern having been recognized by the recognizing circuit.