Using new images in matlab code

2 Ansichten (letzte 30 Tage)
Gurwinder pal singh Bhinder
Bearbeitet: Image Analyst am 8 Dez. 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.

Antworten (2)

Abhisek Pradhan
Abhisek Pradhan am 8 Dez. 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 am 8 Dez. 2020
Bearbeitet: Image Analyst am 8 Dez. 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

Community Treasure Hunt

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

Start Hunting!

Translated by