In the field of digital communication, gray level is used to describe the data of a pixel point in an image. A pixel point should be judged defected or not by the data surrounded and if defected, the gray level of these defects should be compensated by its background through FPGA to correct the defects of an image, this process is named background prediction. The correction of data is based on their storage thus RAMs, which are the abbreviations for Random Access Memories, are used. In this passage two different algorithm of background prediction is listed as examples to introduce the function and importance of block RAM in the storage and calculation of image data.