Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS6825: Point Processing Contents – not complete What is point processing? What is point processing? Altering/TRANSFORMING the image at a pixel only.

Similar presentations


Presentation on theme: "CS6825: Point Processing Contents – not complete What is point processing? What is point processing? Altering/TRANSFORMING the image at a pixel only."— Presentation transcript:

1

2 CS6825: Point Processing

3 Contents – not complete What is point processing? What is point processing? Altering/TRANSFORMING the image at a pixel only as a function of that pixel itself.Altering/TRANSFORMING the image at a pixel only as a function of that pixel itself. Negative images Negative images Thresholding Thresholding Logarithmic transformation Logarithmic transformation Power law transforms Power law transforms Grey level slicing Grey level slicing Bit plane slicing Bit plane slicing

4 Why Transform images? Image has noise in it Image has noise in it Image is low contrast Image is low contrast Want to find things in an image Want to find things in an image Want to emphasize things in an image Want to emphasize things in an image Want to remove things in an image Want to remove things in an image Want to de-emphasize things in an image Want to de-emphasize things in an image For fun? For fun?

5 What are we doing in this lecture Teaching you what image transformation at a point is. Teaching you what image transformation at a point is. Showing you a number of common (but, by no means alls) point-based transforms Showing you a number of common (but, by no means alls) point-based transforms Hopefully, you will understand, “You must know why you want to transform and image first. Then hopefully you can remember these transforms to see if any will work for you”. Hopefully, you will understand, “You must know why you want to transform and image first. Then hopefully you can remember these transforms to see if any will work for you”.

6 2 basic kinds of Point Processing Spatial Processing Spatial Processing Pixel values are directly changed in the 2D array of pixel values we use to represent an image. Pixel values are directly changed in the 2D array of pixel values we use to represent an image. This 2D of array of pixel values is referred to as the image SPATIAL DOMAIN. This 2D of array of pixel values is referred to as the image SPATIAL DOMAIN. The word SPATIAL comes from the fact as we move through the image in x and y directions it is moving through the space of the image. The word SPATIAL comes from the fact as we move through the image in x and y directions it is moving through the space of the image.

7 2 basic kinds of Point Processing Frequency Processing Frequency Processing We will discuss this later in class We will discuss this later in class For now, just like you have radio signals that could be shown in the spatial domain, you also can represent them in the frequency domain.....Remember you tune into radio stations by frequency! For now, just like you have radio signals that could be shown in the spatial domain, you also can represent them in the frequency domain.....Remember you tune into radio stations by frequency! Again we will discuss this later. Again we will discuss this later. Spatial domainFrequency Domain

8 General Spatial Processing Origin x y Image f (x, y) (x, y) Spatial Processing Algorithms can be reduced to the form Spatial Processing Algorithms can be reduced to the form g (x, y) = T[ f (x, y)] where f (x, y) is the input image, g (x, y) is the processed image and T is some operator defined over some neighbourhood of (x, y) where f (x, y) is the input image, g (x, y) is the processed image and T is some operator defined over some neighbourhood of (x, y)

9 Point Processing Spatial Processing The simplest spatial domain operations occur when the neighbourhood is simply the pixel itself The simplest spatial domain operations occur when the neighbourhood is simply the pixel itself In this case T is referred to as a point processing operation In this case T is referred to as a point processing operation Point processing operations take the form Point processing operations take the form P new (r,c) = T ( P(r,c) ) P new (r,c) = T ( P(r,c) )

10 Point Processing Spatial Processing We will discuss: We will discuss: Negative Image TransformationNegative Image Transformation ThresholdingThresholding General Kinds of TransformationsGeneral Kinds of Transformations Contrast StretchingContrast Stretching Piecewise Linear transformationsPiecewise Linear transformations Grey Level SlicingGrey Level Slicing Logarithmic transformationsLogarithmic transformations Power Law transformationsPower Law transformations Gamma correctionGamma correction Note: We will discuss histograms and more point- based operations related to it in a future lecture

11 Point Processing Example: Negative Images Negative images enhancing white or grey detail embedded in dark regions of an image Negative images enhancing white or grey detail embedded in dark regions of an image Note how much clearer tissue is in the negative image belowNote how much clearer tissue is in the negative image below P new = 255 - P Original Image Negative Image Images taken from Gonzalez & Woods, Digital Image Processing (2002)

12 Point Processing Example: Thresholding Thresholding transformations are useful for segmentation in which we want to isolate/emphasize an object of interest from a background Thresholding transformations are useful for segmentation in which we want to isolate/emphasize an object of interest from a background Result called “BINARY” image. Result called “BINARY” image. P new = 255.0 0.0 r <= threshold r > threshold Images taken from Gonzalez & Woods, Digital Image Processing (2002)

13 Basic Grey Level Transformations There are many different kinds of grey level transformations There are many different kinds of grey level transformations Three of the most common are shown here Three of the most common are shown here LinearLinear i.e. Negative/Identity i.e. Negative/Identity LogarithmicLogarithmic i.e. Log/Inverse log i.e. Log/Inverse log Power lawPower law n th power/n th root n th power/n th root Images taken from Gonzalez & Woods, Digital Image Processing (2002)

