How to use Edge Histogram Descriptor (EHD) to compare 2 Image?

3 views (last 30 days)
My problem is I do not know how to write EHD code to compare 2 image. Please help me, thanks
z = clock;
I = imread('a.jpg');
I = rgb2gray(I);
h = imhist(I); % this will have default bins 256
J = imread('b.jpg');
J = rgb2gray(J);
h1 = imhist(J); % this will have default bins 256
E_distance = sqrt(sum((h-h1).^2));

Answers (1)

Image Analyst
Image Analyst on 8 Apr 2017
I don't know that algorithm though what you did doesn't sound or look right. The histogram doesn't have any information on whether or not there are edges in an image.
shalaw faraj
shalaw faraj on 6 Mar 2020
Dear Image Analyst,
some of your code was changed to comment, what are they?
I run your code but the output is the 1x150double matrix, what is this ? please help me

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!