|
|
|
C306 |
|
Fall 2001 |
|
Martin Jagersand |
|
|
|
|
|
Heard concerns about long time between turn in
and demo; matlab problems |
|
Consider: |
|
New due date Tue Oct 9, 17:00 at start of lab |
|
Everyone has to demo in Tue or Thu section or
make individual appointment with TA |
|
|
|
|
So far we have considered operations on one
image point, ie contrast stretching, histogram eq. Etc |
|
By contrast, image transforms are defined over
regions of an image or the whole image |
|
|
|
|
|
|
|
|
|
|
|
Image transforms are some of the most important
methods in image processing |
|
Will be used later in: |
|
Filtering |
|
Restoration |
|
Enhancement |
|
Compression |
|
Image analysis |
|
|
|
|
|
We will start with the concepts of |
|
vector spaces and |
|
coordinate changes, |
|
just as used in the camera models: |
|
Examples: |
|
Euclidean world space |
|
Image space, |
|
(q
by q image): |
|
|
|
|
|
|
A member can be described as a linear comb |
|
|
|
Example: 3D vectors |
|
|
|
|
|
|
|
Example: Image = a
+b +c |
|
|
|
|
|
Product |
|
With scalar |
|
“dot” product |
|
Vector product (for 3-vectors) |
|
vector sum, difference |
|
Norm |
|
Orthogonality |
|
Basis |
|
See Shapiro-Stockman p. 178-181 |
|
|
|
|
|
|
|
Basis: |
|
W1 =
1/2*[
1 1
1 1];
W2 = 1/sqrt(2)*[
0 1
-1 0];
W3 = 1/sqrt(2)*[
1 0
0 -1];
W4 = 1/2*[
-1 1
1 -1]; |
|
|
|
Test region: |
|
CR =
[
5 5
5 5];
% Coefficients:
c1 = sum(sum(W1.*CR))
% c1 = 10
c2 = sum(sum(W2.*CR))
%
c2 = 0
% Do same for W3 and W4 |
|
|
|
|
Construct basis matrix
B = [
W1(:)'
W2(:)'
W3(:)'
W4(:)'] |
|
Flatten the test area:
CRf = CR(:) |
|
|
|
Compute coordinate change: |
|
NewCoord = B*CRf
% = (10,0,0,0)’ |
|
|
|
Test2: Step edge:
SE = [
-1 1
-1 1]
SEf = SE(:)
NewCoordSE = B*SEf
% =(0,1.41,-1.41,0)’ |
|
Verify that we can transform back:
SEtestf =B'*NewCoordSE
reshape(SEtestf, 2, 2)
% SEtest =
% -1.0000 1.0000
% -1.0000 1.0000 |
|
|
|
|
|
|
|
|
|
|
|
t =
0:pi/50:10*pi
I = sin(t)
subplot(221)
plot(t,I) |
|
Image(I) ??? |
|
|
|
subplot(222)
image(64*(I+1)/2)
colormap gray |
|
|
|
|
|
|
|
|
|
What does the F-t express? |
|
|
|