1. A method of determining an optimum candidate pixel value, the method comprising: i. identifying a first plurality of candidate pixels in a training image wherein each of said plurality of candidate pixels is proximate to a first identical neighbor pixel group; ii. for each of said first plurality of candidate pixels, determining a candidate pixel value thereby obtaining a first plurality of candidate pixel values; iii. determining a plurality of statistical moments for said first plurality of candidate pixel values; and iv. storing in memory a table including at least one of: a first optimum candidate pixel value corresponding to said first identical neighbor pixel group, said first optimum candidate pixel being determined based on said plurality of statistical moments, and information indicative of said plurality of statistical moments.