summing the negative of the pixel values of image pixels corresponding to {HEAD ~ each} of {TAIL ~ columns} 2M+1 to M+2 in said next row and adding the pixel values of image pixels corresponding to each of columns M to 1 in said next row to produce a next row value 
of
summing the negative of the pixel values of image pixels corresponding to { HEAD ~ each } of { TAIL ~ columns } 2M+1 to M+2 in said next row and adding the pixel values of image pixels corresponding to each of columns M to 1 in said next row to produce a next row value
OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH HEAD HEAD HEAD HEAD HEAD REL TAIL TAIL TAIL TAIL TAIL OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH