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

1 visualizzazione (ultimi 30 giorni)
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

Risposta accettata

Walter Roberson
Walter Roberson il 12 Apr 2014
set(gca,'UserData',filename)
  1 Commento
Rakesh
Rakesh il 12 Apr 2014
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...

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by