mapping of dat into image

matlablearner
matlablearner used Ask the Experts™
on
hi there,
i would like to know how i can map the data into the image,
thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
ozo
Most Valuable Expert 2014
Top Expert 2015

Commented:
what data, what mapping, and what image?

Author

Commented:
i have a signature image  and i have online data from the
signature what i want to do is map the online data into the
the signature image and be able to see where the particular
data lies in the image.
sorry about confusion
ozo
Most Valuable Expert 2014
Top Expert 2015

Commented:
it sounds like you want to perform a convolution or cross-correlation
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Author

Commented:
yes, i want to cross correlation, is there any function for that..
thank you
ozo
Most Valuable Expert 2014
Top Expert 2015

Commented:
cross correlation is equivalent to a convolution of a reversed image,
and if you make a periodic extension of the images, you can use a Fast Fourier transform to compute the convolution

Author

Commented:
well thanks for the help but i am new to matlab so it would be
gr8 if you could show me in coding and description. thanks
ozo
Most Valuable Expert 2014
Top Expert 2015

Commented:
Sorry I didn't see you mention matlab before.
I am unfamiliar with how one would code a Fast Fourier Transform in matlab
ozo
Most Valuable Expert 2014
Top Expert 2015

Commented:
You may want to add the  MatLab Programming Zone to your question
http://www.experts-exchange.com/Programming/Languages/MatLab/

Author

Commented:
i did some research on convolution myself aswell and i found
that its not that what i want to do.
i would like to explain what i am trying to do.

I have a signature image and seperate information of x and y
cordinates in txt file.
i have found out the x and y cordinates from the signature
image itself now what i want to do is mapp the x and y
cordinates of the txt file to the signature image plot it as graph .
hope these information will help you guys to give me some idea
i can implement that.
thanks a lot

Commented:
Not sure I understand you correctly.
Do you want to see particular pixels with defined x-y coordinate on your image? If so, you probably need to use SUB2IND function:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/sub2ind.html
Than you can use the returned index to do something with either those pixels, or the rest of image.

What kind of graph you want to plot? Can you give an example? May be you can attach your signature image (or part of it) for clarity? And an example of data in the text file?
Commented:
Ok, I've got it. Cannot help much with mapping.
Following the above discussion, to do cross correlation you may try to use xcorr2 function in Signal Processing Toolbox.
To do convolution and FFT try conv2 and fft2.

To import and plot your coordinate you can use the code below. (I converted docx to txt.)
Sorry if it's not what you wanted.

data=dlmread('1.txt',' ',23,0);
plot(data(:,2),data(:,3),'k-')
axis image
axis off
set(gca,'Position',[0 0 1 1])
set(gcf,'color','w')
 
% to fit figure size to axes
pba=pbaspect(gca);
set(gcf, 'units', 'pixels');
fpos=get(gcf,'position');
fpos(4)=fpos(3)*pba(2)/pba(1);
set(gcf,'position',fpos)
 
% in case you need to get image from that plot
M=getframe(gca);
% to show it as image
imshow(M.cdata)

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial