필터 지우기
필터 지우기

HIstogram comparision of two color images and store it in a database

조회 수: 2 (최근 30일)
RANJITHA H V
RANJITHA H V 2015년 3월 31일
편집: Image Analyst 2015년 3월 31일
how can i compare two histograms and display that whether two images are matched or not??

답변 (2개)

Chad Greene
Chad Greene 2015년 3월 31일
편집: Chad Greene 2015년 3월 31일
If you have Matlab 2014b or 2015a, you can use histogram and specify 'facealpha' to make the bars semitransparent. If you have an older version of Matlab, use histf.

Image Analyst
Image Analyst 2015년 3월 31일
편집: Image Analyst 2015년 3월 31일
Just compare the counts to see if the histograms are different.
[counts1, grayLevels1] = imhist(image1(:,:,1)); % Red channel of image 1
[counts2, grayLevels2] = imhist(image2(:,:,1)); % Red channel of image 2
sameHist = all(counts1 == counts2);
Do it for all the other color channels too. Note well that having the same histogram does NOT mean the images will look the same . Not by a long shot as simple thought experiments will reveal to you. I mean you could just scramble around the pixels and get a totally different looking image that has the identical histogram.

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by