In Equation 15, d4 is omitted. d4 has the same value as d2. It can be seen that d1 to d6 of Equation 15 are associated with s1 to s6 of Equation 5. d1 to d6 represent values at one pixel position, and s1 to s6 represent the sum of each of d1 to d6 calculated at all pixel positions in a mask centered on one pixel. That is, using Equation 15, Equation 5 may be expressed as Equation 16 below. In Equation 16, s4 is omitted because s4 has the same value as s2.