1. A method in an electronic device, the method comprising: extracting a pattern from an image; converting the extracted pattern into a first pattern of a binarized grid type based on a size of the extracted pattern and a size of respective grids; verifying pixel information of the first pattern as a descriptor structure to include a color of a first pixel of a horizontal row or vertical column, a position of a pixel whose color is changed, the number of pixels of the horizontal row or vertical column, and a delimiter; and determining whether the first pattern is identical to an original pattern based on a similar degree between the descriptor structure of the first pattern and descriptor structure of the original pattern.