1. A defect pixel detection apparatus comprising: an image sensor that includes an effective pixel configured to include a photoelectric conversion element and an output unit configured to output a pixel signal generated by the photoelectric conversion element, a first reference pixel configured to include the same pixel configuration as the effective pixel and be optically shielded, and a second reference pixel configured not to include a photoelectric conversion element or an output unit; a defect level acquiring unit configured to acquire a defect level of a target pixel in the image sensor; and a defect pixel determination unit configured to determine a defect detection threshold based on whether the target pixel is a first reference pixel or a second reference pixel and to determine whether the target pixel is a defect pixel by comparing the defect level of the target pixel with the defect detection threshold.