Hello I would to ask. are my code for Palm Vein are correct? and is this all for the future extraction? and 1 more question what is the best classifier that suit with my future extraction? if may can i have any coding to help me. thank you?
1 view (last 30 days)
Show older comments
clear; close all; clc; clear variables; %% % Howto use the miura_* scripts.
img = im2double(imread('RightFive.bmp')); % Read the image
% img=img(:,:,1);
img=imcrop(img,[199.5 121.5 248 253]);
figure(1); imshow(img); title('Original Captured Image') %%
% img = imresize(img,0.8); % Downscale image
% Get the valid region, this is a binary mask which indicates the region of % the finger. For quick testing it is possible to use something like: % fvr = ones(size(img)); fvr = lee_region(img,40,200); % Get finger region
figure(2); imshow(fvr) title('Detected Finger Region') %% Extract veins using maximum curvature method % Filter Kernels Method sigma = 3; % Parameter v_max_curvature = miura_max_curvature(img,fvr,sigma);
% Binarise the vein image md = median(v_max_curvature(v_max_curvature>0)); v_max_curvature_bin = v_max_curvature > md;
figure(3); imshow(v_max_curvature_bin) title('Binarised Veins Extracted by Maximum Curvature Method')
%% thinning K=bwmorph(v_max_curvature_bin,'thin',Inf); figure(4) , imshow(K); % set(gcf,'position',[1 1 600 600]); title('Thinning');
%% CLEAN bw =bwmorph(K,'clean'); figure(5), imshow(bw), title ('Clean');
%% v_max_curvature_bin3= bwmorph(bw,'shrink'); figure, imshow(v_max_curvature_bin3) v_max_curvature_bin1= bwmorph(bw,'bridge'); figure, imshow(v_max_curvature_bin1), title ('bridge'); v_max_curvature_bin2 = bwmorph(bw,'thin',Inf); figure, imshow(v_max_curvature_bin2), title ('thin'); Visualise Overlay the extracted veins on the original image overlay_max_curvature = zeros([size(img) 3]); overlay_max_curvature(:,:,1) = img; overlay_max_curvature(:,:,2) = img + 0.4*v_max_curvature_bin; overlay_max_curvature(:,:,3) = img; figure; imshow(overlay_max_curvature) title('Maximum curvature method')
0 Comments
Answers (0)
See Also
Categories
Find more on Biomedical Imaging in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!