Presentation is loading. Please wait.

Presentation is loading. Please wait.

1. General Image Operations Three type of image operations 1.Point operations 2.Geometric operations 3.Spatial operations.

Similar presentations


Presentation on theme: "1. General Image Operations Three type of image operations 1.Point operations 2.Geometric operations 3.Spatial operations."— Presentation transcript:

1 1

2 General Image Operations Three type of image operations 1.Point operations 2.Geometric operations 3.Spatial operations

3 Point Operations

4  Operation depends on Pixel's value.  Context free (memory-less).  Operation can be performed on the Histogram.  Example:

5 Geometric Operations

6  Operation depend on pixel's coordinates.  Context free.  Independent of pixels value.  Example:

7 Spatial Operations

8  Operation depends on Pixel's value and coordinates.  Context dependant.  Spatial v.s. Frequency domain.  Example:

9 Point Operations A point operation can be defined as a mapping function: where v stands for gray values. M(v) takes any value v in the source image into v new in the destination image. Simplest case - Linear Mapping: M(v) v p q p’p’ q’q’

10 If it is required to map the full gray-level range (256 values) to its full range while keeping the gray-level order - a non-decreasing monotonic mapping function is needed: v M(v) 255 contraction stretching

11 Contrast Enhancement If most of the gray-levels in the image are in [u 1 u 2 ], the following mapping increases the image contrast. The values u 1 and u 2 can be found by using the image’s accumulated histogram. v M(v) 255 u1u1 u2u2

12 The Negative Mapping v M(v) 255

13 Point Operations and the Histogram Given a point operation: M(v a ) takes any value v a in image A and maps it into v b in image B. Requirement: the mapping M is a non descending function (M -1 exists). In this case, the area under H a between 0 and v a is equal to the area under H b between 0 and v b

14 A A B B M(v) M -1 (v) HaHa HbHb CaCa CbCb A point operation and the induced histograms:

15 v v HaHa HbHb M(v) v The area under H a between 0 and v a is equal to the area under H b between 0 and v b =M(v a )

16 Q: Is it possible to obtain H b directly from H a and M(v)? A: Since M(v) is monotonic, C a (v a )=C b (v b ) therefore: v v CaCa CbCb M(v) v

17 The histogram of image B can be calculated: A A B B M(v) M -1 (v) HaHa CaCa M(v) HbHb CbCb

18 Q: Is it possible to obtain M(v) directly from H a and H b ? A: Since C b is monotonic and C b (v b )=C a (v a ) Alternatively M(v a )=v b if C a (v a )=C b (v b ) A A HaHa CaCa B B HbHb CbCb M(v)

19 v CaCa CbCb v vava vbvb Calculating M(v) from C a and C b :

20 Histogram Equalization Visual discrimination between objects depends on the their gray-level separation. How can we improve discrimination after image has been acquired? Hard to discriminate Doesn’t helpThis is betterWhat about this?

21 Histogram Equalization For a better visual discrimination of an image we would like to re-assign gray-levels so that gray-level resource will be optimally assigned. Our goal: finding a gray-level transformation M(v) such that: –The histogram H b is as flat as possible. –The order of gray-levels is maintained. –The histogram bars are not fragmented.

22 Histogram Equalization: Algorithm A A HaHa HbHb CaCa CbCb Define: Assign:

23 Hist. Eq.: The two pointers algorithm 0 1 2 3 4 5 6 7 8 9 10 11 0 0 0 1 1 1 3 5 8 9 9 11 old new

24 0 1 2 3 4 5 6 7 8 9 10 11 0 0 0 1 1 1 3 5 8 9 9 11 old new 01234567891011 0 5 10 15 20 25 30 01234567891011 0 5 10 15 20 25 30 (4) (3) (4) (3) (1) (20) (22) (30) (5) (21) 01234567891011 0 5 10 15 20 25 30 Result Goal Original Hist. Eq.: The two pointers algorithm

25 OriginalEqualized Hist. Eq.: Example 1

26 OriginalEqualized Hist. Eq.: Example 2

27 Hist. Eq.: Example 3

28 Histogram matching Transforms an image A so that its histogram will match that of another image B. Usage: before comparing two images of the same scene (change detection) acquired under different lighting conditions or different camera parameters. sourcetargetmapped source

29 However, in cases where corresponding colors between images are not “consistent” this mapping may fail: from: S. Kagarlitsky: M.Sc. thesis 2010.

30 Surprising usage: Texture Synthesis (Heeger & Bergen 1995). –Start with a random image. –Step1: multi-resolution decomposition –Step2: histogram matching for each resolution –Iterate synthesis

31 More results: (Heeger & Bergen 1995):

32 Discussion: Histogram matching produces the optimal monotonic mapping so that the resulting histogram will be as close as possible to the target histogram. This does not necessarily imply similar images.

33 hist. match results Example:

34 The Slice Transform (SLT): Hel-Or & Shaked 2008 The Slice Transform (SLT) can be seen as a representation of a signal using a linear sum of “slice” signals: 001 010 100 001 100 = Signal x A

35 Tone mapping using SLT: The Slice Transform can represents tone mapping (point operations) in a linear form. 001 010 100 001 100 = 001 010 100 001 100 =

36 Tone mapping using SLT: If a signal A can be mapped into signal B we have: In practice we find an optimal q so that image A will be as close as possible to image B in a LS sense: Takes into account spatial information as well. Mapping is not necessarily monotonic.

37 SLT results Example: Hist. Eq.

38 T H E E N D 38


Download ppt "1. General Image Operations Three type of image operations 1.Point operations 2.Geometric operations 3.Spatial operations."

Similar presentations


Ads by Google