フィルターのクリア

Quantize a greyscale Image by 5 levels?

7 ビュー (過去 30 日間)
Twain Glaser
Twain Glaser 2015 年 10 月 20 日
回答済み: Image Analyst 2015 年 10 月 22 日
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.

採用された回答

Walter Roberson
Walter Roberson 2015 年 10 月 20 日
Q = floor(YourArray ./ (256/5));
  1 件のコメント
Twain Glaser
Twain Glaser 2015 年 10 月 20 日
Thanks!

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
Image Analyst 2015 年 10 月 22 日
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:

カテゴリ

Help Center および File ExchangeImage Filtering and Enhancement についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by