Line pattern recognition by digital technique