Home Assignment # 4

Discovering Manifolds in Images

Codes used : Code

 

1.      Isomap

 

a)     Residual error v/s Dimensions:-

 

 

 

 

b)     Discussion: The given set of images of the 2D planar robot arm, have a basic fixed structure (the two hinged arms) with the variation occurring only along two dimensions (theta1 and theta2). Thus, from the above graph we can conclude that Isomap is a pretty good estimation of the dimensionality of the input 16k dimension space.

 

c)         Plotting boundary thetas:-

 

 

 

 

Discussion: The boundary thetas are observed to lie at the boundary points in the y1-y2 graph as well. This implies that this set of bases (y1-y2) has some correlation with the (theta1-theta2) bases.

 

 

d)     Graph for randomMotion1K.zip :-

 

 

 

Discussion: It could be observed that the residual for the set of 1000 images is lesser compared to that of the set of 100 images. This result is according to our expectations because the greater the size of observation set, lesser would be the error.

 

 

e)     Correlation between (theta1, theta2) & (y1,y2)

 

Theta1

Theta2

Y1

Y2

21.70828

23.289759

-969

1705

20.963717

26.445587

-321

1917

25.773035

19.94295

2059

486

26.921942

10.453383

2059

-723

28.73904

16.162862

-408

-723

24.460459

12.614105

3223

-826

27.325196

7.879244

-1683

-224

23.942938

21.592861

-837

-1008

28.450352

13.065413

931

846

27.155386

4.504699

1804

-733

24.558251

7.640685

-1865

-1372

25.45228

12.361451

-2989

-706

25.685854

23.495475

-1018

-390

28.677191

4.586599

3064

1104

22.755089

12.452133

-1106

-1420

29.240948

9.477505

-3374

196

27.894608

4.657732

1752

-1258

20.822057

27.990783

-1224

-1395

20.255749

12.828469

221

1995

23.821824

9.27291

-4930

431

 

 

 

Discussion: From the above correlation plots, we can observe that theta1 varies linearly with y1 while theta2 shows some non-linear trend. If we are able to find the transformation matrices, we could transform the coordinates from one bases to other.

 

2.      Linear Mapping and Reconstruction:-

 

a)     2-D graph using PCA:-

 

Eigen values:-

 

9520000

403000

333000

102000

720000

2260

163

127

 

                        Discussion:  It could be observed that the first two eigen values are much more larger than the remaining values

 

 

b)     Reconstruction of the image using PCA:-

 

 

                        Discussion: The above image is much unclear compared to the original image. Thus, we can conclude that PCA is not effective in contracting information contained in the image.

 

 

 

3.      Non Linear Mapping & Reconstruction:-

 

a)     2-D representation using LLE

 

 

 

b)     Reconstruction using LLE:-

 

 

 

 

c)      Reconstruction using Isomap:-

 

 

Discussion: It could be observed that the reconstruction of the mapping produced by LLE has the maximum clarity than PCA or Isomap, PCA being the least clear. This proves that the data does not suffer much loss of information when we use LLE or Isomap to do multidimensional scaling. Since the input images had variations only along two directions (theta1, theta2) , we can say that LLE and Isomap actually captured the theta1, theta2 information and thus were able to reconstruct the image in an efficient manner.

 

LLE and Isomap (non-linear mapping) use geodesic manifold distances while PCA(linear mapping) uses Euclidean distances. Hence the former methods are well capable of preserving the information about the local neighborhood of each point on the manifold than PCA.

 

 

4.      Complete Motion_2K:-

 

a)     2-D representation using Isomap:-

 

 

b)     2-D representation using PCA:-