画像中の指定した行,列で輝度値のグラフを作りたい
5 views (last 30 days)
Show older comments
グレースケールにした画像で,指定した行,列で輝度値のグラフを作りたいです.
例えば,画像中の450行で,輝度値の分布のグラフを表示するといった感じで考えています.
このような方眼画像で試したいです.よろしくお願いします.

0 Comments
Accepted Answer
Atsushi Ueno
on 11 Nov 2022
RGB = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1188858/image.jpeg');
I = rgb2gray(RGB);
plot(I(450,:)); % 画像中の450行で,輝度値の分布のグラフを表示する
xlabel("画像横方向の位置 [ピクセル]");
ylabel("画像中450行目の輝度値[0-255]");
imshow(repmat(I(450,:),[500,1])); % 画像中の450行目をバーコードの様に表示してみる
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!