Convex approximations of an inhomogeneous anisotropic functional