Lifting scheme and its application to edge detection