画像中の指定した行,列で輝度値のグラフを作りたい

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

 Akzeptierte Antwort

Atsushi Ueno
Atsushi Ueno am 11 Nov. 2022

0 Stimmen

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行目をバーコードの様に表示してみる

1 Kommentar

大輝 隅岡
大輝 隅岡 am 14 Nov. 2022
回答いただきありがとうございました.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Community Treasure Hunt

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

Start Hunting!