Edge detection for image stored in matrix Edge detection for image stored in matrix numpy numpy