A handwritten bengali consonants recognition scheme based on the detection of pattern primitives