hi do anyone know the syntax or command to set userdata mapping to a image displayed in subplots of a figure

2 次查看(过去 30 天)
guys i am new to matlab.... i am doing a image based authentication coding.... i have a database of 40 images... i am using ms access database to store username, password, and image sequence path details for each user during registration, all are of text datatype....
i now finished creating username and password authentication.... but after this authentication i want to implement image sequence authentication, where for every user images in database is displayed and user needs to select the images by mouse in sequence as he registered to pass final authentication...
i am able to display the images in the subplots... now i want to use mouse to select the displayed images and in return i want a variable to store the file-path to reach the selected image.....
please help me with codes to select only 4 images displayed in subplots and state some variables to store those 4 images paths to reach them in database.... i will manage from here to store and verification... please help me
here is the code to reach my images
srcFiles = dir('C:\Users\Raki\Desktop\raki trials\database\*.jpg'); % the folder in which my images exists
n = length(srcFiles);
a = n/3;
X = zeros(1, n);
for i = 1 : n
filename = strcat('C:\Users\Raki\Desktop\rakitrials\database\',srcFiles(i).name);
[Xi,mapi] = imread(filename);
plot=subplot(a,3,i);
axisi=imshow(Xi,mapi);
%g{i}=set(gca,'UserData',Xi);
%get(gca,'UserData') ;
end

采纳的回答

Walter Roberson
Walter Roberson 2014-4-12
set(gca,'UserData',filename)
  1 个评论
Rakesh
Rakesh 2014-4-12
sir can i get a logic to select subplots for only 4 times.... and each time the selected subplot information must be mapped to some variable in background... please help me with command sir...

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by