How to change all the colours in the image to black
Ältere Kommentare anzeigen

how to change all the colours in the image to black except the white colour in image?
Akzeptierte Antwort
Weitere Antworten (1)
yanqi liu
am 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)

Kategorien
Mehr zu Image Filtering and Enhancement finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!