Automatic method for estimation of in situ effective contact angle from X-ray micro tomography images of two-phase flow in porous media