function [obj_cont, select_vert_enc, obj_vert_num, obj_bin_stream, obj_rate, select_vert_dec, obj_dist] =TestBasicSADOri(I, D_max)
% I = imread('D:\Program Files\MATLAB71\work\ORD_codec\Basic_SAD\SADcode\Kids2_Frame17.bmp', 'bmp');
% I = imread('D:\Program Files\MATLAB71\work\ORD_codec\Basic_SAD\SADcode\fish.bmp', 'bmp');
% D_max = 2;
% [obj_cont, select_vert_enc, obj_vert_num, obj_bin_stream, obj_rate, select_vert_dec, obj_dist] = TestBasicSADOri(I, D_max);
[obj_cont, select_vert_enc, obj_vert_num, obj_bin_stream, obj_rate, obj_dist] = Obj_Encod(I, D_max);
% Display
frame_size = size(I);
row = frame_size(1, 1);
col = frame_size(1, 2);
% original binary contour
obj_cont_ori = im2bw(ones(row, col), 0.5);
imshow(obj_cont_ori);
hold on
% reconstruction binary