Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Preprocessing for JPEG Compression Elad Davidson & Lilach Schwartz Project Supervisor: Ari Shenhar SPRING 2000 TECHNION - ISRAEL INSTITUTE of TECHNOLOGY.

Similar presentations


Presentation on theme: "1 Preprocessing for JPEG Compression Elad Davidson & Lilach Schwartz Project Supervisor: Ari Shenhar SPRING 2000 TECHNION - ISRAEL INSTITUTE of TECHNOLOGY."— Presentation transcript:

1 1 Preprocessing for JPEG Compression Elad Davidson & Lilach Schwartz Project Supervisor: Ari Shenhar SPRING 2000 TECHNION - ISRAEL INSTITUTE of TECHNOLOGY Department of Electrical Engineering The Vision Research and Image Science Laboratory

2 2 Presentation Overview Project goals Theoretical Background Possible Solutions The algorithm Results & Conclusions

3 3 Project Goals Compression –JPEG, GIF –Quality vs. File’s size Object Segmentation –Secondary goal: Separate the objects in the picture.

4 4 Theoretical Background JPEG Compression GIF Compression Mathematical Morphology –Dilation, Erosion, Opening, Closing

5 5 JPEG Lossy Useful for nature pictures, photos, and smooth pictures. Compression ratio: 1:5 for gray scale image, 1:10 – 1:20 for color image

6 6 JPEG Cont. : Method: separate the picture to small blocks (8x8) DCT conversion LPF Uniform quantizer (Max – Loyd) Hophman coding (lossless) Creating an header with the information needed for the image decompressing

7 7 GIF Compression algorithm for colored or gray scale pictures Lossless, compressing ratio – 1:4 to 1:10 Method: scanning the picture, searching for a sequence of similar pixels, insert the sequence into a translate table (LUT) and use this table any time such a sequence is encountered Useful for pictures with only a few gray levels or images with objects that have sharp edges.

8 8 Mathematical Morphology Erosion –Purpose: remove pixel with weak link –Method: subtracting the structure element from each pixel’s area and replacing the pixel’s value with the minimum value of this area.

9 9 Mathematical Morphology Cont. Dilation –Purpose: extending an object –Method: like erosion but the structure is added and the pixel is replaced with the maximum value in the area

10 10 Mathematical Morphology Cont. Opening –Purpose: remove small objects, sharpen edges and eliminate noise. –Method: erosion and dilation. * before vs. after Closing –Purpose: combine objects that have been separated –Method: dilation and erosion

11 11 Possible Solutions Problem: Object Identification - Edge detection - identify the edge and separate it’s inner part. 1.Morphological operation -subtracting the picture after dilation from the original picture 2. CANNY Algorithm – an edge detection algorithm ** Problems – the direction of the edge and what is the inner part of the object are hard to define. - Histogram - using local maxima and separating all it’s neighboring pixels. ** Problems - one maximum can be hidden in another maximum and the object won’t be separated.

12 12 Possible Solutions – Cont. Problem: Representative gray-scale level –Max-Loyd quantizer – iterative algorithm that calculates the center of mass. ** Problems – not efficient for one level quantizing because it can convergent to a local minima –Scalar quantizer – cut LSBits from the pixels. ** Problems – no relation to the actual data of the picture.

13 13 The Algorithm Input – gray scale image

14 14 The Algorithm Cont. Objects’ segmentation –Opening - smooth the edges and reduce noise. –Raster scan - object segmentation. Each object gets its representative value. –The result is the ‘cluster’ matrix

15 15 The Algorithm Cont.

16 16 The Algorithm Cont.

17 17 The Algorithm Cont. Find the representative gray scale level Objects’ uniting Image subtracting - the united picture is subtracted from original image JPEG compression to the image after the subtraction GIF compression to the ‘united’ picture Files’ size calculations - GIF & JPEG

18 18 The Algorithm Cont. Decompressing Adding the JPEG picture to the GIF picture Visual comparison, MSE & PSNR calculations.

19 19 Results & Conclusions Visual Comparison MSE – Mean Square Error PSNR – Peak Signal to Noise Ratio (dB) File’s Size MSE = PSNR = 20 * log10 (255 / sqrt(MSE))

20 20 Results Orig. JPEG JPEG +GIF GIF size JPEG size PSNRMSEname 4.891.881.250.6333.4829.13 Gray_ pk 5.123.371.621.7525.77172.04 Eight 4.293.481.531.9531.2748.43 Coins 7.831.8591.360.49972.440.0037 Test

21 21 Conclusions Visual Comparison – –Good results for pictures with a large difference between the objects and the background and pictures with sharp edges –MSE/PSNR: the values were in the higher quality part of the value range –File size: definitely smaller, about 2/3 of the size of the original picture

22 22 Coins Example

23 23 Example – Cont.

24 24 Example – Cont.


Download ppt "1 Preprocessing for JPEG Compression Elad Davidson & Lilach Schwartz Project Supervisor: Ari Shenhar SPRING 2000 TECHNION - ISRAEL INSTITUTE of TECHNOLOGY."

Similar presentations


Ads by Google