I'm still not comfortable with this expression, since it doesn't match the one described in Telea. Is there a reference for this or is this taken from the OpenCV source?