Notes 20110127 CIS 6320 Image Processing
From SnOwy - Ed's Wiki Notebook
Contents |
image transformations continued
- pixel operations are the simplest
- mostly for image enhancements
- then neighbourhood operations
- require definition of a distance (is a function)
- the notion of a neighbour -- where distances == 1
- most often used: city block, chess board distance
- then full image operations
geometric spatial transformations
- rotating an image
- resizing an image
- we must consider image coordinates
- for the transformation that takes image f|Z2→R to g|Z2→R ...
- we first consider the inverse transformation
- T-1S(g|Z2→R)→(f|Z2→R)
- g(u,v) depends on the grey levels from the same neighbourhood of (x,y) in f.
- example -- resize an image
- we want T to double the size of f()
- we get f from g by using a scaling ratio of 0.5
- we thus ask "given (u,v) in g -- which neighbourhood of (x,y) in f do we want?"
- My thought ... why? allows us to interpolate when our coordinates do not undergo a integer scaler multiplier -- solved?
- solution: we do this because we want to define the transformation by the result
- we are interested in the pixels in the dimensions of g()
- image scaling continued ...
- g(0,0) = f(0,0)
- g(0,Q-1) = f(0,N-1)
- g(P-1,0) = f(M-1,0)
- g(P-1,Q-1) = f(M-1,N-1)
- x = u(M-1)/(P-1)
- y = v(N-1)/(Q-1)
- we actually aren't using f(x,y) since x, y aren't guaranteed to be integers
- g(u,v) = fbar(x,y)
- examples of possible fbar
- fbar(x,y) = f(X,Y) = f(nint(x),nint(y)) -- nearest neighbour
- -- bilinear interpolation -- given four pixels, we use a weighted average
- -- bicubic interpolation -- looking even further
image transformations
these are the most interesting transformations to us
- input image f|Z2→R (domain = x,y)
- → Td (domain = ρ,θ)
- x = ρcosθ
- y = φsinθ
- ρ = √(x2+y2)
- θ = ...
- θ ∈ [0,2π)
- ρ ∈ R+
- ρ is the length of the moment arm
- θ is the angle going from the positive x-axis to the positive y-axis
- note: θ is allowed to continue past the rectangular area
- going from the spatial domain to the transform domain is called a forward transform (Td)
- we now perform the transformation T (our neat calculations etc.)
- we then perform a the inverse transformation Td-1
- this brings us to the output image -- g|Z2→R
- why do we want to use the transform domain?
- there's something nice about the math there that makes our work easier or more efficient
- think of the transform domain as a magic door
logical operations
- the logical operator (¬) can be seen as a mapping
- {0;1} into {0;1} -- classical logic
- [0;1] into [0;1] -- fuzzy logic
- [0;255] into [0;255] etc ...
- defining a fuzzy negation ...
- must be consistent with classical logic ...
- ¬(x) = 1-x -- the standard negation
- properties:
- ∀(a,b)∈[0,1]2,a≤b→¬(a)≥¬(b) -- monotonicity (non-increasing)
- continuity
- ∀a∈[0,1],¬(¬(a))=a -- involutive
- fuzzy negations are useful in image processing
- HOMEWORK: Find the definition for continuity
- defining a logical and (∧).
- ∧|{0,1}2→{0,1}
- functional notation: ∧(0,1) = 0
- logical notation: 0∧1 = 0
- defining a fuzzy and ...
- ∧|[0,1]2→[0,1]
- ∀(a,b)∈[0,1]2 ...
- min(a,b) -- standard fuzzy and
- ∧(a,b)=ab -- algebraic product
quiz, assignment
- quiz: there's a quiz on Thursday
- assignment: send slides in ten days