get matrix A from sharp image Ij