Match images using histogram matching method

Can we match two images (as shown in page mentioned below) using histogram matching method? If yes, please let me know how.

 Accepted Answer

Yes, but I don't think that's what you want. Sure you can make one image have the same histogram as another image, and in fact I have such an app in my File Exchange, but I think what you really want to do is to take a test image and see if there's a similar one in a catalog of gesture images. Doing this may or may not involve histogram matching, but I'm sure it involves a lot more. I suggest you look here in Vision Bib at Gesture Recognition to see how people are classifyinging gestures and hand signals and sign language.
|21.4.2 Gesture Recognition Techniques
21.4.2.1 Gesture, Overviews, Surveys, Evaluations
21.4.2.2 Pointing Gestures, Pointing Systems
21.4.2.3 Hand Gesture Systems, Hand Posture, Hand Pose
21.4.2.4 Hand Tracking for Gestures
21.4.2.4.1 Arm Tracking, Arm Pose for Gestures
21.4.2.5 Gesture Recognition Systems, Applications, Human Computer Interaction Systems
21.4.2.5.1 Gesture Systems, Surfaces, Desks, Tables
21.4.2.5.2 Gesture Systems, Game Controls, Game Interactions
21.4.2.5.3 Gesture Systems, Using Depth Images, Range Data, Stereo Analysis for Gestures
21.4.2.6 Music Related Gestures, Systems, Music Video Analysis
21.4.2.7 American Sign Language, ASL Recognition
21.4.2.7.1 Sign Language, Other Languages, Chinese, Arabic
21.4.2.7.2 Sign Language, Fingerspelling|

8 Comments

There are too many algorithms in Vision Bib for sign language recognition. Can you please suggest me an algorithm which you think is suitable for me.
It's not my field, so there are too many for me too. I can't try them all out and let you know which is suitable for you. You can probably contact one of the authors and hire them to build a system for you.
Explorer
Explorer on 6 Oct 2013
Edited: Explorer on 6 Oct 2013
Okay, just guide me how should I make a code that determines whether images are similar or not, using histogram matching method.
Moreover, as for the following quote: "I think what you really want to do is to take a test image and see if there's a similar one in a catalog of gesture images";
I have attempted it using template matching but it is not working. Here is what I have done http://www.2shared.com/file/qHyCgPZq/template_matching.html
You can take the histogram and construct a feature vector that has several comparison metrics, such as mean, std dev, skewness, range, RMS difference, and median absolute difference. Then compare feature vectors to see which are closest. There are a variety of ways you can compare feature vectors. Maybe you can make a model for them based on whether humans say the image is substantially the same hand shape or not.
Explorer
Explorer on 6 Oct 2013
Edited: Explorer on 6 Oct 2013
I have constructed feature vectors. Please see if they are correct or not. Also guide me how can I compare them.
clear all; close all; clc;
im1=imread('106a.jpg'); im2=imread('107a.jpg');
im1g=rgb2gray(im1); im2g=rgb2gray(im2);
%% Calculating mean of im1 grayImage=rgb2gray(im1);
subplot(1, 2, 1); imshow(grayImage, []); title('Original Grayscale Image'); set(gcf, 'Position', get(0,'Screensize')); % Enlarge figure to full %screen.
% Let's get its histogram. [pixelCount grayLevels] = imhist(grayImage); subplot(1, 2, 2); bar(pixelCount); title('Histogram of original image'); xlim([0 grayLevels(end)]); % Scale x axis manually. yRange = ylim; % Calculate the mean gray level meanGL = sum(pixelCount .* grayLevels) / sum(pixelCount)
%% Calculating mean of im2
grayImage2=rgb2gray(im2);
figure, subplot(1, 2, 1); imshow(grayImage2, []); title('Original Grayscale Image'); set(gcf, 'Position', get(0,'Screensize')); % Enlarge figure to full %screen.
% Let's get its histogram. [pixelCount2 grayLevels2] = imhist(grayImage2); subplot(1, 2, 2); bar(pixelCount2); title('Histogram of original image'); xlim([0 grayLevels2(end)]); % Scale x axis manually. yRange2 = ylim; % Calculate the mean gray level meanGL2 = sum(pixelCount2 .* grayLevels2) / sum(pixelCount2)
%% Calculating standard deviation
st_d1=std(double(im1)); st_d2=std(double(im2));
%% Calculating Skewness
sk1=skewness(double(im1)); sk2=skewness(double(im2));
%% Calculating RMS
rms1=rms(im1); rms2=rms(im2);
%% Calculating median absolute
md1=mad(double(im1)); md2=mad(double(im2));
%% Contruct a feature vector
fv1=[ meanGL, st_d1, sk1, rms1, md1 ] ; fv2= [ meanGL2, st_d2, sk2, rms2, md2 ] ;
%% compare feature vector
Explorer
Explorer on 7 Oct 2013
Edited: Explorer on 7 Oct 2013
Please tell me how to compare feature vector in this case.
I can't do that. Every case is unique. Maybe you can scale each feature to a number between 0 and 1 and look for the minimum median absolute difference (see wikipedia).

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!