Этот пример показывает влияние квантования на изображения. ex_imagequantization , вычисляет двумерное преобразование фурье изображения шашечной доски. Исходное изображение отображается в крайнем левом столбце, а результат отображается в виде данных с фиксированной точкой, с полуточностью и одинарной точностью. На полученных изображениях можно видеть, что, хотя тип данных с фиксированной точкой не всегда дает приемлемый результат, тип данных с полуконкурентной точностью, использующий то же количество битов, что и тип данных с фиксированной точкой, дает результат, сравнимый с результатом с одинарной точностью.
model = 'ex_image_quantization.slx';
open_system(model);
sim(model)![Figure contains 12 axes. Axes 1 with title fixdt(1,16,4) contains an object of type image. Axes 2 with title half precision contains an object of type image. Axes 3 with title single precision contains an object of type image. Axes 4 with title original chessboard image range [0, 1024] contains an object of type image. Axes 5 with title fixdt(1,16,4) contains an object of type image. Axes 6 with title half precision contains an object of type image. Axes 7 with title single precision contains an object of type image. Axes 8 with title original chessboard image range [0, 1] contains an object of type image. Axes 9 with title fixdt(1,16,4) contains an object of type image. Axes 10 with title half precision contains an object of type image. Axes 11 with title single precision contains an object of type image. Axes 12 with title original chessboard image range [0, 1/1024] contains an object of type image.](../../examples/fixedpoint/win64/ImageQuantizationWithHalfPrecisionDataTypesExample_01.png)