New Algorithm of Direct Method of Texture Analysis