Comparing 2 different histograms

Hi,
Are there any built in functions in matlab to compare 2 histograms? The 2 histograms are given as input vectors to the problem. (OpenCV has built-in function that offers 4 different metrics)
Thanks, Henry

댓글 수: 1

Muhammad Ali Qadar
Muhammad Ali Qadar 2013년 8월 31일
d=pdist2(c1',c2'); Where c1 and c2 are the Computed histograms, you can go for help pdist2 to explore it

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

답변 (1개)

Image Analyst
Image Analyst 2013년 8월 31일

1 개 추천

You could compute the moments of each. In what way do you want to compare them? What are you really after? Let's say that you had 10 ways to compare histograms (mean, stddev, skewness, kurtosis, pdist, whatever....), and you can see that each histogram gives a different set of values. The question is what would you do then knowing that information?

댓글 수: 4

Prachi Joshi
Prachi Joshi 2022년 5월 29일
Hello @Image Analyst, I am dealing with a similar problem involving histogram comparison. I want to quantify color difference between two similar RGB images. Is there any way I can quantify the color difference using histogram comparison? How to do that?
Your reply will be very helpful to me.
Thanks
Prachi
Image Analyst
Image Analyst 2022년 5월 29일
@Prachi Joshi there are a variety of ways. It depends on what you want to achieve. The usual way is to compute the Delta E between the two images. You can do that for every pixel, and if you want avreage the delta E's over pixels to get it on avreage for the whole image. Use rgb2lab
Prachi Joshi
Prachi Joshi 2022년 5월 30일
편집: Prachi Joshi 2022년 5월 30일
Dear, @Image Analyst Thank you for your response.
I have two images of the same material sample, one before environmental impact (Virgin sample) and one after environmental impact (effect of temperature, water, etc., and clicking image of the affected sample). So, basically, due to the environmental impact, there is a change in the material properties of the sample. I want to relate that change in sample properties to the color difference of the sample images before and after the environmental effect. This is an application of image processing for change detection.
Regarding delta E, the sample images (before and after) are of the same size but are not aligned. I can't change the sample images at this point.
What should I do? Which parameter should I use to quantify the color difference for before and after images?
Also, should I use original RGB images or convert them to LAB?
Image Analyst
Image Analyst 2022년 5월 30일
You should probably just use a colorimeter instead of digital imaging. If you use digital imaging you're going to have to calibrate your system with something like the ColorChecker Chart. Otherwise you're just using arbitrary "book formulas" for converting RGB to LAB and that's not accurate, particularly if you have changing enrionmental conditions (light spectrum, overall intensity, etc.).

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

카테고리

도움말 센터File Exchange에서 Histograms에 대해 자세히 알아보기

태그

질문:

2013년 3월 8일

댓글:

2022년 5월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by