Total Variation Image Edge Detection with Image Quality Measurement