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

3 visualizaciones (últimos 30 días)
varuna watwe
varuna watwe el 14 de Ag. de 2021
Respondida: Image Analyst el 14 de Ag. de 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.

Respuestas (2)

Matt J
Matt J el 14 de Ag. de 2021
Editada: Matt J el 14 de Ag. de 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 el 14 de Ag. de 2021
My attached demo does this very nicely. Adapt as needed.

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by