対象物のみからRGB値のヒストグラムの作成
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
以下の画像において、黒い部分の影響を排除し、コインのみからRGB値のヒストグラムを作成したいです。ご教授よろしくお願いいたします。
0 commentaires
Réponse acceptée
Atsushi Ueno
le 28 Fév 2024
img = imread("image.jpeg");
ind = all(img,3); % RGB方向にANDをとる(黒は0、黒以外は1)
R = img(:,:,1);
G = img(:,:,2);
B = img(:,:,3);
tiledlayout(3,1)
nexttile
histogram(R(ind))
nexttile
histogram(G(ind))
nexttile
histogram(B(ind))
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Histograms dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!