function [feature] = get_features(img, m, n)
% Input: 
%    img        -- the image need to be partitioned into m x n tiles and extract feature
%    m  -- 
%    n  -- 
%
% Output:    
%    features   -- 1x(m*n), feature of this image

[h w] = size(img);
newH = h - mod(h,m);
newW = w - mod(w,n);

tileHeight = newH/m;
tileWidth  = newW/n;

feature = zeros(0,0);

for i = 1: m
    for j = 1:n
        
        beginH = (i-1)*tileHeight+1;
        endH   = i*tileHeight;
        
        beginW = (j-1)*tileWidth+1;
        endW   = j*tileWidth;
        
        subPart = img(beginH:endH,beginW:endW);
        sumEdgePixed = sum(subPart(:));
        
        feature = [feature,sumEdgePixed];
    end
end
