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

15 vues (au cours des 30 derniers jours)
大輝 隅岡
大輝 隅岡 le 11 Nov 2022
Commenté : 大輝 隅岡 le 14 Nov 2022
グレースケールにした画像で,指定した行,列で輝度値のグラフを作りたいです.
例えば,画像中の450行で,輝度値の分布のグラフを表示するといった感じで考えています.
このような方眼画像で試したいです.よろしくお願いします.

Réponse acceptée

Atsushi Ueno
Atsushi Ueno le 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行目をバーコードの様に表示してみる
  1 commentaire
大輝 隅岡
大輝 隅岡 le 14 Nov 2022
回答いただきありがとうございました.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!