We present a new shape recognition algorithm for binary images based on the morphological approach. The standard algorithms based on the morphological hit-or-miss transform use block structure patterns, but in many practical situations, this may cause problems because the size of the object is unknown. In the proposed method, we match the corners of the object instead of the block structure pattern. Because most objects have different structure elements for the corners, our method gives a more reasonable approach and the size of the object plays a less significant role in our recognition algorithm than in the standard algorithms. Our method can be easily adapted to recognize the features of different types of objects.