How to change all the colours in the image to black
Mostra commenti meno recenti

how to change all the colours in the image to black except the white colour in image?
Risposta accettata
Più risposte (1)
yanqi liu
il 1 Feb 2021
clc; clear all; close all;
I = imread('ceshi.png');
I2 = rgb2hsv(I);
s = mat2gray(I2(:,:,2));
bw = im2bw(s, 0.5);
figure; imshow(~bw)

Categorie
Scopri di più su Image Filtering and Enhancement in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!