画像中の指定した行,列で輝度値のグラフを作りたい
16 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
グレースケールにした画像で,指定した行,列で輝度値のグラフを作りたいです.
例えば,画像中の450行で,輝度値の分布のグラフを表示するといった感じで考えています.
このような方眼画像で試したいです.よろしくお願いします.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1188858/image.jpeg)
0 Commenti
Risposta accettata
Atsushi Ueno
il 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行目をバーコードの様に表示してみる
Più risposte (0)
Vedere anche
Categorie
Scopri di più su 大規模なイメージ ファイル in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!