enhance grayscale image using normalization factor
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Ayshath Ramseena CA
il 18 Ott 2020
Modificato: Ameer Hamza
il 18 Ott 2020
sir,
I have a gray scale image in the range {0,1}.I want to enhance this gray scale image using normalization factor alpha in order to transform the range from [0.15-0.4] to
[0-0.4]
ie, the pixel values of enhanced gray scale image should be,
fr(x,y)={ 0; if fg(x,y)<=0.15
alpha * fg(x,y) ; if 0.15<fg(x,y)<= 0.4
fg(x,y) ; else } Where fg(x,y) is the gray scale image in the range{0,1}
0 Commenti
Risposta accettata
Ameer Hamza
il 18 Ott 2020
Modificato: Ameer Hamza
il 18 Ott 2020
Try this
img = rgb2gray(im2double(imread('pears.png')));
img(img<0) = 0;
mask = (0.15<=img)&(img<=0.4);
img(mask) = interp1([0.15 0.4], [0 0.4], img(mask));
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Image Filtering and Enhancement in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!