Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Image Processing Basics

54,393 views

Published on

Image Processing Basics

Published in: Technology, Business

Image Processing Basics

  1. 1. Saudi Board of Radiology: Physics Refresher Course Kostas Chantziantoniou, MSc 2 , DABR Head, Imaging Physics Section King Faisal Specialist Hospital & Research Centre Biomedical Physics Department Riyadh, Kingdom of Saudi Arabia Image Processing Basics
  2. 2. Image Processing: Basics <ul><ul><li>They are many factors that determine the diagnostic usability of a digital image: </li></ul></ul><ul><ul><ul><li>exposure techniques </li></ul></ul></ul><ul><ul><ul><li>detector quality (technology dependent) </li></ul></ul></ul><ul><ul><ul><li>scatter </li></ul></ul></ul><ul><ul><ul><li>viewing conditions </li></ul></ul></ul><ul><ul><ul><li>quality of readers </li></ul></ul></ul><ul><ul><ul><li>number of readers </li></ul></ul></ul><ul><ul><ul><li>image processing </li></ul></ul></ul>
  3. 3. Image Processing: Basics <ul><ul><li>Why do we need image processing? </li></ul></ul><ul><ul><li>since the digital image is “invisible” it must be prepared for viewing on one </li></ul></ul><ul><ul><li>or more output device (laser printer, monitor, etc) </li></ul></ul><ul><ul><li>the digital image can be optimized for the application by enhancing or </li></ul></ul><ul><ul><li>altering the appearance of structures within it (based on: body part, </li></ul></ul><ul><ul><li>diagnostic task, viewing preferences, etc) </li></ul></ul><ul><ul><li>it might be possible to analyze the image in the computer and provide </li></ul></ul><ul><ul><li>cues to the radiologists to help detect important/suspicious structures </li></ul></ul><ul><ul><li>(e.g.: Computed Aided Diagnosis, CAD) </li></ul></ul>
  4. 4. Image Processing: Transformations <ul><ul><li>They are three types of image processing (transformation algorithms) used: </li></ul></ul><ul><ul><ul><li>image-to-image transformations </li></ul></ul></ul><ul><ul><ul><li>image-to-information transformations </li></ul></ul></ul><ul><ul><ul><li>information-to-image transformations </li></ul></ul></ul>
  5. 5. Image Processing: Image-to-Image Transformations <ul><ul><li>Image In  Image Out </li></ul></ul><ul><ul><ul><li>enhancement (make image more useful, pleasing) </li></ul></ul></ul><ul><ul><ul><li>restoration (compensate for known image degradations to produce </li></ul></ul></ul><ul><ul><ul><li>an image that is “closer” to the (aerial) image that came out of the </li></ul></ul></ul><ul><ul><ul><li>patient - e.g: deblurring, grid line removal) </li></ul></ul></ul><ul><ul><ul><li>geometry (scaling/sizing/zooming, morphing one object into </li></ul></ul></ul><ul><ul><ul><li>another, distorting or altering the spatial relationship between </li></ul></ul></ul><ul><ul><ul><li>pixels) </li></ul></ul></ul>
  6. 6. Image Processing: Image-to-Image Transformations <ul><ul><li>They are three types of image-to-image transformations: </li></ul></ul><ul><ul><ul><li>point transformation </li></ul></ul></ul><ul><ul><ul><li>local transformation </li></ul></ul></ul><ul><ul><ul><li>global transformation </li></ul></ul></ul>
  7. 7. Image Processing: Image-to-Image Transformations <ul><ul><li>Point Transformation (use Look-up Tables to adjust Tonescale or image contrast) </li></ul></ul><ul><ul><li>the shape of the LUT depends on the desired “look” of the output image </li></ul></ul><ul><ul><li>and the structure of the histogram </li></ul></ul>
  8. 8. Image Processing: Image-to-Image Transformations
  9. 9. Image Processing: Image-to-Image Transformations
  10. 10. Image Processing: Image-to-Image Transformations
  11. 11. Image Processing: Image-to-Image Transformations
  12. 12. Image Processing: Image-to-Image Transformations Image contrast window
  13. 13. Image Processing: Image-to-Image Transformations Image brightness window
  14. 14. Image Processing: Image-to-Image Transformations <ul><ul><li>Non-linear LUTs can be used as well (but more complex to implement) </li></ul></ul>
  15. 15. Image Processing: Image-to-Image Transformations <ul><ul><li>What LUT shape should be used? </li></ul></ul>
  16. 16. Image Processing: Image-to-Image Transformations <ul><ul><li>Local Transformation (Edge Enhancement, Zooming) </li></ul></ul>
  17. 17. Image Processing: Image-to-Image Transformations <ul><ul><li>Edge Enhancement (Un-sharp Masking Technique) </li></ul></ul>
  18. 18. Image Processing: Image-to-Image Transformations <ul><ul><li>Creating a blurred image </li></ul></ul>The pixels within the kernel are averaged to determine the value of the center pixel for the output image Repeat process for all pixels in image
  19. 19. Image Processing: Image-to-Image Transformations Kernel size will have a large effect on the level of smoothing that is performed Sum of all pixel weight factors in kernel must equal 1
  20. 20. Image Processing: Image-to-Image Transformations
  21. 21. Image Processing: Image-to-Image Transformations <ul><ul><li>Creating a “amplified” difference image </li></ul></ul>
  22. 22. Image Processing: Image-to-Image Transformations <ul><ul><li>Creating the final edge enhanced output image </li></ul></ul>
  23. 23. Image Processing: Image-to-Image Transformations <ul><ul><li>Global Transformation (Spatial frequency “Fourier” decomposition): </li></ul></ul>
  24. 24. Image Processing: Image-to-Image Transformations
  25. 25. Image Processing: Image-to-Information Transformations <ul><ul><li>Image In  Information (Data) Out </li></ul></ul><ul><ul><ul><li>image statistics (histograms) </li></ul></ul></ul><ul><ul><ul><li>image compression </li></ul></ul></ul><ul><ul><ul><li>image analysis (image segmentation, feature extraction, pattern </li></ul></ul></ul><ul><ul><ul><li>recognition) </li></ul></ul></ul><ul><ul><ul><li>computer-aided detection and diagnosis (CAD) </li></ul></ul></ul>
  26. 26. Image Processing: Image-to-Information Transformations <ul><ul><li>Image Statistics (Histogram) </li></ul></ul><ul><ul><li>the histogram is the fundamental tool for </li></ul></ul><ul><ul><li>image analysis and image processing </li></ul></ul><ul><ul><li>it histogram is created by examining each </li></ul></ul><ul><ul><li>pixel in the digital image and counting the </li></ul></ul><ul><ul><li>number of occurrences of each pixel value </li></ul></ul><ul><ul><li>(or Code Value) </li></ul></ul>
  27. 27. Image Processing: Image-to-Information Transformations
  28. 28. Image Processing: Image-to-Information Transformations <ul><ul><li>Low Contrast Image Histograms </li></ul></ul><ul><ul><li>low contrast images produce tall </li></ul></ul><ul><ul><li>and narrow histograms </li></ul></ul><ul><ul><li>histogram covers a short range of </li></ul></ul><ul><ul><li>pixels values </li></ul></ul><ul><ul><li>High Contrast Image Histograms </li></ul></ul><ul><ul><li>high contrast images produce </li></ul></ul><ul><ul><li>short and flat (wide) histograms </li></ul></ul><ul><ul><li>histogram covers a wide range of </li></ul></ul><ul><ul><li>pixels values </li></ul></ul><ul><ul><li>NOTE: histograms do not care for the location of the pixels (both high contrast images shown above have the same histogram) </li></ul></ul>
  29. 29. Image Processing: Image-to-Information Transformations
  30. 30. Image Processing: Image-to-Information Transformations <ul><ul><li>Image Compression </li></ul></ul><ul><ul><li>medical images can contain huge amounts of data (CT image: 0.25 MB, </li></ul></ul><ul><ul><li>CR chest image: 8 MB, Digital Mammo: 32 MB) </li></ul></ul><ul><ul><li>image compression aims to reduce the total number of bits needed to </li></ul></ul><ul><ul><li>represent the image without compromising image quality, which in turn: </li></ul></ul><ul><ul><ul><li>reduces storage requirements </li></ul></ul></ul><ul><ul><ul><li>reduces the time required to transmit images </li></ul></ul></ul><ul><ul><ul><li>uses existing network bandwidth more effectively </li></ul></ul></ul><ul><ul><li>Image compression is more than: </li></ul></ul><ul><ul><li>sampling at a lower rate or throwing away pixels </li></ul></ul><ul><ul><li>quantizing each pixel more coarsely or reducing the precision of each pixel </li></ul></ul>
  31. 31. Image Processing: Image-to-Information Transformations <ul><ul><li>Why can images be compressed? </li></ul></ul><ul><li>Redundancy : relationship do exist between pixels in an image based on their location </li></ul><ul><li>algorithms can be spatial (statistical), temporal or spectral (wavelet) in nature </li></ul>Irrelevancy : pixels included in image that do not add to the diagnostic information
  32. 32. Image Processing: Image-to-Information Transformations <ul><ul><li>Two types of image compression are used: </li></ul></ul><ul><ul><li>Lossless (Reversible) Compression </li></ul></ul><ul><ul><li>uses statistical redundancy only </li></ul></ul><ul><ul><li>compression ratios range from 2:1 to 4:1 </li></ul></ul><ul><ul><li>decompressed (reconstructed) images is numerically identical to original </li></ul></ul><ul><ul><li>Lossy (Irreversible) Compression </li></ul></ul><ul><ul><li>uses statistical redundancy and irrelevancy </li></ul></ul><ul><ul><li>compression ratios range from 6:1 to 20:1 and more </li></ul></ul><ul><ul><li>decompressed image is degraded relative to original </li></ul></ul>
  33. 33. Image Processing: Image-to-Information Transformations <ul><ul><li>Image Analysis (Segmentation) </li></ul></ul>Original image Original image with segmentation data
  34. 34. Image Processing: Information-to-Image Transformations <ul><ul><li>Information (Data) In  Image Out </li></ul></ul><ul><ul><ul><li>decompression of compressed image data </li></ul></ul></ul><ul><ul><ul><li>reconstruction of image slices from CT or MRI raw data </li></ul></ul></ul><ul><ul><ul><li>computer graphics, animations and virtual reality (synthetic objects) </li></ul></ul></ul>
  35. 35. Image Processing: Information-to-Image Transformations <ul><ul><li>3D Image Reconstruction </li></ul></ul>
  36. 36. Image Processing: Information-to-Image Transformations <ul><ul><li>Image Synthesis </li></ul></ul>
  37. 37. Image Output (Reconstruction): Basics <ul><ul><li>Why do we need to reconstruct the image? </li></ul></ul><ul><ul><li>the digital image is still a 2D array of numbers (pixels values) </li></ul></ul><ul><ul><li>if it is to be viewed by a human it must be converted back to an analog </li></ul></ul><ul><ul><li>image on some display device and/or medium (e.g.: CRT monitor, </li></ul></ul><ul><ul><li>hardcopy) </li></ul></ul><ul><ul><li>so digital image must be reconstructed for output device </li></ul></ul>
  38. 38. Image Output (Reconstruction): What is the problem? Nuclear medicine image (96 x 128, 6 bit) to be printed on a laser printer film (4k x 5k, 12 bit) <ul><ul><li>The problem is: </li></ul></ul><ul><ul><li>how do we match the gray scales (tonescale)? </li></ul></ul><ul><ul><li>how do we match the image size? </li></ul></ul>
  39. 39. Image Output (Reconstruction): What is the problem? CR image (2k x 2.5k, 12 bit) to be displayed on a CRT monitor (1.2k x 1k, 8 bit)
  40. 40. Image Output (Reconstruction): Tonescale <ul><ul><li>Output system tonescale depends on: </li></ul></ul><ul><ul><li>image processing applied (output device should not change any post </li></ul></ul><ul><ul><li>processing that was done on the image prior to this step) </li></ul></ul><ul><ul><li>calibration of output device (very important & can vary with time) </li></ul></ul><ul><ul><li>dynamic range of output device </li></ul></ul><ul><ul><li>viewing conditions </li></ul></ul><ul><ul><li>observer </li></ul></ul>
  41. 41. Image Output (Reconstruction): Tonescale <ul><ul><li>Output Calibration (needs to be performed frequently) </li></ul></ul><ul><ul><li>every output device has a LUT that relates its output pixel values to the </li></ul></ul><ul><ul><li>input pixel values that generated them </li></ul></ul>Laser Printer CRT Monitor
  42. 42. Image Output (Reconstruction): Tonescale <ul><ul><li>Dynamic Range </li></ul></ul><ul><ul><li>every output device has a different dynamic range that must be considered </li></ul></ul><ul><ul><li>when selecting or calibrating the device LUT </li></ul></ul><ul><ul><li>Dynamic Range = Highest signal value device can produce </li></ul></ul><ul><ul><ul><ul><ul><li> Lowest signal value device can produce </li></ul></ul></ul></ul></ul>Dynamic Range = antilog(3.0) = 1000 therefore dynamic range of film is 1,000:1
  43. 43. Image Output (Reconstruction): Tonescale <ul><li>Must use LUTs that compensate for differences in dynamic range : </li></ul><ul><li>CRT monitors: non-linear </li></ul><ul><li>Laser printers: linear or non-linear (to introduce additional contrast) </li></ul>
  44. 44. Image Output (Reconstruction): Tonescale <ul><ul><li>Viewing Conditions </li></ul></ul>
  45. 45. Image Output (Reconstruction): Output Geometry <ul><ul><li>Image Scaling Techniques </li></ul></ul><ul><ul><li>in order to display images properly on the output device, the image may </li></ul></ul><ul><ul><li>have to be scaled by the use of one of the following techniques: </li></ul></ul><ul><ul><ul><li>decimation (sub-sampling) </li></ul></ul></ul><ul><ul><ul><li>interpolation </li></ul></ul></ul>
  46. 46. Image Output (Reconstruction): Decimation <ul><ul><li>this technique is required when image matrix size is too big for output </li></ul></ul><ul><ul><li>device </li></ul></ul><ul><ul><li>method of decimation is determined by degree of reduction (may have </li></ul></ul><ul><ul><li>image quality concerns) </li></ul></ul>
  47. 47. Image Output (Reconstruction): Decimation <ul><ul><li>Methodology </li></ul></ul>
  48. 48. Image Output (Reconstruction): Decimation <ul><ul><li>Imaging Concerns </li></ul></ul><ul><ul><li>decimation can be dangerous </li></ul></ul><ul><ul><li>high frequency signals can be </li></ul></ul><ul><ul><li>removed during sub-sampling and </li></ul></ul><ul><ul><li>cause artifacts </li></ul></ul><ul><ul><li>proper decimation requires that the </li></ul></ul><ul><ul><li>digital image be smoothed (blurred) </li></ul></ul><ul><ul><li>first to remove any signal frequencies </li></ul></ul><ul><ul><li>that are higher then half of the new </li></ul></ul><ul><ul><li>sampling frequency </li></ul></ul>
  49. 49. Image Output (Reconstruction): Decimation
  50. 50. Image Output (Reconstruction): Interpolation <ul><ul><li>Why do we need to interpolation? </li></ul></ul><ul><ul><li>the digital image is too small for output device and we have to scale it up </li></ul></ul><ul><ul><li>problem is that when we scale the image up, we have new pixels that will </li></ul></ul><ul><ul><li>require new pixel values, that should make the new image appear </li></ul></ul><ul><ul><li>continuous in space and in gray scale, note output devices are analog </li></ul></ul><ul><ul><li>devices (e.g.: laser printer, CRT monitor) </li></ul></ul><ul><ul><li>three interpolation techniques are often used: </li></ul></ul><ul><ul><ul><li>nearest neighbor interpolation (pixel replication) </li></ul></ul></ul><ul><ul><ul><li>linear (or bilinear) interpolation </li></ul></ul></ul><ul><ul><ul><li>cubic (spline) interpolation (nonlinear interpolation) </li></ul></ul></ul>
  51. 51. Image Output (Reconstruction): Interpolation <ul><ul><li>What are the effects of interpolation? </li></ul></ul>NOTE the human eye-brain system is an efficient interpolator After blurring your eyes
  52. 52. Image Output (Reconstruction): Interpolation <ul><ul><li>What does an interpolator do? </li></ul></ul><ul><ul><li>creates enough pixels in the new digital image such that the matrix sent to </li></ul></ul><ul><ul><li>the output device produces an image of the right size </li></ul></ul><ul><ul><li>generates new pixels with gray values in such a way that when the display </li></ul></ul><ul><ul><li>aperture (electron gun: CRT’s or laser spot: laser cameras) marks the </li></ul></ul><ul><ul><li>output medium, it creates the impression that the image is continuous in </li></ul></ul><ul><ul><li>space and continuous in values </li></ul></ul>NOTE excessive interpolation can degrade image quality
  53. 53. Image Output (Reconstruction): Interpolation <ul><ul><li>the interpolator uses the known pixels values to calculate or produce new </li></ul></ul><ul><ul><li>pixels anywhere within the image </li></ul></ul><ul><ul><li>interpolation adds no new information or detail to the image </li></ul></ul>
  54. 54. Image Output (Reconstruction): Nears Neighbor Interpolation <ul><ul><li>Methodology </li></ul></ul>
  55. 55. Image Output (Reconstruction): Bi-linear Interpolation <ul><ul><li>Methodology </li></ul></ul>
  56. 56. Image Output (Reconstruction): Cubic Interpolation <ul><ul><li>Methodology </li></ul></ul>
  57. 57. Image Output (Reconstruction): Interpolation <ul><ul><li>all reconstructions of analog signals are approximations </li></ul></ul><ul><ul><li>which interpolator to use depends on the application needs: </li></ul></ul><ul><ul><ul><li>Nearest neighbor : maintains/inserts hard edges around pixels (good </li></ul></ul></ul><ul><ul><ul><li>for text and some images like nuclear medicine) </li></ul></ul></ul><ul><ul><ul><li>Linear : smoothing effect, sometimes excessive (good to suppress </li></ul></ul></ul><ul><ul><ul><li>high frequency structures or noise), very easy to implement </li></ul></ul></ul><ul><ul><ul><li>Cubic : can produce very accurate reconstructions but more complex </li></ul></ul></ul><ul><ul><ul><li>and costly to implement </li></ul></ul></ul>
  58. 58. Image Output (Reconstruction): Display Aperture <ul><ul><li>Output device aperture size does effect image quality and perceived image resolution </li></ul></ul>
  59. 59. Image Output (Reconstruction): Addressability/Resolution <ul><ul><li>Because output device has 2k x 2.5 pixels it does not mean you can see all of them </li></ul></ul><ul><ul><li>Addressability (matrix size) </li></ul></ul><ul><ul><li>is the data capacity of the output device characterized by the number of </li></ul></ul><ul><ul><li>values that are addressable by the user (a 4k x 5k laser printer has about </li></ul></ul><ul><ul><li>4000 x 5000 = 20,000,000 addressable points (pixels) over its usable area </li></ul></ul><ul><ul><li>Resolution </li></ul></ul><ul><ul><li>the ability to see or measure details in the output </li></ul></ul><ul><ul><li>device </li></ul></ul><ul><ul><li>more important than addressability since it </li></ul></ul><ul><ul><li>determines the usefulness of a given output device </li></ul></ul><ul><ul><li>is usually lower than addressability (due to effects of </li></ul></ul><ul><ul><li>display aperture) </li></ul></ul>

×