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

Accepted Answer
More Answers (0)
Categories
Find more on イメージ算術 in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!