Presentation is loading. Please wait.

Presentation is loading. Please wait.

Masaki Hayashi 2015, Autumn Visualization with 3D CG Digital 2D Image Basic.

Similar presentations


Presentation on theme: "Masaki Hayashi 2015, Autumn Visualization with 3D CG Digital 2D Image Basic."— Presentation transcript:

1 Masaki Hayashi 2015, Autumn Visualization with 3D CG Digital 2D Image Basic

2 2D Image Digitization

3 2D coordinate in image processing

4 Scanning

5 pixel Gray scale & RGB Grey scale (Black & white) RGB (Color)

6 pixel H size V size Image size 320 x 240 640 x 480  SDTV 1920 x 1080  HDTV 3840 x 2160  4K 4096 x 2160  4K (cinema) 7680 x 4320  8K...... Size (Resolution) Spatial

7 Image data 125 5 185 225 12 127 115 114 135.... 3 0 95 45.... 125 518522512127115114 135 3 0 95 45 62235245244 25 1 92 35 9121 3 15165 121....... > series of data > 2 dimensional data

8 pixel H size V size Depth Image depth Depth (sampling bit rate) 8 bits (256 levels) 10 bits (1024 levels) 12 bits (4096 levels) 16 bits,... 24 bits RGB || 8 bits X 3 || 256 X 256 X 256 = 1.677 million colors Depth and Color

9 Aspect ratio 512 1080 1920 480 640 1 : 1 4 : 3 (TV in the past) 16 : 9 (HDTV, 4K, 8K) Square pixel, basically 2304 3456 3 : 2 (Film)

10 Features of image (summary) Resolution Depth Sharpness, spatial detail Dynamic range

11 Image compression

12 JPEG Most popular Mosquito noise, Blocky noise Not suitable for Logo, text, cartoon… GIF Popular in the past. Motion-GIF Only 256 colors PNG Improved version of GIF, Most used on the Internet Un-limited color. OK for both natural image and logo stuff Loss-less compression (no quality selection) Image format

13 How JPEG compress image Split into 8×8 blocks Discrete Cosine Transform (DCT) JPEG data series Quantization & Entropy coding Image Approx. 1/10 compress 8×8 blocky noise Mosquito noise at sharp edge Important Less important 8×8 spatial 8×8 frequency INPUT OUTPUT

14 How GIF compress image Reduce colors LZW compress GIF data series 16777216 colors Good for logo, font, cartoon Bad for photograph No blocky noise, no mosquito Taken over by PNG 256 colors INPUT OUTPUT (similar to ZIP)

15 How PNG compress image Deflate compress GIF data series Good for all kinds Loss less No blocky noise, no mosquito INPUT OUTPUT 16777216 colors (similar to ZIP)

16 Compression method of ZIP, etc. 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 LZW, Deflate,... etc. INPUT compress 0 x 8, 1 x 12 0 1 0 1 0 1 0 1 0 1 01 x 10 Output The more random the input data is, the less compression the output is.

17 Image processing

18 B (Brightness) H (Hue) S (Saturation) G (Green) R (Red) B (Blue) Color scheme Additive color mixing

19 RGB Chroma: Y = 0.3R + 0.59G + 0.11B Brightness: C R = R - Y C B = B - Y Color scheme Brightness + Chroma Hue + Saturation Brightness (Luminance)

20 Chroma Hue + Saturation H = tan -1 (C R /C B ) S = C R 2 + C B 2 CRCR CBCB S H Color scheme CRCBCRCB HSHS

21 White Yellow Cyan Green Magenta Red Blue Color bar

22 Histogram Input image Intensity distribution of an image Histogram

23 Correction

24 9 100 15050 100 120 50 100 120 convolution 50x(-1) + 50x(-1) + 150x(-1) + 100x(-1) + 100x9 + 100x(-1) + 120x(-1) + 120x(-1) + 120x(-1) = 90 90 Filter (3x3 kernel) Input image Output image Spatial filtering

25 1/9 Mean filter 1/9 Smoothing

26 Median filter 110 140122 145 135 120 100 90120 Input image Output image 145 140 135 122 120 110 100 90 Sorting by numerical order Smoothing

27 Gaussian smoothing Text: © 2004 Robert Fisher, Simon Perkins, Ashley Walker, Erik Wolfart σ=1.0 Smoothing

28 Laplacian filter 0 1 0 1 -4 1 0 1 0 1 1 1 1 -8 1 1 1 1 2 2 -4 2 2 Second spatial derivative of an image Edge detection

29 0.0 1.0 1 -2 1 0.0 1.0 Edge detection

30 Gaussian Smoothing Laplacian Laplacian is much noise sensitive To reduce high frequency noise in the output image in out Edge detection

31 0.0 1.0 1 -2 1 Laplacian + 0.0 + - 1.0 2.0 in out 0 0 4 0 0 Edge enhancement using edge signal detected by laplacian Often referred as “Laplacian” Edge enhancement

32 Smoothing + + - in out + + + x k k : scaling constant for adjusting enhancement Text: © 2004 Robert Fisher, Simon Perkins, Ashley Walker, Erik Wolfart Unsharp filter (edge enhancement)

33 Spatial signal Frequency signal f f transforming re-transforming Spatial domain vs Frequency domain

34 DFT IDFT Original image Frequency signal Spatial domain Frequency domain Spatial domain vs Frequency domain DFT: Discrete Fourier Transform

35 DFT IDFT Original image Frequency signal Output image Mask = remove high frequency Filtered signal apply Spatial domain Frequency domain Digital filter

36 Gap If output pixel position is calculated by using input pixel position 2 times magnification Input Output Image magnification

37 Input pixel position should be calculated by output pixel position 2 times magnification Interpolated from the neighbored 4 pixel values Input Output Interporation

38 Original image 5 times zooming No interpolation (Nearest neighbor) With interpolation (Bi-linear) Image magnification

39 This works but not enough 1/2 shrinking Input Output Aliasing problem Image shrinking

40 5 times shrinking Undesired signal called "aliasing" appears Input Output Image shrinking

41 Aliasing noise

42 Mipmap Original image

43 fp / 2 fp / 4 Aliasing fp / 2 fp / 4 No aliasing LPF fp / 2 Sub-sampling & unti-aliasing

44 No unti- aliasing With unti-aliasing (Low pass filtered prior to the shrinking) Unti-aliasing


Download ppt "Masaki Hayashi 2015, Autumn Visualization with 3D CG Digital 2D Image Basic."

Similar presentations


Ads by Google