1. A method of processing data, the method comprising: detecting image data comprising an image of a license plate; localizing a region of the license plate within the image; processing, by a processor, the region of the license plate to determine a set of distortion parameters for the license plate, wherein the processing comprises: determining an optimal threshold, wherein determining the optimal threshold comprises determining a threshold that generates a binary image with a maximized convexity; binarizing the image data based on the optimal threshold to generate a first binarized image; and processing the first binarized image to determine a rotation angle; and applying the set of distortion parameters to the image data to enhance the image of the license plate, wherein applying the set of distortion parameters comprises: rotating the image based on the rotation angle to generate a rotated image; and binarizing the rotated image to generate a second binarized image.