필터 지우기
필터 지우기

Importing and RGB image to matlab in the form image L(x,y)=[LR​(x,y),LG(x​,y),LB(x,y​)]

조회 수: 1 (최근 30일)
So i'm wondering how i take an RGB into matlab and split it into the following format:
image L(x,y)=[LR(x,y),LG(x,y),LB(x,y)] let us
im = im2double(imread('test_images\low_light\8.bmp'));
Error using imread>get_full_filename (line 569)
File "test_images\low_light\8.bmp" does not exist.

Error in imread (line 371)
fullname = get_full_filename(filename);
the above line of code spits out a value 365x490x3 double which i assume x = 365 y = 460 and 3 = the RGB colours associated with the picture.
Any idea how i can produce an output which looks like:
T(x,y) = max(R,G,B) Lc(x,y)
Thanks.

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2022년 1월 27일
편집: KALYAN ACHARJYA 2022년 1월 27일
LR=L(:,:,1); % First Slice: Red Component
LG=L(:,:,2); % Second Slice: Green Component
LB=L(:,:,3); % Third Slice: Blue Component
All above are result to three 2D arrays.
Regarding the error:
Please ensure that the image file must be present in the same working directory or specify path properly.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by