Semester assignments for the course "Digital Image Processing" of THMMY in AUTH university.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
486 B

function q = myquant(x, w)
%Implementation of a uniform, symmetric quantizer without a dead zone
% Usage q = myquant(x, w), where:
% Inputs
% - x is the input that is going to be quantized, this can be a
% scalar, a column or row vector or a matrix
% - w is the quantization step size
%
% Output
% - q holds the quantized value(s), depending on the input this may
% be a scalar, a column or row vector or a matrix
q = floor(x ./ w);
end