I have unsigned feature vectors stored in a text file named data1.txt
. How can I use textscan
in a code below to extract these FV as dimensions are too much (50 rows and 262144 columns) and store them in a mat file?
clc;
clear all;
close all;
fileID = fopen('data1.txt','w');
for i=1:50
a=num2str(i);
I = imread(strcat(a,'.png'));
I=entropyfilt(I);% filtering 50 images
I = double(I)/255;
fv = hog_feature_vector(I); % extracting feature vectors of 50 images
fileID = fopen('data1.txt','a');% saving those FV in a specific format in text
fprintf(fileID,'\t');
fprintf(fileID,'%1.4f\t',fv);
fprintf(fileID,'\n');
end
fclose(fileID);