1 / 32

Image 2

Image 2. Subject : T0934 / Multimedia Programming Foundation Session : 5 Tahun : 2009 Versi : 1/0. Learning Outcomes. In the end of this session, students must be able to: Understand the basic principal of image transformation and enhancement

erelah
Download Presentation

Image 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Image 2 Subject : T0934 / Multimedia Programming Foundation Session : 5 Tahun : 2009 Versi : 1/0

  2. Learning Outcomes In the end of this session, students must be able to: • Understand the basic principal of image transformation and enhancement • Apply correct Java syntax to transform, enhance, and display an image

  3. Course Outlines • Digital Image Definition • Image Transformation • Image Enhancement • Java 2D API

  4. Digital Image Definition • Image  array of pixel  Z(x,y) X 0 N Z Y X = width (0 – N) Y = height (0 – M) Z = pixel values M

  5. Digital Image Definition • Image  Z(x,y) • Z refers to RGB values or brightness

  6. Image Transform in Java • drawImage • draw and scale an image • ConvolveOp • blur or sharpen an image • AffineTransformOp • transform an image • Graphics2D.setClip • crop an image

  7. Image Enhancement in Java • LookupOp • remap pixel colors (ex : a negative image) • RescaleOp • lighten/darken or reduce/increase opacity of the image

  8. drawImage This is an example to draw image with Java2D

  9. Image Transformation newZ (x,y) = F(Z(x,y)) = result of a Function based on originalZ(x,y) Horizontal Flipping x’ = N – x y’ = y

  10. Image Transformation • Vertical Flipping x’ = x y’= M - y

  11. Image Transformation • Rotation a x' cos a -sin a 0 x y' = sin a cos a 0 y z' 0 0 1 Z Matrix / Kernel

  12. Image Rotation • The basic algorithm is not used in practice • contains unwanted gaps or holes  usually requires a greater number of pixels than the source to properly display the rotation • Therefore, interpolation is used to solve this problem Gaps/holes

  13. Image Interpolation Interpolation Interpolation using known data to estimate values at unknown points.

  14. Image Transformation • Cropping • Scale • Shear

  15. AffineTransformOp Rotate Full codes are downloadable in Additional Material

  16. AffineTransformOp Shear Full codes are downloadable in Additional Material Bina Nusantara

  17. AffineTransformOp Scale Full codes are downloadable in Additional Material Bina Nusantara

  18. AffineTransformOp Translate Full codes are downloadable in Additional Material Bina Nusantara

  19. Scale x’ y’ 1 sx 0 0 0 sy 0 0 0 1 x y 1 = *

  20. RescaleOp Rescaling Full codes are downloadable in Additional Material

  21. Shear x’ y’ 1 1 h 0 0 1 0 0 0 1 x y 1 = *

  22. Image Enhancement Convolution • an operation in which the final pixel is the weighted sum of the neighboring pixels • Use matrix/kernel as well  convolution kernel / linear filter

  23. Convolution • Blurring Note : This is only an example of many blur kernel variations X Y Z 1 2 1 2 4 2 1 2 1

  24. Convolution • Sharpening Note : This is only an example of many sharpen kernel variations X Y Z -1 -1 -1 -1 9 -1 -1 -1 -1

  25. Convolution • Edge Detection Note : This is only an example of many edge detection kernel variations X Y Z -1 -1 -1 -1 8 -1 -1 -1 -1

  26. ConvolveOp Blur Full codes are downloadable in Additional Material

  27. ConvolveOp Sharpen Full codes are downloadable in Additional Material Bina Nusantara

  28. ConvolveOp Edge Full codes are downloadable in Additional Material Bina Nusantara

  29. Image Enhancement • Brighten/Darken • Opacity Brighten Darken Opacity 80% Opacity 50%

  30. Graphics2D.setClip setClip is used to clip a portion of images to make a new image

  31. LookupOp Invert Color Full codes are downloadable in Additional Material

  32. References • Image Processing with Java 2D. 2008. http://www.javaworld.com/javaworld/jw-09-1998/jw-09-media.html?page=3 • Image Processing and Enhancement. 1999. http://java.sun.com/j2se/1.3/docs/guide/2d/spec/j2d-image.fm8.html • Image Processing Fundamentals. 2009. http://www.ph.tn.tudelft.nl/Courses/FIP/noframes/fip.html • Basic Concepts in Digital Image Processing. 2004. http://micro.magnet.fsu.edu/primer/digitalimaging/javaindex.html • The Digital Darkroom. 2003. http://www.spinroot.com/pico/a3.pdf • Transforming Shapes, Text, and Images. 2008. http://java.sun.com/docs/books/tutorial/2d/advanced/transforming.html • Digital Image Interpolation. 2009. http://www.cambridgeincolour.com/tutorials/image-interpolation.htm • Image Convolution. 2009. http://www.eas.asu.edu/~karam/2dconvolution/ • Image Filtering with GLSL - Convolution Kernels. 2009. http://www.ozone3d.net/tutorials/image_filtering.php • Fundamentals of Image Processing. 2009. http://www.cs.dartmouth.edu/~farid/tutorials/fip.pdf

More Related