what is the possible solution for the Intra-class variations poblems? my poblem is that i have a database for human dorsal hand veins ,but with intra-class variations , so this problem have a large effect on my results when i need to do matching between my samples for recognition purpose(testing phase after finishing trainning phase ) .

therefore , i need to know what are the possible solutions that may be suitable here.
are there any function in matlab can overcome this problem?

examples of my images(5 images for the same person):

class 1:











class 2:











class 3:











and the code that i wrote to obtain the above images was as below:

    in_dir = 'E:\master_matlab\HandVein_DataSet';
    out_dir = 'E:\master_matlab\final resultant images';  
    for px = 1 : 50,     
        for hx = 1 : 5,     
            fname = sprintf('%04dhv%d.bmp', px, hx); 
            current_image = imread(fullfile(in_dir, fname));    

            % do processing       

    level=graythresh(current_image);
    x=im2bw(current_image,level);
    % figure,imshow(x);
    nnew=current_image.*cast(x,class(current_image));
    medimage=medfilt2(nnew,[5 5]);%median Filtering image
    % figure,imshow(medimage);
    z=adapthisteq(medimage);
    % figure,imshow(z);
    H = fspecial('unsharp');
    y=imfilter(z,H);
    % figure,imshow(y);
    mIm=imfilter(y,fspecial('average',15),'symmetric');%%%%%%here mask is 15*15 and method is symmetric(not replicate)
    sIm=y-mIm;
    bw=im2bw(sIm,0);                          % Convert to binary image
    ALT_img=imcomplement(bw);                 % Complement binary image
    % figure,imshow(ALT_img);
%%%%%% morphological on binary images.

open_img =bwmorph(ALT_img,'open'  ,Inf);
% figure,imshow(open_img);title('open_img');
major_img =bwmorph(open_img,'majority' ,Inf);
ske_img = bwmorph(major_img,'skel',100);


%removal outer boundary
without_border=ske_img.*x;
% figure,imshow(without_border);

   %%%%spurs removal can be added  or removed
spur_img=bwmorph(without_border,'spur',1);%8 spurs
% figure,imshow(spur_img);

% centering the resultant spur_image
measurements = regionprops(im2double(spur_img), 'Centroid');
    [rows columns] = size(spur_img);
    rowsToShift = round(rows/2- measurements.Centroid(2));
    columnsToShift = round(columns/2 - measurements.Centroid(1));
    shiftedImage = circshift(spur_img, [rowsToShift columnsToShift]);

    %%%%%cropping to remove the below white lines

rect=[26 ,37 ,255 ,138];
ssdc=imcrop(shiftedImage, rect);
q12=imresize((ssdc),1.25);
% figure,imshow(q12); 
%        
        % save output     
        imwrite(q12, fullfile(out_dir, fname));   
    end
end


regards for all
It boils down to the features.  You have shown some images of the same class. You also need to look at images of the other class(s), and find a set of features that maximize inter-class variance and minimize intra-class variance. What features those might be depends on your data. You need to look at the types of variation that exists within each class, and try to find features, transformations, or distance measures that account for it. It is very hard to tell you anything more specific based on the information you have provided.

Edit:
One thing you can do is post some images of a different class.  

Also, are the images aligned? Maybe before you compute the features you should translate all your images so that the white pixels coincide as much as possible.  Then you can define a distance measure between two images as the percentage of white pixels that co-locate, and then use a k-nearest-neighbor classifier.

Some other random thoughts:
Shape context features may be suitable for your problem.

You also might want to search the literature on recognizing hand-written characters.