How to change all the colours in the image to black
古いコメントを表示

how to change all the colours in the image to black except the white colour in image?
採用された回答
その他の回答 (1 件)
yanqi liu
2021 年 2 月 1 日
clc; clear all; close all;
I = imread('ceshi.png');
I2 = rgb2hsv(I);
s = mat2gray(I2(:,:,2));
bw = im2bw(s, 0.5);
figure; imshow(~bw)

カテゴリ
ヘルプ センター および File Exchange で Image Filtering and Enhancement についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!