separating r g . b's from a colour image
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Matpar
am 29 Aug. 2019
Kommentiert: KALYAN ACHARJYA
am 29 Aug. 2019
Hi all,
I am trying to separate the red green blue values of an image and it's baffling me based on what i have googled so far!
can someone guide me please and
Thanx in advance
im = imread('forest.jpg');
r=im(:,:,1);
g=im(:,:,2);
b=im(:,:,3);
disp(r);
disp(g);
disp(b);
1 Kommentar
Stephen23
am 29 Aug. 2019
The MATLAB documentation has an excellent explanation of different images types:
What exactly is baffling you?
Akzeptierte Antwort
KALYAN ACHARJYA
am 29 Aug. 2019
Bearbeitet: KALYAN ACHARJYA
am 29 Aug. 2019
You are doing right.
im = imread('forest.jpg');
r_plane=im(:,:,1);
g_plane=im(:,:,2);
b_plane=im(:,:,3);
subplot(311),imshow(r_plane);
subplot(312),imshow(g_plane);
subplot(313),imshow(b_plane); % Use imshow to display image
Any issue?
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Import and Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!