Azzera filtri
Azzera filtri

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

2 visualizzazioni (ultimi 30 giorni)
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 Commento
Image Analyst
Image Analyst il 9 Ott 2017
Modificato: Image Analyst il 9 Ott 2017
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???

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Convert Image Type in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by