% assignment5_test1:
% to test your encoder function
% the bad result of this function does not necessarily mean that you made a
% wrong code
close all;
clear all;
input_img = rgb2gray(imread('./AlfredoBorba_TuscanLandscape.jpg'));

% PLEASE REPLACE IN THE FOLLOWING LINE THE NAME OF THE ENCODER FUNCTION 
% WITH YOUR ONE:
[codebook, index_vector, rownum2, colnum2] = encoder(input_img, 16, 10);
% PLEASE DO NOT MODIFY AFTER THIS LINE

load('assignment5_test1.mat');
if isequal(codebook, cb) && isequal(index_vector, iv) && ...
        isequal(rownum2, rn) && isequal(colnum2, cn)
    fprintf('It seems your encoder generates perfect outputs\n');
else
    fprintf('It seems your encoder does not generate the same outputs as mine');
end
