Adaptive Finite Element Method for Image Processing