Filter löschen
Filter löschen

How to store RGB values of multiple images with separate variables?

2 Ansichten (letzte 30 Tage)
varuna watwe
varuna watwe am 14 Aug. 2021
Beantwortet: Image Analyst am 14 Aug. 2021
I have specified a folder location which contains jpg images. I am getting all images but now i want RGB values of each iage separately in workapace to process them further. Please can someone help me. Thank you for reading this question. I am attaching my code for your reference below.

Antworten (2)

Matt J
Matt J am 14 Aug. 2021
Bearbeitet: Matt J am 14 Aug. 2021
Something like this perhaps.
RGB=rand(256,256,3,10); %Images
tmp=cellfun(@squeeze, num2cell(RGB,[1,2,4]) , 'uni' ,0);
[R,G,B]=deal(tmp{:}); %separate channels
whos R G B
Name Size Bytes Class Attributes B 256x256x10 5242880 double G 256x256x10 5242880 double R 256x256x10 5242880 double

Image Analyst
Image Analyst am 14 Aug. 2021
My attached demo does this very nicely. Adapt as needed.

Kategorien

Mehr zu Image Processing Toolbox 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!

Translated by