It should be noted that ri,j includes raw foreground and background intensity values.