Image Processing: Embedding Data in Digital Images Sami Khorbotly & Firas Hasan Dept. of Elec. & Comp. Eng. & Comp. Sc. Ohio Northern University
Images Around Us Memories & special moments Law enforcement Biomedical field Advertisements Athletic events News & politics
Analog vs Digital Images Capturing Device Storage Device Display Media
Digital Images & Pixels A digital image is stored as a set of pixels Full image (Thousands of pixels) Subset of the image (5x5 pixels)
Pixels, Resolution, & Image Quality 500x x100 10x Mega Pixels 0.1 Mega Pixels 0.1 Kilo Pixels What’s the resolution of your digital camera? Quality vs storage size trade-off.
Gray Scale Images A number {0-255} represents the amount of light intensity in each pixel 0 ≡ Black, 255 ≡ White, other ≡ different levels of gray
Color Images (RGB System) Each pixel is represented by 3 values representing red, green, and blue components. ColorRGB
Binary Representation of Integers Decimal (base-10) number system represents numeric values using ten symbols: {0, 1, 2,…,9} Binary (base-2) number system represents numeric values using two symbols: {0, 1} DecimalBinary 1 digit 2 digits 3 digits n digits n {0 9} {0 99} {0 999} {0 10 n -1} n222232n2 {0 1} {0 3} {0 7} {0 2 n -1}
Decimal – Binary Conversion = 4x x x x = 1x x x x = 1x x x x2 3 = = 1x x2 4 +1x2 2 +1x2 0 =
Image Storage Pixel values {0-255} Pixel values represented by 8 bits (1 byte) Gray Scale Images A pixel is represented by a single byte Example: 400x250 Image 0.1 Mega Pixels 0.1 Mega Bytes Gray Scale Images A pixel is represented by a single byte Example: 400x250 Image 0.1 Mega Pixels 0.1 Mega Bytes Color Images A pixel is represented by 3 values: R: 1 byte G: 1 byte B: 1 byte Example: 400x250 Image 0.1 Mega Pixels 0.3 Mega Bytes
Storage Examples ≡ ≡ ≡ ≡ ≡
Image Distribution & Copyrights Copying a digital image is as easy as a mouse click How do you protect the rights of the owner? What Is Copyright? According to the U.S. Copyright office * : Copyright is a form of protection provided by the laws of the United States (title 17, U. S. Code) to the authors of “original works of authorship,” including literary, dramatic, musical, artistic, and certain other intellectual works. This protection is available to both published and unpublished works. *
Copyrights (cont ed ) Who Can Claim Copyright*? The copyright in the work of authorship immediately becomes the property of the author who created the work. Only the author or those deriving their rights through the author can rightfully claim copyright. In the case of works made for hire, the employer and not the employee is considered to be the author. Infringement of Copyrights* Anyone who violates any of the exclusive rights of the copyright owner as provided by sections 106 through 122 or of the author as provided in section 106A(a), or who imports copies or phonorecords into the United States in violation of section 602, is an infringer of the copyright or right of the author. *
Copyrights (cont ed ) Remedies for infringement * An infringer of copyright is liable for either— (1) the copyright owner’s actual damages and any additional profits of the infringer, or (2) statutory damages. How can authors protect their properties? “Digital Watermarking” *
Digital Watermarking Embedding digital data into digital audio, video, or other types of signals Watermarking can be visible or invisible Visible watermarking
Invisible Watermarking This image is property of John Smith. All distribution rights are reserved Patient name: John Smith Birth date: Jan 1 st 1950 Blood Pressure: 135/85 Heart rate: 80
Different Applications Owner’s signatures (Reducing Multimedia piracy) Alert Line on TV broadcasts (Emergency public address) Time stamping of digital images Geo tagging of digital images Saving patient’s data on biomedical images
Visible vs Invisible Watermarks Visible watermarks are easier to temper with Invisible watermarks require overhead to be extracted
Invisible Watermarking Focus of this project Data must be stored (hidden) inside the picture file The quality of the picture is not to be (visibly) damaged Definitions Based on the way the watermark is applied, invisible watermarking can be categorized as follows: 1.Blind detection watermarking: Anyone who is aware of the watermarking used can recover the watermark data. 2.Non-Blind detection watermarking: only someone with the original (non watermarked) image can recover the watermark data.
ASCII Code & Data American Standard Code for Information Interchange Character encoding scheme Encodes 128 characters {0 127} in 7 bits each Examples o ‘A’ ≡ ≡ o ‘a’ ≡ ≡ o space ≡ ≡ o ‘/’ ≡ ≡
ASCII code data Property of XCo, Inc … … …
Embedding Data in the Image How to embed the data with minimal image error? Property of XCo, Inc … … … … … … … …
Image Bit Error Effects b 7 b 6 b 5 b 4 b 3 b 2 b 1 b 0 ±1 ±2 ±4±8±16±32 ±128 ±64 Least Signif. Bit (LSB) Least Signif. Bit (LSB) Most Signif. Bit (MSB) Most Signif. Bit (MSB)
Error Bit Example Intended color: (100,150,200) B 0 : ±1B 1 : ±2B 2 : ±4B 3 : ±8 B 4 : ±16B 5 : ±32 B 6 : ±64 B 7 : ±128
LSB Watermarking Sacrifice the LSB in an image (unlikely to be noticed) Number of bits (or characters) that can be embedded is relative to the size of the image Example In a 512 x 512 image, there are 2 18 = 262,144 pixels 1.Can fit 2 18 bits (37,449 characters) in a grayscale image 2.Can fit 3x2 18 bits (112,347characters) in a color image If more space is needed, what bit will you use next? What is the cost to be paid?
LSB Watermarking Example Hello Embed Original Format Integer Format Binary Format
LSB Example (cont ed ) 9 bits can fit in this segment LSB marked in red
LSB Watermarking Results Watermarked Original
LSB Watermarking (cont ed ) Advantages No visible damage to the watermarked image Easy to embed data and then recover it Blind detection is possible Disadvantages Watermark can be tempered with Low immunity to noise and compression
Spread Weighted Sum (SWS) The watermarking is applied by modifying each pixels value as follows: Where: P w :the watermarked pixel value P :the original pixel value b :the data bit to be embedded :a constant parameter
SWS Watermarking Example Hello Embed Original Format Integer Format Binary Format Not Needed
SWS Example (cont ed ) 9 bits can fit in this segment =
SWS Watermarking Results Watermarked Original
Recovering Watermarks Difference between the watermarked & original images Decision based on the sign of the difference Detected watermark = [ ] The value of is a design parameter: * Large good noise immunity, noticeable damage * Small low noise immunity, unnoticeable damage
SWS Watermarking (cont ed ) Advantages Watermark can not be tempered with (only someone with the original image will be able to modify the watermark) Adjustable level of visible damage to the watermarked image Easy to embed data and then recover it Disadvantages Blind detection is not possible (only someone with the original image will be able to read the watermark) Adjustable immunity to noise and compression
Questions ?