The classification and recognition of the coke optical texture is one of the key elements to determine the quality and guide the production of cokes. Since the traditional methods are not so ideal in the spatial and frequency domains, a novel algorithm is proposed in this paper to bridge the gap. Firstly, the coke micrograph is decomposed by a new contourlet packet (CP) for multi-scale and multi-direction, which introduces a nonsubsampled wavelet transform and a nonsubsampled directional filter banks (NSDFB). Furthermore, an adaptively weighted 2-directonal 2-dimension PCA method is put forward to extract the feature, which not only reduce the data dimensions, but also help to obtain a set of optimal basis in decomposed sub-bands. Finally, the classes of optical texture in coke micrograph are identified according to the knowledge-based similarity measure criteria on eigenvectors of selected basis. The experimental results indicate that the proposed scheme has a higher and more stable recognition rate than the conventional methods.