1. An image processing apparatus comprising: a sampling unit that performs sampling to thin out pixel values to be used as adjacent pixels in intra-frame prediction according to a size in an horizontal direction of an image to be coded or a size in a vertical direction of regions obtained by dividing the image; a reconstruction unit that performs interpolation by using the pixel values sampled by the sampling unit to reconstruct the adjacent pixels; a predicted image generation unit that performs the intra-frame prediction by using the adjacent pixels reconstructed by the reconstruction unit to generate a predicted image; and a coding unit that codes the image by using the predicted image generated by the predicted image generation unit.