We present a new technique for content based image retrieval by deriving a Local motif pattern (LMP) code co-occurrence matrix (LMP-CM). This paper divides the image into 2 x 2 grids. On each 2 x 2 grid two different Peano scan motif (PSM) indexes are derived, one is initiated from top left most pixel and the other is initiated from bottom right most pixel. From these two different PSM indexes, this paper derived a unique LMP code for each 2 x 2 grid, ranges from 0 to 35. Each PSM minimizes the local gradient while traversing the 2 x 2 grid. A co-occurrence matrix is derived on LMP code and Grey level co-occurrence features are derived for efficient image retrieval. This paper is an extension of our previous MMCM approach [54]. Experimental results on popular databases reveal an improvement in retrieval rate than existing methods.