Using new images in matlab code

5 vues (au cours des 30 derniers jours)
Gurwinder pal singh Bhinder
Modifié(e) : Image Analyst le 8 Déc 2020
hello everyone,
i tried many times, but i cant do the changes i want.
In the code below, i want to use some new images in this code, i want to use only the 6 new images, not current image and iamges from database:
clear all; clc; addpath(genpath(pwd));
%% EXTRACT FEATURES FROM AN ARBITRARY FINGERPRINT
filename='101_1.tif';
img = imread(filename);
if ndims(img) == 3; img = rgb2gray(img); end % Color Images
disp(['Extracting features from ' filename ' ...']);
ffnew=ext_finger(img,1);
%% GET FEATURES OF AN ARBITRARY FINGERPRINT FROM THE TEMPLATE AND MATCH IT WITH FIRST ONE
load('db.mat'); i=2;
second=['10' num2str(fix((i-1)/8)+1) '_' num2str(mod(i-1,8)+1)];
disp(['Computing similarity between ' filename ' and ' second ' from FVC2002']);
S=match(ffnew,ff{i},1);
My new images (.bmp) are attached .these are six images. i want to compare all 6 images with each other.

Réponses (2)

Abhisek Pradhan
Abhisek Pradhan le 8 Déc 2020
What I could guess from your question is that you are facing some issues while reading the BMP files using imread function. This was a known issue from R2014a to R2016b. Try using the fix below as a workaround.

Image Analyst
Image Analyst le 8 Déc 2020
Modifié(e) : Image Analyst le 8 Déc 2020
If you want to process only those 6 images, and no others that may be in the folder, just make a cell array of the 6 filenames you want and then put into a loop to do your processing.
fileNames = {'Arch1.bmp', 'Arch2.bmp', 'Left_loop1.bmp', 'Left_loop1.bmp', 'Tented_Arc1.bmp', 'Tented_Arc2.bmp'}
for k = 1 : length(fileNames)
thisFileName = fullfile(pwd, fileNames{k});
thisImage = imread(thisFileName);
% Now do whatever processing you want to do.
end

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by