An efficient classification algorithm for traditional textile patterns from different cultures based on structures