Convert Rgb to grayscale and back to rgb

조회 수: 3 (최근 30일)
OriAlpha
OriAlpha 2019년 2월 15일
편집: KALYAN ACHARJYA 2019년 2월 15일
i have a image
i will read that image and do some of the operations on grayscale
then convert back to RBG
how can i do this

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 2월 15일
편집: KALYAN ACHARJYA 2019년 2월 15일
imageRGB is a given image.
gray_image=rgb2gray(imageRGB);
%do operation, say result1 is result image
RGB_Image=ind2rgb(result1,colormap);
Please note, there are some imformation loss during gray to RGB.
Read here ind2rgb, also read the answer of same question here

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by