Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
how to introduce next line while saving feature vector values in predefined matfile?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
1.i have 50 images
2.my code produces feature vector of size 512 by 512 of 50 images using a for loop
3. i am using reshape function to make matrix of 512 by 512 into 1 by 512*512=262144 vector. similarly for 50 images i need to do the same to get the final mat file of dimension 50 rows and 262144 columns.
4. the problem is i get error of "assignment dimension mismatch" as fv (3rd last line) is getting value of all 50 images in a single row i-e 1 by 512*512(1st image) 512*512(2nd image) and then error occurs. plus i have declared nan matfile of dimensions "Result = nan(50,262144)" as mentioned in a code below.
5. is there a way to introduce next line format '\n' after "reshape function" so that after extracting fv of 1st image then on next fv of second image and on third live fv of third image so on and till 50th image in a for loop.
Result = nan(50,262144);
for i=1:50
a=num2str(i);
I = imread(strcat(a,'.png'));
I=entropyfilt(I);
I = double(I)/255;
imshow(I,[]);
isRotInv=false;
isChanWiseRot=false;
filtR= generateRadialFilterLBP(8, 1);
fv= efficientLBP(I, 'filtR', filtR, 'isRotInv', false, 'isChanWiseRot', false);
fv= reshape(fv,1,[]);
Result(i,:) = fv;
end
0 commentaires
Réponses (0)
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!