1. An image processing device comprising: a determination section which determines a texture direction in a vicinity region based on the vicinity region which includes a target pixel in the image; and a detection section which detects whether or not the target pixel is a defective pixel based on a plurality of pixels including the target pixel which are lined up in the texture direction in the image, wherein the determination section calculates a differential value of a direction in the vicinity region based on a differential value between the pixels which are lined up in the same direction in the vicinity region and the direction where the differential value is the smallest out of a plurality of directions is set as the texture direction, wherein the detection section is provided with a secondary differential value calculation section which calculates a secondary differential value of the pixel value of the pixel with regard to a grouping of a predetermined number of pixels including the target pixel which are lined up to be continuous in the texture direction in the image and a comparator which determines whether the target pixel is a defective pixel based on the secondary differential values of a plurality of the groupings which are different, and wherein the determination section and the detection section are each implemented via at least one processor.