Store output program to a 3 d array as matrix

조회 수: 1 (최근 30일)
Aliff Zin
Aliff Zin 2017년 1월 31일
댓글: Aliff Zin 2017년 2월 1일
Sorry if i sounded stupid, i am new to matlab
I wanted to do experiment on fingervein system, i got 10 users with 12 images of each person, i have create all my pre processing step in my main function including the looping
but what i wanted to know is how do i save all the processesd image into array and concatenating them into one 3d matrix so my output will be 10x12. It is possible?
Thank you
  댓글 수: 3
Jan
Jan 2017년 1월 31일
@Aliff Zin: Please post more details, e.g. example data or existing code. I'm sure it is possible what you want, but I assume the answ3er "yes" will not make you happy.
Aliff Zin
Aliff Zin 2017년 1월 31일
Hi, sorry if my question is not clear
I have main function where it runs HOG feature vector and i tested on 10 users with 12 fingers of each
So when i run my main code, it will automatically store the output of extracted features (3060) x 10(user) x 12 (image) from the looping in my main function.
I need to store it in 3 different arrays each. So that i can concatenate them to form a 3D matrix. So i can have a matrix size of 3060 x 10 x 12
Sorry if it is not clear. Thank you for your reply.

댓글을 달려면 로그인하십시오.

답변 (1개)

Niels
Niels 2017년 2월 1일
편집: Niels 2017년 2월 1일
A=cell(10,12);
for user=1:10
for imageNumber= 1:12
% for this to work you will need some way to get the right name
% cant help any further without more information (like image names etc)
A{user,imageNumber}=imread ("replace.png");
end
end
i think this might be kind of what you wanted
A{user,imageNumber} % will get you the data you want to access
  댓글 수: 2
Aliff Zin
Aliff Zin 2017년 2월 1일
This is my code after choose from the folder. (I currently have 10 files represent 10 users and 12 images of same size in each file) I include all the processing step in this code What i wanted is to store the hog feature length, total file of 10 (users), and 12 images in 3 different array and concatenating them as 3d matrix
So that my size will be 720 x 10 x 12. I need this matrix so that i can proceed with SVM. Thanks for you reply
if numberOfImageFiles >= 1
for f = 1 : numberOfImageFiles
fullFileName = fullfile(thisFolder, baseFileNames(f).name);
%%PRE-Processing step%%%%
imageArray = imread(fullFileName);
imageArray = imadjust(imageArray,stretchlim(imageArray),[]);
imageArray = imresize(imageArray, 0.3);
hog_feature_vector(imageArray);
fprintf('Now Processing image in %s\n', fullFileName);
imshow(imageArray);
drawnow;
end
else
Aliff Zin
Aliff Zin 2017년 2월 1일
Sorry if my code seems wrong, i really really new to matlab. I need to get this done for my project. Thank you sir.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Search Path에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by