Gravar-mail: A Generalized Ghost Detection and Segmentation Method for Double-Joint Photographic Experts Group Compression