Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computational Biology, Part 23 Biological Imaging III G. Steven Vanni Robert F. Murphy Copyright  1998, 2000. All rights reserved.

Similar presentations


Presentation on theme: "Computational Biology, Part 23 Biological Imaging III G. Steven Vanni Robert F. Murphy Copyright  1998, 2000. All rights reserved."— Presentation transcript:

1 Computational Biology, Part 23 Biological Imaging III G. Steven Vanni Robert F. Murphy Copyright  1998, 2000. All rights reserved.

2 Basic Image Processing Operations Arithmetic Operations Arithmetic Operations Kernel Operations Kernel Operations Image Math Image Math

3 Arithmetic Operations Two cases: Two cases:  Perform a single operand operation (e.g., logarithm, square root) on each pixel of an image  Perform a dual operand operation (e.g., add, multiply) on each pixel of an image using a constant as the second operand In both cases, the result is usually stored in the same pixel location (“storing in place”) In both cases, the result is usually stored in the same pixel location (“storing in place”)

4 Arithmetic Operations

5 Kernel Operations Basic idea: Use a matrix (usually square and of odd dimension, e.g., 3x3) in combination with an image to generate a new image Basic idea: Use a matrix (usually square and of odd dimension, e.g., 3x3) in combination with an image to generate a new image Algorithm: Algorithm:  For each pixel in the image (the current pixel)  Align the matrix to center it on that pixel  For each position in the matrix, multiply the corresponding pixel value in the image by the value in the matrix and sum the results  Store the result in the current pixel

6 Kernel Operations A matrix used in this fashion is called a kernel A matrix used in this fashion is called a kernel Note that the operation is different from matrix multiplication of the kernel by the image because Note that the operation is different from matrix multiplication of the kernel by the image because  the dimensions don’t match, and  all elements of the matrix are combined to give one result

7 Common Kernel Operations used in Image Processing Smoothing Smoothing Sharpening Sharpening Edge Finding Edge Finding

8 Examples of Kernel Operations using NIH Image Open an example file (from Mellon: BioServer: File Service: Courses: 03310: Demos: NIH Image files) Open an example file (from Mellon: BioServer: File Service: Courses: 03310: Demos: NIH Image files)

9 Original image Original image

10 Examples of Kernel Operations using NIH Image Smooth Smooth

11 Results of one Smooth Results of one Smooth

12 Results of a second Smooth Results of a second Smooth

13 Examples of Kernel Operations using NIH Image Close smoothed image, reopen original image, then Sharpen Close smoothed image, reopen original image, then Sharpen

14 Original image Original image

15 Image after one Sharpen Image after one Sharpen

16 Image after a second Sharpen Image after a second Sharpen

17 Examples of Kernel Operations using NIH Image Close sharpened image, reopen original image, then Find Edges Close sharpened image, reopen original image, then Find Edges

18 Image after Find Edges Image after Find Edges

19 Example kernels Smoothing Smoothing

20 Example kernels Sharpen Sharpen

21 Example kernels Edge detection (Sobel) Edge detection (Sobel)

22 Image Math Basic idea: Combine two images using an dual operand operator to generate a new image Basic idea: Combine two images using an dual operand operator to generate a new image Algorithm: Algorithm:  For each pixel in the first image, operate on it using the corresponding pixel in the second image and store the result in the corresponding pixel in a new (output) image

23 Image Math Any operator can be used Any operator can be used Most common operators: Most common operators:  division: generate ratio image  logical AND: mask one image with another (usually binary) image

24 Examples of Image Math using NIH Image Open original image and sharpen once (save as Abdomen.sharpen1), reopen original image Open original image and sharpen once (save as Abdomen.sharpen1), reopen original image

25 Ratio of sharp to original image (shows regions affected by sharpen) Ratio of sharp to original image (shows regions affected by sharpen)

26 Image Math vs. Arithmetic Operations Note difference between Image Math which does an operation on two images and Arithmetic which does an operation on a single image and a constant Note difference between Image Math which does an operation on two images and Arithmetic which does an operation on a single image and a constant

27 Summary: Basic Image Processing Operations Arithmetic Operations Arithmetic Operations  Inputs: Image, Constant (optional)  Common use: Subtract background Kernel Operations Kernel Operations  Inputs: Image, Kernel  Common use: Smoothing Image Math Image Math  Inputs: Two images  Common use: Generate ratio image


Download ppt "Computational Biology, Part 23 Biological Imaging III G. Steven Vanni Robert F. Murphy Copyright  1998, 2000. All rights reserved."

Similar presentations


Ads by Google