Top Banner
Fundamentals Data
28

fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Aug 31, 2018

Download

Documents

dangkhuong
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

FundamentalsData

Page 2: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Outline• Visualization

• Discretization Sampling Quantization

• Representation Continuous Discrete

• Noise

2

Page 3: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Data• Data : Function dependent on one or more variables.• ExampleAudio (1D) - depends on time t -

Image (2D) - depends on spatial coordinates x and y - ,

Video (3D) - depends on spatial coordinate (x,y) and time t -, ,

3

Page 4: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Visualization• Plot of dependent variable with respect to independent ones2D plot is a height field

4

Page 5: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Visualization• Other kinds of visualizations• Color image : three color channels: , , , ,

5

Page 6: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Discretization• Data exists in nature as a continuous function.• Convert to discrete function for digital representationDiscretization

• Two concepts SamplingQuantization

6

Page 7: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Sampling• Set of values of continuous at specific values of t.• Reduces continuous function to discrete form

7Sampling

t

Page 8: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Uniform vs Non-uniform sampling

8Uniform Non-uniform

Page 9: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Reconstruction• Get the continuous function from the discrete function

9Sampling Correct Reconstruction

Page 10: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Reconstruction• Accurate reconstruction needs adequate samples

10Sampling Incorrect Reconstruction

Page 11: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Aliasing• Incorrect representation of some entity

11A much lower frequency Zero frequency

Page 12: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Nyquist Sampling Rate• By sampling at least twice the frequency (2 samples per cycle), signal can be reconstructed correctly.

12Sampling Correct Reconstruction

t

Page 13: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Quantization• A analog signal can have any value of infinite precision • Digital signal can only have a limited set of value

13

Step Size Max error½ step size

Page 14: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

An Alternative Representation• frequency domain representationA signal is a linear combination of sine or cosine waves

• Signal can be represented by the coefficients of these sine or cosine waves

14

Page 15: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Representation• Explicit Representation

• Implicit Representation0

• Parametric EquationUsing one or more parameters Example: point p on a line segment between two points P and Q

, 0 1

15

Page 16: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Discrete Representation• A 3D cube defined by a set of quadrilaterals or trianglesThis is called Mesh

• The entities that make up the mesh (e.g. lines, triangles or quadrilaterals) are called the primitives.

16

Page 17: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Properties• Geometric Properties: PositionNormalCurvature

• Topological Properties: remains invariant to changes in geometric properties Connectivity or AdjacencyDimensionManifold / non-manifoldEuler characteristic/Genus

17

Page 18: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Manifold Definitions• ManifoldEvery edge has exactly two incident triangles.

• Manifolds with boundariesEvery edge has either one or two incident triangles.

• Non-manifoldNot with above restrictions.

18

Page 19: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Euler Characteristic

• e = V-E+F (V: Vertices, E: Edges, F: Faces). • Cube has 8 vertices, 12 edges, 6 faces e = V-E+F = 8-12+6 = 2

• Changing geometric properties keeps Euler characteristic invariant Such as adding edges, vertices

19

Page 20: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Genus• (Nai ̈ve) Number of “handles”. • Relationship between e and g: e=2-2g Sphere, cube g=0 torus, coffee cup g=1

• Going from coffee cup to torusChanging only geometric properties

20

Page 21: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Noise• Addition of random values at random locations in the data. Random noise

21

Page 22: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Noise• Outlier Noise• An example of such noise is salt and pepper noise• Can be solved by Median filter

22

Page 23: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Noise• Some noise look random in spatial domain but can be isolated to a few frequencies in spectral domain.

• Can be removed by Notch filter.

23

Page 24: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Technqiues• Interpolation

Linear Interpolation

Bilinear Interpolation

• Geometric Intersections

24

Page 25: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Interpolation• Estimate function for values which it has not been measured.• Linear interpolation:Assuming a line between samples.Change abruptly at sample points continuity

25

Page 26: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Interpolation• Non-linear interpolation:A smooth curve passes through samples First derivative continuous - continuous Second derivative continuous - continuous

26

Page 27: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Linear Interpolation• Point V on the line segment is given by

1 , 0 1

• Example: Linear interpolation of color at point V

C 1 1

27

Page 28: fundamentals - ics.uci.edumajumder/VC/new-lectures/fundamentals.pdf · Sampling Quantization 6. Sampling ... •By sampling at least twice the frequency (2 samples per cycle), signal

Bilinear Interpolation• 2D Data• Interpolating in one direction followed by interpolating in the second direction.

28