Similarity Evaluation of 3D Gray Rock Image Using Pattern Density Classification Function