Azzera filtri
Azzera filtri

Image threshold value question

3 visualizzazioni (ultimi 30 giorni)
Claire Redfield
Claire Redfield il 20 Feb 2013
Hello guys, Normally we set one value 'a', then we have [0 a]= black, [a 255]=white My question is, can we do it like this way, [0 a]=black, [a b]=white, [b 255]=black I hold you can understand my terrible description.

Risposta accettata

Image Analyst
Image Analyst il 20 Feb 2013
Sure, just do two comparisons:
binaryImage = grayImage >= a & grayImage <= b;

Più risposte (1)

Thorsten
Thorsten il 20 Feb 2013
I = imread('cameraman.tif');
a = 100; b = 150;
ind = setdiff(find(I > a), find(I < b));
B = logical(size(I));
B(ind) = 1;

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by