How to use code of chi square test to check histogram analyis

6 ビュー (過去 30 日間)
Parveiz Lone
Parveiz Lone 2020 年 5 月 12 日
回答済み: Parveiz Lone 2021 年 11 月 25 日
How to use code of chi square test to check histogram analyis

採用された回答

Parveiz Lone
Parveiz Lone 2021 年 11 月 25 日
%% chi square test for image data
function [X_R X_G X_B]=chisquare(C)
B1=uint8(C); % C=cipher image
v=0;
a1=imhist(B1(:,:,1));
a2=imhist(B1(:,:,2));
a3=imhist(B1(:,:,3));
for i=1:256
z1=((a1(i)-256).^2)/256;
v=v+z1;
end
z2=((a2-256).^2)/256;
z3=((a3-256).^2)/256;
X_R=v;
X_G=sum(z2);
X_B=sum(z3);
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeHypothesis Tests についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by