A Study for Selecting the Best Performing Rotation Invariant Patterns in Local Binary/Ternary Patterns