HIstogram comparision of two color images and store it in a database
5 ビュー (過去 30 日間)
古いコメントを表示
how can i compare two histograms and display that whether two images are matched or not??
0 件のコメント
回答 (2 件)
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.
0 件のコメント
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!