1. A method comprising: expanding a Maximally Stable Extremal Region (MSER) in an image to obtain a neighborhood associated with the MSER, the neighborhood comprising a plurality of sub-blocks; and thresholding a subset of the plurality of sub-blocks in the neighborhood, the subset comprising sub-blocks with text, wherein each sub-block in the subset is thresholded using a corresponding local threshold associated with the sub-block; and obtaining a thresholded neighborhood.