An image processing apparatus comprising: a periodicity determining unit that sets a determination area including a defective pixel having a pixel value to be supplemented in a target image and determines whether the determination area is a periodicity area where pixel values of pixels included in the determination area periodically vary or a non-periodicity area where pixel values of pixels included in the determination area do not periodically vary; a first pixel value generating unit that generates a candidate pixel value of the defective pixel and candidate pixel values of neighboring pixels positioned near the defective pixel and included in a predetermined area by a first supplementing method, preferably using a pattern matching method; a second pixel value generating unit that generates a candidate pixel value of the defective pixel by a second supplementing method, preferably using interpolation, different from the first supplementing method; a control unit that determines which of the first pixel value generating unit and the second pixel value generating unit is to be adopted to generate the candidate pixel value of the defective pixel based on the determination by the periodicity determining unit; and a pixel value supplementing unit that inserts the candidate pixel value of the defective pixel generated by either one of the first pixel value generating unit or the second pixel value generating unit determined to be adopted by the control unit, characterized by the image processing apparatus further comprising: a pixel value updating unit that updates pixel values of the neighboring pixels using the candidate pixel values of the neighboring pixels generated by the first pixel value generating unit and original pixel values of the neighboring pixels when the first pixel value generating unit is determined to be adopted by the control unit. a periodicity determining unit that sets a determination area including a defective pixel having a pixel value to be supplemented in a target image and determines whether the determination area is a periodicity area where pixel values of pixels included in the determination area periodically vary or a non-periodicity area where pixel values of pixels included in the determination area do not periodically vary; a first pixel value generating unit that generates a candidate pixel value of the defective pixel and candidate pixel values of neighboring pixels positioned near the defective pixel and included in a predetermined area by a first supplementing method, preferably using a pattern matching method; a second pixel value generating unit that generates a candidate pixel value of the defective pixel by a second supplementing method, preferably using interpolation, different from the first supplementing method; a control unit that determines which of the first pixel value generating unit and the second pixel value generating unit is to be adopted to generate the candidate pixel value of the defective pixel based on the determination by the periodicity determining unit; and a pixel value supplementing unit that inserts the candidate pixel value of the defective pixel generated by either one of the first pixel value generating unit or the second pixel value generating unit determined to be adopted by the control unit,