read image infomation
can specify how many words to learn