How to convert the white component of binary image into an RGB image?

1 回表示 (過去 30 日間)
Ali Khan
Ali Khan 2017 年 10 月 9 日
編集済み: Image Analyst 2017 年 10 月 9 日
This is my code. I want to convert my code final value into original image which is RGB, but the selected one which I separate at the end of my code. Here is my code:
I = imread('D:\seven semester\DIP\lab2\Image Data\N10.png');
figure;
imshow(I);
G = rgb2gray(I);
% figure;
% imshow(G);
A = I(:,:,1);
% figure;
% imshow(A);
F=imsubtract(A,G);
F= im2bw(F,0.18);
figure;
imshow(F);
Thanks for helping
  1 件のコメント
Image Analyst
Image Analyst 2017 年 10 月 9 日
編集済み: Image Analyst 2017 年 10 月 9 日
I can't understand what you want to do. Why would you want to convert a binary image into a color binary image? Are you thinking of label2rgb() perhaps? That works on a labeled image. Or do you want to do masking where inside or outside the mask is black or white???

サインインしてコメントする。

回答 (0 件)

カテゴリ

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