Using new images in matlab code
조회 수: 2 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (2개)
Abhisek Pradhan
2020년 12월 8일
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.
댓글 수: 0
Image Analyst
2020년 12월 8일
편집: Image Analyst
2020년 12월 8일
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
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!