필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
varuna watwe
varuna watwe 2021년 8월 14일
답변: Image Analyst 2021년 8월 14일
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.

답변 (2개)

Matt J
Matt J 2021년 8월 14일
편집: Matt J 2021년 8월 14일
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 2021년 8월 14일
My attached demo does this very nicely. Adapt as needed.

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by