PROBLEM TO BE SOLVED: To correct a defective pixel block or eliminate moire fringe even when the moire fringe is caused by a grid.SOLUTION: Pre-correction processing for correcting the inside of the defective pixel block B is performed using a normal pixel adjacent to the periphery of the defective pixel block B where a predetermined number or more defective pixels continuously collect together. Subsequently, first and a second lines which pass through a defective pixel Q in the defective pixel block B and lie along an x-direction and a y-direction, respectively, and a rectangular region C of a predetermined dimensions containing the defective pixel block are set, the average value of pixel values (Nx1, ..., Nx4, Ny1, ..., Ny4) on the first and second lines concerning a region outside of the defective pixel block B and within the rectangular region C is obtained to be taken as a first average value, the average value of pixel values (Bx1, ..., Bx4, By1, ..., By4, q) on the first and second lines inside the defective pixel block B is obtained to be taken as a second average value, and fringe pattern data is calculated by subtracting the second average value from the first average value, and added to a pixel value q of the defective pixel Q. After this, moire-eliminating processing is conducted.COPYRIGHT: (C)2012,JPO&INPIT【課題】グリッドによりモアレ縞が生じている場合でも精度良く欠損画素塊の補正及びモアレ縞の除去を行う。【解決手段】所定数以上の欠損画素が連続して集合した欠損画素塊Bの周辺に隣接する正常画素を用いて、欠損画素塊Bの内部を補正するプレ補正処理を行う。次に、欠損画素塊B内の欠損画素Qを通りx方向に沿う第1ライン及びy方向に沿う第2ラインと、欠損画素塊を内包する所定の大きさの矩形領域Cとを設定し、欠損画素塊B外でかつ矩形領域C内の領域について第1及び第2ライン上の画素値(Nx1,・・Nx4,Ny1,・・・,Ny4)の平均値を求めて第1平均値とし、欠損画素塊Bの内部の第1及び第2ライン上の画素値(Bx1,・・Bx4,By1,・・・,By4,q)の平均値を求めて第2平均値とし、第1平均値から第2平均値を減算することにより縞目データを算出し、欠損画素Qの画素値qに加算する。この後、モアレ除去処理を行う。【選択図】図9