黒い箇所を除いた輝度値の平均、または合計を求めたいです
Afficher commentaires plus anciens
おそらく初歩的な質問だと思うのですが申し訳ありません.
以下の画像のように端を黒く塗りつぶした画像があったとき,この黒い箇所を除いた輝度値の平均を求めたいと考えています.
または
a = imread("sample.jpg");
a' = rgb2gray(a);
area = numel(a') ;
black = sum(sum(a'<1)) ;%%黒い箇所の面積
notbl = area - black ;%%黒い箇所を除いた面積
で黒い箇所を除いたPixel数を求めることができると思うのですが、これで輝度値の合計を割り平均を求めたいです.
利用できる関数などがありましたらご教授いただけますと幸いです.
よろしくお願いいたします.

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur イメージ算術 dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!