An image-capturing device, comprising: an image sensor comprising: a first pixel (81, 82) having a first photoelectric conversion unit (812, 822) that photoelectrically converts light having been transmitted through an optical system and a first light blocking unit (813, 823) that blocks a part of light about to enter the first photoelectric conversion unit (812, 822), the first pixel (81, 82) outputting a signal photoelectrically converted at the first photoelectric conversion unit (812, 822); and a second pixel (81, 82) having a second photoelectric conversion unit (812, 822) that photoelectrically converts light having transmitted through the optical system and a second light blocking unit (813, 823) that has an area different from an area of the first light blocking unit (813, 823) and blocks a part of light about to enter the second photoelectric conversion unit (812, 822), the second pixel (81, 82) outputting a signal photoelectrically converted at the second photoelectric conversion unit (812, 822); and a control unit that selects at least one of the first pixel (81, 82) and the second pixel (81, 82) based upon information regarding the optical system, and controls a position of the optical system to be set to a focal position based upon the signal output from at least one of the selected first pixel (81, 82) and the selected second pixel (81, 82), wherein: the first light blocking unit (813, 823) is set apart from the first photoelectric conversion unit (812, 822) by a first distance, and the second light blocking unit (813, 823) is set apart from the second photoelectric conversion unit (812, 822) by a second distance that is different from the first distance. an image sensor comprising: a first pixel (81, 82) having a first photoelectric conversion unit (812, 822) that photoelectrically converts light having been transmitted through an optical system and a first light blocking unit (813, 823) that blocks a part of light about to enter the first photoelectric conversion unit (812, 822), the first pixel (81, 82) outputting a signal photoelectrically converted at the first photoelectric conversion unit (812, 822); and a second pixel (81, 82) having a second photoelectric conversion unit (812, 822) that photoelectrically converts light having transmitted through the optical system and a second light blocking unit (813, 823) that has an area different from an area of the first light blocking unit (813, 823) and blocks a part of light about to enter the second photoelectric conversion unit (812, 822), the second pixel (81, 82) outputting a signal photoelectrically converted at the second photoelectric conversion unit (812, 822); and a first pixel (81, 82) having a first photoelectric conversion unit (812, 822) that photoelectrically converts light having been transmitted through an optical system and a first light blocking unit (813, 823) that blocks a part of light about to enter the first photoelectric conversion unit (812, 822), the first pixel (81, 82) outputting a signal photoelectrically converted at the first photoelectric conversion unit (812, 822); and a second pixel (81, 82) having a second photoelectric conversion unit (812, 822) that photoelectrically converts light having transmitted through the optical system and a second light blocking unit (813, 823) that has an area different from an area of the first light blocking unit (813, 823) and blocks a part of light about to enter the second photoelectric conversion unit (812, 822), the second pixel (81, 82) outputting a signal photoelectrically converted at the second photoelectric conversion unit (812, 822); and a control unit that selects at least one of the first pixel (81, 82) and the second pixel (81, 82) based upon information regarding the optical system, and controls a position of the optical system to be set to a focal position based upon the signal output from at least one of the selected first pixel (81, 82) and the selected second pixel (81, 82), wherein: the first light blocking unit (813, 823) is set apart from the first photoelectric conversion unit (812, 822) by a first distance, and the second light blocking unit (813, 823) is set apart from the second photoelectric conversion unit (812, 822) by a second distance that is different from the first distance. the first light blocking unit (813, 823) is set apart from the first photoelectric conversion unit (812, 822) by a first distance, and the second light blocking unit (813, 823) is set apart from the second photoelectric conversion unit (812, 822) by a second distance that is different from the first distance.