Convert Rgb to grayscale and back to rgb

2 ビュー (過去 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 Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by