47
1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302, India [email protected]

1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

1

Image Resizing and Other applications

Jayanta MukhopadhyayDepartment of Computer Science & Engineering

Indian Institute of Technology, Kharagpur, 721302, India

[email protected]

Page 2: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

2

Image Down-Sampling

LxM8x8 blocks

BlockComposition

Larger DCT blocks

8x8 block

Sub-bandApprox.

Page 3: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

3

Image Up-Sampling

LxM8x8 blocks

Sub-bandApprox.

Larger DCT blocks8x8 block

BlockDecompos.

Page 4: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

4

Image Up-Sampling: A different Strategy

A few8x8 blocks

Block Decompos.

Smallaer DCT blocks

8x8 block

Sub-bandApprox.

Page 5: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

5

Some results related to image halving and image doubling

Page 6: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

6

Comparative performance

 Images

PSNR (dB)

DA SB TR

LenaWatchCapF-16

34.6429.2634.3332.43

34.8329.5734.3332.70

34.9529.7234.3732.82

PSNR values after halving and doubling a grey level image.

Mukherjee, Mitra (2002) , IEEE CSVT

Page 7: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

7

PSNR values after halving and doubling a color image.

 Images

PSNR (dB)

DA SB TR

LenaPeppersBaboon

33.8226.3922.90

34.0026.5422.87

34.0926.5922.88

Comparative performance

Page 8: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

8

Comparative performance

PSNR plots for different techniques at varying compression ratio for color images

Lena Peppers

Page 9: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

11

Arbitrary Resizing: Some examples

Mukherjee and Mitra (2005), IEE VISP

Page 10: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

12

2x3 Down-Sampling

Page 11: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

13

2x3 Up-Sampling

Page 12: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

14

HDTV Format

Page 13: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

15

NTSC Format

Page 14: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

16

Color Image resizing: An Example

2x3 Down-sampling

Page 15: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

17

2x3 Up-Sampling

Page 16: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

18

Wavelet Resizing

D o w ns a m ple d im a g e

ID W TL L

L L O

O OIM A G E

W a ve le ts ubba nds

U pa s m ple dim a g e

W a ve le t D o ubling

IM A G E LLLL H L

LH H H

D o w ns a m ple d im a g e

D W T

W a ve le ts ubba nds

W a ve le t H a lving

Frajka and Zegar, SP and IC, 2004.

Page 17: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

19

Up-sampling and Down-Up-sampling and Down-sampling in the DCT domainsampling in the DCT domain

Page 18: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

20

DCT domain Upsampling with Zero Insertion

Type-II DCT of upsampled signal as obtained throughzero insertion of signal x(n) is computed by:

Note:- DCT obtained is referred as upsampled DCT.

Page 19: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

21

A typical conversion matrix4x4 block to 8x8 upsampled type-II DCT

For even sample xoxoxoxo…

For odd sampleoxoxoxox…

Page 20: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

22

For LLsubba

nd

For LH

subband

Downsampling from block DCT

Page 21: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

23

DCT-Wavelet Downsampling

LL

D o w ns a m ple d im a g e

B W T

D o w ns a m ple dim a g e D C T blo c k s

D C T

Im a g eD C T blo c k s

D C T -W a ve le t

LL s ubba nd tra ns c o ding

Page 22: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

24

Transcoding Matrix for downsampling

Ttd

Page 23: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

25

Upsampling

D o w ns a m ple dim a g e D C T blo c k s

LLID C T W B D T

U ps a m ple d im a g eD C T blo c k s

D o w ns a m ple d im a g e

W a ve le t-D C T

LL s ubba nd tra ns c o ding

Page 24: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

26

Transcoding Matrix for upsampling

TTuu

Page 25: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

27

Results: Resizing with threshold

Cost of resizing with input/output representation in block DCT domain

Page 26: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

28

Resizing Results

Poor Performance

Page 27: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

29

Resizing Results

Original DWT on Image(Downsampling)

Page 28: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

30

Resizing Results

Proposed upsamplingPSNR=35.28 dB, JPQM=9.65

Wavelet upsampling PSNR=35.28 dB, JPQM=9.86

Page 29: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

31

DCT upsampl ingPSNR=29.96 dB, JPQM=7.86

Bilinear upsamplingPSNR=29.74dB, JPQM=9.23

Resizing Results

Page 30: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

32

Resizing Results

Sparse data PSNR=33.97dB

Non-sparse data PSNR=35.19 dB

Page 31: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

33

Extraction of ROI

Page 32: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

34

Extraction of ROI from an image in the DCT domain

If a 8x8 block is totally contained in ROI, output it as it is.

If a 8x8 block is totally outside of ROI, set DCT values to ZERO.

For a mixed 8x8 block, perform quad-tree decomposition. Retain the coefficients if a leaf node is totally contained in ROI, else discard it.

Recompose the decomposed nodes to a 8x8 block following the same quad-tree partitioning.

Page 33: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

35ORGINAL IMAGE

Page 34: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

36

BINARY OF REGION OF INTEREST

Page 35: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

37

EXTRACTED IMAGE

Page 36: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

38

ORIGINAL IMAGE

Page 37: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

39

 

BINARY OF REGION OF INTEREST

Page 38: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

40

EXTRACTED IMAGE

Page 39: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

41

Logo insertion

Page 40: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

42

Insertion of a logo in the DCT domain Form an image (called as logo-image) of same

size with the logo placed in desired location. The rest of the pixels are set to zero.

Partition the logo-image in 8x8 blocks. If all the pixels of a block belong to the logo,

perform 8x8 DCT of that block and replace the corresponding DCT block.

If a ZERO block of logo-image is totally contained in the DCT block of the given image. Output the corresponding

DCT block of the given image.

Page 41: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

43

(contd.)

For a mixed block, perform multilevel decomposition following a quad-tree. Retain the DCT coefficients of either from the given image or from the logo-image according to the homogeneous property of its leaf-node.

Recompose the multilevel-decomposed coefficients to a 8x8 DCT block.

Page 42: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

44

ORIGINAL IMAGE

Page 43: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

45

LOGO TO BE INSERTED

Page 44: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

46ORIGINAL IMAGE WITH LOGO

INSERTED

Page 45: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

47

ORIGINAL IMAGE WITH LOGO INSERTED

Page 46: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

48

IMAGE WITH LOGO INSERTED

Page 47: 1 Image Resizing and Other applications Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur, 721302,

49

Thanks