Effacer les filtres
Effacer les filtres

Quantize a greyscale Image by 5 levels?

7 vues (au cours des 30 derniers jours)
Twain Glaser
Twain Glaser le 20 Oct 2015
I would like to quantize an image by 5 levels without using the imquantize command. Given any a grayscale image on a scale of [0,255] this should be possible. Thanks in advance for your time and help.

Réponse acceptée

Walter Roberson
Walter Roberson le 20 Oct 2015
Q = floor(YourArray ./ (256/5));

Plus de réponses (1)

Image Analyst
Image Analyst le 22 Oct 2015
Use imquantize:
Description
example
quant_A = imquantize(A,levels) quantizes image A using specified quantization values contained in the N element vector levels. Output image quant_A is the same size as A and contains N + 1 discrete integer values in the range 1 to N + 1 which are determined by the following criteria:

Catégories

En savoir plus sur Image Filtering and Enhancement dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by