function [offset] = calc_offset(I)
  artificial_image = zeros(size(I));
  
  artificial_image(1:100,1:100) = 1;
  
  CrossCorr =  conv2(I, rot90(conj(artificial_image), 2));
  cropped = CrossCorr(size(I,1):end, size(I,2):end);
  [~, arg_max] = max(abs(cropped(:)));
  [off_y, off_x] = ind2sub(size(cropped), arg_max);
  offset = [off_y, off_x];
  
end