# Content and Privacy Protection in JPEG Images by Reversible Visual Transformation
## 1 Introduction  
With the popularity of cloud computing and social networks, more and more images are stored and distributed on the web. There are quite a few image formats, among which a popular one is JPEG [1] for its high efficiency in compression. Compared with lossless formats such as bitmap (BMP), JPEG compression can significantly reduce the file size to save bandwidth without introducing noticeable degradation. With the dissemination of JPEG images, how to protect content and privacy for them has become an important issue. For instance, a user may want to share some JPEG images containing private information but directly exposing them in social networks may impair privacy. In the literature, a number of methods (e.g., [2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13]) have been proposed for privacy protection in JPEG images, including selective encryption (e.g., [2]), image blurring, image pixelation, image masking, image morphing (e.g., [3]) and image warping (e.g., [4]). To keep the sensitive content from being exposed, these methods may change image content permanently and even degrade image quality. By contrast, it is advantageous for authorized receivers to recover the original images when needed. Hence, data hiding has been applied in JPEG image encryption to achieve such reversibility. For instance, scrambling and image data hiding are combined in [PERSON]'s algorithm [5]. Moreover, image masking and data hiding are combined in [6; 7]. Nevertheless, the original image cannot be completely recovered with the algorithms proposed in [5; 6; 7]. Then, a privacy protection algorithm based onscrambling the quantized Discrete Cosine Transform (DCT) coefficients was proposed in [8], but the JPEG file size is significantly increased. Reversible data hiding (RDH) (e.g., [14]) is applied in [PERSON]'s algorithm [9] and [PERSON]'s algorithm [10] so that the original JPEG images can be completely recovered. In particular, [PERSON]'s algorithm uses a prediction-based RDH technique to achieve reversibility and protects sensitive regions by modifying pixel values in them. However, the size of the privacy-sensitive region (PSR) is restricted. Additionally, a large PSR may cause distortions of a non-sensitive region while a small PSR may increase the file size. In [10], Coltuc's reversible watermarking algorithm [14] is adopted to modify AC coefficients for content protection. Subsequently, two successive AC coefficients are further modified to mark the protected blocks. Although the performance of [10] for content protection was evaluated, the security has not been properly analyzed. As a matter of fact, the protected blocks can be easily identified and the AC coefficients may be restored by a brute force search. To enhance the security, we improve the algorithm in [10] in two aspects. Firstly, the location information of protected blocks is generated instead of modifying two successive AC coefficients. By embedding the location information into the whole JPEG image with the RDH algorithm in [15], the protected blocks can be identified only after data extraction. Secondly, the protected blocks are scrambled with a secret key in our proposed algorithm so that it is more difficult for an adversary to recover the original image. Similar to the algorithm in [10], the information required for image recovery is reversibly hidden in the AC coefficients by adopting the algorithm in [16]. It turns out that the original images can only be obtained after extracting the hidden data with the secret key. To evaluate the performance, invisibility of the protected content, image quality, reversibility and JPEG file size increment are measured. The experimental results show that the proposed algorithm provides good security against attacks. The protected content is invisible while the quality of the other blocks is well preserved. Moreover, the proposed algorithm outperforms the existing techniques in terms of reversibility and file size preservation. In the next section, some related work will be reviewed.