5

I am running Isomap Dimensionality reduction in MATLAB on a series of images. I want to plot the image's thumbnail beside the point on the manifold corresponding to it.

Examples of manifolds

I am currently using 2 differnt isomaps http://isomap.stanford.edu/ and http://robotics.cs.brown.edu/projects/stisomap/ .

4

1 回答 1

3

The imagesc function can take arguments which dictate where the image is drawn, so I would use this. Here's an example of imagesc being drawn on top of a plot:

% Draw plot
vals=rand(2,100);
plot(vals(1,:),vals(2,:),'x');
hold on;

% Draw image
im=imread('moon.tif');
xs=linspace(0.1, 0.2, size(im, 2) );
ys=linspace(0.1, 0.2, size(im, 1) );
colormap gray;
imagesc(xs,ys,im)

Which looks like this:

Note the first two arguments to imagesc which define the range over which the image is drawn. Obviously you'll want to change the arguments to linspace, which will define the position and size of the image, and you'll need to take account for the aspect ratio if the image isn't square, but hopefully this will get you along the right lines.

于 2013-05-28T19:28:32.667 回答