Histogram Difference with Normalization and Equalization ...Help Please

조회 수: 8 (최근 30일)
Dracfov
Dracfov 2018년 4월 3일
편집: Dracfov 2018년 4월 6일
Hello everyone.
I am currently working with Histograma diferencia and I have used the following code that is referenced here:
https://de.mathworks.com/matlabcentral/fileexchange/51238-key-frame-extraction-from-video-using-videoreader?focused=3880674&tab=function
the code works perfectly for me.
My Doubt is
what would be the mathematical equation of the function that defines the calculation of Histogram difference and if it is possible to apply another, for example:
n 2
d(Ii,Ij)=(Hik-Hjk) / (Hjk+Hik)
k=1
Where Hi and Hj stand for the histogram of Ii and Ij, respectively.
My second doubt it is possible to introduce normalization and equalization to this code.
How would I do that?
Someone can Help me pls.
Thank you.
  댓글 수: 2
Image Analyst
Image Analyst 2018년 4월 6일
I don't understand the question. And what are Hi, Hj, Ii, and Ij? Hi and Hj don't show up in your equation. And what is Hik? Is it H(i, k), which is the element at row i, column k? If so, what is H? What does a 2-D Histogram represent?
Dracfov
Dracfov 2018년 4월 6일
편집: Dracfov 2018년 4월 6일
Hello dear friend, thank you for responding. Sorry for not being clear in my question. let me reformulate my question, my apologies. 1. In the following link: "https://de.mathworks.com/matlabcentral/fileexchange/51238-key-frame-extraction-from-video-using-videoreader?focused=3880674&tab=function"
the following function is used to calculate the Histogram difference:
function [ r ] = difference( f1,f2 )
k=rgb2gray(f1); % Convert into gray scale
l=rgb2gray(f2);
f11=imhist(k); %histogram of data
f12=imhist(l);
diffe= imabsdiff(f11,f12); %Absolute difference of two images
r=sum(diffe);
end
imabsdiff(), this is a Matlab's own function to calculate Histogram difference, right?
I would like to know if it is possible to calculate the Histogram difference by applying my own equation and how I could implement it.
this is the rectified equation:
n 2
d (Ii, Ij) = Σ (Hi-Hj) / (Hj + Hi)
k=1
Where Hi and Hj represent the Histograms of the current Ii and the next frame Ij respectively, for all frames from 1..n
2. It is possible to normalize and equalize the Histogram before calculating the Difference or not?
Thanks

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by