14 Contrast Stretching for Low- Contrast Images Have an image of low contrast Have an image of low contrast Image has only a small number of grey levels (or colors) Image has only a small number of grey levels (or colors) Stretch the over-concentrated grey levels via a nonlinear mapping Stretch the over-concentrated grey levels via a nonlinear mapping One technique - Piece-wise linear stretching functionOne technique - Piece-wise linear stretching function Assign slopes of the stretching region to be greater than 1Assign slopes of the stretching region to be greater than 1 input gray level u output gray level v a b o    Note: a to b in the input grey levels get stretched to the Larger range of  to .

15 Piecewise Linear Transformation We use user-defined transforms, defined by a set of lines “pieced” together….piecewise linear. We use user-defined transforms, defined by a set of lines “pieced” together….piecewise linear. The images below show a contrast stretching linear transform to add contrast to a poor quality image The images below show a contrast stretching linear transform to add contrast to a poor quality image Images taken from Gonzalez & Woods, Digital Image Processing (2002)

16 Gray Level Slicing Highlights a specific range of grey levels Highlights a specific range of grey levels Similar to thresholdingSimilar to thresholding Other levels can be suppressed or maintainedOther levels can be suppressed or maintained Useful for highlighting features in an imageUseful for highlighting features in an image Images taken from Gonzalez & Woods, Digital Image Processing (2002)

17 Logarithmic Transformations The general form of the log transformation is The general form of the log transformation is P new = c * log(1 +P) P new = c * log(1 +P) The log transformation maps a narrow range of low input grey level values into a wider range of output values The log transformation maps a narrow range of low input grey level values into a wider range of output values The inverse log transformation performs the opposite transformation The inverse log transformation performs the opposite transformation

18 Logarithmic Transformations In the following example the Fourier transform of an image is put through a log transform to reveal more detail In the following example the Fourier transform of an image is put through a log transform to reveal more detail P new = log(1 + P) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

19 Power Law Transformations Power law transformations have the following form Power law transformations have the following form P new = c * P γ P new = c * P γ Map a narrow range of dark input values into a wider range of output values or vice versa Map a narrow range of dark input values into a wider range of output values or vice versa Varying γ gives a whole family of curves Varying γ gives a whole family of curves Images taken from Gonzalez & Woods, Digital Image Processing (2002)

20 Power Law Example Original Transformed γ = 0.6

21 Power Law Example (cont…) γ = 0.4

22 Power Law Example (cont…) γ = 0.3

23 Power Law Example (cont…) The images to the right show a magnetic resonance (MR) image of a fractured human spine The images to the right show a magnetic resonance (MR) image of a fractured human spine Different curves highlight different detail Different curves highlight different detail s = r 0.6 s = r 0.4 s = r 0.3 Images taken from Gonzalez & Woods, Digital Image Processing (2002)

24 Power Law Example

25 Power Law Example (cont…) γ = 5.0

26 Power Law Example An aerial photo of a runway is shown An aerial photo of a runway is shown This time power law transforms are used to darken the image This time power law transforms are used to darken the image Different curves highlight different detail Different curves highlight different detail Images taken from Gonzalez & Woods, Digital Image Processing (2002) s = r 3.0 s = r 4.0 s = r 5.0

27 Gamma Correction Many of you might be familiar with gamma correction of computer monitors Many of you might be familiar with gamma correction of computer monitors Problem is that display devices do not respond linearly to different intensities Problem is that display devices do not respond linearly to different intensities Can be corrected using a log transform Can be corrected using a log transform Images taken from Gonzalez & Woods, Digital Image Processing (2002)

28 Gamma Correction One can form an approximate model for displayed luminance Li due to the excitation of gun i with voltage V i for a Monitor as: One can form an approximate model for displayed luminance Li due to the excitation of gun i with voltage V i for a Monitor as: Typically, 1< Gamma γ <= 2.5, standard Gamma = 2.2 Original imageGamma correction= 1.5

29 Gamma Correction New Image pixel = (Original Image pixel ) - γ New Image pixel = (Original Image pixel ) - γ New Image pixel = (Original Image pixel )^-1.5 New Image pixel = (Original Image pixel )^-1.5 Original image New Image Gamma correction= 1.5

30 Gamma Correction Examples Here is an example at different gammas. Here is an example at different gammas. L 0, gamma= 1 L 0 2.2, gamma = 1/(2.2) L 0 1/2.2, gamma = 2.2 This is the best gamma

31 Bit Plane Slicing Often by isolating particular bits of the pixel values in an image we can highlight interesting aspects of that image Often by isolating particular bits of the pixel values in an image we can highlight interesting aspects of that image Higher-order bits usually contain most of the significant visual informationHigher-order bits usually contain most of the significant visual information Lower-order bits contain subtle detailsLower-order bits contain subtle details Images taken from Gonzalez & Woods, Digital Image Processing (2002)

32 Bit Plane Slicing Example Images taken from Gonzalez & Woods, Digital Image Processing (2002) [ 10000000 ] [ 01000000 ] [ 00100000 ] [ 00001000 ] [ 00000100 ] [ 00000001 ] [ 00010000 ] [ 00000010 ]

33 Summary There are many more transformations. We will see some later in class There are many more transformations. We will see some later in class We concentrated on some common point-based transformations in the spatial domain. We concentrated on some common point-based transformations in the spatial domain. Know what your problem is and then decide on or if there is transformation that can help. Know what your problem is and then decide on or if there is transformation that can help. Your class website has some other material that explores this. Your class website has some other material that explores this.


Download ppt "CS6825: Point Processing Contents – not complete What is point processing? What is point processing? Altering/TRANSFORMING the image at a pixel only."

Similar presentations


Ads by Google