フィルターのクリア

Averaging brightness/fluorescent intensity in columns (y axis)

2 ビュー (過去 30 日間)
Jane
Jane 2013 年 12 月 4 日
コメント済み: Image Analyst 2013 年 12 月 4 日
Hello, I'm trying to find the average brightness of the columns (y direction) of an image and have these for each column along the x direction. Then I'd like to plot this in some sort of graph.
I've gotten some good information through this forum:
%
grayImage = rgb2gray(Image);
meanGrayLevels = mean(grayImage(:));
I'm a little confused about how to set up the indices for the mean. And how do I set this in a loop to continue along the x direction of the image until the end of the image? Any help here would be much appreciated.
Thanks! Jane

採用された回答

sixwwwwww
sixwwwwww 2013 年 12 月 4 日
編集済み: sixwwwwww 2013 年 12 月 4 日
just use
meanAlongEachColumn = mean(grayImage)
it will create an array of mean values. Each value in this row vector will be of each column. Is it what you need?
  2 件のコメント
Jane
Jane 2013 年 12 月 4 日
Yes this looks correct. Thank you!
Image Analyst
Image Analyst 2013 年 12 月 4 日
When you do (:) , that basically takes a multidimensional array and turns it into a 1D vector . So when you did that, the columns were "lost" and it just took the mean of all the pixels in the image, not column-by-column like mean() will do if you pass it a 2D array (instead of the 1D array like you passed it).

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by